Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Pick Link to Modify Template

Quote Reply
Pick Link to Modify Template
Heya,

I have customized all my templates and for some reason when I click on "Modify a Resource" the first page that shows up with the list of all the possible links that you can modify still looks like the deafault LinksSQL template.

Why is this? Which template is used to create the page that starts with: "Please pick which link you would like to update:"

I did change modify.html - when I select the link to modify it is uses the new modify.html template to show me the link. What am I missing here?

Safe swoops
Sangiro
http://www.dropzone.com/
Quote Reply
Re: Pick Link to Modify Template In reply to
try modify_select.html


PUGDOG®
PUGDOG® Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ


Quote Reply
Re: Pick Link to Modify Template In reply to
Aaah... I have 3 licenses of LinksSQL - the first two older installations didn't have this template, the most recent one does. I'll copy it over. Thanks pugdog.

Safe swoops
Sangiro
http://www.dropzone.com/
Quote Reply
Re: Pick Link to Modify Template In reply to
eeaaghh...this is driving me nuts! The little radio button on the select form seems to get passed on through <%link_results%> into the modify.html template. By default it's surrounded by a bunch of table row and cell tags, which are breaking my custom tables. Where does this come from?

Actually, I'd like to get rid of the radio button and the form altogether... if you have the isLinkOwner tag in your links.html template (below) then each link owned by the person when logged in will come up with a nice "update" link and there's no reason to have a radio button and a form wrapped around it.

In Reply To:
<%if isLinkOwner%>
<a href="<%db_cgi_url%>/modify.cgi?LinkID=<%ID%>">Update</a>
<%endif%>
Safe swoops
Sangiro
http://www.dropzone.com/
Quote Reply
Re: Pick Link to Modify Template In reply to
Look for $link_results in the modify.cgi script.

Regards,

Eliot Lee
Quote Reply
Re: Pick Link to Modify Template In reply to
Thanks Eliot,

I found this under sub _list_owned_links in modify.cgi and changed it to get rid of the table tags. This is an awkward piece of hard-coded html. Almost any customization of links.html will cause these tables to break.
Code:
my $output = '<table border=0>';
while (my $link = $sth->fetchrow_hashref) {
$output .= qq~<tr><td><input type=radio name=LinkID value="$link->{ID}"></td><td>~;
$output .= Links::SiteHTML::display('link', $link);
$output .= "</td></tr>";
}
$output .= "</table>";
Safe swoops
Sangiro
http://www.dropzone.com/
Quote Reply
Re: Pick Link to Modify Template In reply to
This can be a _REAL_ problem. You need get all your installations up to the same level of code. One problem I had, copying my templates over, is my language.txt file is way out of date. You need to get the newest version of that as well.

It's a good idea to install the new version completely, copy your templates/mods over it, then go backwards and fix up what you need to. That way, anything missing is added, but if it exists, the older (custom) version overwrites it.

PUGDOG®
PUGDOG® Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ


Quote Reply
Re: Pick Link to Modify Template In reply to
I'm going to update this to use loops, it makes things so much easier and simpler. For now, you'll just need to modify the code unfortunately. This makes your modify_select.html template look like:

Code:
<table border=0>
<%loop link_results%>
<tr><td><input type=radio name=LinkID value="<%ID%>"></td><td>
<%include link.html%>
</td></tr>
<%endloop%>
</table>
Which is much easier to change/understand.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Pick Link to Modify Template In reply to
Alex,

What's the rationale for keeping the radio select at all? Keeping the <%IF isLinkOwner%> tag in your link.html template renders the radio select somewhat obsolete. Are you thinking people may remove that tag from the link.html file?

For my modification I removed all the table tags and the radio button from modify.cgi and the entire <FORM> from modify_select.html - works great.

Safe swoops
Sangiro
http://www.dropzone.com/