Gossamer Forum
Home : Products : Links 2.0 : Customization :

Say Updated when a link is modified

Quote Reply
Say Updated when a link is modified
Right now, I have at my a new listing that says everything that was added :http://www.ceglobe.com/software/New

What I would like to be able to do if have it say updated it instead of added if a link was modified. Is there any way to do this? thanks.

To see what I am doing to make the new page look like it is, go to http://www.ceglobe.com/software/New/new.txt

------------------
Nicholas Clark

Quote Reply
Re: Say Updated when a link is modified In reply to
The date shown is the same regardless if the db entry was added or updated.

Perhaps you could add an additional field to the db (eg. Updated) and have it updated through a hidden value when modify.cgi is run. Then, you could test for the value when the db is built:

if ($Updated) {
$output .= qq| <$font_date><em>(Updated: $rec{'Date'}, Hits: $rec{'Hits'})~;
}
else {
$output .= qq| <$font_date><em>(Added: $rec{'Date'}, Hits: $rec{'Hits'})~;

I dunno, just some rambling thoughts...
Quote Reply
Re: Say Updated when a link is modified In reply to
I use this way for my software-site also:
http://download-tip.de/

The bad thing is to add a new field to an existing links.db If u use the new field also as dropdown or radio, it can't be the last field in your database! I don't know why.

If you have any questions, feel free to ask me if you understand my broken english ;-)
Quote Reply
Re: Say Updated when a link is modified In reply to
eljot, you have made some gorgeous graphics for your page. just thought you would like to know this

------------------
Nicholas Clark

Quote Reply
Re: Say Updated when a link is modified In reply to
Is there a way when building links ages that it will display something nextto the link if it satisfies two conditions?I know how to do one - i.e. - if ($rec{'Updated'} eq "Yes") { $output .= qq| <li><img src="http://www.ceglobe.com/images/hpc.gif" align="absmiddle" alt="Handheld PC"> Updated <b><i>$rec{'Title'} ($rec{'platform'})</i></b> in the </A><b><u><a href="http://www.ceglobe.com/software/$rec{'Category'}#$rec{'Title'}" class="soft">$rec{'Category'}</a></span></b></u> Section</li> |; }

but how would you do two?


------------------
Nicholas Clark

Quote Reply
Re: Say Updated when a link is modified In reply to
I use the following to check if a link is updated, popular or new. The Order of the "if's" is important for my site.

if ($rec{'isNew'} eq "Yes") {$point = "http://Download-TIP.de/images/p_rot.gif"};
if ($rec{'isNew'} eq "No") {$point = "http://Download-TIP.de/images/p_schwarz.gif"};
if ($rec{'isPopular'} eq "Yes") {$point = "http://Download-TIP.de/images/p_gelb.gif"};
if ($rec{'Update'} eq "Yes") {$point ="http://Download-TIP.de/images/p_blau.gif"};
if ($rec{'isNew'} eq "Yes") {$pointalt = "Neues Programm"};
if ($rec{'isPopular'} eq "Yes") {$pointalt = "TOP-Download"};
if ($rec{'Update'} eq "Yes") {$pointalt ="Programm-Update"};
if ($rec{'isNew'} eq "No") {$pointalt = ""};

In my dictionary "gorgeous" is translated as
bad and/or good?

------------------
Quote Reply
Re: Say Updated when a link is modified In reply to
I modify the nph-build.cgi also to change update=yes after the what's new period to update=no

# Check to see if the record is new...
if ($new_records{$fields[$db_cols[0]]}) {
print "\tUpdating record: $fields[$db_cols[0]], marking as new.\n";
$fields[$db_isnew] = "Yes";
}
else {
$fields[$db_isnew] = "No";
$fields[$db_update] = "No";

By

Lothar Jung
Quote Reply
Re: Say Updated when a link is modified In reply to
 
Quote:
The bad thing is to add a new field to an existing links.db If u use the new field also as dropdown or radio, it can't be the last field in your database! I don't know why.

That's a small bug in admin_html.pl. In html_validate_form add just after:

LINE: foreach $line (@lines) {
chomp $line; # ADD THIS LINE

and that should fix it (you need to do it twice, once for validate and once for modify right below).

Cheers,

Alex
Quote Reply
Re: Say Updated when a link is modified In reply to
 
Quote:
In my dictionary "gorgeous" is translated as bad and/or good?

Lothar, see www.m-w.com :

Main Entry: gor·geous
Pronunciation: 'gor-j&s
Function: adjective
Etymology: Middle English gorgayse, from Middle French gorgias elegant, from gorgias wimple, from gorge gorget
Date: 15th century
: splendidly or showily brilliant or magnificent
synonym see SPLENDID
- gor·geous·ly adverb
- gor·geous·ness noun