Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

What's new - changing the look of date tag

Quote Reply
What's new - changing the look of date tag
As you can see at http://www.sirena.dhs.org/links/New/ I break up the What's New pages into
# per day sections...I want to know, where can I configure the date tag (f.e. Cetrtek, 17. junij 1999) to be like the number of new links (green background). I tryed to do this at links.css but withought success... Frown

Can you help me, please?
Quote Reply
Re: What's new - changing the look of date tag In reply to
Hallo!!
On this site [urlhttp://www.slowwwenia.com/novosti/default.asp[/url] is the result of the date tag which I want to have in my page...I want to have it backgrounded (colour).

Please, Bobsie, help me! I really do not know where to change this settings!
Quote Reply
Re: What's new - changing the look of date tag In reply to
The date on that page you referenced is enclosed in a <table><tr<td> </td></tr></table> and uses a background color as a parameter for the <td> cell. This is just normal HTML code.

Look at the source code for that page and you will see how it was done.

I hope this helps.

[This message has been edited by Bobsie (edited June 18, 1999).]
Quote Reply
Re: What's new - changing the look of date tag In reply to
I understand.
In file new.html i have:

<p><strong class="title"> <A HREF="<%build_root_url%>/">Domov</A>: Novo</strong></p>
<h2><%total%> novih povezav:</h2>
<%link_results%>
<h2>Novo na SIRENI:</h2>

The tag <%link_results%> has inide data about:
1. Date
2. Link title
3. Link description
4. Date, ratings ecc.

What should I put in the place to have only date, site title and description?
Something like <%link_title%>, <%link_description%> or what?
I think this is the right question!

Thanks in advance!
Quote Reply
Re: What's new - changing the look of date tag In reply to
You are in the wrong place. The template file, new.html, only displays the links as created by sub build_new_page of nph-build.cgi. So, to adjust the way the links will look on the new pages, you need to edit that routine.

The problem you run into in the build_new_page subroutine is this line:

Quote:
${$link_output{$tmp{'Date'}}}{$category} .= &site_html_link (%tmp) . "\n";

As written, it uses sub site_html_link (located in site_html_templates.pl) to build the link and is the same routine used to build the links on the other pages. So, if you make any changes, the changes are going to show up everywhere. To overcome this, you can create a duplicate of sub site_html_link in site_html_templates.pl but rename it to sub site_html_new_link. You would then do the editing in there. Then change the &site_html_link in sub build_new_page that I mentioned above to &site_html_new_link.

Also, since no date is actually displayed on the new pages that contain the links, you are going to need to modify sub build_new_link in nph-build.cgi to put one in. I would do that right after the line that reads:

Quote:
print qq|\tNew Links for $date: $total\n|;

You would just add a line there that says something like:

Quote:
print NEW qq|<table><tr><td bgcolor="ColorOfYourChoice">$date</td></tr></table><p>|;

I hope this helps.