Gossamer Forum
Quote Reply
days old question
How can I change how many days the graphics show up.
Quote Reply
Re: [rayhne] days old question In reply to
Here's a little series of questions about this one...

When I go to modify a site via the Modify a Site form, the new graphic is broken. Can that be fixed?

How can I change which new graphic shows up when and for how long?

Can I turn the updated and the pop into graphics and how?

Anyone got any popular graphics? Smile
Quote Reply
Re: [rayhne] days old question In reply to
This has to go back to how links "builds" the database, and resets the flags.

You need to "repair tables" on a regular basis if you do not use the static-build features. The flags "new" and "updated" have to get reset, and some other things happen as well. "Repair Tables" does what a build does (and a bit more) but doesn't build any pages.

I've offered several "fixes" over the past few months for the Days_Old quirks, and maybe Alex will incorporate them into the next Links version, since this seems to be a much requested, and desired feature.




PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] days old question In reply to
I don't see anything for updating...just for the new.
Quote Reply
Re: [rayhne] days old question In reply to
I'm a little confused concerning these mods...before I purchased Links SQl, I had asked about what mods were included and got this response from Alex:

Q. What mods are available for Links SQL?
A. Several of the popular Links 2.0 mods are built into Links SQL. These include:

Enhanced Template - you can use if, ifnot, if var eq value, if var > value, etc inside your template tags.
Keyword Tracker - any searches people do are logged to the database so the admin can view them later.
Links 2.0 Non English Modifications - Links SQL will work out of the box with GB or Big5 encoding or any special characters.
3 Level of New graphics - you can display different graphics depending on the number of days old your link is, as well as display an Update graphic if your link has been modified recently.
Altavista style span page - instead of just displaying next and prev, you can display Pages: 1 2 3 4 >>.
Bad links summary report - you can easily see a links history to gauge how often a link has returned 404 and whether it should be deleted or not.

But I couldn't find most of the mods as being already installed and could only download and install them. There isn't alot in the way of instruction with them.
Quote Reply
Re: [rayhne] days old question In reply to
Hi,

I'm confused too.

Thos mods are either available as plugins, or included in the base configuration if you set it up.

There is new documentation to show how it's done.

The days_old plug in had some problems, because people are using dynamic mode more now. If you use static builds, there shouldn't be any problem with days_old.

If you are using dynamic pages, look for my "fixes" and use them. I always explain how to install them, but I don't keep the thread numbers. I haven't had time to gather them all into one place yet. I'm still hoping to do that.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] days old question In reply to
I always use static...that's the major reason I got Links SQL...:)

I'm still looking Links SQL over so I may just be missing some things. On the other hand, how do you change which graphic is used and for how long? And where's the documentation?

Last edited by:

rayhne: Oct 12, 2001, 12:12 PM
Quote Reply
Re: [rayhne] days old question In reply to
Hi,

The graphics are included in the link.html based on the parameter of "Days_Old". Youc an change them by simply editing that file.

People have chosen to do it differently, but the easiest, is to simply use:

<IMG SRC=http://path/to/images/directory/<%Days_Old%>.gif>


Then, if Days_Old is equal to 1, 1.gif is used, if it's equal to 2, 2.gif is used. I've actually used /new_<%Days_Old%>.gif, so that my images are new_1.gif, new_2.gif, etc

By wrapping this with an <%if%> as I suggested previously, if Days_Old is too large, or doesn't exist, you simply bypass the IMG tag completely, so image is shown.







PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] days old question In reply to
I'm a bit confused here...

How often does the graphic change? I mean, I switched the days_old number to 30 and noticed that when I first put a site up the graphic was red then blue then green but I have no idea how long each graphic is up.
Quote Reply
Re: [rayhne] days old question In reply to
The plugin, if you are talking about it, only has 14 graphics. You'd need to
adujust/rename more files if you want to do it differently.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] days old question In reply to
Okay...let's try this....

I would like one graphic to come up for the first 10 days, another for the next 10 and a third for the last ten. Can I do that and how?

Right now, I can't figure out which graphic is coming up and for how long.


Last edited by:

rayhne: Oct 18, 2001, 10:56 AM
Quote Reply
Re: [rayhne] days old question In reply to
Well, if Days_Old is returning a value from 0 to 30, then what you'd want to do is create 3 graphics new_10.gif, new_20.gif and new_30.gif (or something like that).

Then, you'd do something like:

<%if Days_Old < 11%>
<img src=http://path..../new_10.gif>
<%elsif Days_Old < 21%>
<img src=http://path..../new_20.gif>
<%else%>
<img src=http://path..../new_30.gif>
<%endif%>

That way, you'd show one of 3 graphics, depending on the age of the graphic.

I don't personally like this way, since it hard codes this into the the routines.

I would much prefer to create a set of 30 different graphics, and call them using the previous convention. The reason -- I could have different graphic sets, by changing the graphics, but keep the same template, even if I switch from 30 days, to 14 days or even 7 days "old".

That's just personal. I'm sure I'm in the minority on that one, but it makes more sense to me, really :)








PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [rayhne] days old question In reply to
While I was testing this feature, I found it helpful to use text instead of images, like this
Code:
<%if isNew%>
&nbsp; [<%Days_Old%> days]
<%endif%>

You can see immediately whether it works correctly. Revert to the images when you are sure it is OK.


Quote Reply
Re: [pugdog] days old question In reply to
I think I got this (the way you do it)...in other words, I'd take 3 graphics and make 10 copies of each. Name the first batch new_00 thru new_09, the next batch new_10 thru new_19, etc and just make sure that the new cutoff is at thirty. Is that it?
Quote Reply
Re: [rayhne] days old question In reply to
Yes, but don't use 01, 02, just use 1, 2, etc, since the Days_Old value is an integer, and won't have a leading zero.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.