vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Thread rateing hack (https://vborg.vbsupport.ru/showthread.php?t=5983)

12-27-2000 02:48 AM

Hello,

I would like to give users the ability to rate a thread from 1 to 10 and show the top rated threads on homepage/another page, is there a known hack for it?

Regards,

JDreamer

12-27-2000 04:09 AM

I'm looking for something a little familiar, except it's a rating on the forums. Not the threads. Anyone have it ?

12-27-2000 11:38 PM

I'm looking for something a little familiar, except it's a rating on the Users . Not the threads or forums . Anyone have it ? ;)

12-28-2000 01:49 AM

my users have developed a system to 'rate' threads. generally speaking your average usefull thread (on my forums) will have 10 views/post. if it is particularly usefull it will have less then 10 views/post, and obviously if it has more then 10 vies/post it is deemed more a more useless thread. of course thats just a generalization, but maybe you could devide the # of views by 10 (or whatever), and then get the ratio of [views/10]:posts to rate a thread.

of course thats just an idea, but i would require hella-less work then coding up a rating system.

12-28-2000 12:41 PM

This actually wouldn't be too hard...

1. Put a list of ratings on the "newreply" template. 1-10 per se.
2. Store that rating with each new post (would require a new field)
3. Your average thread rating would be the average of the ratings for each reply.

To pull this out just do a query before you display the thread info.

SELECT avg(rating) as rating from post where threadid=$threadid

The rest I leave up to you. Not hard if you know a little PHP.


All times are GMT. The time now is 02:42 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01144 seconds
  • Memory Usage 1,707KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete