Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Andy] Clickable links in multiple_modify search results?

Quote Reply
Re: [Andy] Clickable links in multiple_modify search results? In reply to
It's possible, but it's not very intuitive. Unsure

You'll have to go into your admin/GT/SQL/Admin.pm file and add some code.

Specificially you'll have to add code to the subroutine: modify_multi_search_results

In that module (for me it was around line 1064 in ...GT/SQL/Admin.pm), where you see

Code:
print $self->{html}->form ( { mode => 'modify_multi_search_results', values => $result, multiple => $i, view_key => 1, file_field => 1, file_delete => 1 } );

You will have to add the following code before that line. You will also have to modify that line so it reflects the following:

Code:
my $code = {
URL => sub {
my ( $self, $col, $values ) = @_;
my $field_name = $self->{multiple} ? "$self->{multiple}-$col" : $col;
my $value = $values->{URL};

my $visit_link = $value ? qq!<sup><a href='$value' target=_blank>visit link</a></sup>! : '';

my $buf = qq!
<tr $self->{tr}>
<td $self->{td}>
<font $self->{col_font}>URL</font>
</td>

<td $self->{td}>
<font $self->{val_font}>
<input type="text" name="$field_name" value="$value">
$visit_link
</font>
</td>
</tr>
!;
return $buf;
},
};
print $self->{html}->form ( { mode => 'modify_multi_search_results', values => $result, multiple => $i, view_key => 1, file_field => 1, file_delete => 1, code => $code } );

That should setup your modify-multiple so that there will be a little "visit link" twiddle beside the URL value (if the URL value exists) that will open the link in a new window.

I may have some syntax errors in there so please let me know and I'll fix it.
Subject Author Views Date
Thread Clickable links in multiple_modify search results? YoYoYoYo 3404 Jul 11, 2002, 11:43 AM
Thread Re: [YoYoYoYo] Clickable links in multiple_modify search results?
Andy 3324 Jul 11, 2002, 11:56 AM
Thread Re: [Andy] Clickable links in multiple_modify search results?
Aki 3279 Jul 11, 2002, 12:26 PM
Thread Re: [Aki] Clickable links in multiple_modify search results?
YoYoYoYo 3328 Jul 11, 2002, 1:01 PM
Thread Re: [YoYoYoYo] Clickable links in multiple_modify search results?
Aki 3316 Jul 11, 2002, 1:54 PM
Thread Re: [Aki] Clickable links in multiple_modify search results?
pugdog 3300 Jul 12, 2002, 9:34 AM
Post Re: [pugdog] Clickable links in multiple_modify search results?
YoYoYoYo 3285 Jul 12, 2002, 11:58 PM
Thread Re: [pugdog] Clickable links in multiple_modify search results?
Aki 3307 Jul 13, 2002, 1:23 AM
Post Re: [Aki] Clickable links in multiple_modify search results?
YoYoYoYo 3284 Jul 13, 2002, 4:15 AM