Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Displaying new links on home page in V3

Quote Reply
Displaying new links on home page in V3
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.
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 .= "...&nbsp;&nbsp;(<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 Tongue

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
Quote Reply
Re: [jgkiefer] Displaying new links on home page in V3 In reply to
See if the following helps:

http://www.gossamer-threads.com/...orum.cgi?post=278448




Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Displaying new links on home page in V3 In reply to
No that didn't solve the problem. It seems that the only problem I am having is linking to the detailed page.
Quote Reply
Re: [jgkiefer] Displaying new links on home page in V3 In reply to
Try this replacement line in your global:

$short .= qq~...&nbsp;&nbsp;(<a href="$CFG->{build_detail_url}/$id$CFG->{build_extension}">more</A>)~;