vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Force User Style via ACP? (https://vborg.vbsupport.ru/showthread.php?t=49681)

Rose 03-05-2003 02:49 PM

Force User Style via ACP?
 
Is there a way to force a users style in the admin cp? I'm sure there isn't a way without hacking, which is why this post is being made in the "requests" forum.

Reasoning - when editing a style, it's useful to view the style you're editing. But you don't want to choose "let members select style" so they might have access before it's through. And in this particular instance I'd rather not use a test forum and force the style in the forum as I'd like to test the overall site all at once.

Therefore, can I force myself to see the new style even though it's not selectable in user options?

:)

Rose 03-05-2003 04:03 PM

I've been looking around and can't seem to figure out where I might do a quick force-set. But in retrospect - it doesn't necessarily have to force a member's specific style, maybe a "forced Usergroup Style" would work - then I'd create a "test" usergroup and use that.....

Xenon 03-05-2003 04:10 PM

hmm, i've done that already for me ;)

go to admin/setting.php and create a new setting varname adminstyleid :)

so you can change that value in vboptions (set default to 0) :)

then open your normal global.php
and add this:
PHP Code:

if ($adminstyleid!=and $bbuserinfo[usergroupid]==6) {
  
$styleid=$adminstyleid;
  unset(
$style);    


just before that:
PHP Code:

if (!isset($style)) {
  
$style=$DB_site->query_first("SELECT templatesetid,replacementsetid,userselect FROM style WHERE styleid='".addslashes($styleid)."' or styleid=1 ORDER BY styleid DESC");
}
//get template set and replacement set details
$templatesetid=$style['templatesetid'];
$replacementsetid=$style['replacementsetid']; 


Rose 03-05-2003 04:44 PM

:D Thanks, Xenon.

I've added the information to global.php, but I'm having trouble with the first step.

admin/setting.php > add a new setting for varname adminstyleid ..... Maybe could you possible point me as to where I might add that in setting.php? I've not made heads nor tails of the file. :(

Xenon 03-05-2003 04:58 PM

you should run the file and click on add setting :)

Rose 03-05-2003 05:13 PM

Oh! Even easier. :D Thanks, Stefan! That worked like a charm, and I learned something new, too.

Xenon 03-06-2003 12:05 PM

:)
you're welcome Rose :)


All times are GMT. The time now is 10:24 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.01721 seconds
  • Memory Usage 1,720KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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