Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Store addon: Staff discount Details »»
Store addon: Staff discount
Version: 1.00, by Dark Jim Dark Jim is offline
Developer Last Online: May 2007 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 01-17-2003 Last Update: Never Installs: 33
 
No support by the author.

With this hack you can change the costs of the store items depending on usergroups. For example you can set the cost to 25% for administrators, 50% for moderators and 100% for regular members.

Update 1/19/03: Fixed an error. Step 7 was wrong.
Update 1/18/03: Fixed an error. The final step was wrong.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-24-2003, 09:47 PM
Vile's Avatar
Vile Vile is offline
 
Join Date: Apr 2002
Location: Arizona, USA
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thanks.
Reply With Quote
  #23  
Old 01-24-2003, 10:20 PM
LOD-squa's Avatar
LOD-squa LOD-squa is offline
 
Join Date: Aug 2002
Location: Orlando, Florida
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks mate. ^^; now I have everything for free and mods 50% off.
Reply With Quote
  #24  
Old 02-23-2003, 05:30 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack, well done for making it, i'll install it later
Reply With Quote
  #25  
Old 03-04-2003, 02:39 AM
sonic3d's Avatar
sonic3d sonic3d is offline
 
Join Date: Jan 2002
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

l8er
sonic
Reply With Quote
  #26  
Old 05-01-2003, 03:04 PM
gerlando gerlando is offline
 
Join Date: Apr 2002
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #27  
Old 05-02-2003, 05:43 AM
gerlando gerlando is offline
 
Join Date: Apr 2002
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #28  
Old 07-05-2003, 11:31 PM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #29  
Old 03-02-2004, 10:55 PM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

$cost=$contest[costs];

isn't in v3
Reply With Quote
  #30  
Old 12-26-2004, 05:11 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yea I Know!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:19 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.04521 seconds
  • Memory Usage 2,307KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete