vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Store addon: Staff discount (https://vborg.vbsupport.ru/showthread.php?t=47834)

Vile 01-24-2003 09:47 PM

Lol, cool idea, like an employee discount :D
I'll be installing this :)

Thanks.

LOD-squa 01-24-2003 10:20 PM

Thanks mate. ^^; now I have everything for free and mods 50% off.

sabret00the 02-23-2003 05:30 PM

great hack, well done for making it, i'll install it later

sonic3d 03-04-2003 02:39 AM

ne1 up to the challenge to make it work for the itemshop?

l8er
sonic

gerlando 05-01-2003 03:04 PM

I think this hack has an error with the give someone else a custom title. My users are getting a "not enough points" error even though they clearly DO have enough points. I think the store may be looking at the other users usergroupid to determine the price of the custom title. Anyone care to fix that? :)

gerlando 05-02-2003 05:43 AM

Ok, I figured out how to fix the error with giving other users custom titles.

Look for:
PHP Code:

$checkcost=$contest[costs]; 

Change to:
PHP Code:

$checkcost=round($contest[costs] * ($costpercent[storecost]/100)); 

Also, a little clean up. You could/should declare the $costpercent variable as a global.

Look for:
PHP Code:

global $points$usertitle$username$userid$storename$pointname$glow$italic

Change to:
PHP Code:

global $points$usertitle$username$userid$storename$pointname$glow$italic$costpercent

then look for:
PHP Code:

$username=$user++++[username]; 

and add BELOW:
PHP Code:

$costpercent=$DB_site->query_first("SELECT storecost FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]"); 

then remove all other instances of:
PHP Code:

$costpercent=$DB_site->query_first("SELECT storecost FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]"); 

since they're not needed. I hope that helps.

ImportPassion 07-05-2003 11:31 PM

i was looking for the code $username=$user++++[username];
and couldn't find it and realized that ++++ replaced shit
nice code, couldn't have used userstuff, or userinfo.

THanks for the fix gerlando!

D

tpearl5 03-02-2004 10:55 PM

Anyone have an update for v3.0 store hack for this

$cost=$contest[costs];

isn't in v3

Gio~Logist 12-26-2004 05:11 PM

Yea I Know!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


All times are GMT. The time now is 07:32 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,734KB
  • 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
  • (7)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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