Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

3 Levels of New Graphic

Quote Reply
3 Levels of New Graphic
Could anyone here provide step by step instructions (or point me to the instructions, if they exist) on how to implement the 3 levels of new graphics and update graphic in Links SQL 1.11?

Just so you know I tried to help myself, I found the following docs in the FAQ:

http://www.postcards.com/FAQ/LinkSQL/Detailed/6.html

http://www.postcards.com/FAQ/LinkSQL/Detailed/2.html

But I'm still unclear on what code actually needs to be added/modified in order to have a graphic representation of 3 levels of new plus update, etc.

I don't feel comfortable playing around with code unless I know exactly what I'm doing. So instructions always help.

I've looked at templates/links.html as well as templates/subcategory.html, but was left rather clueless.

Thanks very much for your help.
Quote Reply
Re: 3 Levels of New Graphic In reply to
Look in the HTML_Templates.pm file for Days_Old

There are several lines you need to uncomment.

Then, you need to alter the links.html and subcategory.html files.

Check the FAQ for how to do it, this was discussed around September, then again in December, or there abouts.


------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/









Quote Reply
Re: 3 Levels of New Graphic In reply to
I just re-checked the FAQ.

The following FAQ link applies to pre 1.11:

http://www.postcards.com/FAQ/LinkSQL/Detailed/2.html

The next FAQ link applies to all versions, but doesn't clearly (at least for the coding inept) give steps on what needs to be changed/modified:

http://www.postcards.com/FAQ/LinkSQL/Detailed/6.html

I was just hoping there was a more definitive source for the answer to this question.

My Links.pm file (for 1.11) has this:

# Use Days_Old? If set to 1, you will be able to use <%Days_Old%> in the
# link.html and subcategory.html to tell you how old the newest link is.
$LINKS{build_days_old} = 1;

Mine is set to 1.

So...

In link.html, I replaced:

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

with:

<%if isNew%>
<img src="/images/new<%DaysOld%>.gif">
<%endif%>

But now my new links have a broken image with these properties:

(http://3d-sites.3dark.com/images/newUnkown%20Tag:%20DaysOld.gif).

I also changed the "if changed" and "if popular" tags to refer to graphics instead of text, but again nothing changed.

As for the subcategory.html file, I know this tag needs to be modified:

<%if Has_New_Links eq 'Yes'%><small><sup class="new">new</sup></small><%endif%>

But I'm not sure how.

Can anyone clearly state exactly which files need to be changed and what those changes are? (ie. "replace this with this, etc").

I'm not looking for someone to do the work for me, I just want to be confident enough about the changes so that I won't screw something up when I do them.

So far, it seems to be narrowed down to:

Links.pm (make sure that tag has an =1)
HTML_Templates.pm
Links.html
subcategory.html
Quote Reply
Re: 3 Levels of New Graphic In reply to
Thanks for the help pugdog. I see that you've helped others on this...

I did a bit more snooping around and discovered the following thread:

http://www.gossamer-threads.com/scripts/forum/resources/Forum9/HTML/000665.html

From that thread I was able to piece together the method for implementing the 3 levels of new. And they appear to be working great now.

Thanks!