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

Reply
 
Thread Tools
Restrict Style Changes To Specific Usergroups Details »»
Restrict Style Changes To Specific Usergroups
Version: 1.00, by NTLDR (Coder) NTLDR is offline
Developer Last Online: Oct 2004 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-17-2004 Last Update: Never Installs: 15
 
No support by the author.

Author: NTLDR
Version: 1.0.0
Requested By: restless (here)
vB Compatibility: vB3 Gamma, RC1, RC2

Description:

This hack will allow you to restrict users ability to change the board style based on there usergroup, usefull for premium members etc. Note, this will mean members not in these groups will only have access to ONE style, the default board one (or a forum specific one).

File Edits:

In global.php find:

PHP Code:
// is style in the forum/thread set?
if ($codestyleid)

Add before (replace X, Y, Z with the a comma seperated list of the usergroupid's that should have access to the styles):

PHP Code:
if (!in_array($bbuserinfo['usergroupid'], array(XYZ))) {
    
$vboptions['allowchangestyles'] = 0;

Show Your Support

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

Comments
  #2  
Old 01-18-2004, 06:24 PM
restless's Avatar
restless restless is offline
 
Join Date: Jan 2002
Location: Canada
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellent stuff.
Reply With Quote
  #3  
Old 01-18-2004, 06:58 PM
M1th's Avatar
M1th M1th is offline
 
Join Date: Jul 2002
Location: UK
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, I've already got this working. But what would be cool is the ability to enable/disable a specified style on a usergroup basis.
Reply With Quote
  #4  
Old 01-25-2004, 02:15 AM
DiscussAnything DiscussAnything is offline
 
Join Date: Jan 2002
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work on vb2 as well? I just tried it on a 2.3.0 but a test user not in a usergroup in the array could change styles. I would love to have this on vb2. If its a slight difference with the above, please let me know. thanks!

would this work?

in member.php:

PHP Code:
if ($allowchangestyles==AND (in_array($bbuserinfo['usergroupid'], array(567))) ) {
    
$stylesets=$DB_site->query("SELECT * FROM style WHERE userselect=1 ORDER BY title");
    if ( !isset(
$bbuserinfo['realstyleid']) ) {
      
$bbuserinfo['realstyleid'] = $bbuserinfo['styleid'];
    } 
Reply With Quote
  #5  
Old 01-25-2004, 12:49 PM
M.C. M.C. is offline
 
Join Date: Jan 2002
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

there is spetial hack for 2.3.0 same to this one just search in Code Modification vB2 -> Full Releases

NTLDR, is any chanse to make it work throgh AdminCP? I now it need to make database queries but...

Thanks
Reply With Quote
  #6  
Old 01-25-2004, 04:17 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When Kura has released the HTL hack I'll create another version that has an ACP setting, untill then you manually need to enter the code.
Reply With Quote
  #7  
Old 05-20-2004, 01:16 AM
neo|d3fx neo|d3fx is offline
 
Join Date: Nov 2001
Location: Allentown, PA
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to modify it to allow only certain usergroups to have access to certain styles?

For example, a selection of premuim styles for members that donate money, and a selection for normal members?
Reply With Quote
  #8  
Old 05-20-2004, 01:47 AM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm...i was going to add this, the i thought, what happens when their premium membership runs out. they won't be able to access it anymore and it will be left at the last one they selected cause of the cookie it sets.

This is a good idea, but I think needs better integration and defineable by usergroup on which styles they are allowed to choose.
Reply With Quote
  #9  
Old 05-20-2004, 02:09 AM
neo|d3fx neo|d3fx is offline
 
Join Date: Nov 2001
Location: Allentown, PA
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wouldn't it be the same as if the style was disabled? Then it would revert to the default forum style?
Reply With Quote
  #10  
Old 05-20-2004, 02:11 AM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i don't think so, from what i have seen as soon as u change it, even with a link and not by the dropdown, it sets a cookie.
i don't think this will stop them from just appending &styleid=5 in the url ether tho.
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 01:46 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.06691 seconds
  • Memory Usage 2,297KB
  • 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
  • (3)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_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