Gossamer Forum
Home : Products : Links 2.0 : Customization :

Moving the "New" table from where it is to begining of line ?

Quote Reply
Moving the "New" table from where it is to begining of line ?
Hi,
I wish to move the "New" little table from where it is to the begining of the line, just after the <li> and just before the title/url of my new links.

An example of modified the code is more than welcome.

Thanks,
Paul

[This message has been edited by Paul (edited July 04, 1999).]
Quote Reply
Re: Moving the "New" table from where it is to begining of line ? In reply to
Hi Paul,

I am assuming you are referring to your new links on your category pages? If so you need to edit link.html

All you have to do is move this code to the beginning of the line (after the <li>

<%if isNew%><small><sup class="new">new</sup></small>

So that the new link appears at the beginning

Hope this helps
Quote Reply
Re: Moving the "New" table from where it is to begining of line ? In reply to
Paul,

on second thought. Do not do that. It seemed like that was working for me, but it also seemed to cause other problems. I just noticed when I tried adding some more links, that they were not showing up on the category pages after I made that change. This is the only change I could think of that was causing the problem It is the only thing I had modified Frown

I will have to look into this some more, because I am trying to do the same thing
Quote Reply
Re: Moving the "New" table from where it is to begining of line ? In reply to
Paul,

on second thought. Do not do that. It seemed like that was working for me, but it also seemed to cause other problems. I just noticed when I tried adding some more links, that they were not showing up on the category pages after I made that change. This is the only change I could think of that was causing the problem It is the only thing I had modified Frown

I will have to look into this some more, because I am trying to do the same thing
Quote Reply
Re: Moving the "New" table from where it is to begining of line ? In reply to
ooopps sorry about the double post.I hit the back button and refreshed...*sigh*
Quote Reply
Re: Moving the "New" table from where it is to begining of line ? In reply to
Unless you have the new nested if's mod installed in Template.pm, the <%if isNew%> needs to go on a line by itself and also needs an <%endif%> on a line by itself. If the nested if's mod is installed, then it just needs an <%endif%> at the end of the line.

I hope this helps.
Quote Reply
Re: Moving the "New" table from where it is to begining of line ? In reply to
So, is there a solution ?

I tried to put the line:

Code:
if ($rec{'isNew'} eq "Yes") { $output .= qq~ <small><sup class="new">new</sup></small>~; }

before the title line, but it didn't worked.
(I use the original links 2.0 files)

Thanks,
Paul
Quote Reply
Re: Moving the "New" table from where it is to begining of line ? In reply to
If using templates, change link.html to say:

Code:
<ul><li>
<%if isNew%>
<small><sup class="new">new</sup></small>
<%endif%>
<a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>

If not using templates, change site_html.pl, sub site_html_link to read:

Code:
my (%rec) = @_;
$output = qq~<ul><li>~;
if ($rec{'isNew'} eq "Yes") {
$output .= qq~ <small><sup class="new">new</sup></small>~; }

$build_detailed ?
($output .= qq~<a class="link" href="$build_detail_url/$rec{$db_key}$build_extension">$rec{'Title'}</a>~) :
($output .= qq~<a class="link" href="$build_jump_url?$db_key=$rec{$db_key}">$rec{'Title'}</a>~);

if ($rec{'Description'}) { $output .= qq~ <span class="descript">- $rec{'Description'}</span>\n~; }
if ($rec{'isPopular'} eq "Yes") { $output .= qq~ <small><sup class="pop">pop</sup></small>~; }

$output .= qq~ <small class="date">(Added: $rec{'Date'} Hits: $rec{'Hits'} Rating: $rec{'Rating'} Votes: $rec{'Votes'}) <a href="$build_rate_url?ID=$rec{'ID'}">Rate It</a></small>
</ul>
~;

return $output;

I hope this helps.

[This message has been edited by Bobsie (edited July 06, 1999).]