Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Detaild link of front page

Quote Reply
Detaild link of front page
At front page I have this code to display last links of front page

Code:
<%LastLinks%>
<%loop LastLinks_loop%>
<div id="l<%ID%>" class="linklisting">
<h4 class="linktitle">
<%if detailed_url and isValidated eq 'Yes'%><a href="<%detailed_url%>"><%elsif URL ne 'http://' and isValidated eq 'Yes'%><a href="<%config.db_cgi_url%>/jump.cgi?ID=<%ID%>"><%endif%><%if highlight%><%Links::Tools::highlight($Title, $query)%><%else%><%Title%><%endif%><%if isValidated eq 'Yes'%><%if detailed_url or URL ne 'http://'%></a><%endif%><%endif%>
</h4>
<%if URL ne 'http://'%><p class="linkurl"><%if isValidated eq 'Yes'%><a href="<%config.db_cgi_url%>/jump.cgi?ID=<%ID%>"><%endif%><%if highlight%><%Links::Tools::highlight($URL, $query)%><%else%><%URL%><%endif%><%if isValidated eq 'Yes'%></a><%endif%><span class="hsmall"> (<%Hits%> hit<%if Hits != 1%>s<%endif%>)</span></p><%endif%>

<p class="linkrating">
<%~if Votes%>
<%~set intRating = $Rating i/ 1%>
<img src="<%Links::Utils::image_url("stars-10-${intRating}.gif")%>" alt="<%intRating%> of 10 stars" title="<%intRating%> of 10 stars" /> (<%Votes%> vote<%if Votes != 1%>s<%endif%>)
<%~endif%>
</p>

<%if Description%><div class="linkdescription"><%if highlight%><%Links::Tools::highlight($Description, $query)%><%else%><%Description%><%endif%></div><%endif%>

<p class="linkactions">
<%~if isValidated eq 'Yes'%>
<%if Review_Count%><a href="<%config.db_cgi_url%>/review.cgi?ID=<%ID%>">Read <%Review_Count%> review<%if Review_Count != 1%>s<%endif%></a><%endif%>
<a href="<%config.db_cgi_url%>/review.cgi?ID=<%ID%>;add_review=1">Write reveiw</a>
<a href="<%config.db_cgi_url%>/rate.cgi?ID=<%ID%>">rate</a>
<a href="<%db_cgi_url%>/recommend_it.cgi?ID=<%ID%>">recomment</a>
<%if config.bookmark_enabled%><a href="<%config.db_cgi_url%>/bookmark.cgi?action=link_add;ID=<%ID%>">Bookmark it</a><%endif%>
<%if isLinkOwner%><a href="<%config.db_cgi_url%>/modify.cgi?LinkID=<%ID%>">Edit</a><%endif%>
</p>

</div>
<%endloop%>

This was copy/paste from link.html template.

This is global tag for this:

Code:
sub {
my $tags = shift;
my $table = $DB->table('Links');
$table->select_options ('ORDER BY ID DESC', 'LIMIT 6');
my $sth = $table->select ({isValidated => "Yes"});
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { LastLinks_loop => \@output };
}

Why a have link to jump.cgi and not detailed page ? (as in other part of site because I have detailed page active).

Thanks.

Regards.

UnReal Network
Subject Author Views Date
Thread Detaild link of front page DeadMan 2124 Jan 4, 2008, 10:47 AM
Post Re: [deadroot] Detaild link of front page
Matthias70 2058 Jan 4, 2008, 10:55 AM
Thread Re: [deadroot] Detaild link of front page
Andy 2065 Jan 4, 2008, 11:14 AM
Post Re: [Andy] Detaild link of front page
DeadMan 2056 Jan 4, 2008, 12:22 PM