[Beta] User Override Style with exception for admin

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
deerdork
Registered User
Posts: 115
Joined: Thu Jan 30, 2003 7:44 pm
Location: Dayton OH
Contact:

[Beta] User Override Style with exception for admin

Post by deerdork »

This mod Allows an admin to view a certain style apart from the default when the override user style is on.
This can be userful if an admin is designing a new template for their site but doesnt want it an option to be viewed by other users.

i just played around with the code in functions.php to get it to work
i dont know if its the proper way to be set up but it works for me.
test it out.

Code: Select all

############################################################## 
## MOD Title:          User Override Style with exception for admin 
## MOD Author:         wesdeer < [email protected] > 
## MOD Description:    This MOD will allow the board administrators 
##                     to have the override user style on
##                     and still view their selected style and not the default.
##                     Very useful when designing new style that you dont want
##                     other users to be able to view.
## MOD Version:        1.0 
## Compatibility:      2.0.6 (prior releases not tested) 
## 
## Installation Level: Easy 
## Installation Time:  2 Minutes 
## Files To Edit:      1 
##      include/functions.php 
## 
############################################################## 
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites 
############################################################## 
## 
## Author Notes: 
## 
## enjoy
## 
############################################################## 
## 
## MOD History: 
## 
##   2004-02-21 - Version 1.0 
##      - Initial final release 
## 
############################################################## 
## This MOD is released under the GPL License. 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
# 
# 

# 
#-----[ OPEN ]------------------------------------------------ 
# 
include/functions.php 

# 
#-----[ FIND ]------------------------------------------------ 
# 
	if ( !$board_config['override_user_style'] )
	{

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
if ( $userdata['user_level'] == ADMIN ) 
{
		if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 )
		{
			if ( $theme = setup_style($userdata['user_style']) )
			{
				return;
			}
		}
}
else {

# 
#-----[ FIND ]------------------------------------------------ 
# 
if ( $theme = setup_style($userdata['user_style']) )
			{
				return;
			}
		}
	}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
}

# 
#-----[ SAVE/CLOSE ALL FILES ]-------------------------------- 
# 
# EoM
Silver9990
Registered User
Posts: 76
Joined: Wed Jun 08, 2005 8:01 am
Location: WI

Post by Silver9990 »

[Edit]

Wrong topic, please remove my post.
Post Reply

Return to “[2.0.x] MODs in Development”