vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   uCash & uShop (https://vborg.vbsupport.ru/forumdisplay.php?f=100)
-   -   Theif Mod (https://vborg.vbsupport.ru/showthread.php?t=73915)

MajorFm.com 01-06-2005 10:37 PM

Theif Mod
 
Can it be set so you can't steal from a particuler usergroup?

Link14716 01-06-2005 11:28 PM

Not yet, but it is set up on my dev board, and will be in the next major release.

MajorFm.com 01-07-2005 01:07 PM

look forward to this...

fly 01-11-2005 03:47 PM

I added that to my board with a file edit. Is it cool to post what I did?

Zachery 01-11-2005 04:05 PM

You are more than welcome to share your mdos / addons :)

fly 01-11-2005 04:40 PM

Okay, here's what I did to prevent theives from stealing from mods/admins. Never posted anything I hacked up, so hopefully this is the right format...

In /uttstore/action.theif.php find:
PHP Code:

$thefted $DB_site->query_first("SELECT userid, username, ".$vboptions['uttpoints_pointsfield']." AS points FROM ".TABLE_PREFIX."user WHERE ".$field."='".addslashes($data)."'"); 

REPLACE it with:
PHP Code:

$thefted $DB_site->query_first("SELECT userid, usergroupid, username, ".$vboptions['uttpoints_pointsfield']." AS points FROM ".TABLE_PREFIX."user WHERE ".$field."='".addslashes($data)."'"); 

find:
PHP Code:

if (!isset($thefted['userid'])) {
        
$message "User does not exist.";
        
uttstore_print_end_message($message);
    } 

ADD underneath:
PHP Code:

if ($thefted[usergroupid]==|| $thefted[usergroupid]==7) {
        
$message "Cannot steal from staff, asshat. You have been banned.";
        
uttstore_print_end_message($message);
    } 

Change the message to whatever you want, the script doesn't really ban them for that. I just thought it was funny.

This will prevent anyone from stealing from mods or admins.

docvader 01-11-2005 05:07 PM

Doesn't work. But I like the idea.

fly 01-11-2005 05:16 PM

Quote:

Originally Posted by docvader
Doesn't work. But I like the idea.

OH! I think I know what I forgot. Hang on...

edit: Should be fixed now. I did this a while ago and forgot exactly what I had done...

MajorFm.com 01-11-2005 07:24 PM

can you set this to usergroups to? instead of just mods and admin?

Link14716 01-11-2005 07:24 PM

Quote:

Originally Posted by flypaper
OH! I think I know what I forgot. Hang on...

edit: Should be fixed now. I did this a while ago and forgot exactly what I had done...

This will be in 0.96 actually whenever it is released. I'll be an option for Thief and Change Other User's Custom Title.


All times are GMT. The time now is 02:05 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.01037 seconds
  • Memory Usage 1,741KB
  • 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
  • (4)bbcode_php_printable
  • (2)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