vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Restrict Style Changes To Specific Usergroups (https://vborg.vbsupport.ru/showthread.php?t=60410)

NTLDR 01-17-2004 10:00 PM

Restrict Style Changes To Specific Usergroups
 
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;



restless 01-18-2004 06:24 PM

excellent stuff.

M1th 01-18-2004 06:58 PM

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.

DiscussAnything 01-25-2004 02:15 AM

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'];
    } 


M.C. 01-25-2004 12:49 PM

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

NTLDR 01-25-2004 04:17 PM

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.

neo|d3fx 05-20-2004 01:16 AM

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?

ImportPassion 05-20-2004 01:47 AM

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.

neo|d3fx 05-20-2004 02:09 AM

wouldn't it be the same as if the style was disabled? Then it would revert to the default forum style?

ImportPassion 05-20-2004 02:11 AM

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.


All times are GMT. The time now is 08:25 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.01178 seconds
  • Memory Usage 1,735KB
  • 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
  • (3)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
  • (10)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