PDA

View Full Version : new with perl


dg123
11-07-03, 03:58 AM
hi

i have this code

my $featuredwatch;
if ($featured eq 'yes') {
$featuredwatch .= "Featured Auction Main Page<br>";
}
if ($catfeat eq 'yes') {
$featuredwatch .= "Featured Auction Category<p>";
}
if ($watchflag) {
$featuredwatch .= "This auction is on your watchlist";

and here is the varible
$content=~ s/<!-DISPLAY_FEATURED_AND_WATCHLIST_IF_TRUE-->/$featuredwatch/;

ok now i separate it because i want to put the links on different places on my template

here

my $featuredwatch;
my $catfeaturedwatch;
my $watchfeaturedwatch;
if ($featured eq 'yes') {
$featuredwatch = "Featured Auction Main Page<br>";
}
if ($catfeat eq 'yes') {
$catfeaturedwatch = "Featured Auction Category<p>";
}
if ($watchflag) {
$watchfeaturedwatch = "This auction is on your watchlist";
}


$content=~ s/<!-DISPLAY_FEATURED_IF_TRUE-->/$featuredwatch/;
$content=~ s/<!-DISPLAY_CATEGORY_FEATURED_IF_TRUE-->/$catfeaturedwatch/;
$content=~ s/<!-DISPLAY_WATCHLIST_IF_TRUE-->/$watchfeaturedwatch/;


But now with this

if ($watchflag) {
$watchfeaturedwatch = "This auction is on your watchlist";
}

i been trying to change it so i can have a link first for example

watch this item ..... and if you click on it will show this ~~~> This auction is on your watchlist

how can i do that?

thank you

Millennium
11-07-03, 11:55 AM
??

if ($watchflag) {
$watchfeaturedwatch = "<a href=\"whatever_goes_here\">This auction is on your watchlist</a>";
}

dg123
11-07-03, 12:27 PM
??

if ($watchflag) {
$watchfeaturedwatch = "<a href=\"whatever_goes_here\">This auction is on your watchlist</a>";
}


i trying to have on the template with a link that say for example

Watch this item

and when you click on it (you saved it put it in your watch list) will change to this

This auction is on your watchlist

on the same template

thank you

Millennium
11-07-03, 12:37 PM
i trying to have on the template with a link that say for example

Watch this item

and when you click on it (you saved it put it in your watch list) will change to this

This auction is on your watchlist

on the same template

thank you

A link is a link, just replace the link code you need with the example I posted for you. I have no idea what exactly it should be for your purposes.

Ask whoever sold you the script or the author of the script, do they not provide tech support for the script?