Gossamer Forum
Home : Products : Links 2.0 : Customization :

List all links?

Quote Reply
List all links?
I'm thinking about using Links as a addressbook that people can submit their e-mail address as a "link". I'm not quite sure how to go about a few things:

1) Where do I need to make changes to the script to add/remove fields in the database? I'm sure it's in multiple areas, but I'm not quite sure which files and subs.

2) After I get it all working, I'd like to be able to list all entrys alphabetically somehow. I figure I'll have it broken down into "categories" of United_States
United_States/State_01/
United_States/State_02/
United_States/State_03 ...etc...

Or perhaps just the letters of the alphabet. Is it possible to output the entire list of entries? Perhaps somehow a search for a blank or something? Hmmmm.

Vincent
www.tailsout.com/ (Click "Product Links")
Quote Reply
Re: [Dead Air] List all links? In reply to
I would be good for listing them all period myself. Sly How can this be done?
Quote Reply
Re: [Dead Air] List all links? In reply to
I did something like this at
http://www.happytogether.com/318ti/registry
Instead of urls I have email addresses.

Originally instead of http:// for the URL, I used mailto:.
This worked but I did not like having the URL and Contact Email be the same. In my case the Title and Contact Name was also the same.

I ended up just using Contact Email and Contact Name.
I still use URL but differently. I also added an extra field.

When people want to modify their entry they enter their email address on record. It's not the best system, but it works.

It is very possible to do what you want.
With lots of help from this forum I was able to accomplish what I wanted. Take a look at this thread.

I commented out things I did not need.
Changed some fieldnames to suit my purposes.

...steven
...steven
MINI Links
BMW 318ti Registry
Quote Reply
Re: [steven1214] List all links? In reply to
People keep asking for this. I've been asking for it for years (literally!)

It looks like the links tree mod could easily be hacked to do this, if you're more familiar with CGI than I am. I tried, but I'm just not at that level yet, since you'd have to change things like some of the sort routines.

Still, the links tree is a nice compact mod, does all it's work directly from the nph-build.cgi script, and already does pretty much the same thing. If only somebody would release a version that doesn't break it into category but just shows all of the links in alphabetical order. It seems like that would actually be easier than breaking it up by categories, but if it's so easy then why can't I figure out how to hack the code to do it? :)
Quote Reply
Re: [Dead Air] List all links? In reply to
Can I ask why you would want to list every entry on one page? It seems a little pointless using a script that divides the entries into separate pages if you don't actually want that.

It sounds a particularly bad idea if the links are email addresses, as the email address harvesters (for spam mail) would have a field day.

If you as admin of the site want to see them for your own use, then just use "list all" when doing a search in the admin area.

You could modify the script to create a public page like that, but it wouldn't be very useful once the directory grew to more than a hundred links or so. It would have to be a static HTML page, as creating a large list dynamically would likely time out before it was all displayed.

I believe someone has already given instructions in a recent thread if you still want to go ahead, but if you do, at least make sure that the email addresses are only accessible via jump.cgi rather than "hard coded" in the page.
Quote Reply
Re: [wysardry] List all links? In reply to
I have to agree with the post above, it does seem a bit pointless trying to use links 2.0 to do this feature.

I would try using dbman or some other database tool.

Stu2000

- Top 100 forums / GT Links 2.0 websites -
Quote Reply
Re: [wysardry] List all links? In reply to
> Can I ask why you would want to list every entry on one page?

Well not that it matters, but here's why: I'm using Links to create an online bookstore. I currently list 500 books. I want to be able to look at a list of books and compare it to the books I currently offer. Yes, I can use the search function, and do one at a time. By having an up to date list, I can check them all quickly.

This listing is only for my in house use. I'm using the functionality to create the remaining site html.

So, now that you know why, anyone care to take this on? Seems fairly do-able. Replace the function that sorts and prints out the categories in links tree with one that sorts links by title, and you've got what I'm looking for.
Quote Reply
Re: [wysardry] List all links? In reply to
> I believe someone has already given instructions in a recent thread

Well I can't find them, even though I've searched for quite some time. Tried "tree" and "all links" and a bunch of other search terms.

btw, I just noticed you comment about e-mails. I don't list any e-mails on my site. The page I have in mind will be 500 lines long, each a book title. No description, nothing but a title linked to that book's page.
Quote Reply
Re: [Bob Harbison] List all links? In reply to
The thread I was talking about was directly below this one until I submitted this reply. Here's a direct link to it

The reason I asked why you and the Dead Air wanted all links on one page is that there are plenty of other scripts that do that instead of in categories. I wanted to clarify if one of those wouldn't have been more suitable.

If this is just for your own use, it might be worth looking at the code that controls how many links are shown per page when you click on "view links" then "list all" in the admin area.

The email comment was directed at the original poster (notice how his/her username was in brackets?)
Quote Reply
Re: [Bob Harbison] List all links? In reply to
here is a link that changes the build_sorthit subroutine

http://www.gossamer-threads.com/...=sort%20title;#31066

not sure if that is what your are looking for or not.


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."

Last edited by:

esm: Jan 22, 2003, 8:04 PM