[2.0.16] Olympus Group Colours

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
17
49%
Very Good
8
23%
Good
6
17%
Fair
0
No votes
Poor
4
11%
 
Total votes: 35

DreAdeDcoRpSE
Registered User
Posts: 196
Joined: Fri Dec 22, 2006 3:43 am

Post by DreAdeDcoRpSE »

Manually installed on phpBB 2.0.22 and works great.

Mod's running:

Topic Calendar (regular phpBB edition)
[2.0.15] April Fool MOD
birthday mod
[2.0.21] My Quick Reply
The humanizer
Slick Group Admin
Democracy mod
[2.0.10] Remote Avatar Resize
IP log on regsteration
Gender mod
TempBan
BanReason
Staff Posts
Fix For The Firefox "Remember Passwords" Problem
User Shield
Password security
Search Data
EasyMOD
Advanced User Search
UserList
Edit User's Postcount
[2.0.20] Vote Manager
[2.0.20] MOD Troll
[04/02/07] Rules Page

Maybe a few I am missing, not sure... Most installed by hand, or partially by hand.


I have a tendacy to do all edits by hand the delete the edits in the txt file and upload the files to easy mod and let easy mod do all the SQL work. saves me time. Other than that all the file edits were done by hand.

deejaybet wrote: hmm i dont know then.. it must have something to do with your lang_main.php anyways

edit: i have a feeling its the super quick reply
## This MOD not compliant with MODs (for more info see contrib folder):
## - Username Color ( http://www.phpbb.com/phpBB/viewtopic.php?t=187354 )
## - Link Poster's Name To Profile ( http://www.phpbb.com/phpBB/viewtopic.php?t=210954 )
## - Mini Profile ( http://www.phpbb.com/phpBB/viewtopic.php?t=110870 )
## - Author Hyperlink ( http://www.phpbb.com/phpBB/viewtopic.php?t=135776 )
## - Online/Offline/Hidden ( http://www.phpbb.com/phpBB/viewtopic.php?t=228106 )


since its not compliant with the username colour mod i guess its not with this either


Works with the quick reply mod, I have it installed on my forums and this mod works just fine with it. So if its the case that its the super quick reply mod then I suggest [2.0.21] My Quick Reply

I did have the same problem as
chatline, but was an easy fix inside the index_body.tpl.

Nice work. Keep it up...
elpastrana
Registered User
Posts: 2
Joined: Wed Jun 13, 2007 2:34 pm

Re: [2.0.16] Olympus Group Colours

Post by elpastrana »

Well after reading and searching for almost 2 days I failed to read the FAQ's and posted in the wrong section. My apologies :oops:
After trying to install Olympus Group Colours and failed I restored all back-up files and thats when I lost the Who is Online on main page Image
Its not my board and other Mods have been installed but I think they have errors. I'm gonna create a back-up board and re-install all Mods again but since he worked so hard I wanna restore this one to normal....
Please is there any way to get the Who is Online back up ?
Thanks
sakm
Registered User
Posts: 713
Joined: Sun Jan 21, 2007 8:14 pm
Location: Hull, uk
Name: Stu
Contact:

Re: [2.0.16] Olympus Group Colours

Post by sakm »

how do you make this mod work with show last visited users

any one help me with this

Thanks stu
sakm
Registered User
Posts: 713
Joined: Sun Jan 21, 2007 8:14 pm
Location: Hull, uk
Name: Stu
Contact:

Re: [2.0.16] Olympus Group Colours

Post by sakm »

sakm wrote:how do you make this mod work with show last visited users

any one help me with this

Thanks stu
sorted it 8-)
User avatar
NeoID
Registered User
Posts: 406
Joined: Mon Jun 06, 2005 10:12 pm
Location: Norway
Contact:

Re: [2.0.16] Olympus Group Colours

Post by NeoID »

I've added this mod to my forum, it works well, but shouldn't the color assigned to the group get "auto-applied" to any user added to the group? Now I have to log into the admin panel and set the "Main Group Membership" for each user who should have a different color...

Am I doing something wrong or can this be changed somehow?
Anyway, thanks for the mod, looks like the most promising out there...
Norsk Anime Forum
http://www.AnimeNord.com
User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: [2.0.16] Olympus Group Colours

Post by ChriZathens »

Hello...
Could someone please point me to the right direction in order to make usernames colored in Users of the day ?
I've created a group and members have a blue color.
When they are online, they are blue, but in Users of the day list they appear normally coloured.
I've read in a post about adding user_colour in the sql query, but no matter what I've tried I can't get it to work... :(
Anyone, please???

EDIT: Since I'm not planning on creating many colored groups and the members of this group are only six, any help to "hardcode" the color will help me just the same

eg something like:

Code: Select all

	if ( user == 'test' )
	{
		$user_colour=='#FFF000'
	}
Or something like that... :roll:
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...
XiNiTHAOUS
Registered User
Posts: 202
Joined: Tue Jun 20, 2006 2:22 pm

Re:

Post by XiNiTHAOUS »

_ergo_ wrote:to have topic author colored in viewforum you have to :
FIND

Code: Select all

//
// All announcement data, this keeps announcements
// on each viewforum page ...
//
$sql = "SELECT t.*, u.username, u.user_id,
AFTER ADD

Code: Select all

u.user_colour as user_colour_first,
FIND

Code: Select all

$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '"
AFTER ADD

Code: Select all

 style="color: #' . $topic_rowset[$i]['user_colour_first'] . ';"
there are more files to be done like search.php but i dont care ... ;-)

the changes should be probably similiar :]

so this covers most issues with mod :]

hope thie things ive posted here are useful to someone and dont take up much resources

DEMO HERE : http://darknation.pl/forum2 - only index.php for unregistered folks ( dont register unless you want to participate in forums )
Could anyone provide edits based on the above for search.php?
User avatar
Ornette
Registered User
Posts: 56
Joined: Thu Mar 06, 2008 3:53 pm

Re: If anyone is at all interested, that is...

Post by Ornette »

>>
prophetUK wrote:
NGLeader wrote: It would be nice if we can get the Legend line up by priority.

Admin being the highest priority and Users being the lowest.
Administrators, Jr. Administrators, Moderators, Users

Did anyone find a solution to this?

Seems Simple Colored Usergroups allows for this - you get to choose placement of the legend with the Position after group on legend: option in Group Admin > Management



DJReda wrote:
delicata wrote:
smithy_dll wrote: Looks the same as olympus basically, except for phpBB2.0

One question. In Olympus, (area51), the legend has no underlines by default. They appear on hover.
I'm having the same issue - working on it now...

Hmmm, seems again Simple Colored Usergroups addresses this too - underline on hover only... ;)



onigumo wrote:Questions:
1.) What if someone is in multiple colored usergroups? Will the last one he was added to be the one by which the color of will be applied to his or her username?
bebe2803 wrote:About the question 3, i find that they need the admin to change their "main group colour", or their color will still be the normal user. I wish the user can change the color themselves in their edit profile... or a page in ACP for admin to change many user color easily... there will be a problem if 100+ user want to change their color...
dan369 wrote:
ChrisRLG wrote:
sliktek wrote:The bottom of the page works fine now except I have the open groups mod so people can choose a group when they sign up. But when they sign up it puts them in the group but doesn't change their color? How do I fix this?
You have to do the change in adminCP - not possible for the users to choose thier MAIN usergroup, which is what changes the color.
Do you really have to assign color to each and every user? Cant you just add them to the group and they automatically get assigned the colour for the group?

Well this is the one big killer for the mod. Pretty stupid oversight really. I guess it doesn't really mimic phpBB3 that much after all. Then again, it is in the [2.0.x] MOD Database Cleanup section...


Again Simple Colored Usergroups answers these issues. Colour is applied to all members of a group automatically, and users do too get the choice to choose their 'Main Group Membership', or 'User Group priority' as it is called there. Much better system.
(although could be better if SCU had a 'default' choice for the group priority, which would then give colour priotity as per the group ordering placement... ).


SCU also comes with too it a nice little contrib file that applies colouring to all of the phpBB2 forum - no fiddling about like with this ;) Although in saying that, I didn't have a problem with closed groups not taking on colour, as I saw reported by some - so no fiddling there.

However one thing that SCU doesn't do is keep the default colourings for the Administrator and Moderator like this one does - something that is perhaps a bit annoying.


smithy_dll wrote:The point of the MOD is that it mimics the behaviour of the group colours in olympus. I'm not sure how they work in the admin panel, but the DB structure is the same as the latest CVS I downloaded (a month or two old).

I won't be making any changes to it which takes it any further than Olympus will take it, if you want user selectable colours, I suggest you try looking for another MOD.

Well, with a author attitude like that i guess it deserves to be in the MOD Database Cleanup section. But, just for the sake of good keeping, here I enclose the amended mod for it to work/install under 2.0.23:

  • Code: Select all

    ##############################################################
    ## MOD Title: Olympus Group Colours
    ## MOD Author: smithy_dll < n/a > (David Smith) http://phpbbstuff.ddblog.org
    ## MOD Description: This MOD for phpBB2.0 implements user group colours simillar to phpBB olympus (3.0).
    ## MOD Version: 1.0.4c - 2.0.23
    ## 
    ## Installation Level: Moderate
    ## Installation Time: 47 minutes
    ## Files To Edit: groupcp.php
    ##                index.php
    ##                viewtopic.php
    ##                admin/admin_groups.php
    ##                admin/admin_users.php
    ##                includes/page_header.php
    ##                includes/usercp_viewprofile.php
    ##                language/lang_english/lang_admin.php
    ##                language/lang_english/lang_main.php
    ##                templates/subSilver/index_body.tpl
    ##                templates/subSilver/admin/group_edit_body.tpl
    ##                templates/subSilver/admin/user_edit_body.tpl
    ## Included Files: 
    ## Generator: MOD Studio 3.0 Beta 2 [mod functions 0.4.1818.26949]
    ##############################################################
    ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
    ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
    ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
    ## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
    ##############################################################
    ## Author Notes: 
    ## 
    ## First assign a group a colour in the group administration panel, then edit the default 
    ## group a user belongs to in the administration panel for the user's name to appear 
    ## coloured on the index, viewtopic, viewprofile and groupcp.
    ## 
    ## A user can belong two multiple coloured groups, but can only belong to one default 
    ## group of which they inherit the groups colour.
    ## 
    ## You can also set wether or not a group shows up in the Legend on the forum index.
    ##
    ## Hidden groups will be shown if you tell them to, however it is up to the admin wether
    ## they give a hidden group a colour and tell it to display in the legend.
    ## 
    ##############################################################
    ## MOD History:
    ## 
    ##   2005-03-06 - Version 1.0.4
    ## 
    ##      - Fixed groupcp display bug, and legend display bug
    ##
    ##   2005-02-27 - Version 1.0.3
    ## 
    ##      - Removed some Olympus specific code and cleaned up an SQL edit
    ## 
    ##   2005-02-26 - Version 1.0.2
    ## 
    ##      - Added missing ALTER TABLE column group_id on phpbb_users
    ## 
    ##   2005-02-26 - Version 1.0.1
    ## 
    ##      - Fixed a few bugs in the MOD Template file
    ## 
    ##   2005-02-26 - Version 1.0.0
    ## 
    ##      - The first release of the Olympus style group colour MOD for phpBB2.0.
    ## 
    ##############################################################
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
    ##############################################################
    
    #
    #-----[ SQL ]------------------------------------------
    #
    ALTER TABLE phpbb_groups ADD group_colour VARCHAR(6) NOT NULL;
    ALTER TABLE phpbb_groups ADD group_legend TINYINT(1) DEFAULT '0' NOT NULL;
    ALTER TABLE phpbb_users ADD user_colour VARCHAR(6) NOT NULL;
    ALTER TABLE phpbb_users ADD group_id MEDIUMINT(8) NOT NULL;
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    groupcp.php
    #
    #-----[ FIND ]------------------------------------------
    #
    	$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm  
    
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    user_msnm
    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , user_colour
    #
    #-----[ FIND ]------------------------------------------
    #
    	$sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, ug.user_pending 
    
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    user_msnm
    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , u.user_colour
    #
    #-----[ FIND ]------------------------------------------
    #
    	$sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm
    
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    user_msnm
    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , u.user_colour 
    #
    #-----[ FIND ]------------------------------------------
    #
    # ORNS   $s_hidden_fields .= '';
    
        $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    	
    	$group_name = $group_info['group_name'];
    	
    	if ($group_info['group_colour'])
    	{
    		$group_name = '<span style="color: #' . $group_info['group_colour'] . '">' . $group_name . '</span>';
    	}
    	
    	if ($group_moderator['user_colour'])
    	{
    		$username = '<b style="color: #' . $group_moderator['user_colour'] . ';">' . $username . '</b>';
    	}
    
    #
    #-----[ FIND ]------------------------------------------
    #
    		'GROUP_NAME' => $group_info['group_name'],
    
    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
    		'GROUP_NAME' => $group_name,
    
    #
    #-----[ FIND ]------------------------------------------
    #
    			$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
    			
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    			if ($group_members[$i]['user_colour'])
    			{
    				$username = '<b style="color: #' . $group_members[$i]['user_colour'] . ';">' . $username . '</b>';
    			}
    
    
    #
    #-----[ FIND ]------------------------------------------
    #
    				$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    				
    				if ($modgroup_pending_list[$i]['user_colour'])
    				{
    					$username = '<b style="color: #' . $modgroup_pending_list[$i]['user_colour'] . ';">' . $username . '</b>';
    				}
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    index.php
    #
    #-----[ FIND ]------------------------------------------
    #
    else
    {
    	$mark_read = '';
    }
    
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Grab group details for legend display
    $sql = 'SELECT group_id, group_name, group_colour, group_type
    	FROM ' . GROUPS_TABLE . '
    	WHERE group_legend = 1 AND group_single_user = 0';
    $result = $db->sql_query($sql);
    
    $legend = '';
    while ($row = $db->sql_fetchrow($result))
    {
    	$legend .= ', <a style="color:#' . $row['group_colour'] . '" href="groupcp.' . $phpEx . '?sid=' . $userdata['session_id'] . '&' . POST_GROUPS_URL . '=' . $row['group_id'] . '">' . $row['group_name'] . '</a>';
    }
    $db->sql_freeresult($result);
    
    
    #
    #-----[ FIND ]------------------------------------------
    #
    		'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'), 
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    		'LEGEND' => $legend,
    
    #
    #-----[ FIND ]------------------------------------------
    #
    		'L_ONLINE_EXPLAIN' => $lang['Online_explain'], 
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    		'L_LEGEND' => $lang['Legend'],
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    viewtopic.php
    #
    #-----[ FIND ]------------------------------------------
    #
    $sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid
    
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    user_allowsmile, 
    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    u.user_colour, 
    #
    #-----[ FIND ]------------------------------------------
    #
    	$poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $postrow[$i]['username'];
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    	
    	if ($postrow[$i]['user_colour'])
    	{
    		$poster = '<b style="color: #' . $postrow[$i]['user_colour'] . ';">' . $poster . '</b>';
    	}
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    admin/admin_groups.php
    #
    #-----[ FIND ]------------------------------------------
    #
    	$group_hidden = ( $group_info['group_type'] == GROUP_HIDDEN ) ? ' checked="checked"' : '';
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    	
    	$group_legend_yes = ( $group_info['group_legend'] == 1 ) ? ' checked="checked"' : '';
    	$group_legend_no = ( $group_info['group_legend'] == 0 ) ? ' checked="checked"' : '';
    
    #
    #-----[ FIND ]------------------------------------------
    #
    		'GROUP_MODERATOR' => $group_moderator, 
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    	'GROUP_COLOUR' => $group_info['group_colour'],
    
    #
    #-----[ FIND ]------------------------------------------
    #
    		'L_YES' => $lang['Yes'],
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    		'L_NO' => $lang['No'],
    		'L_GROUP_COLOUR' => $lang['group_colour'],
    		'L_GROUP_SHOW_LEGEND' => $lang['group_show_legend'],
    
    #
    #-----[ FIND ]------------------------------------------
    #
    		'S_GROUP_HIDDEN_CHECKED' => $group_hidden,
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    		'S_GROUP_LEGEND_YES' => $group_legend_yes,
    		'S_GROUP_LEGEND_NO' => $group_legend_no,
    
    #
    #-----[ FIND ]------------------------------------------
    #
    # ORNS  $group_name = isset($HTTP_POST_VARS['group_name']) ? trim($HTTP_POST_VARS['group_name']) : '';
            $group_name = isset($HTTP_POST_VARS['group_name']) ? htmlspecialchars(trim($HTTP_POST_VARS['group_name'])) : '';
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    		$group_colour = isset($HTTP_POST_VARS['group_colour']) ? trim($HTTP_POST_VARS['group_colour']) : '';
    		$group_legend = isset($HTTP_POST_VARS['group_legend']) ? intval($HTTP_POST_VARS['group_legend']) :0;
    
    #
    #-----[ FIND ]------------------------------------------
    #
    				SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator 
    
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    group_moderator = $group_moderator 
    
    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , group_colour = '" . str_replace("\'", "''", $group_colour) . "', group_legend = $group_legend 
    
    #
    #-----[ FIND ]------------------------------------------
    #
    			$sql = "INSERT INTO " . GROUPS_TABLE . " (group_type, group_name, group_description, group_moderator, group_single_user) 
    				VALUES ($group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator,	'0')";
    
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    group_single_user
    
    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , group_colour, group_legend
    
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    '0'
    
    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , '" . str_replace("\'", "''", $group_colour) . "', $group_legend
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    admin/admin_users.php
    #
    #-----[ FIND ]------------------------------------------
    #
    		$user_rank = ( !empty($HTTP_POST_VARS['user_rank']) ) ? intval( $HTTP_POST_VARS['user_rank'] ) : 0;
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    		$user_group = ( !empty($HTTP_POST_VARS['user_group']) ) ? intval( $HTTP_POST_VARS['user_group'] ) : 0;
    
    #
    #-----[ FIND ]------------------------------------------
    #
    		// Update entry in DB
    		//
    		if( !$error )
    		{
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    			$group_colour = '';
    			$sql = "SELECT group_colour FROM " . GROUPS_TABLE . " WHERE group_id = $user_group;";
    			if ( !($result = $db->sql_query($sql)) )
    			{
    				message_die(GENERAL_ERROR, 'Could not obtain groups data', '', __LINE__, __FILE__, $sql);
    			}
    		
    			if( $row = $db->sql_fetchrow($result) )
    			{
    				$group_colour = $row['group_colour'];
    			}
    			
    
    #
    #-----[ FIND ]------------------------------------------
    #
    				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . "
    
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    $user_rank
    
    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , group_id = $user_group, user_colour = '$group_colour' 
    
    #
    #-----[ FIND ]------------------------------------------
    #
    			$rank_select_box .= '<option value="' . $rank_id . '"' . $selected . '>' . $rank . '</option>';
    		}
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    		
    		$sql = "SELECT g.* FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
    			WHERE ug.group_id = g.group_id AND user_id = $user_id AND group_single_user = 0;";
    		if ( !($result = $db->sql_query($sql)) )
    		{
    			message_die(GENERAL_ERROR, 'Could not obtain groups data', '', __LINE__, __FILE__, $sql);
    		}
    		
    		$group_select_box = '<option value="0">' . $lang['No_assigned_group'] . '</option>';
    		while( $row = $db->sql_fetchrow($result) )
    		{
    			$group_name = $row['group_name'];
    			$group_id = $row['group_id'];
    			
    			$selected = ( $this_userdata['group_id'] == $group_id ) ? ' selected="selected"' : '';
    			if ($row['group_colour'])
    			{
    				$group_colour = $row['group_colour'];
    				$group_select_box .= '<option style="color: #' . $group_colour . '" value="' . $group_id . '"' . $selected . '>' . $group_name . '</option>';
    			}
    		}
    
    #
    #-----[ FIND ]------------------------------------------
    #
    			'RANK_SELECT_BOX' => $rank_select_box,
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    			'GROUP_SELECT_BOX' => $group_select_box,
    
    #
    #-----[ FIND ]------------------------------------------
    #
    			'L_SELECT_RANK' => $lang['Rank_title'],
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    			'L_MAIN_GROUP' => $lang['main_group'],
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    includes/page_header.php
    #
    #-----[ FIND ]------------------------------------------
    #
    	$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip
    
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    user_level, 
    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    u.user_colour, 
    #
    #-----[ FIND ]------------------------------------------
    #
    				if ( $row['user_level'] == ADMIN )
    
    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
    				if ( $row['user_colour'] )
    				{
    					$row['username'] = '<b>' . $row['username'] . '</b>';
    					$style_color = 'style="color:#' . $row['user_colour'] . '"';
    				}
    				elseif ( $row['user_level'] == ADMIN )
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    includes/usercp_viewprofile.php
    #
    #-----[ FIND ]------------------------------------------
    #
    	$u_search_author = urlencode(str_replace(array('&', ''', '"', '<', '>'), array('&', "'", '"', '<', '>'), $profiledata['username']));
    }
    
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    $username = $profiledata['username'];
    
    if ($profiledata['user_colour'])
    {
    	$username = '<b style="color: #' . $profiledata['user_colour'] . ';">' . $username . '</b>';
    }
    
    
    #
    #-----[ FIND ]------------------------------------------
    #
    	'USERNAME' => $profiledata['username'],
    
    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
    	'USERNAME' => $username,
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    language/lang_english/lang_admin.php
    #
    #-----[ FIND ]------------------------------------------
    #
    //
    // That's all Folks!
    
    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    //
    // Olympus Group Colour MOD
    //
    $lang['group_colour'] = 'Group colour';
    $lang['group_show_legend'] = 'Show group in Legend';
    $lang['main_group'] = 'Main Group Membership';
    $lang['No_assigned_group'] = 'No main group assigned';
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    language/lang_english/lang_main.php
    #
    #-----[ FIND ]------------------------------------------
    #
    //
    // That's all, Folks!
    
    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    //
    // Olympus Group Colour MOD
    //
    $lang['Legend'] = 'Legend';
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/index_body.tpl
    #
    #-----[ FIND ]------------------------------------------
    #
    	<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
    
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    rowspan="2"
    #
    #-----[ IN-LINE REPLACE WITH ]------------------------------------------
    #
    rowspan="3"
    #
    #-----[ FIND ]------------------------------------------
    #
    {LOGGED_IN_USER_LIST}</span></td>
      </tr>
    
    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
    	<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
      </tr>
      <tr>
        <td class="row1"><b class="gensmall">{L_LEGEND} :: {L_WHOSONLINE_ADMIN}, {L_WHOSONLINE_MOD}{LEGEND}</b></td>
      </tr>
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/admin/group_edit_body.tpl
    #
    #-----[ FIND ]------------------------------------------
    #
    		<input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} /> {L_GROUP_OPEN} &nbsp;&nbsp;<input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} />	{L_GROUP_CLOSED} &nbsp;&nbsp;<input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} />	{L_GROUP_HIDDEN}</td> 
    	</tr>
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    	<tr>
    	  <td class="row1" width="38%"><span class="gen">{L_GROUP_COLOUR}:</span></td>
    	  <td class="row2" width="62%"> 
    	    <input type="text" class="post" name="group_colour" maxlength="6" size="6" value="{GROUP_COLOUR}" /></td>
    	</tr>
    	<tr>
    	  <td class="row1" width="38%"><span class="gen">{L_GROUP_SHOW_LEGEND}:</span></td>
    	  <td class="row2" width="62%"> 
    	  <input type="radio" class="post" name="group_legend" value="1" {S_GROUP_LEGEND_YES} /> {L_YES} &nbsp; <input type="radio" class="post" name="group_legend" value="0" {S_GROUP_LEGEND_NO} /> {L_NO}</td>
    	</tr>
    
    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/admin/user_edit_body.tpl
    #
    #-----[ FIND ]------------------------------------------
    #
    		<td class="row2"><select name="user_rank">{RANK_SELECT_BOX}</select></td>
    	</tr>
    
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    	<tr>
    		<td class="row1"><span class="gen">{L_MAIN_GROUP}</span></td>
    		<td class="row2"><select name="user_group">{GROUP_SELECT_BOX}</select></td>
    	</tr>
    
    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM
:D
DJ Ornsman - Back To 93
Tuesday 9-11pm GMT on Stress Factor

http://www.stressfactor.co.uk
Post Reply

Return to “[2.0.x] MOD Database Cleanup”