Gossamer Forum
Home : General : Perl Programming :

Perl guru..........please help me with this code!

Quote Reply
Perl guru..........please help me with this code!
Hello all,
I m using newspro version 3.7.5 .
Guys i m using one subroutine which will seperate the news headlines according to date. The following is the subroutine

sub MyStaticLinks1 {
$newshtml = "";
if (&isNewDate) {
$newshtml .= qq~<font size="2" face="arial"><b>$newsdate</b></font>~;
$headdatecount++;
}

if($headdatecount == 1) {
# Current News
$newshtml .= qq~
<font color="#FFFFFF">

<b><img src="http://192.168.56.9/images/dot.gif" border="0"><a href="$baseURL/$fname">$newssubject</a><BR></b>
</font>


~;
} elsif ($headdatecount == 2) {
# Yesterday's or the previous day's news
$newshtml .= qq~
<font color="888888">

<i><img src="http://192.168.56.9/images/arrowmaroon.gif" border="0"><a href="$baseURL/$fname">$newssubject</a><BR></i>
</font>


~;
} else {
# The Rest
$newshtml .= qq~
<font color="#444444">

<img src="http://192.168.56.9/images/arrowmaroon.gif" border="0"><a href="$baseURL/$fname">$newssubject</a><BR>
</font>


~;
}
}

Now the problem that i m facing is that whenever i built the news and the subroutine is run, it makes all the headlines point to the same news story (all get linked to one file and not to thier respective news story).
Can anybody tell me how can i edit the subroutine to point all the headlines to thier respective news stories.

I m really sorry for my bad english as its is not my first language

Thanks in advance
San Trino


Quote Reply
Re: Perl guru..........please help me with this code! In reply to
You should probobly post this at the NewsPro Forum

http://www.amphibianweb.com/newspro/forum/forum.cgi

- Mark


Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Perl guru..........please help me with this code! In reply to
Hey Astroboy.......i have posted this on that forum but not recieved any replies. The forum seems to be dead.
Somebody please help me

San


Quote Reply
Re: Perl guru..........please help me with this code! In reply to
HUH?

You only posted your question at their forum a few hours before this one - learn to be patient!!!

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/