Rank MultiImages

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
Extensions Robot
Extensions Robot
Extensions Robot
Posts: 27617
Joined: Sat Aug 16, 2003 7:36 am

Rank MultiImages

Post by Extensions Robot » Sun Oct 21, 2007 7:21 pm

Modification name: Rank MultiImages
Author: Alek$
Modification description: This mod allows you to set multiple different images for each rank
Modification version: 1.0.0
Tested on phpBB version: See below

Download file: rank-multiimg_1-0-2.zip
File size: 7123 Bytes

Modification overview page: View


Selected tags:
  1. category
    1. Add-Ons
    2. Profile/User Control Panel
  2. complexity
    1. SQL Schema Changes
    2. Language Changes
    3. File Edits
  3. time
    1. ~ 5 Minutes
  4. phpbb
    1. 2.0.22
Support for this modification needs to be asked within this topic. The phpBB Team is not responsible or required to give anyone support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version listed in the topic. It may not work in any other versions of phpBB.
(this is a non-active account manager for the phpBB Extension Customisations Team)

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 24307
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Rank MultiImages

Post by Paul » Sun Oct 21, 2007 7:21 pm

Modification validated/released

Notes:
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
Doctor Love
Registered User
Posts: 117
Joined: Sat Jul 24, 2004 12:20 am
Location: USA
Contact:

Re: Rank MultiImages

Post by Doctor Love » Wed Nov 28, 2007 2:00 am

Apparently this MOD doesn't work for my forum. Maybe it is because I have installed Rank Colors and Maybe not. I just do not know, but all of my "Rank Images" appear normal until I edit any one of them, and then I no longer have any image and the image address is deleted (and cannot be successfully reinserted).

I have installed over 200 hundred mods so I am at a loss for what the problem might be. I successfully used "EasyMOD" to make the install, however, in the language/lang_english/lang_admin.php I did have to move $lang['Rank_image_list'] = 'Image'; // Ranks images in ACP Rank List below $lang['Rank_image_explain'] = 'Use this to define a small image associated with the rank'; (as shown below) before the install would proceed.

$lang['Rank_image'] = 'Rank Image (Relative to phpBB2 root path)';
$lang['Rank_image_explain'] = 'Use this to define a small image associated with the rank';
$lang['Rank_image_list'] = 'Image'; // Ranks images in ACP Rank List


These are the current Ranks $lang strings:
//
// Ranks admin
//

$lang['Ranks_title'] = 'Rank Administration';
$lang['Ranks_explain'] = 'Using this form you can add, edit, view and delete ranks. You can also create custom ranks which can be applied to a user via the user management facility';
$lang['Add_new_rank'] = 'Add new rank';
$lang['Rank_title'] = 'Rank Title';
$lang['Rank_special'] = 'Set as Special Rank';
$lang['Rank_minimum'] = 'Minimum Posts';
$lang['Rank_maximum'] = 'Maximum Posts';
$lang['Rank_image'] = 'Rank Images (Relative to phpBB2 root path or http://)';
$lang['Rank_image_explain'] = 'Use this to define a small image associated with the rank<br />One address per line. You can add your comment to image, it should be after image address, separated with space. Empty lines will be translated to newline';
$lang['Rank_sig_length'] = 'Signature Length';
$lang['Rank_sig_length_explain'] = 'Specify the maximum signiture legnth this rank is allowed. If set to <b>0</b>, this rank will use the value specified in <b>General Admin -> Configuration</b>';
$lang['Rank_default_sig_length'] = 'Default length';
$lang['Must_select_rank'] = 'You must select a rank';
$lang['No_assigned_rank'] = 'No special rank assigned';
$lang['Rank_updated'] = 'The rank was successfully updated';
$lang['Rank_added'] = 'The rank was successfully added';
$lang['Rank_removed'] = 'The rank was successfully deleted';
$lang['No_update_ranks'] = 'The rank was successfully deleted. However, user accounts using this rank were not updated. You will need to manually reset the rank on these accounts';
$lang['Click_return_rankadmin'] = 'Click %sHere%s to return to Rank Administration';
$lang['Confirm_delete_rank'] = 'Are you sure you want to delete this rank?';
$lang['Rank_tags'] = 'Rank Tags';
$lang['Rank_tags_explain'] = 'Enter the starting tag into the first field and the ending into the second.';
No error messages are ever generated.
Aleichem Shalom,

Doctor Love

User avatar
Xamence
Registered User
Posts: 201
Joined: Sat Mar 05, 2005 9:08 am
Location: Tomorrow...

Re: Rank MultiImages

Post by Xamence » Thu Jun 26, 2008 10:00 am

Is anyone able to add this MOD to my forum? I'm having difficulties.

Rikonen
Registered User
Posts: 27
Joined: Sat May 17, 2008 1:25 pm

Re: Rank MultiImages

Post by Rikonen » Fri Jul 04, 2008 12:15 pm

Does it works on phpBB 2.0.23???

User avatar
Alek$
Registered User
Posts: 36
Joined: Tue Jan 23, 2007 6:50 am
Location: Russia, Novosibirsk
Contact:

Re: Rank MultiImages

Post by Alek$ » Fri Jul 04, 2008 2:16 pm

Theoretically, it should.
The worst mistake is mistake without specific reasons and obvious consequences.
Sorry for possible grammar mistakes.

User avatar
Odd666
Registered User
Posts: 28
Joined: Tue Aug 01, 2006 9:26 pm

Re: Rank MultiImages

Post by Odd666 » Thu Nov 20, 2008 1:51 pm

hello I searched the mod database and in many other places but I didn't found the answer of my question ...
So if someone here could answer me I will be very happy ...
is there a mod which makes that the user after reaching 300 posts for example to be able to put his own rank from his Profile control panel ...
sorry that I am writing here but as you know I it is not allowed to add new topics... can someone help?

User avatar
jslayter
Registered User
Posts: 7
Joined: Tue Mar 06, 2007 1:01 pm
Location: Indiana
Contact:

Re: Rank MultiImages

Post by jslayter » Sat Jan 24, 2009 8:06 pm

Alek$...great concept ..
I am running 2.0.22
with Venus template from Villavizar solutions
I have 1 minor and 1 major issue..
you list
  • ## Files To Edit:
    ## viewtopic.php
    ## admin/admin_ranks.php
    ## language/lang_english/lang_admin.php
    ## templates/subSilver/admin/ranks_edit_body.tpl
you are missing one file to edit....
templates/subSilver/profile_view_body.tpl

that was the minor fix. Major issue is that I get an syntax error "}" in the code at the file admin/admin_ranks.php
It is the "}" just prior to "$rank_image .= '<br />';"

Code: Select all

	if($ranksrow[$j]['rank_image'] != "")
				{
					$lines = explode("\n", $ranksrow[$j]['rank_image']);
					$rank_image = '';
					foreach( $lines as $line )
					{
						$line = explode(' ', $line, 2 );
						if( trim($line[0]) == '' )
						{
							$rank_image .= '<br />';
						}
						else
						{
							if( empty($line[1]) )
							{
								$rank_image .= '<img src="' . trim($line[0]) . '"  alt="' . $poster_rank . '" title="' . $poster_rank . '"/>';
							}
							else
							{
								$rank_image .= '<img src="' . trim($line[0]) . '"  alt="' . trim($line[1]) . '" title="' . trim($line[1]) . '"/>';
							}
						}
					}
					$rank_image .= '<br />';
				}
				else
				{
					$rank_image = '';
				}
any help in this matter is greatly appreciated.

User avatar
Alek$
Registered User
Posts: 36
Joined: Tue Jan 23, 2007 6:50 am
Location: Russia, Novosibirsk
Contact:

Re: Rank MultiImages

Post by Alek$ » Sun Jan 25, 2009 4:32 am

1) Thanks, fixed. Also there was a bug in viewprofile, image display algorithm was phpBB native, not from my mod. To fix it, do following:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
incudes/usercp_viewpofie.php
#
#-----[ FIND ]------------------------------------------
#
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';

#
#-----[ REPLACE WITH ]------------------------------------------
#
			if($ranksrow[$i]['rank_image'] != "")
			{
				$lines = explode("\n", $ranksrow[$i]['rank_image']);
				$rank_image = '';
				foreach( $lines as $line )
				{
					$line = explode(' ', $line, 2 );
					if( trim($line[0]) == '' )
					{
						$rank_image .= '<br />';
					}
					else
					{
						if( empty($line[1]) )
						{
							$rank_image .= '<img src="' . trim($line[0]) . '"  alt="' . $poster_rank . '" title="' . $poster_rank . '"/>';
						}
						else
						{
							$rank_image .= '<img src="' . trim($line[0]) . '"  alt="' . trim($line[1]) . '" title="' . trim($line[1]) . '"/>';
						}
					}
				}
				$rank_image .= '<br />';
			}
			else
			{
				$rank_image = '';
			}

#
#-----[ FIND ]------------------------------------------
#
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';

#
#-----[ REPLACE WITH ]------------------------------------------
#
			if($ranksrow[$i]['rank_image'] != "")
			{
				$lines = explode("\n", $ranksrow[$i]['rank_image']);
				$rank_image = '';
				foreach( $lines as $line )
				{
					$line = explode(' ', $line, 2 );
					if( trim($line[0]) == '' )
					{
						$rank_image .= '<br />';
					}
					else
					{
						if( empty($line[1]) )
						{
							$rank_image .= '<img src="' . trim($line[0]) . '"  alt="' . $poster_rank . '" title="' . $poster_rank . '"/>';
						}
						else
						{
							$rank_image .= '<img src="' . trim($line[0]) . '"  alt="' . trim($line[1]) . '" title="' . trim($line[1]) . '"/>';
						}
					}
				}
				$rank_image .= '<br />';
			}
			else
			{
				$rank_image = '';
			}
2) It seems you have a mistake in your installation. I've had installed my mod on clean phpBB2 and it worked fine. Another possibility - this file is modified by other mods and we need check for conflicts with them.
The worst mistake is mistake without specific reasons and obvious consequences.
Sorry for possible grammar mistakes.

User avatar
Alek$
Registered User
Posts: 36
Joined: Tue Jan 23, 2007 6:50 am
Location: Russia, Novosibirsk
Contact:

Re: Rank MultiImages

Post by Alek$ » Sun Jan 25, 2009 9:11 am

Here is final mod version.
Attachments

[The extension zip has been deactivated and can no longer be displayed.]

The worst mistake is mistake without specific reasons and obvious consequences.
Sorry for possible grammar mistakes.

User avatar
jslayter
Registered User
Posts: 7
Joined: Tue Mar 06, 2007 1:01 pm
Location: Indiana
Contact:

Re: Rank MultiImages

Post by jslayter » Sun Jan 25, 2009 5:26 pm

Alek$ wrote:1) Thanks, fixed. Also there was a bug in viewprofile, image display algorithm was phpBB native, not from my mod. To fix it, do following:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
incudes/usercp_viewpofie.php
#
#-----[ FIND ]------------------------------------------
#
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';

#
#-----[ REPLACE WITH ]------------------------------------------
#
			if($ranksrow[$i]['rank_image'] != "")
			{
				$lines = explode("\n", $ranksrow[$i]['rank_image']);
				$rank_image = '';
				foreach( $lines as $line )
				{
					$line = explode(' ', $line, 2 );
					if( trim($line[0]) == '' )
					{
						$rank_image .= '<br />';
					}
					else
					{
						if( empty($line[1]) )
						{
							$rank_image .= '<img src="' . trim($line[0]) . '"  alt="' . $poster_rank . '" title="' . $poster_rank . '"/>';
						}
						else
						{
							$rank_image .= '<img src="' . trim($line[0]) . '"  alt="' . trim($line[1]) . '" title="' . trim($line[1]) . '"/>';
						}
					}
				}
				$rank_image .= '<br />';
			}
			else
			{
				$rank_image = '';
			}

#
#-----[ FIND ]------------------------------------------
#
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';

#
#-----[ REPLACE WITH ]------------------------------------------
#
			if($ranksrow[$i]['rank_image'] != "")
			{
				$lines = explode("\n", $ranksrow[$i]['rank_image']);
				$rank_image = '';
				foreach( $lines as $line )
				{
					$line = explode(' ', $line, 2 );
					if( trim($line[0]) == '' )
					{
						$rank_image .= '<br />';
					}
					else
					{
						if( empty($line[1]) )
						{
							$rank_image .= '<img src="' . trim($line[0]) . '"  alt="' . $poster_rank . '" title="' . $poster_rank . '"/>';
						}
						else
						{
							$rank_image .= '<img src="' . trim($line[0]) . '"  alt="' . trim($line[1]) . '" title="' . trim($line[1]) . '"/>';
						}
					}
				}
				$rank_image .= '<br />';
			}
			else
			{
				$rank_image = '';
			}
2) It seems you have a mistake in your installation. I've had installed my mod on clean phpBB2 and it worked fine. Another possibility - this file is modified by other mods and we need check for conflicts with them.
Thanks Alek$ ... fixed up and running perfect on 2.022...great mod!!! just what we where looking for!!!
If others want to view results of this fine mod goto my forum at http://www.michianajeepclub.com/phpBB2/index.php

Post Reply

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

Who is online

Users browsing this forum: No registered users and 11 guests