Gossamer Forum
Home : Products : Gossamer Links : Discussions :

List all links by user on separate page

Quote Reply
List all links by user on separate page
The site I am developing at the moment will potentially have a lot of links submitted by each user i.e. 100+. It is set up in dynamic mode with mod_rewrite to rewrite URLs.

Is there an easy way to list all of a user's links in the same way you can list all their reviews e.g. /cgi-bin/review.cgi?username=xxxx? I have found a few globals that can select user's links etc. but I haven't been able to find much on creating a new template that would be able to handle this.

I don't have a great understanding of the dynamic page URLs and what values can be passed within them, so I thought there may be existing functionality to list a user's links within the existing Links framework.
Quote Reply
Re: [aus_dave] List all links by user on separate page In reply to
I have figured this out so I thought I would update this thread in case it helps anyone in future.

I created a new template called member.html. Using page.cgi I can pass a member variable in the URL and use that in Andy's global from this thread.

So I end up with a user's links listed on a separate page with a URL like this:

Quote:
http://www.domain.com/cgi-bin/page.cgi?p=member&member=Dave

Using mod_rewrite rules I also changed the URLs to look like static pages.
Quote Reply
Re: [aus_dave] List all links by user on separate page In reply to
Quote:
Andy's global from this thread.
where is this Andy's global? Also, I am new to this and I would appreciate it if you could explain fully how I can do this - what needs to be in the template, etc.,

thanks
Quote Reply
Re: [socrates] List all links by user on separate page In reply to
In my second post, 'this thread' is linked to the thread containing the global. Unfortunately the default link styles for this forum don't work too well with this background.

In the example above, page.cgi?p=member uses a template called member.html (you need to create this new template, easiest way is to load an existing template and save as a new name, then edit as required).

You can then append variables to the URL and the template parser will recognise them automatically e.g. page.cgi?p=member&member=Dave will allow you to use the variable <%member%> in your template.

So, you create the global as in the above link (e.g.member_links) and call it in your template by using <%member_links($member)%>.

Last edited by:

aus_dave: Oct 31, 2005, 2:51 AM
Quote Reply
Re: [aus_dave] List all links by user on separate page In reply to
Thanks - I missed that link. The links on this entire site are hard to find as the font color isn't all that different (especially on visited links) and the links aren't underlined.