danrak
04-01-2005, 01:00 PM
I've searched for a bit and couldn't find this. Is there anyway to make it so only certain groups can select a different style? For example, say I have 3 skins, and only want the staff and supporters to be able to choose a different skin then the default one which the guests/registered members can see. Can this be done?
Deaths
04-01-2005, 01:01 PM
Not as far as I know...
You could edit each user induvidually in phpMyAdmin, though.
why-not
04-01-2005, 04:09 PM
Hi
Real Quick....
User Group Can Change Styles Permissions
Follow me!!!
Go to the Admin Directory....
Open './admin/usergroup.php'
FIND THIS...
require_once('./includes/adminfunctions_ranks.php');
BELOW IT ADD...
require_once ( './includes/adminfunctions_template.php' );
FIND THIS...
// set default yes permissions (bitfields)
$ug_bitfield = array(
'showgroup' => 1,
'canview' => 1,
'canviewmembers' => 1,
'canviewothers' => 1,
'cagetattachment' => 1,
'cansearch' => 1,
'canmodifyprofile' => 1,
'canthreadrate' => 1,
'canpostattachment' => 1,
'canpostpoll' => 1,
'canvote' => 1,
'canwhosonline' => 1,
'allowhidden' => 1,
'showeditedby' => 1,
'canseeprofilepic' => 1,
'canusesignature' => 1,
'cannegativerep' => 1,
'canuserep' => 1,
);
REPLACE WITH...
// set default yes permissions (bitfields)
$ug_bitfield = array(
'showgroup' => 1,
'canview' => 1,
'styleid' => '',
'canviewmembers' => 1,
'canviewothers' => 1,
'cagetattachment' => 1,
'cansearch' => 1,
'canmodifyprofile' => 1,
'canthreadrate' => 1,
'canpostattachment' => 1,
'canpostpoll' => 1,
'canvote' => 1,
'canwhosonline' => 1,
'allowhidden' => 1,
'showeditedby' => 1,
'canseeprofilepic' => 1,
'canusesignature' => 1,
'cannegativerep' => 1,
'canuserep' => 1,
'canselectskin' => 1,
);
FIND THIS...
print_yes_no_row($vbphrase['can_download_attachments'], 'usergroup[cangetattachment]', $ug_bitfield['cangetattachment']);
print_table_break();
print_column_style_code(array('width: 70%', 'width: 30%'));
REPLACE WITH...
print_yes_no_row($vbphrase['can_download_attachments'], 'usergroup[cangetattachment]', $ug_bitfield['cangetattachment']);
print_yes_no_row($vbphrase['can_select_skin'], 'usergroup[canselectskin]', $ug_bitfield['canselectskin']);
if ($usergroup['styleid'] == 0)
{
$usergroup['styleid'] = -1;
}
print_style_chooser_row('usergroup[styleid]', $usergroup['styleid'], $vbphrase['use_default_style'], $vbphrase['force_usergroup_style'], 1);
print_table_break();
print_column_style_code(array('width: 70%', 'width: 30%'));
Close and save './admin/usergroup.php'
Open './global.php'
FIND THIS...
// is style in the forum/thread set?
if ($codestyleid)
{
// style specified by forum
$styleid = $codestyleid;
$userselect = true;
}
else if ($bbuserinfo['styleid'] > 0 AND ($vboptions['allowchangestyles'] == 1 OR ($bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL)))
{
// style specified in user profile
$styleid = $bbuserinfo['styleid'];
}
else
{
// no style specified - use default
$styleid = $vboptions['styleid'];
}
REPLACE WITH...
if ( $codestyleid )
{
$styleid = $codestyleid;
$userselect = true;
}
else if ( ( $permissions['genericpermissions'] & 16777216 ) <> 0 )
{
if ( $bbuserinfo['styleid'] > 0 AND ($vboptions['allowchangestyles'] == 1 OR ( $bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL ) ) )
{
$styleid = $bbuserinfo['styleid'];
}
else
{
$styleid = $vboptions['styleid'];
}
}
else
{
$styleid = $permissions['styleid'];
}
FIND THIS...
if ($vboptions['allowchangestyles'])
{
$stylecount = 0;
$quickchooserbits = construct_style_options(-1, '--', true, true);
$show['quickchooser'] = iif ($stylecount > 1, true, false);
unset($stylecount);
}
else
{
$show['quickchooser'] = false;
}
REPLACE WITH...
if ( ( $permissions['genericpermissions'] & 16777216 ) <> 0 )
{
if ( $vboptions['allowchangestyles'] )
{
$stylecount = 0;
$quickchooserbits = construct_style_options ( -1, '--', true, true );
$show['quickchooser'] = iif ( $stylecount > 1, true, false );
unset ( $stylecount );
}
else
{
$show['quickchooser'] = false;
}
}
else
{
$show['quickchooser'] = false;
}
Save, close './global.php'
Open './profile.php'
FIND THIS...
if ($vboptions['allowchangestyles'])
{
$stylecount = 0;
if (!empty($stylechoosercache))
{
$stylesetlist = construct_style_options();
}
$show['styleoption'] = iif($stylecount > 1, true, false);
}
else
{
$show['styleoption'] = false;
}
REPLACE WITH...
if ( ( $permissions['genericpermissions'] & 16777216 ) <> 0 )
{
if ( $vboptions['allowchangestyles'] )
{
$stylecount = 0;
if ( ! empty ( $stylechoosercache ) )
{
$stylesetlist = construct_style_options ();
}
$show['styleoption'] = iif($stylecount > 1, true, false);
}
else
{
$show['styleoption'] = false;
}
}
else
{
$show['styleoption'] = false;
}
save, close './profile.php'
Open './includes/init.php'
FIND THIS...
'canhaverepleft' => 8388608,
BELOW IT ADD...
'canselectskin' => 16777216,
save, close './includes/init.php'
Now just run these querys (change 'bbs_' to the TABLE PREFIX YOU ARE USING, if not using one, then just remove it!)
ALTER TABLE bbs_usergroup ADD styleid TINYINT(1) UNSIGNED NOT NULL default '1';
INSERT INTO bbs_phrase VALUES ( '', -1, 'can_select_skin', 'Can Select Forum Styles', 3 );
INSERT INTO bbs_phrase VALUES ( '', -1, 'use_default_style', 'Use Default Style', 3 );
INSERT INTO bbs_phrase VALUES ( '', -1, 'force_usergroup_style', 'Force this usergroup to use this style only.<br />\r\n<span class=\'smallfont\'>If usergroup can not select styles, select one.</span>', 3 );
After go to Admin Panel >> Language Manger >> click Rebuild All Languages!
Then go to Usergroups >> Usergroup Manager >> Select group
Then configure your groups! (by default all groups have no permission to change styles and they are set to use the default style!!!)
You now have Change Style Permissions Based On User Groups!
I did this real quick, so there is no Admin Help phrases, if you want them I will show you how to add them, just tell me!
c, ya...
Sonia
danrak
04-01-2005, 05:29 PM
Thank you so much. I installed it and it is working great.
Thank you.
want3ed
09-22-2008, 04:38 PM
i need this mod , any one have it?
i dont want make manuel install.
i need this mod , any one have it?
i dont want make manuel install.
The hack I would use is Andreas's Restrict Style to Usergroup hack which he released for v3.5.x. I have tested it on v3.5.x, v3.6.x and v3.7.x, and it works fine for three versions.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.