Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 04-01-2005, 01:00 PM
danrak danrak is offline
 
Join Date: Dec 2001
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Skin select by group

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?
Reply With Quote
  #2  
Old 04-01-2005, 01:01 PM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not as far as I know...

You could edit each user induvidually in phpMyAdmin, though.
Reply With Quote
  #3  
Old 04-01-2005, 04:09 PM
why-not why-not is offline
 
Join Date: Feb 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

Real Quick....

User Group Can Change Styles Permissions

Follow me!!!

Go to the Admin Directory....

Open './admin/usergroup.php'

FIND THIS...
Code:
require_once('./includes/adminfunctions_ranks.php');

BELOW IT ADD...
Code:
require_once ( './includes/adminfunctions_template.php' );
FIND THIS...
Code:
			// 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...
Code:
			// 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...
Code:
	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...
Code:
	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...
Code:
// 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...
Code:
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...
Code:
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...
Code:
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...
Code:
	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...
Code:
	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...
Code:
	'canhaverepleft'           => 8388608,
BELOW IT ADD...
Code:
	'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!)
Code:
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
Attached Images
File Type: png force.png (16.7 KB, 0 views)
Reply With Quote
  #4  
Old 04-01-2005, 05:29 PM
danrak danrak is offline
 
Join Date: Dec 2001
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you so much. I installed it and it is working great.

Thank you.
Reply With Quote
  #5  
Old 09-22-2008, 04:38 PM
want3ed want3ed is offline
 
Join Date: Sep 2007
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i need this mod , any one have it?
i dont want make manuel install.
Reply With Quote
  #6  
Old 09-23-2008, 02:22 AM
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 1,968
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by want3ed View Post
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.
Reply With Quote
Reply

Thread Tools
Display Modes

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:06 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04399 seconds
  • Memory Usage 2,237KB
  • Queries Executed 12 (?)
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
  • (15)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete