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)

fly 01-11-2005 07:56 PM

Quote:

Originally Posted by MajorFm.com
can you set this to usergroups to? instead of just mods and admin?

Yeah, just follow the format in that IF statement...

Add another: || $thefted[usergroupid]==????????

MajorFm.com 01-11-2005 08:10 PM

Great, thank you for shareing this!

Lionel 04-29-2005 04:04 PM

Thanks. I automatically give 200 points to new users and they are being ripped off. Can it also be made that you cannot steal from anyone with less than 10 posts?

fly 04-29-2005 04:44 PM

Quote:

Originally Posted by Lionel
Thanks. I automatically give 200 points to new users and they are being ripped off. Can it also be made that you cannot steal from anyone with less than 10 posts?

Yeah, that should be pretty easy to do. I'll try to remember to look at it after work, unless someone else posts it before that.

fly 05-02-2005 06:10 PM

Quote:

Originally Posted by Lionel
Thanks. I automatically give 200 points to new users and they are being ripped off. Can it also be made that you cannot steal from anyone with less than 10 posts?

This hack assumes that you haven't installed the code I posted above...

In action.thief.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 with:

PHP Code:

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

find:
PHP Code:

if ($userid == $bbuserinfo['userid']) {
        
$message "You may not steal from yourself!";
        
uttstore_print_end_message($message);
    } 

Add under:
PHP Code:

if ($thefted[posts]<=10) {
        
$message "Leave the little ones alone now!";
        
uttstore_print_end_message($message);
    } 

Lemme know if you also used the code I posted earlier in this thread and I'll adjust it...

btw, I can't test this right now, but the code is simple. It should work without issue.

Lionel 05-03-2005 02:15 AM

Thanks. This is how I did it earlier.


Quote:

$thefted = $DB_site->query_first("SELECT userid, usergroupid, username, ".$vboptions['uttpoints_pointsfield']." AS points FROM ".TABLE_PREFIX."user WHERE posts > 0 AND ".$field."='".addslashes($data)."'");
if (!isset($thefted['userid'])) {
$message = "User does not exist <br />or, You may not steal from users with less than 10 posts.";
uttstore_print_end_message($message);
}

fly 05-03-2005 11:16 AM

:cool:


All times are GMT. The time now is 10:06 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.01197 seconds
  • Memory Usage 1,737KB
  • 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
  • (4)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
  • (7)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