[2.0.6] Rank Images Display Multi. Times

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

Rating:

Excellent!
7
58%
Very Good
1
8%
Good
2
17%
Fair
1
8%
Poor
1
8%
 
Total votes: 12

arrows10
Registered User
Posts: 133
Joined: Tue Jun 18, 2002 4:19 pm

Post by arrows10 »

Jonah wrote: Hi Guys :)

Ive got a question.
Is ist possible to create a mod, with which it's possible to work with more than one rank system?
erm... Im sure is it possible, but I'm not able to code one.
I tried this MOD. It's nice, but it would be nicer if there were possibilities to display different gifs to ONE member.

eg: a "normal" member has a "normal" rank (depending on the number of posts) and he did something honorable and I want to give a honor-gif to him. But i dont want to remove the "normal" rank-gif.

I hope you understand this, in spite of my bad english-knowledge

:)

Jonah

im working on a mod that allows u to have more than one rank for users. :-)
the_sim wrote: Question... How can i show the ranks multiple times in the Memberlist?

Thanks much!


Heres the code

Code: Select all

# 
#-----[ OPEN ]------------------------------------------ 
#

language/lang_english/lang_main.php

# 
#-----[ FIND ]------------------------------------------ 
# 

// Memberslist
//

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

$lang['Rank'] = 'User Rank';

# 
#-----[ OPEN ]------------------------------------------ 
# 

memberlist.php

# 
#-----[ FIND ]------------------------------------------ 
# 

$select_sort_order .= '</select>';

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

$sql = "SELECT *
	FROM " . RANKS_TABLE . "
	ORDER BY rank_special, rank_min";
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, "Could not obtain ranks information.", '', __LINE__, __FILE__, $sql);
}

$ranksrow = array();
while ( $row = $db->sql_fetchrow($result) )
{
	$ranksrow[] = $row;
}
$db->sql_freeresult($result);

# 
#-----[ FIND ]------------------------------------------ 
# 

	'L_EMAIL' => $lang['Email'],

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

	'L_M_RANK' => $lang['Rank'],

# 
#-----[ FIND ]------------------------------------------ 
# 

$sql = "SELECT username, user_id,

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 

user_email

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#

, user_rank

# 
#-----[ FIND ]------------------------------------------ 
# 

			$email = '&nbsp;';
		}

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

		//
		// Generate ranks, set them to empty string initially.
		//
		$poster_rank = '';
		$rank_image = '';
		$rank_mal = '';
		if ( $row['user_rank'] )
		{
			for($j = 0; $j < count($ranksrow); $j++)
			{
				if ( $row['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
				{
					$poster_rank = $ranksrow[$j]['rank_title'];
					$rank_image = $ranksrow[$j]['rank_image']; 
					$rank_mal = $ranksrow[$j]['rank_mal']; 
				}
			}
		}
		else
		{
			for($j = 0; $j < count($ranksrow); $j++)
			{
				if ( $row['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
				{
					$poster_rank = $ranksrow[$j]['rank_title'];
					$rank_image = $ranksrow[$j]['rank_image']; 
					$rank_mal = $ranksrow[$j]['rank_mal']; 
				}
			}
		}

# 
#-----[ FIND ]------------------------------------------ 
# 

			'EMAIL' => $email,

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

			'POSTER_RANK' => $poster_rank,
			'RANK_IMAGE' => ( ($rank_image != '') ? str_repeat("<img src=\"".$rank_image."\" border=\"0\">",$rank_mal) : ''),


# 
#-----[ OPEN ]------------------------------------------ 
# 

templates/subSilver/memberlist_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 

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

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

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

# 
#-----[ FIND ]------------------------------------------ 
# 

	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle">&nbsp;{memberrow.EMAIL_IMG}&nbsp;</td>

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

	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.POSTER_RANK}<br />{memberrow.RANK_IMAGE}</span></td>
blowfish
Registered User
Posts: 63
Joined: Sat Sep 06, 2003 11:09 am

Post by blowfish »

Hi arrows10

Thanks for the MOD, a little different from what I initially thought it would do, (thought it would let me give each user two seperate ranks instead of one lol) oh well, you don't know other mod with that do you.

I have just finished installing your addon to display the mutiple rank images in the members list, took me two installs but it works great,

I am not a php coder so I haven't been successful in getting the multiple images to work with this other mod.
MOD NAME: Ranks summarize
MOD VERSION: 1.0.4
MOD THREAD: http://www.phpbb.com/phpBB/viewtopic.php?t=147374
MOD DESCRIPTION: This mod is designed to display a page will all the ranks available on your board, including special ranks with the list of active users, standard ranks with the number of active users.


Any ideas on how to use your memberlist addon with the summarize page.

Thanks.
Regards
Brett
blowfish
Registered User
Posts: 63
Joined: Sat Sep 06, 2003 11:09 am

Post by blowfish »

Sorry was just thinking too hard for a sec and decide to post a small idea as well.

this may not be relevant to your mod but one thing that I think would be useful is a way to set the display order of each rank, maybe like a little box that you can add a number.
Regards
Brett
User avatar
snw
Registered User
Posts: 46
Joined: Tue Mar 09, 2004 4:31 am

Post by snw »

Would one of you guys be able to help me with making this work with PCP?
arrows10
Registered User
Posts: 133
Joined: Tue Jun 18, 2002 4:19 pm

Post by arrows10 »

blowfish wrote: Hi arrows10

Thanks for the MOD, a little different from what I initially thought it would do, (thought it would let me give each user two seperate ranks instead of one lol) oh well, you don't know other mod with that do you.

I have just finished installing your addon to display the mutiple rank images in the members list, took me two installs but it works great,

I am not a php coder so I haven't been successful in getting the multiple images to work with this other mod.
MOD NAME: Ranks summarize
MOD VERSION: 1.0.4
MOD THREAD: http://www.phpbb.com/phpBB/viewtopic.php?t=147374
MOD DESCRIPTION: This mod is designed to display a page will all the ranks available on your board, including special ranks with the list of active users, standard ranks with the number of active users.


Any ideas on how to use your memberlist addon with the summarize page.

Thanks.


I've been working on the multi. ranks and its almost done will post on my board once it is (link in sig). With it working with that mod i've almost have it done for myself and once i do i will post in on my board and put a link here.
blowfish wrote: Sorry was just thinking too hard for a sec and decide to post a small idea as well.

this may not be relevant to your mod but one thing that I think would be useful is a way to set the display order of each rank, maybe like a little box that you can add a number.


Could u explain this alittle more as i dont quite understand what your saying
snw wrote: Would one of you guys be able to help me with making this work with PCP?


I've also been working on this as well and once i get it finished ill post it on my board and put a link here.
blowfish
Registered User
Posts: 63
Joined: Sat Sep 06, 2003 11:09 am

Post by blowfish »

blowfish wrote:
Sorry was just thinking too hard for a sec and decide to post a small idea as well.

this may not be relevant to your mod but one thing that I think would be useful is a way to set the display order of each rank, maybe like a little box that you can add a number.


Could u explain this alittle more as i dont quite understand what your saying


Hi arrows10

OK, here goes.

I run an online gaming clan site. we have a whole heap of ranks to represent milestones for members. but they display in random order as there is no way adjust the display order.

what I was thinking would work, would be a 2 character text field next to each rank. the order the ranks would display when listed in the forum would be determined by the number in box.

order is top of list 0, 1, 2, 3, to bottom of list etc

a sample of my ranks in order from higher to lowest

General
Captain
Private
Trial Member
Retired


I think my request might be more relevant to these two mods and was a little missplaced on this one.
MOD NAME: Ranks summarize
MOD VERSION: 1.0.4
MOD THREAD: http://www.phpbb.com/phpBB/viewtopic.php?t=147374
MOD DESCRIPTION: This mod is designed to display a page will all the ranks available on your board, including special ranks with the list of active users, standard ranks with the number of active users.

MOD NAME: Site Roster
MOD VERSION: 1.0.0
MOD THREAD: http://www.phpbb.com/phpBB/viewtopic.ph ... sc&start=0
MOD DESCRIPTION: Adds a roster to the site based on user's ranks
Regards
Brett
Mud-Blood
Registered User
Posts: 2
Joined: Sat May 29, 2004 3:40 pm

Hi

Post by Mud-Blood »

Hi, thanks for your help because I've read enough here to know someone will be able to offer it.


I've installed the MOD and it worked fine but when I did the:

#
#-----[ SQL ]------------------------------------------
#

ALTER TABLE phpbb_ranks ADD `rank_mal` tinyint(2) unsigned NOT NULL default '1' AFTER rank_image;


When I altered the table I messed up and put it actually within the "rank_image" line. Now I have no clue what the "rank_image" line was before I had this moment of stupidity. I'm sure it looks stupid of me but I don't want to try to remember what the rank_image info had been in the SQL table and risk messing up more.

Thanks again.
Last edited by Mud-Blood on Sat May 29, 2004 3:58 pm, edited 1 time in total.
Mud-Blood
Registered User
Posts: 2
Joined: Sat May 29, 2004 3:40 pm

Hi

Post by Mud-Blood »

Sorry, hit submit twice.
Paul [manymore]
Registered User
Posts: 11
Joined: Thu Apr 22, 2004 9:42 am
Location: Belfast
Contact:

Post by Paul [manymore] »

I've been working on the multi. ranks and its almost done will post on my board once it is (link in sig). With it working with that mod i've almost have it done for myself and once i do i will post in on my board and put a link here.


any more progress on this part of the mod?
arrows10
Registered User
Posts: 133
Joined: Tue Jun 18, 2002 4:19 pm

Post by arrows10 »

u can check on my site for progress on it its still not completely done as i have a few things to do on it per the last time i sent it in to the mod team to be approved
Paul [manymore]
Registered User
Posts: 11
Joined: Thu Apr 22, 2004 9:42 am
Location: Belfast
Contact:

Post by Paul [manymore] »

ok, thanks for the reply - awaiting eagerly ;)
Tinius1
Registered User
Posts: 7
Joined: Fri Jul 23, 2004 9:16 pm

Post by Tinius1 »

ok trying to install ranks mod but have no idea where to find this table to edit let a lone how to edit it

#
#-----[ SQL ]------------------------------------------
#

ALTER TABLE phpbb_ranks ADD `rank_mal` tinyint(2) unsigned NOT NULL default '1' AFTER rank_image;

thanks in advance
Tinius1
Registered User
Posts: 7
Joined: Fri Jul 23, 2004 9:16 pm

Post by Tinius1 »

morpheus2matrix wrote:
dictator wrote:sorry but i still don't understand what is wrong :oops:
i did everything what was said in installation faile
what do you suqest me to do :?:


in phpMyadmin, run this request :

Code: Select all

ALTER TABLE phpbb_ranks ADD `rank_mal` tinyint(2) unsigned NOT NULL default '1' AFTER rank_image;
:wink:



where do you get this phpMyadmin at?
tosho
Registered User
Posts: 1
Joined: Sun Oct 31, 2004 10:02 pm

Post by tosho »

Does it work in 2.0.10 too?
toejam
Registered User
Posts: 2
Joined: Thu Nov 04, 2004 11:38 pm

Post by toejam »

Hey guys, i'm having the same problem 7L52P5 had with the rank image right next to the avatar instead of being on a new line. I'm using the Aeolus template. Any idea as to how to fix it?
Post Reply

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