vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   there has GOT to be a way to only allow usergroup to change styles (https://vborg.vbsupport.ru/showthread.php?t=60404)

restless 01-18-2004 03:49 PM

there has GOT to be a way to only allow usergroup to change styles
 
i've been searching everywhere... and all i can find is people telling everyone to change conditionals so certain usergroups can see things on the board. this is hugely annoying when you have to change a million different templates on every style.

can someone figure out a way to only allow a certain usergroup to change styles?

i want only my upgraded members to be able to change styles, and have everyone else use the default style. yes, because of all the usual reasons... ads, etc... but also tons of other stuff that i want to put on the board for upgraded users. i don't want to have to insert conditionals for EVERYTHING. plus, i think being able to change styles is one of the upgrade features that i want.

NTLDR 01-18-2004 05:09 PM

This is the simplist method of doing this, in global.php find:

PHP Code:

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


Add before (replace X with the upgraded users usergroupid):

PHP Code:

if ($bbuserinfo['usergroupid'] == X) {
    
$vboptions['allowchangestyles'] = 0;



restless 01-18-2004 05:47 PM

this disallows the usergroup to change.

that's fine, actually... but can i use an array of usergroup ids?

NTLDR 01-18-2004 05:51 PM

Instead of:

PHP Code:

if ($bbuserinfo['usergroupid'] == X) { 

use:

PHP Code:

if (in_array($bbuserinfo['usergroupid'], array(XYZ))) { 

Replacing X, Y, Z with a comma seperated list of usergroupids.

restless 01-18-2004 05:57 PM

you rock.

corsacrazy 01-18-2004 06:02 PM

should be released as a mini hack so this useful info isnt lost here in some thread hard to find

NTLDR 01-18-2004 06:16 PM

Done :) (https://vborg.vbsupport.ru/showthrea...560#post464560)

MindTrix 01-18-2004 11:13 PM

NTLDR is it just me or have you helped so many people out recently with things you can release as a hack, and you never seem to unless told :)

NTLDR 01-19-2004 11:03 AM

:P If I'm told it normally means more than one person wants it so its worth releasing ;)


All times are GMT. The time now is 08:57 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.01069 seconds
  • Memory Usage 1,729KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete