[2.0.16] Olympus Group Colours

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

Rating:

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

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 29216
Joined: Sat Aug 16, 2003 7:36 am

[2.0.16] Olympus Group Colours

Post by Extensions Robot »

MOD Name: Olympus Group Colours
Author: smithy_dll
MOD Description: This MOD for phpBB2.0 implements user group colours simillar to phpBB olympus (3.0).


MOD Version: 1.0.4c (Updated 06/30/05)

Download File: Olympus Group Colours 1-0-4c.mod
mods overview page: View
File Size: 20983 Bytes

Security Score: 0
Last edited by Extensions Robot on Mon Apr 30, 2007 12:29 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

MOD Validated/Released

Notes:
This MOD allows a phpBB 2.0.x forum to show Olympus-like group color.
bebe2803
Registered User
Posts: 49
Joined: Tue Jan 25, 2005 7:16 am
Location: Hong Kong

Post by bebe2803 »

first one to reply(excpet bot and vaild post)... seem great, i will download and try in my forum now, and edit this post if find any problems or question.


edit : A problem when installing this mod :

Can't find this row :

Code: Select all

	$poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $postrow[$i]['username'];
I have installed many mod, and i think the mod have changed it...

part of the viewtopic.php...

Code: Select all

//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
for($i = 0; $i < $total_posts; $i++)
{
	$poster_id = $postrow[$i]['user_id'];
	$poster = ( $poster_id != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $poster_id) . '" class="genmed">' : '';
	$poster .= ( $poster_id != ANONYMOUS ) ? $postrow[$i]['username'] : ( ( $postrow[$i]['post_username'] != '' ) ? $postrow[$i]['post_username'] : $lang['Guest'] );
	$poster .= ( $poster_id != ANONYMOUS ) ? '</a>' : '';

	$post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']);
	//
    // MOD - TODAY AT - BEGIN
	//
	if ( $board_config['time_today'] < $postrow[$i]['post_time'])
	{ 
		$post_date = sprintf($lang['Today_at'], create_date($board_config['default_timeformat'], $postrow[$i]['post_time'], $board_config['board_timezone'])); 
	}
	else if ( $board_config['time_yesterday'] < $postrow[$i]['post_time'])
	{ 
		$post_date = sprintf($lang['Yesterday_at'], create_date($board_config['default_timeformat'], $postrow[$i]['post_time'], $board_config['board_timezone'])); 
	}
    // MOD - TODAY AT - END

	$poster_posts = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $postrow[$i]['user_posts'] : '';

	$poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';

	$poster_joined = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ': ' . create_date($lang['DATE_FORMAT'], $postrow[$i]['user_regdate'], $board_config['board_timezone']) : '';

	$poster_avatar = '';
	if ( $postrow[$i]['user_avatar_type'] && $poster_id != ANONYMOUS && $postrow[$i]['user_allowavatar'] )
	{
		switch( $postrow[$i]['user_avatar_type'] )
		{
			case USER_AVATAR_UPLOAD:
				$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img onload="rmwa_img_loaded(this,' .  $board_config['avatar_max_width'] . ',' .  $board_config['avatar_max_height'] . ')"' . ' src="' . $board_config['avatar_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
				break;
			case USER_AVATAR_REMOTE:
				$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img onload="rmwa_img_loaded(this,' .  $board_config['avatar_max_width'] . ',' .  $board_config['avatar_max_height'] . ')"' . ' src="' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
				break;
			case USER_AVATAR_GALLERY:
				$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img onload="rmwa_img_loaded(this,' .  $board_config['avatar_max_width'] . ',' .  $board_config['avatar_max_height'] . ')"' . ' src="' . $board_config['avatar_gallery_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
				break;
		}
	}
// Default avatar MOD, By Manipe (Begin)
	if ((!$poster_avatar) && ($board_config['default_avatar_set'] != 3)){
		if (($board_config['default_avatar_set'] == 0) && ($poster_id == -1) && ($board_config['default_avatar_guests_url'])){
			$poster_avatar = '<img src="' . $board_config['default_avatar_guests_url'] . '" alt="" border="0" />';
		}
		else if (($board_config['default_avatar_set'] == 1) && ($poster_id != -1) && ($board_config['default_avatar_users_url']) ){
			$poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
		}
		else if ($board_config['default_avatar_set'] == 2){
			if (($poster_id == -1) && ($board_config['default_avatar_guests_url'])){
				$poster_avatar = '<img src="' . $board_config['default_avatar_guests_url'] . '" alt="" border="0" />';
			}
			else if (($poster_id != -1) && ($board_config['default_avatar_users_url'])){
				$poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
			}
		}
	}
// Default avatar MOD, By Manipe (End)
	//
	// Define the little post icon
	//
	if ( $userdata['session_logged_in'] && $postrow[$i]['post_time'] > $userdata['user_lastvisit'] && $postrow[$i]['post_time'] > $topic_last_read )
	{
		$mini_post_img = $images['icon_minipost_new'];
		$mini_post_alt = $lang['New_post'];
	}
	else
	{
		$mini_post_img = $images['icon_minipost'];
		$mini_post_alt = $lang['Post'];
	}

	$mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#' . $postrow[$i]['post_id'];

	//
	// Generate ranks, set them to empty string initially.
	//
	$poster_rank = '';
	$rank_image = '';
	if ( $postrow[$i]['user_id'] == ANONYMOUS )
	{
	}
	else if ( $postrow[$i]['user_rank'] )
	{
		for($j = 0; $j < count($ranksrow); $j++)
		{
			if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
			{
				$poster_rank = $ranksrow[$j]['rank_title'];
				$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $images['rank'] . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
			}
		}
	}
	else
	{
		for($j = 0; $j < count($ranksrow); $j++)
		{
			if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
			{
				$poster_rank = $ranksrow[$j]['rank_title'];
				$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="'  . $images['rank']. $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
			}
		}
	}

	//
	// Handle anon users posting with usernames
	//
	if ( $poster_id == ANONYMOUS && $postrow[$i]['post_username'] != '' )
	{
		$poster = $postrow[$i]['post_username'];
		$poster_rank = $lang['Guest'];
	}

	$temp_url = '';

	if ( $poster_id != ANONYMOUS )
	{
		$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
		$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
		$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
Last edited by bebe2803 on Fri Mar 04, 2005 3:02 am, edited 1 time in total.
怨念公社 (trad. chinese big5 forum)
coygroup
Registered User
Posts: 170
Joined: Thu Aug 12, 2004 5:24 am
Location: California
Contact:

Post by coygroup »

Is this like the Username Color MOD where it does is all the way throughout phpBB? Is it admin based too?
www.anthonycoy.com
www.anthonycoy.com/forum
[ Invision View Profile MOD v1.1.0 Here ]
bebe2803
Registered User
Posts: 49
Joined: Tue Jan 25, 2005 7:16 am
Location: Hong Kong

Post by bebe2803 »

Good if can see a demo...

I have installed it (just paste those row somewhere in viewtopic.php.....)

Now my index "who is online" looks like this :

http://tinypic.com/204hg4
怨念公社 (trad. chinese big5 forum)
User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post by onigumo »

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?

2.) Is this compatible with eXtreme Styles?

3.) Will it allow you to choose different colors for different templates or will you have to use the same colors for every template?
I write articles on community building
@ The Infinity Program.
bebe2803
Registered User
Posts: 49
Joined: Tue Jan 25, 2005 7:16 am
Location: Hong Kong

Post by bebe2803 »

1. I dont know, i will try it later on my live board

2. I have installed exstyle too, and find no problem... (seem that they are not related to each other...)

3. cannot, i guess...

(testing now)
怨念公社 (trad. chinese big5 forum)
bebe2803
Registered User
Posts: 49
Joined: Tue Jan 25, 2005 7:16 am
Location: Hong Kong

Post by bebe2803 »

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...

I have installed Usergroup Auto Join and this mod won't show those group (only show the open group)

Code: Select all

	if ($row['group_type'] == 0)
	{
		$legend .= ', <a style="color:#' . $row['group_colour'] . '" href="groupcp.' . $phpEx . '?sid=' . $userdata['session_id'] . '&' . POST_GROUPS_URL . '=' . $row['group_id'] . '">' . $row['group_name'] . '</a>';
	}
changed to

Code: Select all

	if ($row['group_type'] == 0)
	{
		$legend .= ', <a style="color:#' . $row['group_colour'] . '" href="groupcp.' . $phpEx . '?sid=' . $userdata['session_id'] . '&' . POST_GROUPS_URL . '=' . $row['group_id'] . '">' . $row['group_name'] . '</a>';
	}
	if ($row['group_type'] == 3)
	{
		$legend .= ', <a style="color:#' . $row['group_colour'] . '" href="groupcp.' . $phpEx . '?sid=' . $userdata['session_id'] . '&' . POST_GROUPS_URL . '=' . $row['group_id'] . '">' . $row['group_name'] . '</a>';
	}
then can show to auto join group too, i think this method can used to show the closed group and the hide one.... (changed 0 to 3, 3 is auto join group in that mod)


demo (image)

http://tinypic.com/205i53

upper : before assign by admin to a group even tails2803 have join a group

lower : admin have assgin him to " 王道派" color (admin cannot change the group color that he has not join that group)
怨念公社 (trad. chinese big5 forum)
User avatar
smithy_dll
Former Team Member
Posts: 7632
Joined: Tue Jan 08, 2002 6:27 am
Location: Australia
Name: Lachlan Smith
Contact:

Post by smithy_dll »

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.
Systems Engineering
bebe2803
Registered User
Posts: 49
Joined: Tue Jan 25, 2005 7:16 am
Location: Hong Kong

Post by bebe2803 »

Thanks for the reply.....:P

That ok..... really a good design, i am looking forward to olympus... (but i wish there will be some improve here, or the admin in olympus need to edit each user color.... 8O )
怨念公社 (trad. chinese big5 forum)
Kanon
Registered User
Posts: 72
Joined: Sat Sep 11, 2004 2:53 pm

Post by Kanon »

Is there a demo page for this mod?
User avatar
smithy_dll
Former Team Member
Posts: 7632
Joined: Tue Jan 08, 2002 6:27 am
Location: Australia
Name: Lachlan Smith
Contact:

Post by smithy_dll »

Looks the same as olympus basically, except for phpBB2.0
Systems Engineering
Cross_+_Flame
Registered User
Posts: 295
Joined: Wed Oct 30, 2002 3:37 pm
Location: Okie-homa!
Contact:

Post by Cross_+_Flame »

Does this work with Profile Control Panel, and the changes it makes to the main forum page? I assume not.
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric »

I think the Profile Control Panel MOD already has something like this in it.
Eric
GruntsMilitary
Registered User
Posts: 30
Joined: Tue Jun 08, 2004 4:50 pm

Post by GruntsMilitary »

Great mod, works well on my forum.

Question: how can I use this mod to colorize usernames in the "Last Post" area on the index page? This mod doesn't seem to change those colors.

Thanks!
Post Reply

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