I am trying to display new links on the home page. I have got the global (named short) to work.. well almost
The string <a href=\"<%detailed_url%>\">more</A> doesn't insert the detailed link.
no strict;
my ($rec) = @_;
my $short;
my $comma;
my $cs;
my $desc = $rec->{'Description'};
my $id = $rec->{'ID'};
if (length $desc < 175) {
$short = $desc;
}
else {
$short = substr ($desc, 0, 165); $short =~ s/\s\S+?$//;
$cs = chop($short);
until ($comma eq " ") {
$comma = chop($short);
}
$short .= "... (<a href=\"<%detailed_url%>\">more</A>)";
}
return $short;
}
I am using the same code as link.html to display the global "short" code and this does not want to display the detailed link either. I don't know if it is because this tag will not work on the home page or if I need to use a different tag.
I think I am making it harder that it realy is
What I am trying to do is display x amount of new links on the home page like hotscripts. I have noticed a lot of new code in the v3 links.html page for paid links. I do not know what has to be there and what doesn't. I just want to make this as simple as I can, so maybe I need to ask the simple questions...
1. How do I create a global in v3 to display the newest x amount of links on the home page.
2. How do I display the results of this global?
If someone can help me with this I will post the complete code once I get it ironed out.
TIA
The string <a href=\"<%detailed_url%>\">more</A> doesn't insert the detailed link.
Code:
sub { no strict;
my ($rec) = @_;
my $short;
my $comma;
my $cs;
my $desc = $rec->{'Description'};
my $id = $rec->{'ID'};
if (length $desc < 175) {
$short = $desc;
}
else {
$short = substr ($desc, 0, 165); $short =~ s/\s\S+?$//;
$cs = chop($short);
until ($comma eq " ") {
$comma = chop($short);
}
$short .= "... (<a href=\"<%detailed_url%>\">more</A>)";
}
return $short;
}
I am using the same code as link.html to display the global "short" code and this does not want to display the detailed link either. I don't know if it is because this tag will not work on the home page or if I need to use a different tag.
I think I am making it harder that it realy is
What I am trying to do is display x amount of new links on the home page like hotscripts. I have noticed a lot of new code in the v3 links.html page for paid links. I do not know what has to be there and what doesn't. I just want to make this as simple as I can, so maybe I need to ask the simple questions...
1. How do I create a global in v3 to display the newest x amount of links on the home page.
2. How do I display the results of this global?
If someone can help me with this I will post the complete code once I get it ironed out.
TIA