[2.0.14] Add Multiple Ranks And Staff View

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

Rating:

Excellent!
27
53%
Very Good
10
20%
Good
10
20%
Fair
3
6%
Poor
1
2%
 
Total votes: 51

Arethka
Registered User
Posts: 10
Joined: Sun Jan 21, 2007 4:16 am

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by Arethka » Mon Sep 10, 2007 8:42 am

Hi, Would you please be able to make this mod with only the Multiple Ranks part without the staff view?

User avatar
shaykana
Registered User
Posts: 108
Joined: Mon Sep 04, 2006 12:11 am
Location: Canada
Contact:

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by shaykana » Mon Sep 10, 2007 9:44 pm

Arethka wrote:Hi, Would you please be able to make this mod with only the Multiple Ranks part without the staff view?
The section of the install file that creates both the rank list and staff view is this:

Code: Select all

#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------------
#
{L_USERGROUPS}</a>&nbsp;
#
#-----[ IN-LINE FIND ]----------------------------------------
#
{L_USERGROUPS}</a>&nbsp;
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
<a href="{U_RANKS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_RANKS}" hspace="3" />{L_RANKS}</a>&nbsp;<a href="{U_STAFF}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_STAFF}" hspace="3" />{L_STAFF}</a>&nbsp;
#
If you want to not list the ranks and staff, do not follow, or reverse the above code. If you want to just not list the staff then remove

Code: Select all

<a href="{U_STAFF}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_STAFF}" hspace="3" />{L_STAFF}</a>&nbsp;
from the overall_header.tpl changes above.

User avatar
Mighty Gorgon
Registered User
Posts: 616
Joined: Thu May 23, 2002 2:56 pm
Location: Italy
Name: Luca Libralato
Contact:

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by Mighty Gorgon » Sat Sep 15, 2007 11:13 am

Thanks shaykana,
unfortunately it is not the only part to be applied... he may wants to remove even the extra code in memberlist.php regarding staff generation.

If this is the case, then this should be the modifications to be applied to a plain memberlist.php.

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------------
#
'L_ICQ' => $lang['ICQ'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
	// Mighty Gorgon - Multiple Ranks - BEGIN
	'L_USER_RANK' => $lang['Poster_rank'],
	// Mighty Gorgon - Multiple Ranks - END
#
#-----[ FIND ]------------------------------------------------
#
switch( $mode )
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Mighty Gorgon - Multiple Ranks - BEGIN
require_once($phpbb_root_path . 'includes/functions_mg_ranks.'.$phpEx);
$ranks_sql = query_ranks();
// Mighty Gorgon - Multiple Ranks - END
#
#-----[ 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, user_avatar, user_avatar_type, user_allowavatar
#
#-----[ IN-LINE FIND ]----------------------------------------
#
, user_allowavatar
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_rank , user_rank2, user_rank3, user_rank4, user_rank5, user_level, user_session_time, user_allow_viewonline
#
#-----[ FIND ]------------------------------------------------
#
	ORDER BY $order_by";
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
	$where_sql
#
#-----[ FIND ]------------------------------------------------
#
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
#
#-----[ AFTER, ADD ]------------------------------------------
#
		// Mighty Gorgon - Multiple Ranks - BEGIN
		$user_ranks = generate_ranks($row, $ranks_sql);

		$user_rank_01 = ($user_ranks['rank_01'] == '') ? '' : ($user_ranks['rank_01'] . '<br />');
		$user_rank_01_img = ($user_ranks['rank_01_img'] == '') ? '' : ($user_ranks['rank_01_img'] . '<br />');
		$user_rank_02 = ($user_ranks['rank_02'] == '') ? '' : ($user_ranks['rank_02'] . '<br />');
		$user_rank_02_img = ($user_ranks['rank_02_img'] == '') ? '' : ($user_ranks['rank_02_img'] . '<br />');
		$user_rank_03 = ($user_ranks['rank_03'] == '') ? '' : ($user_ranks['rank_03'] . '<br />');
		$user_rank_03_img = ($user_ranks['rank_03_img'] == '') ? '' : ($user_ranks['rank_03_img'] . '<br />');
		$user_rank_04 = ($user_ranks['rank_04'] == '') ? '' : ($user_ranks['rank_04'] . '<br />');
		$user_rank_04_img = ($user_ranks['rank_04_img'] == '') ? '' : ($user_ranks['rank_04_img'] . '<br />');
		$user_rank_05 = ($user_ranks['rank_05'] == '') ? '' : ($user_ranks['rank_05'] . '<br />');
		$user_rank_05_img = ($user_ranks['rank_05_img'] == '') ? '' : ($user_ranks['rank_05_img'] . '<br />');

		if ( $row['user_level'] == ADMIN )
		{
			// You may prefer to show the level instead of coloring the username
			// $level = '<b style="color:#' . $theme['fontcolor3'] . '">' . $lang['Memberlist_Administrator'] . '</b>';
			$username = '<b style="color:#' . $theme['fontcolor3'] . '">' . $username . '</b>';
		}
		elseif( $row['user_level'] == MOD )
		{
			// You may prefer to show the level instead of coloring the username
			// $level = '<b style="color:#' . $theme['fontcolor2'] . '">' . $lang['Memberlist_Moderator'] . '</b>';
			$username = '<b style="color:#' . $theme['fontcolor2'] . '">' . $username . '</b>';
		}
		else
		{
			// You may prefer to show the level instead of coloring the username
			// $level = '<b style="color:#' . $theme['fontcolor1'] . '">' . $lang['Memberlist_User'] . '</b>';
		}
		// Mighty Gorgon - Multiple Ranks - END

#
#-----[ FIND ]------------------------------------------------
#
		if ( $row['user_avatar_type'] && $user_id
#
#-----[ FIND ]------------------------------------------------
#
'YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------------
#
			// Mighty Gorgon - Multiple Ranks - BEGIN
			'USER_LEVEL' => $level,
			'USER_RANK_01' => $user_rank_01,
			'USER_RANK_01_IMG' => $user_rank_01_img,
			'USER_RANK_02' => $user_rank_02,
			'USER_RANK_02_IMG' => $user_rank_02_img,
			'USER_RANK_03' => $user_rank_03,
			'USER_RANK_03_IMG' => $user_rank_03_img,
			'USER_RANK_04' => $user_rank_04,
			'USER_RANK_04_IMG' => $user_rank_04_img,
			'USER_RANK_05' => $user_rank_05,
			'USER_RANK_05_IMG' => $user_rank_05_img,
			// Mighty Gorgon - Multiple Ranks - END

User avatar
TheInquistor
Registered User
Posts: 304
Joined: Tue Jun 19, 2007 11:36 pm

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by TheInquistor » Sun Oct 21, 2007 6:20 pm

OK so i am not the most kee on many things but i am learning.

in the instructions you see...

Code: Select all

#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_users ADD user_rank2 INT(11) DEFAULT '0' AFTER user_rank;
ALTER TABLE phpbb_users ADD user_rank3 INT(11) DEFAULT '0' AFTER user_rank2;
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
this is the first thing. But i am not sure what or where to make this modification to SQL. I just successfully put in the attachment mod (which is an awesome mod) and this was next on my list. the SQL files i seen were in the install file i had but removed. is there SQL file else where and how do i modify them?
[noob]ME[/noob]

User avatar
TheInquistor
Registered User
Posts: 304
Joined: Tue Jun 19, 2007 11:36 pm

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by TheInquistor » Mon Oct 22, 2007 12:46 am

i learned elsewhere how to do the SQL thing...but

on makeing the scripting changes, i came to this...

Code: Select all

#-----[ OPEN ]------------------------------------------
#
templates/subSilver/memberlist_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<th class="thTop" nowrap="nowrap">{L_USERNAME}</th>
#
#-----[ AFTER, ADD ]------------------------------------------
#
		<th class="thTop" nowrap="nowrap">{L_USER_RANK}</th>
I cant find this cause it is not in the file. Keep in mind that it is in the subsilver version but not the AcidTechGreen template i am using.
[noob]ME[/noob]

User avatar
Dr DBW
Registered User
Posts: 194
Joined: Thu Oct 06, 2005 10:37 pm
Location: Ballarat, Victoria
Contact:

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by Dr DBW » Mon Oct 22, 2007 1:21 am

That is located in the header, then menu for the forums. So simply look for the part of the code dealing with searching, profile, FAQ that sort of stuff.

User avatar
TheInquistor
Registered User
Posts: 304
Joined: Tue Jun 19, 2007 11:36 pm

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by TheInquistor » Mon Oct 22, 2007 1:47 am

lol...i have no knowledge to read phpbb code...NWN yes...phpBB no :cry:
[noob]ME[/noob]

User avatar
Dr DBW
Registered User
Posts: 194
Joined: Thu Oct 06, 2005 10:37 pm
Location: Ballarat, Victoria
Contact:

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by Dr DBW » Mon Oct 22, 2007 2:24 am

Try, it is very, very easy.

User avatar
TheInquistor
Registered User
Posts: 304
Joined: Tue Jun 19, 2007 11:36 pm

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by TheInquistor » Mon Oct 22, 2007 2:50 am

ooooohh...a challenge :geek:

how does this look?

Code: Select all

	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.FROM}</span></td>
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.{L_USER_RANK}}</span></td>
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.JOINED}</span></td>
i copied the JOINED line due to size of the line in the member line. Will the rest of the blocks auto format to fit the screen, or will there have to be a scroll. Scrolling is annoying :evil:
[noob]ME[/noob]

User avatar
TheInquistor
Registered User
Posts: 304
Joined: Tue Jun 19, 2007 11:36 pm

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by TheInquistor » Mon Oct 22, 2007 4:07 am

on top of the code i already could not edit...these i couldnt edit as well in the AcidTechGreen template

Code: Select all

#-----[ OPEN ]------------------------------------------
#
admin/admin_ranks.php

#
#-----[ FIND ]------------------------------------------
#
			if($special_rank)
#
#-----[ REPLACE WITH ]------------------------------------------
#
			// Mighty Gorgon - Multiple Ranks - BEGIN
			$rank_img_sp = ( $rank_rows[$i]['rank_image'] != "" ) ? ( '../' . $rank_rows[$i]['rank_image'] ) : ( '../images/spacer.gif' );
			$rank .= '<br /><img name="rank_image" src="' . $rank_img_sp . '" border="0" alt="" />';

			if( !$special_rank == 0 )
			// Mighty Gorgon - Multiple Ranks - END
#
#-----[ FIND ]------------------------------------------
#
				"SPECIAL_RANK" => ( $special_rank == 1 ) ? $lang['Yes'] : $lang['No'],
#
#-----[ REPLACE WITH ]------------------------------------------
#
				// Mighty Gorgon - Multiple Ranks - BEGIN
				"SPECIAL_RANK" => ( !$special_rank == 0 ) ? $lang['Yes'] : $lang['No'],
				// Mighty Gorgon - Multiple Ranks - END
#-----[ FIND ]------------------------------------------
#
		if( $special_rank == 1 )
#
#-----[ REPLACE WITH ]------------------------------------------
#
		// Mighty Gorgon - Multiple Ranks - BEGIN
		$rank_img_sp = ( $rank_rows[$i]['rank_image'] != "" ) ? ( '../' . $rank_rows[$i]['rank_image'] ) : ( '../images/spacer.gif' );
		$rank .= '<br /><img name="rank_image" src="' . $rank_img_sp . '" border="0" alt="" />';

		if( !$special_rank == 0 )
		// Mighty Gorgon - Multiple Ranks - END
#-----[ FIND ]------------------------------------------
#
		$rank_is_special = ( $special_rank ) ? $lang['Yes'] : $lang['No'];
#
#-----[ REPLACE WITH ]------------------------------------------
#
		// Mighty Gorgon - Multiple Ranks - BEGIN
		$rank_is_special = ( !$special_rank == 0) ? $lang['Yes'] : $lang['No'];
		// Mighty Gorgon - Multiple Ranks - END
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php

#-----[ FIND ]------------------------------------------
#
	$ranksrow[] = $row;
#
#-----[ AFTER, ADD ]------------------------------------------
#
	// Mighty Gorgon - Multiple Ranks - BEGIN
	if ($row['rank_special'] == 3)
	{
		$rank_banned = $row['rank_title'];
		$rank_banned_image = ( $row['rank_image'] ) ? '<br /><img src="' . $row['rank_image'] . '" alt="' . $rank_banned . '" title="' . $rank_banned . '" border="0" /><br />' : '<br />';
	}
	// Mighty Gorgon - Multiple Ranks - END
#-----[ FIND ]------------------------------------------
#
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
		}
#
#-----[ REPLACE WITH ]------------------------------------------
#
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<br /><img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '<br />';
		}
		// Mighty Gorgon - Multiple Ranks - BEGIN
		if ( $profiledata['user_rank2'] == $ranksrow[$i]['rank_id'] && $ranksrow[$i]['rank_special'] )
		{
			$poster_rank2 = $ranksrow[$i]['rank_title'];
			$rank2_image = ( $ranksrow[$i]['rank_image'] ) ? '<br /><img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank2 . '" title="' . $poster_rank2 . '" border="0" /><br />' : '<br />';
		}
		if ( $profiledata['user_rank3'] == $ranksrow[$i]['rank_id'] && $ranksrow[$i]['rank_special'] )
		{
			$poster_rank3 = $ranksrow[$i]['rank_title'];
			$rank3_image = ( $ranksrow[$i]['rank_image'] ) ? '<br /><img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank3 . '" title="' . $poster_rank3 . '" border="0" /><br />' : '<br />';
		}
		// Mighty Gorgon - Multiple Ranks - END
#-----[ FIND ]------------------------------------------
#
		}
	}
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
		}
	}
	}
	}
}
#-----[ FIND ]------------------------------------------
#
	'POSTER_RANK' => $poster_rank,
	'RANK_IMAGE' => $rank_image,

#
#-----[ AFTER, ADD ]------------------------------------------
#
	// Mighty Gorgon - Multiple Ranks - BEGIN
	'POSTER_RANK2' => $poster_rank2,
	'RANK2_IMAGE' => $rank2_image,
	'POSTER_RANK3' => $poster_rank3,
	'RANK3_IMAGE' => $rank3_image,
	// Mighty Gorgon - Multiple Ranks - END
Any help would be appreicated
[noob]ME[/noob]

User avatar
TheInquistor
Registered User
Posts: 304
Joined: Tue Jun 19, 2007 11:36 pm

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by TheInquistor » Mon Oct 22, 2007 4:16 am

Code: Select all

Please delete the double post
[noob]ME[/noob]

gushe
Registered User
Posts: 19
Joined: Sun Oct 14, 2007 4:48 pm

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by gushe » Mon Oct 29, 2007 3:56 pm

Well,
I downloaded the MOD and tryed to install it using EasyMOD; But Got 3 errors On some of my Themes: AcidTech and FIapplepink..

I get these errors:

Code: Select all

Warning

FIND FAILED: In file [templates/AcidTech/memberlist_body.tpl] could not find:

<th class="thTop" nowrap="nowrap">{L_USERNAME}</th>

MOD script line #902 :: FAQ :: Report

Code: Select all

FIND FAILED: In file [templates/fiapplepink/memberlist_body.tpl] could not find:

<th class="thTop" nowrap="nowrap">{L_USERNAME}</th>

MOD script line #902 :: FAQ :: Report

Code: Select all

Critical Error

FIND FAILED: In file [templates/subSilver/memberlist_body.tpl] could not find:

<td class="catBottom" colspan="8" height="28">&nbsp;</td>

MOD script line #926 :: FAQ :: Report

What to do now? :S


greetz,
Gushe

gushe
Registered User
Posts: 19
Joined: Sun Oct 14, 2007 4:48 pm

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by gushe » Tue Oct 30, 2007 2:26 pm

anyone? :roll:

User avatar
TheInquistor
Registered User
Posts: 304
Joined: Tue Jun 19, 2007 11:36 pm

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by TheInquistor » Tue Oct 30, 2007 5:05 pm

im not sure if the author still checks in or not
[noob]ME[/noob]

User avatar
shaykana
Registered User
Posts: 108
Joined: Mon Sep 04, 2006 12:11 am
Location: Canada
Contact:

Re: [2.0.14] Add Multiple Ranks And Staff View

Post by shaykana » Tue Oct 30, 2007 11:03 pm

MOD authors are busy people, and have lives of their own. Mighty Gorgon still checks in from time to time when able to.

EasyMOD is only designed to install MODS on the default theme of subSilver, or any theme that uses the exact same html code. I personally have never seen any other template with the same code as subSilver. Anyway, MOD to boards with multiple themes, or other themes other than subSilver will require almost all template related changes to be made manually.

Look for the variables {ITEMS IN CURLY BRACES}. Examine the template file and compare it with its equal in subSilver to get a better idea of where the changes are made. Once you make the change, don't forget to use the same style classes as your alternate template. Example: "gensmall" in subSilver will probably be something different in the alternate template. Just look at the surrounding code to see what it is.

Post Reply

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

Who is online

Users browsing this forum: No registered users and 3 guests