Gossamer Forum
Home : Products : Links 2.0 : Customization :

Links as Voting Topsites?

(Page 2 of 3)
> > > >
Quote Reply
Re: Links as Voting Topsites? In reply to
ron4315,

To make the links list from most to least hits, you have to replace the sub build_sorthit routine that Jerry wrote in the following URL:
http://www.widgetz.com/...w/instructions.cgi?4

with the sub build_sorthit that you have in your db_utils.pl file. Does this make sense?

Also, to use the link.html format in this Mod, I believe that what you do is replace the following codes:

Code:
$topxhtml .= qq~<a href="$build_detail_url/$tmp{$db_key}$build_extension"><b>$tmp{'Title'}</b></a>~;

AND

Code:
$topxhtml .= qq~<a href="$build_jump_url?$db_key=$tmp{$db_key}"><b>$tmp{'Title'}</b></a>~;

Code:
$topxhtml .= &site_html_link (%tmp);

However, by doing this you will lose the different links to the detailed and jump.cgi.

But this should work.

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited October 18, 1999).]
Quote Reply
Re: Links as Voting Topsites? In reply to
Bookmarking this one to dive into when I have more time, but was wondering....does this output the "topsites" list on every page of the category?
Quote Reply
Re: Links as Voting Topsites? In reply to
Hi Brad,

yes, take a look at http://www.kostnixx.de

Karl

[This message has been edited by Karl (edited October 20, 1999).]
Quote Reply
Re: Links as Voting Topsites? In reply to
Well, the initial post in this thread mentioned about a "top sites voting" mod.

But what you have acheived is a listing of sites based on "hits" and not "votes".

Is it possible to make a voting mod to list top sites in each category? That would be cool.

Thanks
Quote Reply
Re: Links as Voting Topsites? In reply to
uhh??

i didn't understand what you meant by a voting mod..

anything is possible.. just be more specific and when i find time i'll do it..

jerry
Quote Reply
Re: Links as Voting Topsites? In reply to
 
Quote:
anything is possible..
Hmmm... are they still teaching that in schools?

OK, what I mean is using it as a voting script, ranking sites based on votes(ratings, 9.5, 8.3, 7.5.... with 9.5, the site with highest ranking at the top) cast by users. I think it is a bit complicated as you have to count and average votes for all sites within a category.

What we have above is an arragement of sites based on "hits" to those sites.

I saw a site once, I can't remember the url. They ranked sites in each category, based on user ratings. Sort of like a topsites script but with a number of categories and subcategories.
Quote Reply
Re: Links as Voting Topsites? In reply to
i still don't get it..

let's see.. what i get out of all that is..

SORT BY VOTES then RATINGS?

if so.. then you'd do the same as the hits script except sort it twice.. first by ratings then by votes

change:
Code:
$original = $db_sort_links;
$db_sort_links = $db_hits;
@topx = &build_sorthit (@{$links{$category}});
$db_sort_links = $original;

to

Code:
$original = $db_sort_links;
$db_sort_links = $db_rating;
@topx = &build_sorthit (@{$links{$category}});
$db_sort_links = $db_votes;
@topx = &build_sorthit (@topx);
$db_sort_links = $original;
Quote Reply
Re: Links as Voting Topsites? In reply to
Hi Widgetz,

What about sorting the list based on average votes per day?

Also, can something be implemented to let a person be able to vote only ONCE per day?

Thanks a lot! Smile

------------------
BeatBox Entertainment
beat-box.com
Ron Newbigging

Quote Reply
Re: Links as Voting Topsites? In reply to
using alex's rate.cgi you'd only be able to do it everytime you build.. if you built it once a day.. then it would sorta be like only allowing them to rate once a day Wink

if you use review.cgi's rate.. then you can.. but it would call for some extra code..

where it checks for the ip.. you can add like

&& $rec{'Date'} eq $date

something like that..

as for votes per day.. you can do this by hmm.. interesting..

you'd have to come up with a whole nother build_sorthit..

one that used this:

$values[$db_votes]/&days_old($values[$db_modified])

you can rewrite build_sorthit into like sort_votesperday

and then hardcode it.. tell me if you still want to.. otherwise the easiest way is to make another field with the info in it.. (would actually be faster for links to process)..

jerry
Quote Reply
Re: Links as Voting Topsites? In reply to
Hi Jerry,

Take a look at this site. http://www.toptenlinks.com

This is what I mean. Like you have categories and the list is arranged based on the ratings cast by visitors.
Quote Reply
Re: Links as Voting Topsites? In reply to
of course....

that is simple actually.. you sort it by ratings..

and then it's pretty much done.. the form for the voting is just html and i think you'd get that yourself..

when you sort it by rating.. the rank is already done for you.. $i+1

anyways..

jerry
Quote Reply
Re: Links as Voting Topsites? In reply to
I have changed all the codes like eliot and you have said.
but when I click on a pages it say:
Unkown Tag: top

how do I fix this? please help
also I changed the top ranking from the # of hits to # of votes
Quote Reply
Re: Links as Voting Topsites? In reply to
You have forgotten to make top a tag in the load template area of sub site_html_category routine in the site_html_templates.pl as my instructions clearly state. Make sure that you have used either top or topx in your nph-build.cgi file. For whatever variable you used, you must identify this tag in the routine I mentioned, like the following:

Code:
top => $top,

OR

Code:
topx => $topx,

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Links as Voting Topsites? In reply to
Ok now this is messed up
now IM getting this:
CGI ERROR
==========================================
Error Message : fatal error: Undefined subroutine &main::site_html_print_cat called at /vhome1/jolo/cgi-bin/admin/site_html_templates.pl line 944.

Script Location : nph-build.cgi
Perl Version : 5.00503

im getting this after links trys to build a page
Please help

Quote Reply
Re: Links as Voting Topsites? In reply to
Save the following files as text files:

1) nph-build.cgi => nph-build.txt
2) site_html_templates.pl => site_html.templates.txt
3) category.html => category.txt

and upload the text files to a publicly accessibly web directory, AND provide the URL to these files.

WE need to see your files to help you.

BTW: It is best to make current backup of files you are hacking. Smile

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




[This message has been edited by Eliot (edited November 09, 1999).]
Quote Reply
Re: Links as Voting Topsites? In reply to
Thanks alot:
http://www.worldvoter.com/category.txt
http://www.worldvoter.com/nph-build.txt
http://www.worldvoter.com/site_html_templates.txt

I think this is the screwy one:
http://www.worldvoter.com/site_html_templates.txt

There might be more than one thing messedup.
thanks again !
Quote Reply
Re: Links as Voting Topsites? In reply to
Your site_html_templates.pl text version is NOT FOUND at the URL you gave, so we can't help you.

Please re-post the correct URL!

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Links as Voting Topsites? In reply to
http://www.worldvoter.com/site_html_templates.txt

ok its there
thanks again my man
Quote Reply
Re: Links as Voting Topsites? In reply to
hey dude, wierd but your site_html_templates.pl, resembles nph-build.cgi somewhat.
Quote Reply
Re: Links as Voting Topsites? In reply to
Thank you every body
This mod was great
I turned it inot a voting booth
and I love it
thank you
guys
Quote Reply
Re: Links as Voting Topsites? In reply to
So, you have it working, right?

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Links as Voting Topsites? In reply to
hehe.. that was ... weird Smile

i think he probably went through the instructions and figured out that he did soemthign wrong..

eliot.. have you gotten the grep search to work.. i have gotten it to work at hexapods.com

the URL for reg search is..

http://www.hexapods.com/...earch.cgi?query=test

and URL for GREP search is..

http://www.hexapods.com/...-grep.cgi?query=test

it's using the latest code which saves memory.. (which takes less load on server.. speed is the same.. just too fast Smile)

highlight the VERY bottom to see how long grep takes.. (not in search.cgi)

jerry

[This message has been edited by widgetz (edited November 11, 1999).]
Quote Reply
Re: Links as Voting Topsites? In reply to
Ok one other thing, I want this mod incorporated in the actual links section,
so all the sites are on the list.
for example on:
http://worldvoter.com/adult/
I want to get rid of the Links: section
and have top sites: list all the sites in that category with the standard link format, description,and (Added: 12-Nov-1999 Hits: 65 Rating: 9 Votes: 23)

please help
much appreciated
Quote Reply
Re: Links as Voting Topsites? In reply to
Very cool widgetz, looks good, took 3 on the regular and 1 on the grep one.
Quote Reply
Re: Links as Voting Topsites? In reply to
I need and dont know how to accutally incorporate this mod in the actual links section, so all the sites are on the top list in that category.
for example on:
http://worldvoter.com/adult/
I want to get rid of the (Links in this category Smile section and have (top sites Smile list all the sites (not just 5) in that category with the standard link format, description,and (Added: 12-Nov-1999 Hits: 65 Rating: 9 Votes: 23)

anybody
please help
> > > >