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

Grand_Total variable not workin....

Quote Reply
Grand_Total variable not workin....
my grand_total variable is not registering in my web pages, all other variables appear to work, i am pretty sure everything is set up properly in site_templates.... and the necessary files... and in my html it is as follows: <%grand_total%> could you make a suggestion as to where i could be wrong?

Thank You , also I will tell you what i found out, about the AOL and LWP....

------------------
lyricsearch99
Quote Reply
Re: Grand_Total variable not workin.... In reply to
I fixed the problem i believe it was an error on my part, i had a second copy of site_html templates and i re uploaded it and it came out fine. but now i have another problem...

on my whats hot(whats cool)i changed the variable to make it 10 percent so in that case i have 337 lyrics online, it will list approx 33 lyrics? is there a way to make it where the script only displays 10 or so no matter what your total number increases to?

------------------
lyricsearch99
Quote Reply
Re: Grand_Total variable not workin.... In reply to
Ok a slight problem again, with the grand total variable, i kinda fixed it now where it shows up on all of the static html pages, but when i call the variable from search.cgi it doesnt work...its like this :

menu
----
home g-total works
whats new g-total works
whats cool g-total works
ratings g-total works
search page(search.cgi) g-total doesnt work

any suggestions would be appreciated.

------------------
lyricsearch99
Quote Reply
Re: Grand_Total variable not workin.... In reply to
In the unmodified version of Links, the grand_total variable is only available for the Home, New, Cool, Detail, and Category pages. It is not available on the search or other cgi generated pages. You can make it available, though, by adding it to the list of variables that load the templates for those pages. See sub site_html_home in site_html_templates.pl on how to specify it.

As an alternative, you can add it to the %globals variable list at the top of site_html_template.pl and then remove it from all the subroutines in that script. That way, you only have it in one place and any template loaded by site_html_templates.pl can use it since all the subroutines include the %globals variable in the list of variables usable by templates.

To make your hot/cool page only list the top ten most visited sites, change the $db_popular_cutoff variable in links.cfg from 0.10 to 10, just like the instructions for it say to do.

I hope this helps.

[This message has been edited by Bobsie (edited April 03, 1999).]