vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Prohibit Users from Rating Own Threads. (https://vborg.vbsupport.ru/showthread.php?t=73626)

Michael Morris 12-31-2004 10:00 PM

Prohibit Users from Rating Own Threads.
 
This is a tiny modification that requires 1 new phrase and 1 file hack.

Search threadrate.php for this code

PHP Code:

if (!($forumperms CANVIEW) OR !($forumperms CANTHREADRATE) OR (!($forumperms CANVIEWOTHERS) AND ($threadinfo['postuserid'] != $bbuserinfo['userid'])))
{
    
print_no_permission();


Below it add

PHP Code:

// No voting for your own threads.
if ($threadinfo['postuserid'] == $bbuserinfo['userid'])
{
    eval(
print_standard_error('error_cantvoteforown'));;


Create a new phrase in the standard front end error messages group and name it cantvoteforown

The text I used was "Sorry, but you can't rate your own threads."

Note that this doesn't stop folks from voting with alt accounts.

Dio 01-01-2005 06:42 PM

Nice quick little hack!

Dan 01-01-2005 06:42 PM

Nice mod :D

ResaleBroker 01-01-2005 10:05 PM

Nice and Easy! Thank You!

Bad Bunny 01-01-2005 10:53 PM

Quote:

Originally Posted by ResaleBroker
Nice and Easy! Thank You!

Hey...that is VERY practical. Thanks.

MauriceReed 01-18-2005 11:58 PM

excellent mod there m8...installed!!

AlexanderT 01-19-2005 06:25 AM

nice and clean!

Megareus Rex 01-19-2005 08:24 PM

Excellent idea! This has happened at my site before (although not much, since thread rating is rarely used there :P)

Usually what happened is the threadmaker would rate it, which would lead others to do so :-/

EscortCossie 01-30-2005 12:41 PM

Seems like a great mod, but how do you create a new phrase in the standard front end error messages group and name it cantvoteforown?

Sorry, but I'm a total noob at this :rolleyes:

EscortCossie 01-30-2005 01:35 PM

Doh! I just found the Phrase Manager :o

Sorry


All times are GMT. The time now is 11:17 AM.

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.01069 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete