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

Using URL instead of ID

Quote Reply
Using URL instead of ID
If only for purely aesthetic reasons at this point, I'd rather pipe the actual URL through jump.cgi than the ID number; a lot of people, for whatever reason, like to be able to look into the status bar and determine the url of the site they'll be going to first - therefore I'd like to use the format of /jump.cgi?ID=http://whatever.theurl.is/

Would this be possible to do easily enough? I'm still dissecting the template module and what not attempting to get a feel for how it works so I can just make minor adjustments like this myself, but I've been out of town all weekend, and have the rest of the site to do in addition, which cuts down on my time somewhat. (How was that for a run on sentence? =)


------------------
Mark Waterous mark@projectlinux.org
Project Linux - www.projectlinux.org/

Quote Reply
Re: Using URL instead of ID In reply to
Hello!

This is very easy. just insert <%URL> in the templates and the build routine. I thought about it earlier but never tried it out.

You will not be able to use the counter routine, bytheway.

Further, you could use jump.cgi as it is and build the IDs in links + a Java script that hides them. This is a way to use the Links routines and their features what Alex designed AS it is but hide their IDs!

Hope this helps.

------------------
rajani











Quote Reply
Re: Using URL instead of ID In reply to
I actually just posted, and asked Alex if a templates type object could be created to allow passing variables and values more easily to the templates routines.

Anything is possible, but if not done to _the_ copy of Links, then everyone starts going off in their own directions and offering help becomes a literal nightmare.

Quote Reply
Re: Using URL instead of ID In reply to
As always, it's much easier than I would've made it, had I not asked first. Wink Thanks for that.

In the old flatfile links, atleast when you were using the html.pl files, they usually contained comments letting you know what variables would produce what results for a particular page.

Perhaps a list of all available template commands and what templates they'll work in, would be a great great idea? Smile


------------------
Mark Waterous mark@projectlinux.org
Project Linux - www.projectlinux.org/

Quote Reply
Re: Using URL instead of ID In reply to
 
Quote:
Perhaps a list of all available template commands and what templates they'll work in, would be a great great idea?

You can find this by clicking on Edit Templates, picking a template and clicking on help. It is static though and if you change things it doesn't update the list. (Also, I may have missed one or two, but should serve as a good starting point).

Cheers,

Alex
Quote Reply
Re: Using URL instead of ID In reply to
Oh, Also, if you want to keep the hit counting, do something like:

<a href="/cgi-bin/jump.cgi?ID=<%ID%>" onMouseOver="document.status='<%URL%>'">

or something like that (syntax is a bit off), hope your Javascript is a better then mine. =)

Cheers,

Alex
Quote Reply
Re: Using URL instead of ID In reply to
Interesting, I didn't know that. =) I think I may go through all that and compile a static resource file listing them all and which templates they work in for my own use, as I edit all my templates offline and upload them afterwards.


------------------
Mark Waterous mark@projectlinux.org
Project Linux - www.projectlinux.org/

Quote Reply
Re: Using URL instead of ID In reply to
I thought there was a list, but when I looked, it was quite short, and there are quite a few variables that are available.

Quote:

<%date%> - Current date.
<%time%> - Current time.
<%db_cgi_url%> - URL to your user cgi directory.
<%build_root_url%> - URL to your user home directory.
<%site_title%> - Title of your Links directory.
<%css%> - URL to your links.css file.

THese are the only ones I get listed.
Quote Reply
Re: Using URL instead of ID In reply to
Ooops, there is a typo. Edit Admin_HTML.pm and change line 1696 from:

my $template = $in->param('edit_tpl');

to:

my $template = $in->param('template');

and then it will show correctly. The list is sensitive to the page, so the list of fields for category.html will be different then those for link.html.

Cheers,

Alex