vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Store Redemption Hack v1.1 (https://vborg.vbsupport.ru/showthread.php?t=57096)

X-Fan 09-16-2003 04:35 AM

Ah, you don't have the Store Staff Discount hack installed.

Okay, in store.php, find:

PHP Code:

// ###################### Start Remove Warning Verify #######################
if ($action=="removewarn") {
$contest $DB_site->query_first("SELECT * FROM store WHERE action='removewarn'");
$storeid=$contest[id];
$costpercent=$DB_site->query_first("SELECT storecost FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]");
$cost=round($contest[costs] * ($costpercent[storecost]/100));
$need=$points $cost;
 
if (
$cost>$points) {
    eval(
"standarderror(\"".gettemplate('store_error')."\");");
}
$warns $DB_site->query_first("SELECT warninglvl FROM user WHERE userid=$bbuserinfo[userid]");
if (
$warns['warninglvl'] < or empty($warns['warninglvl'])) {
    eval(
"standarderror(\"".gettemplate('store_removewarn_error')."\");");
}
$oldwarnings=$warns[warninglvl];
$newwarnings=$oldwarnings-1;
eval(
"dooutput(\"".gettemplate("store_removewarn_verify")."\");");
}
// ###################### Start Remove Warning #######################
if ($action=="removewarndo") {
$contest $DB_site->query_first("SELECT * FROM store WHERE action='removewarn'");
$title=$contest[title];
$costpercent=$DB_site->query_first("SELECT storecost FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]");
$cost=round($contest[costs] * ($costpercent[storecost]/100));
 
if (
$cost>$points) {
    eval(
"standarderror(\"".gettemplate('store_error')."\");");
} else {
    
$DB_site->query("UPDATE user SET warninglvl=warninglvl-1,storep=storep-$cost WHERE userid='$bbuserinfo[userid]'");
    
$changestorenow $DB_site->query("UPDATE store SET sold=sold+1 WHERE action='removewarn'");
    
$moneycheck $DB_site->query_first("SELECT storep FROM user WHERE userid=$bbuserinfo[userid]");
    
$money $moneycheck[storep];
    eval(
"dooutput(\"".gettemplate("store_removewarn_done")."\");");
}


And replace with:

PHP Code:

// ###################### Start Remove Warning Verify #######################
if ($action=="removewarn") {
$contest $DB_site->query_first("SELECT * FROM store WHERE action='removewarn'");
$storeid=$contest[id];
$cost=$contest[costs];
$need=$points $cost;
 
if (
$cost>$points) {
    eval(
"standarderror(\"".gettemplate('store_error')."\");");
}
$warns $DB_site->query_first("SELECT warninglvl FROM user WHERE userid=$bbuserinfo[userid]");
if (
$warns['warninglvl'] < or empty($warns['warninglvl'])) {
    eval(
"standarderror(\"".gettemplate('store_removewarn_error')."\");");
}
$oldwarnings=$warns[warninglvl];
$newwarnings=$oldwarnings-1;
eval(
"dooutput(\"".gettemplate("store_removewarn_verify")."\");");
}
// ###################### Start Remove Warning #######################
if ($action=="removewarndo") {
$contest $DB_site->query_first("SELECT * FROM store WHERE action='removewarn'");
$title=$contest[title];
$cost=$contest[costs];
 
if (
$cost>$points) {
    eval(
"standarderror(\"".gettemplate('store_error')."\");");
} else {
    
$DB_site->query("UPDATE user SET warninglvl=warninglvl-1,storep=storep-$cost WHERE userid='$bbuserinfo[userid]'");
    
$changestorenow $DB_site->query("UPDATE store SET sold=sold+1 WHERE action='removewarn'");
    
$moneycheck $DB_site->query_first("SELECT storep FROM user WHERE userid=$bbuserinfo[userid]");
    
$money $moneycheck[storep];
    eval(
"dooutput(\"".gettemplate("store_removewarn_done")."\");");
}


That should work. I'll update the install instructions to take this into account as well.

Hobbes 09-16-2003 04:40 AM

hmmm....and teh page is now blank o_O..when trying with a register user


edit- and i get

Quote:

You do not have any warning points, and so do not need to remove one.
when trying with admin username


edit2- me go sleep >=\

X-Fan 09-16-2003 04:48 AM

Quote:

Originally Posted by Hobbes
hmmm....and teh page is now blank o_O..when trying with a register user

Not sure why that would be... did you try a SHIFT-refresh on the page?

Quote:

Originally Posted by Hobbes
edit- and i get

when trying with admin username

Well, if you don't have any warning points then that's the result you'll get! :)

Hobbes 09-16-2003 01:55 PM

Quote:

Originally Posted by X-Fan
Not sure why that would be... did you try a SHIFT-refresh on the page?

i refreshed hehe...still blank :(

X-Fan 09-17-2003 08:28 AM

Did you add the templates correctly?

Hobbes 09-19-2003 02:25 AM

yeesh :(

X-Fan 09-19-2003 03:41 AM

Well, sorry, but I had to ask. I can't think of any reason why it wouldn't be showing up. Just make sure you followed the steps in the txt file as listed and you shouldn't have any problems.

PixelFx 09-27-2003 12:39 PM

very cool idea, I don't have either hack installed yet, again, but I'll definaly add this when I do :)


All times are GMT. The time now is 03:44 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.01179 seconds
  • Memory Usage 1,772KB
  • 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
  • (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
  • (8)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