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
Styles for Premium Members Details »»
Styles for Premium Members
Version: 1.00, by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-14-2003 Last Update: Never Installs: 18
 
No support by the author.

This Hack allows you to set styles for use only by premium members. (Premium members are people that you decide are premium either because they have paid or because you like them or for whatever reason you determine they are premium)

This hack does not use the usergroup system because it allows premium users to be in any usergroup. This enables me to keep moderators in a mods group, Epinions members in an Epinions group, and everybody else in the registered group and still mark them as a contributor.

Premium members on my board have paid a membership fee. My nonpaid members have the default style that has ad banners and few if any hacks.

My premium members have 5 styles to choose from. None have Ad Banners and there are more hacks and features.

If you want to see a live demo: Join my forum, look at the styles available to you. Then pay to become a premium member and look to see the available styles once you have paid.

KNOWN ISSUES:
None.

I will include screenshots in a few minutes.

NOTE: I will support this hack for users who know how to run queries and edit files. I will not explain the basics of hacking. I will support bugs. I will also refine the instructions if they are incorrect.


Custom Avatars Addon: https://vborg.vbsupport.ru/showthrea...084#post366084


No PM Quota for Premium Addon:
https://vborg.vbsupport.ru/showthrea...882#post364882

Show Your Support

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

Comments
  #2  
Old 02-15-2003, 07:54 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screenshot of making the style premium:
Reply With Quote
  #3  
Old 02-15-2003, 07:56 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the screenshot of making the user premium:
Reply With Quote
  #4  
Old 02-15-2003, 09:47 PM
SphereX
Guest
 
Posts: n/a
Default

this looks very nice. I am not sure if I will install it though.
If I ever get a donation thing up and running it will come in very handy
Reply With Quote
  #5  
Old 02-16-2003, 12:59 AM
EchoHype.com's Avatar
EchoHype.com EchoHype.com is offline
 
Join Date: Mar 2002
Location: Harrisburg, PA
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a very nice hack.

Good job!
Reply With Quote
  #6  
Old 02-17-2003, 03:16 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got over my lazy spell and updated this hack so that you can change premium member's styles from the admin control panel. The text file has been updated.

If you have already installed it, you simply need to do this in user.php:

Find:
Code:
// returns a combo box containing a list of titles in the $tablename table.
// allows specification of selected value in $selvalue
  global $DB_site,$bgcounter;
Replace With:
Code:
// returns a combo box containing a list of titles in the $tablename table.
// allows specification of selected value in $selvalue
  global $DB_site,$bgcounter,$user;
Find:
Code:
$result=$DB_site->query("SELECT title,$tableid FROM $tablename WHERE userselect=1 ORDER BY title");
Replace With:
Code:
  if ($user[premium]){
     $result=$DB_site->query("SELECT title,$tableid FROM $tablename WHERE userselect>0 ORDER BY title");
  }
  else {
     $result=$DB_site->query("SELECT title,$tableid FROM $tablename WHERE userselect=1 ORDER BY title");
  }
Reply With Quote
  #7  
Old 02-17-2003, 06:30 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question: There's a drop down menu for style sets in register.php and member.php. Does this make it so users who are registering cannot select premium styles?

Also, how would I go about making this work with the change style drop-down menu hack, located: here.
Reply With Quote
  #8  
Old 02-17-2003, 07:53 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did not incorporate it into register.php because my members have to register first before they can become premium members. The paypal integration requires that their username already exist. Therefore, people registering can only choose from the non-premium styles.

Regarding the second question, I would simply change This:

Code:
$allstyles=$DB_site->query("SELECT style.title, user.styleid, COUNT(*) AS count FROM user LEFT JOIN style USING (styleid) WHERE style.styleid IS NOT NULL AND style.userselect=1 GROUP BY user.styleid");
to this:

Code:
if ($bbuserinfo[premium]{
$allstyles=$DB_site->query("SELECT style.title, user.styleid, COUNT(*) AS count FROM user LEFT JOIN style USING (styleid) WHERE style.styleid IS NOT NULL AND style.userselect>0 GROUP BY user.styleid");
}
else {
 $allstyles=$DB_site->query("SELECT style.title, user.styleid, COUNT(*) AS count FROM user LEFT JOIN style USING (styleid) WHERE style.styleid IS NOT NULL AND style.userselect=1 GROUP BY user.styleid");
}
Reply With Quote
  #9  
Old 02-17-2003, 07:56 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't think I ever mentioned, this code prevents non-premium members from simply setting the styleid in their url and viewing the premium styles that way. The hack treats it just like they tried to use a non-selectable style.
Reply With Quote
  #10  
Old 02-17-2003, 08:07 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops! lol, of course! How can you make a guest a premium member ! I was having a dumb moment, sorry.

Also, thanks for that code for the drop down change style hack by FireFly, very helpful. Will install this later .
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:44 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05773 seconds
  • Memory Usage 2,298KB
  • Queries Executed 23 (?)
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
  • (6)bbcode_code
  • (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
  • (9)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_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