Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Change link URL in Check Duplicates results

Quote Reply
Change link URL in Check Duplicates results
I would like to change the link URL to a Detailed page, rather than an external link.

I have checked Admin > Templates > Admin > tools_duplicate.html but there doesn't seem to be any URL links in there. The Modify link works as it should but as all of my links are internal, clicking on the link title just results in a 404 error.
Quote Reply
Re: [MJB] Change link URL in Check Duplicates results In reply to
Just modify detailed.html and edit the tag, so that it does not use jump.cgi at all.

In addition, if clicking on the link means, that the same page would be reloaded, then I would recommend you to not setup that link at all, and user expect to see new page/content/section.. etc when clicking on a link.

Hope this helps.

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Change link URL in Check Duplicates results In reply to
It's not the user side, it's the admin side. I simply want to change the URL of the link in Admin > Database > Check Duplicates.

There are 2 links per result - the link title and Modify. It's the link title URL that I want to change.
Quote Reply
Re: [MJB] Change link URL in Check Duplicates results In reply to
Hi,

Untested, but in /admin/Links/Tools.pm, find:

Code:
while (my ($id, $title) = $sth2->fetchrow_array) {
my $cats = $db->get_categories($id);
my ($cid, $cname) = each %$cats;
my $etitle = $IN->html_escape($title);

$dupes .= qq~
<tr><td valign=top>
<font face="Tahoma,Arial,Helvetica" size="2">
<input type="checkbox" name="delete" value="$id">
<input type="hidden" name="$id-ID" value="$id">
$id - <a href="$eurl">$etitle</a> - $cname -
[ <a href="admin.cgi?do=modify_form&db=Links&modify=1&1-ID=$id">Modify</a> ]
</font>
</td></tr>
~;
}
...and change to:

Code:
while (my ($id, $title) = $sth2->fetchrow_array) {
my $cats = $db->get_categories($id);
my ($cid, $cname) = each %$cats;

my $detailed_url = "$CFG->{build_detail_url}/" . $DB->table('Links')->detailed_url( $id ) . $CFG->{build_extension};

my $etitle = $IN->html_escape($title);

$dupes .= qq~
<tr><td valign=top>
<font face="Tahoma,Arial,Helvetica" size="2">
<input type="checkbox" name="delete" value="$id">
<input type="hidden" name="$id-ID" value="$id">
$id - <a href="$detailed_url">$etitle</a> - $cname -
[ <a href="admin.cgi?do=modify_form&db=Links&modify=1&1-ID=$id">Modify</a> ]
</font>
</td></tr>
~;
}

See if that works :)

Cheers

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] Change link URL in Check Duplicates results In reply to
Thanks Andy. It's just knowing which file the code is in that I struggle with.

You were more or less spot on there. The only adjustment that I made was to change
Code:
my $detailed_url = "$CFG->{build_detail_url}/" . $DB->table('Links')->detailed_url( $id ) . $CFG->{build_extension};

to
Code:
my $detailed_url = "$CFG->{build_detail_url}/" . $DB->table('Links')->detailed_url( $id ) ;

because it doubled the extension - 1234.php.php

I also added
Code:
$id - <a href="$detailed_url" target="_blank">$etitle</a> - $cname -
so that I could open multiple links in new windows at the same time to compare them.

Works perfectly thanks.

Last edited by:

MJB: Oct 23, 2009, 3:02 AM
Quote Reply
Re: [MJB] Change link URL in Check Duplicates results In reply to
Cool, glad it worked =)

Cheers

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!