Gossamer Forum
Quote Reply
modify.cgi
Several of my 'links' do not have URLs but simply link to the detailed pages.

How can I change the coding of modify.cgi to use the ID rather than the URL to find the links to be modified?

Rennie
Quote Reply
Re: modify.cgi In reply to
If you change:

$links = $db->query ( { URL => $in->param('Current URL'), ww => 1 } );

to:

$links = $db->get_record ($in->param('Current URL'));

and then just change the wording on the HTML (but leave the form name as 'Current URL', it will now use the ID number instead of the URL.

Hope this helps,

Alex
Quote Reply
Re: modify.cgi In reply to
My site uses only "internal" links for all the cards. I had to modify jump.cgi to allow for this (checking for http:// or just '/')
I also modded it to allow for .html after the ID number, so if it's fed an ID it jumps to the image URL, if it's ID.html it jumps to the detailed page.

You also need to use absolute references or provide a base url to the HTML, since the relative references (those that start without a '/') will be relative to where the script was called/run from.

I posted this in the Links 2.0 forum, and really haven't changed it for LinkSQL other than pasting it in.