Gossamer Forum
Home : Products : Links 2.0 : Customization :

Push Technology

Quote Reply
Push Technology
Hi All.

Well, my script is up and running!!
I've got a couple of guys working on adding about 2000+ links. (hopefully links will handle the build correctly!)

Well, my question is this:

My local newspaper has agreed to work with me to add their daily headlines to my site.

I just want to know what everybody feels is the best method to accomplish this.

Now, I have full cgi, ssi, and such. So that won't be a problem. But I have this strange feeling inside that none of that is going to do a rats turd for me....

So, anybody got suggestions on how to accomplish this? I pretty well taught the guys at my local newspaper html a few years back... so they owe me... they've pretty much agreed that whatever I come up with, they'll do. (short of actually editing my frontal page every day!)

Any suggestions I'm totally open for!
Quote Reply
Re: Push Technology In reply to
Opps...I meant www.freecode.com .

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Push Technology In reply to
Use LWP to grab the headline news and links from their page. There are some decent scripts like getnews.cgi (referenced and linked at www.freecodes.com).

All you have to do is re-write the script so it matches the syntax of the page where the headline news links are located.

Then you can use SSI calls to show the headline news on your LINK generated pages.

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Push Technology In reply to
Hi Elliot!

Quote:
www.freecodes.com

The site ones comes to say this address is not in use at the moment.





------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory




Quote Reply
Re: Push Technology In reply to
Thanks Elliot!

Now to see if I can get it working and find a Christian News supplier that let me do this.

------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory




Quote Reply
Re: Push Technology In reply to
You're welcome.

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Push Technology In reply to
i went to the page you mentioned but i was unable to find the news script
Quote Reply
Re: Push Technology In reply to
they are really easy to make..

Code:
#!/usr/local/bin/perl

use LWP::Simple;

$news = get qq!http://www.news.com/!;

print "Content-type: text/plain\n\n";
while ($news =~ m#<a href="([^"]+)">([^<]+)</a>#sog) {
($url, $title) = ($1, $2);
print "$url - $title";
}

the bolded part varies for every site..

jerry
Quote Reply
Re: Push Technology In reply to
oh yea.. yokahhan..

using LWP and stealing is the lamest way to do this if you actually got them to agree to do it with you..

i suggest you either get them to upload a database of news headlines to your site.. or ask them to put it in a protected area on their site and use LWP to fetch the database.. insteawd of using LWP::Simple you can use LWP::UserAgent which allows you to have a username and password to a page that requires it. you then can easily "download" the database and display it onto your site..

the things you have to make clear with the news people is..

which setup you're doing.. (your site or their site)
the fields of the database.. (must remain the same throughout)..
and how often your database will be updated..

if they want to put the data on their site.. then you'd have to setup a CRON job to download the data every x minutes or hours.. having them update the database on your site is the easiest though.. if you have MySQL and have remote access.. that is the easiest.. you can make a new username and password to a table and allow them to add/modify/delete the news items from a Windows based GUI or a web page..

jerry
Quote Reply
Re: Push Technology In reply to
Jerry, man you've hit it on the head!

They did agree to do such a thing. I just don't know how.

They stated they would be willing to provide the following information once a day. (which is all they update their website)


Name of Article:
URL of Article:
Brief Description of Article. (1-2 sentences)

Bascially, they stated the best thing to do is to create page with the above fields on it. Then they will simply cut-n-paste their information into the fields.

From there, though, it's up to me and my end of things. Which I don't know how to do. I've been doing web desig for 5+ years. But never touched anything like this before. Don't even have a concept of how it'll work.

But, what you stated is just about exactly what I'd like to do!!

Any suggestions how to implement it?
Know anybody that would for me? (if it's tricky?)

Well, Jerry, thanks a bunch... I was just looking at the other suggestion... the 'getnews.cgi'... wasn't looking forward to that one!

JbA
Quote Reply
Re: Push Technology In reply to
I'm not sure if this would be something you could use, but what I have written before is a script to write certain pages for me, do all the formatting as contained in the code (would need to be edited for your purpose). It gives an online form to fill out, with title, author, and the text, then which file name you want (you could remove that and use a default). Of course, this is a "dangerous" script that needs to be htaccess protected, otherwise anyone who finds it can write or re-write any page in the directory this is set up for...
Quote Reply
Re: Push Technology In reply to
Hi, would I end up having to use a whole new template? Or is/could it be written to use ssi and place it into my existing page?

It sounds somewhat like the method we're trying to accomplish here.

Hmm.. sound interresting. Can you send more info/details about it?

What about the rest of you? Think this would be a good method?

Personally, I'm up for whatever is easiest. For both me setting it up, and them doing their daily updates!

Later.



------------------
John B. Abela
Owner, 4CM
www.4cm.com/
support@4cm.com

Presently working on:
www.humbee.com/
Quote Reply
Re: Push Technology In reply to
Jerry,

You stated:

---
if you have MySQL and have remote access.. that is the easiest.. you can make a new username and password to a table and allow them to add/modify/delete the news items from a Windows based GUI or a web page..
---

hey, that would be sweet, but I don't think.. well. I'm pretty sure my server doesn't have MySQL. They are running a Unix based server. (could they add it to a *nix server?)

Again, this is all new stuff for me.


I am leaving town tomorrow at around 1100.
(actually leaving the state, for business)
So, if anyone response and I don't reply... please don't get mad! I'll be gone until the 23rd. Home for 4 days, then on the road again. (business is picking up!)

Later all.
Thanks for all the help/suggestions/corrections you'all have provided!


------------------
John B. Abela
Owner, 4CM
www.4cm.com/
support@4cm.com

Presently working on:
www.humbee.com/
Quote Reply
Re: Push Technology In reply to
Hi Yokhannan,
It could be converted to do anything you want to - write the HTML code with SSI calls, I had it written for a mirror of my site in a different language, to easily enter the text from e-mailed translations via copy and paste into an online form, and had it via a drop down menu select the section of my site it was for, then you had to manually enter the filename for the html file, and enter the title and author in the form. I even included an update function for my "What's New" page that it would automatically re-write. It would need to be modified for your own purposes, the question would be, are you familiar with CGI/Perl programming? I don't have the script ready for public release at this time, as it is adjusted to my needs. Since I searched for something like this also on cgiresources.com and found nothing quite that fit my purpose, I decided to write it myself. The next step would be to make a release version with detailed instructions on how to adjust it for the user.
Quote Reply
Re: Push Technology In reply to
P.S.: It could also be set up to use simply a "top.html" and "bottom.html" with your html code for the beginning and end of the page you want to be modified with the script.
Quote Reply
Re: Push Technology In reply to
Greetings All!

Here is one for you all !

What is and is it possible to use this given method to call their news.

Quote:
we do provide an RSS file



------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory




Quote Reply
Re: Push Technology In reply to
Hi all.


Well, I have finally accomplished what I was after!!

What I was after (as a reminder) was/is to allow a local newspaper to add their latest news into my web site.

Now, I knew that SSI would have to be included in there somewhere. (as we all know that [iframe] pretty much sucks!

So, after trying a few of the options listed above (especially the getNews.cgi script), I finally came across something today that has worked!!

It only took me about 30 minutes to make the change I need to fit my site.

Just 'cause I want to help everyone out... I'll post everything I can think of, that I did, to help those of you out, who wanted the same thing.

Download [NewsAdmin v0.3beta] from:
http://www.stefan-pettersson.nu/scripts/

Unzip the sucker.

Follow the standard cgi settings like perl path and such within the file [newsadmin.cgi]. (I renamed .pl to .cgi)

Open up the [newsadmin_settings.pl] file.
Make your changed in there to.

(don't forget to chmod the directy you place the .(s)html files in to: 777)

Now, if you want things it to look like they do on my site http://www.humbee.com/ the do the following:

Open [newsitem-template.html] and delete everything, then replace it with:

Code:
<font face="Verdana,Tahoma,Arial" size="1" color="black">
<a href="[%NA-EMAIL]" target="_blank"><B>[%NA-HEADLINE]</B></a> - [%NA-TIMESTAMP]<BR>
[%NA-TEXT] - [<a href="[%NA-EMAIL]" target="_blank">Full Story</a>]
</font><BR>

Open the [newsadmin.cgi] file and go to the [sub PrintInputPage] section.

Replace line numbers 291 & 292 with:

Code:
<td></td>
<td><input type="hidden" value="Full Story" name="author" size=20 value="$cookie{"$ENV{'SCRIPT_NAME'}_AUTHOR"}"></td>

Change line 299 with the text [Headline]

Change line 351 with your sites name

Change line 354 with your own [body] commands

Change line 225 with http://www.4cm.com/
support@4cm.com

Presently working on:
www.humbee.com/
Quote Reply
Re: Push Technology In reply to
Ian, I'm using a Christian news script:

http://www.lifelinenews.com

They have 3 or 4 different versions and easily customizable.
Quote Reply
Re: Push Technology In reply to
Hi.

That should have been: http://www.lifelinenews.net/ Smile

JbA

------------------
John B. Abela
Owner, 4CM
www.4cm.com/
support@4cm.com

Presently working on:
www.humbee.com/
Quote Reply
Re: Push Technology In reply to
Greetings All!

Please note that the new LifeLine News 2000 site is being uploaded all this week (12/27-12/31) and will include a completely new set of news co-branding programs as well as branding programs for portal sites.

If you decide to use LifeLine News co-branding, it will be worth your while to wait until Monday, January 3rd and download the new versions.

If you are already a LifeLine News Partner, that info will be sent to you by email this week.

Cheers!

D. Mark Fincannon
partners@lifelinenews.net

http://www.lifelinenews.net

-
Quote Reply
Re: Push Technology In reply to
Thats cool. I'll go get the new ones.
Quote Reply
Re: Push Technology In reply to
Ian, in regards to the question you asked

Code:
What is and is it possible to use this given method to call their news: [we do provide an RSS file]

Start here:
http://my.netscape.com/...formats/rss-0.91.dtd

Then, if you want to... just follow along the recommended links on that page.

As for using it for 'push technology'... I don't think so Smile

JbA

------------------
John B. Abela
Owner, 4CM
www.4cm.com/
support@4cm.com

Presently working on:
www.humbee.com/