Gossamer Forum
Home : Products : Links 2.0 : Customization :

Integrating a news program

Quote Reply
Integrating a news program
I'm not a perl programmer, but I am slowly learning. I am building a portal type deal for a LUG I am creating. I have the Links program setup and a few other things. I downloaded a news program wich is perfect for what I need. The only problem is it dynamically creates all output. I want to inluce the output of this script, with certan parameters passed to it, and place the output into links.
I can set it up so it only outputs the html that I need. I have seen where I can include files and have sucessfully done so to maintain one copy of the menu that I only have to update once. I cannot figure out how to tell links to take the output from this script and place it on the page.

If anyone has any suggestions I would love them. Thaks to anyone that helps in advance
Quote Reply
Re: Integrating a news program In reply to
Have the news cgi script output the data to a file rather than dynamically and then just *include* the file in Links.

Something like:
Code:
# Write the news to a file.
open(NEWSFILE,">$filename")
print NEWSFILE qq~
- Your HTML here -
~; #end of HTML
close(FILE);

Then use the include mod to include that file in Links.

Hope that helps.
Quote Reply
Re: Integrating a news program In reply to
Where does one find a script similar to the one described above? I would be interested in adding/updating news content to my main page.
Quote Reply
Re: Integrating a news program In reply to
Andrew,

Check out this page for a bunch of New Updating scripts.

http://cgi.resourceindex.com/...pts/Perl/What's_New/

Whenever you need to find a CGI script, go to CGI Resources.
Quote Reply
Re: Integrating a news program In reply to
Thanks to all for the help and interest. I hacked the perl script for the news. Which was a feat considering I'm NOT a perl programmer yet. If anyone cares to see the result goto http://www.madlinux.cx/lolug/ and check it out. It is the beginning of a portal for a Linux Users Group I'm starting. I don't think its back for a few hours of work in one night.

Lorance Stinson
Quote Reply
Re: Integrating a news program In reply to
Use SSI! That's server-side includes, which means dynamically created pages. Of course, your server must support SSI (ask your provider).

Search in the forums for more information about using SSI.

John
Quote Reply
Re: Integrating a news program In reply to
I integrated NewsPro into Links... it now builds when I click build all.. and it basically writes the articles to a txt file and when you build it.. it reads the text file and writes it on the page..

I find it to be really good and it supports multiple news posters.. which is good if you have staff Smile

Not sure about the URL of newspro.. but you can find it at

http://www.cgi-resources.com/ under Programs and Scripts/Perl/What's New

Jerry
Quote Reply
Re: Integrating a news program In reply to
Hi

I have used DBMan for news at this site: http://www.lizdavies.org/ , there is also Links running on this site.

It supports multiple users, categories and is all searchable. It displays the 4 latest items on the front page. The way it works at the moment uses SSI. It'll work with upto 1Meg of articles - for more the SQL version of DBMan could be used.

I'm going to sort out the code a bit and stick it up on Alex's resources bit of this site. However I'm dead busy at the moment so it might be a week or two.

Chris
Quote Reply
Re: Integrating a news program In reply to
Hi people

The complete URL of News pro is http://amphibian.hypermart.net/newspro/

HappyHippo