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

List all links on one page

Quote Reply
List all links on one page
I would like to automatically generate an alphabetical list of all the links in the database... on one page.

Also, there should be a bookmark for each letter (e.g. A B C ...) for easy navigation.

Are these modifications too complicated?
Quote Reply
Re: List all links on one page In reply to
You might need to do it manually, then save the page.

Check out the "letter.cgi" mod that was talked about awhile ago.

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








Quote Reply
Re: List all links on one page In reply to
Hi Andrei,

your idea sounds interesting I’ve tried the
same idea a while back, but couldn’t get it
to work. I’ve problems adjusting the SQL
part of the letter.cgi as far as I can understand
the following is setting what field of the database
to look in:
SELECT * FROM Links
WHERE Title LIKE '$letter%'
ORDER BY Hits Desc
LIMIT 300!;

But if I change Title to Category nothing good
happens. Can you tell me what I should change?

Further more I don’t understand what you’re saying
about the manual saving the page. Do it have to do this
every time somebody change the category?
Quote Reply
Re: List all links on one page In reply to
I've got some minor crises brewing here... but in short, what I meant about manually saving the page is to have a CGI program or call do this query, and build the page outside of the Links nph-build.cgi (you could probably stick it in there too...)

Rather than have the page built each time the query is made, make it a static page. It will be a _BIG_ page, and probably crash most people's browsers, but there is no reason why your server has to do the work each time as well! Smile

I'll do my best to post a working, if not elegant, solution to this later this evening, since this has a very valid admin use, and should be able to be put as a menu option on the Admin screen.

Don't look for it before tomorrow morning at the earliest! But it seems to be a very good 1 or 2 hour project to take my mind off of other things that have been going on.

It _won't_ be elegant, but it should give you a good jumping off point -- or someone else -- or maybe even me later -- to make it template based and less rigid.

Remember, to make anything template based, just look at the search.cgi or add.cgi scripts to see what is necessary to be included, and passed to &load_template. You don't need to do a lot of work (I think I explained this in January some time.)

It's really the beauty of using SQL, DBSQL.pm and the ancillary modules to format the query and print the output.

You don't have to do a lot of work -- just make a few calls. Most of the work is checking your input and testing to see what you have before printing the template out.





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








Quote Reply
Re: List all links on one page In reply to
It sounds great Pugdog, thanks.
Quote Reply
Re: List all links on one page In reply to
I got a little sidetracked....

Should have something workable -- maybe even slightly elegant -- shortly.

Quote Reply
Re: List all links on one page In reply to
Hi Pugdog,

just wanted to hear how it's
going. Problems?

Looking forward to hearing from you.