Gossamer Forum
Home : Products : Links 2.0 : Customization :

jump.cgi detail instead of URL

Quote Reply
jump.cgi detail instead of URL
Hi All,

I have made a number of changes so that most of the links don'tuse jump.cgi...but I am still curious as to why jump.cgi goes to the page specified in the URL field even though, with my limited knowledge the link in the bowsers status bar, looks like it is pointing to ID. I have seached the posts and there is loads of info about changing where jump.cgi points, but like I said it allready looks like it is pointing to the ID.

So in summarry....What I would like is for the jump.cgi to point to the detailed page, i.e. use the id number so that my detailed pages which are stored in:

www.domain.com/links/pages/ID.html

I have tried a some things that have been suggested, but I either get a page not found or it still goes to the URL listed in the URL field..

I am sorry if the answer for this allready been posted and I am just being a dumb ass...

Thanks in advance
Hamsterpants
Quote Reply
Re: [Hamsterpants] jump.cgi detail instead of URL In reply to
Jump.cgi uses the ID number to look up the URL in url.db. Detailed pages are created "on the fly" and are not static like other Links pages. If you're wanting to link to local pages (on your server), use relative URLs in the URL field for links, and you will need to change something so that the http:// part is not required. I forgot where, but I know it's covered in these forums.


Leonard
aka PerlFlunkie
Quote Reply
Re: [Hamsterpants] jump.cgi detail instead of URL In reply to
Does setting $build_detailed = 1 in links.cfg do what you want? It build one page for each link

There is a mod to change the location of where detailed pages are built.

also, do a search on info.cgi as this builds the page "on the fly."


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [PerlFlunkie] jump.cgi detail instead of URL In reply to
Hi Leonard,

Thanks for your reply... You have give me an idea...What if I were to change the url.db to store the URL to the detailed page rather then the URL itself???? Would this damage anything else?

If I where to do this, do you know which file dictates what gets stored in the url.db?



Thanks

Dill
Quote Reply
Re: [Hamsterpants] jump.cgi detail instead of URL In reply to
If you set $build_detailed to 1, then a static page is built for each detailed page, and the link goes directly to that page anyway. In other words, jump.cgi isn't used to get to the detailed page.

The URL shown on that detailed page, then uses jump.cgi to link to the other site. You can always remove that link from the detailed template if you don't need it.

Adding the URL of the detailed page to the database won't break anything, but as the detailed page is already linked to when detailed pages are enabled, it might be a waste of effort to do so.

It really depends if all your links are internal or not, and whether your visitors would be confused by a detailed page linking to itself when there's no external link.
Quote Reply
Re: [wysardry] jump.cgi detail instead of URL In reply to
Thats my problem though...I have set $build_detailed = 1; and detailed pages are being created, yet when you click on a link it slways uses the URL rather then linking to the detailed page??

Hamsterpants
Quote Reply
Re: [Hamsterpants] jump.cgi detail instead of URL In reply to
You need to edit link.html . Get rid of the URL going to jump.cgi?ID=<%ID%> with <%detailed_url%> .

That should sort you out Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Hamsterpants] jump.cgi detail instead of URL In reply to
Strange. There should be an if statement block in the template that checks whether build_detailed is on or not, and uses the correct link type accordingly.

If you've modified the link.html template, check the original for the code.

I'd paste it here, but I'm using someone else's machine at the moment, so don't have access to a copy of the script.
Quote Reply
Re: [wysardry] jump.cgi detail instead of URL In reply to
I just looked at the default template...and didn't see it in link.html. You sure you are not thinking of Links SQL? Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] jump.cgi detail instead of URL In reply to
Andy - Tried your suggestion and that didn't work - the URL that it is pointing to is incorrect see below:

http://domainname/cgi-bin/links/162.html

it should be

In the links.cfg, I have set the detailed pages to be created in a directory called pages

http://domainname/links/pages/162.html.

# Detailed View: The script can build a single html page per link. This is
# great if you have a review in your database. To enable, you must set
# the directory where all the pages will be stored, the url to that directory
# and set the enable option.
$build_detailed = 1;
$build_detail_path = "$build_root_path/pages";
$build_detail_url = "$build_root_url/pages";

I have change the links template so that it does point to the detailed page another way:

href="/links/pages/<%ID%>.html">

But I was just courious as to why when I set the links.cfg to build detail page then why the jump.cgi is then still set to link to the URL rather then the detail page.

Like I said there are manual ways around it, but I would just like to know how this all works and to use it correctly rather then hack bits and pieces.
Quote Reply
Re: [Andy] jump.cgi detail instead of URL In reply to
In Reply To:
I just looked at the default template...and didn't see it in link.html. You sure you are not thinking of Links SQL? Wink
I don't have Links SQL!

I know the non-template version of Links 2 has the if block in so that it switches URL types automatically, and I vaguely remember the template version doing the same thing.

I must admit that I haven't used the template version for a while though, so maybe it changed or I'm thinking of a template other than link.html?

Perhaps I added the code myself - or maybe I'm just slowly going mad. Crazy
Quote Reply
Re: [Hamsterpants] jump.cgi detail instead of URL In reply to
Try this. In link.html, replace:-

Code:
<ul><li><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>

with

Code:
<ul><li><a class="link"
<%if build_detailed%>
href="<%build_detail_url%>"><%Title%></a>
<%else%>
href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>
<%endif%>

You may also want to remove the jump.cgi link from detailed.html, or use an if statement to decide whether to display it or not, based on the value of an extra field called 'External Link' (or whatever).

Hint: 1 and 0 are better than Yes and No when testing for true/false values.
Quote Reply
Re: [wysardry] jump.cgi detail instead of URL In reply to
tried that...get an error "unknown tag: build_detail_url"...I appriate all the help guys...but I think I will just use my manual solutions, at least for the moemnt and maybee revisit this issue when I have more perl knowledge..

Thanks guys

Hamsterpants
Quote Reply
Re: [Hamsterpants] jump.cgi detail instead of URL In reply to
You need to defined build_detail_url in the %globals in the SITE_HTML_TEMPLATES.PL file.

You can use the following codes:

build_detail_url = $build_detail_url
========================================
Buh Bye!

Cheers,
Me