Gossamer Forum
Home : Products : Links 2.0 : Customization :

[MOD RELEASE] Top Votes On Main Index {Using Globals}

Quote Reply
[MOD RELEASE] Top Votes On Main Index {Using Globals}
Description: Puts Top 10 Sites By Vote Rating & By # of Votes On Your Main Index

Demo's: None Yet

dont know if this has been created yet or not. i saw one using ssi.. but it has bugs and wouldnt work.. so i thought i'd give one that uses globals & is 100% bug free..

I'd like to create modifications for the links sql... ya'll don't say give trade-offs do ya? I create mods & you let me use product without charge? hehe...

I'm a Mod-Team Member @ Phpbb.com If That Persuay's you at all...

ok so the code

---------------------------------------------

OPEN /admin/site_html_templates.pl

FIND:

sub site_html_home {
# --------------------------------------------------------
# This routine will build a home page. It is not meant to have any
# links on it, only subcategories.

return &load_template ('home.shtml', {
category => $category,
grand_total => $grand_total,
top_rated_include => $top_rated_include,
top_votes_include => $top_votes_include,
lastlink => $lastlink,
%globals
});
}


IN-LINE FIND:

grand_total => $grand_total,

AFTER ADD:

top_rated_include => $top_rated_include,
top_votes_include => $top_votes_include,


OPEN /admin/nph-build.cgi

FIND: (line: 1136)

$top_votes .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a href="$link{'URL'}">$link{'Title'}</a></td></tr>\n~;

AFTER ADD:

$top_votes_include .= qq~<li><a href="$link{'URL'}">$link{'Title'}</a> - ($link{'Votes'} votes) Rating: $link{'Rating'} \n~;

FIND: (line: 1141)

$top_rated .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a href="$link{'URL'}">$link{'Title'}</a></td></tr>\n~;

AFTER ADD:

$top_rated_include .= qq~<li><a href="$link{'URL'}">$link{'Title'}</a> - ($link{'Votes'} votes) Rating: $link{'Rating'} \n~;

OPEN: /admin/templates/home.html

Place This Code Where You Want Informatin To Show UP

// START CODE

Top 10 Resources (by Rating) -- with at least 10 votes <P>

<%top_rated_include%>




Top 10 Resources (by Votes) -- with at least 10 votes <P>

<%top_votes_include%>



// END CODE



// END OF MODIFICATION



Note: If You Have A Demo Using This Mod Please Supply A Link To It Below. Thanks.