Hi,
You could probably do it with a global;
replace_words_with_links
my @words = split /\n/, q|some word::http://www.domain.com
another::http://www.google.com|;
my $tmp = $_[0];
foreach (@words) {
my ($word,$link) = split /::/, $_;
$tmp =~ s|\b$word|<a href="$link" target="_blank">$word</a>|sig;
}
return $tmp;
}
..then just use something like this:
<%replace_words_with_links($Description)%>
Untested, but something like that should do the trick =)
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!
You could probably do it with a global;
replace_words_with_links
Code:
sub { my @words = split /\n/, q|some word::http://www.domain.com
another::http://www.google.com|;
my $tmp = $_[0];
foreach (@words) {
my ($word,$link) = split /::/, $_;
$tmp =~ s|\b$word|<a href="$link" target="_blank">$word</a>|sig;
}
return $tmp;
}
..then just use something like this:
<%replace_words_with_links($Description)%>
Untested, but something like that should do the trick =)
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!