Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2007, 10:09 AM
gef gef is offline
 
Join Date: Apr 2006
Location: UK
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Setting style/skin for individual users via admin CP when users can't normally choose

Hi!

I've run into a head-scratcher here.

I run a 3.6.5 forum (licence renewal and update imminent) here, and it has two skins - one dark, set to default, and one (mostly broken) test skin.

Users cannot select skins, so everyone is using the default.

Can I set specific users to use the other "test" skin? In the admin CP, if I find a user and edit their settings, there is a drop down for style, which gives me the options of default, the dark skin, and the broken test skin.

However, if I select the test skin, the user still sees the dark one. Logging out, clearing cookies etc doesn't work, the default is the default, despite their profile saying they are using the test skin.

I need a handful of members to use the test skin, but not everybody.

Have I missed a setting? Do I need to rebuild a database or something to force the change? Or, despite the user-specific setting change via the admin CP, does the disallowing user selection override everything?

Is there a way around this?

Many thanks!

Gef
Reply With Quote
  #2  
Old 07-31-2007, 10:15 AM
MaestroX MaestroX is offline
 
Join Date: Aug 2006
Location: UK
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure in your vbulletin settings under Style & Language Settings you have "Allow Users To Change Styles" set to yes otherwise users will only be able to use the style set as "Default"
Reply With Quote
  #3  
Old 07-31-2007, 10:20 AM
gef gef is offline
 
Join Date: Apr 2006
Location: UK
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah.

That's actually what I want to avoid, as I only want about 6 people to use the test skin, and everyone else to use the default.

Is there a way around it?
Reply With Quote
  #4  
Old 07-31-2007, 10:31 AM
MaestroX MaestroX is offline
 
Join Date: Aug 2006
Location: UK
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unless you make them admins you can't really avoid it.

What I would do it put these users into a new usergroup, allow the "Allow Users To Change Styles" option and in your footer template, wrap the style chooser drop down in a conditional to only let the new usergroup see it.
Reply With Quote
  #5  
Old 07-31-2007, 10:46 AM
gef gef is offline
 
Join Date: Apr 2006
Location: UK
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sounds great, thanks. Can you give me some more info on what I need to edit in the footer template (and where)? I'm a bit new to this!
Reply With Quote
  #6  
Old 07-31-2007, 10:57 AM
MaestroX MaestroX is offline
 
Join Date: Aug 2006
Location: UK
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure,

Go to: Styles & Templates -> Style Manager -> Your Style -> Edit Templates

in your footer template find:

Code:
 <if condition="$show['quickchooser']">
  <td class="tfoot">
   <select name="styleid" onchange="switch_id(this, 'style')">
    <optgroup label="$vbphrase[quick_style_chooser]">
     $quickchooserbits
    </optgroup>
   </select>
  </td>
 </if>
and change it to:

Code:
 
<if condition="is_member_of($vbulletin->userinfo, x)">
 <if condition="$show['quickchooser']">
  <td class="tfoot">
   <select name="styleid" onchange="switch_id(this, 'style')">
    <optgroup label="$vbphrase[quick_style_chooser]">
     $quickchooserbits
    </optgroup>
   </select>
  </td>
 </if>
</if>
change x to the usergroup id of the the users who you want to let use the new style
Reply With Quote
  #7  
Old 07-31-2007, 11:27 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That won't stop users from using the style - if just hides the chooser.

Check my profile for Restrict Style to Usergroup - that might do what you want.
Reply With Quote
  #8  
Old 07-31-2007, 11:34 AM
MaestroX MaestroX is offline
 
Join Date: Aug 2006
Location: UK
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

True, members can use the style if they know the style id (most users won't). You might need to use the same conditional to hide the style switch in the UserCP.

Quote:
An order has been placed!
Ah the perfect solution, nice on Andreas
Reply With Quote
  #9  
Old 07-31-2007, 12:34 PM
gef gef is offline
 
Join Date: Apr 2006
Location: UK
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hiding the chooser will do me - if someone manages to work out the style ID (if they even know there is more than one style), good on them!

However, the conditional does need to be used in the UserCP as well - it's hidden on the main forum with the footer template edit but now appears in the UserCP. I'll see if I can find the template myself this time!

Brilliant job though - thanks very much indeed! Very useful!

Ah hang on, I'm lost in the UserCP templates. By making the edit suggested by MaestroX, or by using Andreas's Restrict Styles product, the style selector is still viewable in all UserCPs.

So...where in the template can I snip it out?
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 12:05 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.04631 seconds
  • Memory Usage 2,237KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete