[RC] User Rank Progression Bar v0.2.1

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Ideas Centre
User avatar
eman80
Registered User
Posts: 327
Joined: Tue Aug 19, 2008 1:49 pm

Re: [RC] User Rank Progression Bar v0.2.0

Post by eman80 » Sat Jun 26, 2010 2:24 pm

Thanks for this mod installed it and it works fine :)

mut2nt wrote:question: I dont see the bar :| i just see the text
Progress to next rank:
30%
maybe you forgot to refresh your theme, also try to clear your browser cache
welcome to my forum:
http://www.elibrary4arab.com

User avatar
mao43
Registered User
Posts: 80
Joined: Thu Jul 23, 2009 5:08 am
Location: Santa Rosa Laguna
Contact:

Re: [RC] User Rank Progression Bar v0.2.0

Post by mao43 » Sun Jun 27, 2010 12:54 am

not working

Code: Select all

File edits
includes/functions_display.php

Find
* @param string &$rank_img_src the rank image source is stored here after execution
Add After
* @param int &$percent_complete the percentage of the way a user is to the next rank, where -1 means "not applicable"
Success

Find
function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)
In-Line Find
, &$rank_img_src
In-Line After, Add
, &$percent_complete
Success

Find
	if (!empty($user_rank))
Add Before
	if (!is_int($percent_complete) || $percent_complete < 0 || $percent_complete > 100)
	{
		$percent_complete = -1;
	}
Success

Find
	else if ($user_posts !== false)
	{
Add After
	$next_rank_post_count = -1;
Success

Find
				if ($user_posts >= $rank['rank_min'])
Add Before
				if ($user_posts < $rank['rank_min'])
				{
					$next_rank_post_count = $rank['rank_min'];
				}
				else
Success

Find
					$rank_title = $rank['rank_title'];
Add Before
					if ($percent_complete == -1 && $next_rank_post_count > -1)
					{
						$rank_difference = $next_rank_post_count - $rank['rank_min'];
						$user_progress = $user_posts - $rank['rank_min'];
						$percent_complete = round(($user_progress / $rank_difference) * 100);
					}
Success
includes/ucp/ucp_pm_viewmessage.php

Find
		'RANK_IMG'			=> $user_info['rank_image'],
Add After
		'PERCENTAGE_PROGRESS_NUM'	=> $user_info['percentage_progress'],
		'PERCENTAGE_PROGRESS'		=> sprintf($user->lang['PERCENTAGE_PROGRESS'], $user_info['percentage_progress']),
Success

Find
get_user_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);
In-Line Find
, $user_row['rank_image_src']
In-Line After, Add
, $user_row['percentage_progress']
Success
language/en/common.php

Find
?>
Add Before
$lang = array_merge($lang, array(
	'PERCENTAGE_PROGRESS' => '%s%%',
	'PROGRESS_TO_NEXT_RANK' => 'Progress to next rank:'
));
Success
memberlist.php

Find
			get_user_rank($row['user_rank'], $row['user_posts'], $rank_title, $rank_img, $rank_img_src);
In-Line Find
$rank_img_src
The In-Line Find specified by the MOD could not be found.The Find specified by the MOD could not be found

Find
			get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src);
In-Line Find
$rank_img_src
In-Line After, Add
, $percentage_progress
Success

Find
		'RANK_IMG_SRC'		=> $rank_img_src,
Add After
		'PERCENTAGE_PROGRESS_NUM'	=> $percentage_progress,
		'PERCENTAGE_PROGRESS'		=> sprintf($user->lang['PERCENTAGE_PROGRESS'], $percentage_progress),
Success
styles/prosilver/template/memberlist_body.html

Find
<!-- IF memberrow.RANK_IMG --><span class="rank-img">{memberrow.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{memberrow.RANK_TITLE}</span><!-- ENDIF -->
In-Line Find
<!-- ENDIF -->
In-Line After, Add
<!-- IF memberrow.PERCENTAGE_PROGRESS_NUM > -1 --><div class="rank_progress_bar" title="{L_PROGRESS_TO_NEXT_RANK}"><span style="width:{memberrow.PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{memberrow.PERCENTAGE_PROGRESS}</span></div><!-- ENDIF -->
Success
styles/prosilver/template/memberlist_view.html

Find
<!-- IF RANK_IMG --><dd style="text-align: center;">{RANK_IMG}</dd><!-- ENDIF -->
Add After
<!-- IF PERCENTAGE_PROGRESS_NUM > -1 --><dd>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->
Success

Find
<!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt> <dd>{RANK_IMG}</dd><!-- ENDIF -->
Add After
<!-- IF PERCENTAGE_PROGRESS_NUM > -1 --><dt>{L_PROGRESS_TO_NEXT_RANK}</dt><dd><div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->
Success
styles/prosilver/template/ucp_pm_viewmessage.html

Find
		<!-- IF RANK_IMG --><dd>{RANK_IMG}</dd><!-- ENDIF -->
Add After
		<!-- IF PERCENTAGE_PROGRESS_NUM > -1 --><dd>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->
Success
styles/prosilver/template/viewtopic_body.html

Find
			<!-- IF postrow.RANK_TITLE or postrow.RANK_IMG --><dd>{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF -->
Add After
			<!-- IF postrow.PERCENTAGE_PROGRESS_NUM > -1 --><dd>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{postrow.PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{postrow.PERCENTAGE_PROGRESS}</span></div></dd><!-- ENDIF -->
Success
styles/prosilver/themes/common.css
Cannot locate file
viewtopic.php

Find
get_user_rank($row['user_rank'], false, $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
In-Line Find
$user_cache[$poster_id]['rank_image_src']
In-Line After, Add
, $user_cache[$poster_id]['percentage_progress']
Success

Find
get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
In-Line Find
$user_cache[$poster_id]['rank_image_src']
In-Line After, Add
, $user_cache[$poster_id]['percentage_progress']
Success

Find
				'joined'		=> '',
Add Before
				'percentage_progress'		=> -1,
The Find specified by the MOD could not be found

Find
				'joined'		=> $user->format_date($row['user_regdate']),
Add Before
				'percentage_progress'		=> -1,
The Find specified by the MOD could not be found

Find
		'RANK_IMG_SRC'		=> $user_cache[$poster_id]['rank_image_src'],
Add After
		'PERCENTAGE_PROGRESS_NUM'	=> $user_cache[$poster_id]['percentage_progress'],
		'PERCENTAGE_PROGRESS'		=> sprintf($user->lang['PERCENTAGE_PROGRESS'], $user_cache[$poster_id]['percentage_progress']),
Success
styles/subsilver2/template/memberlist_view.html

Find
			<!-- IF RANK_IMG -->
				<tr>
					<td align="center">{RANK_IMG}</td>
				</tr>
			<!-- ENDIF -->
Add After
			<!-- IF PERCENTAGE_PROGRESS_NUM > -1 -->
				<tr>
					<td>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></td>
				</tr>
			<!-- ENDIF -->
Success
styles/subsilver2/template/viewtopic_body.html

Find
			<!-- IF postrow.RANK_IMG -->
				<tr>
					<td>{postrow.RANK_IMG}</td>
				</tr>
			<!-- ENDIF -->
Add After
			<!-- IF postrow.PERCENTAGE_PROGRESS_NUM > -1 -->
				<tr>
					<td>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{postrow.PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{postrow.PERCENTAGE_PROGRESS}</span></div></td>
				</tr>
			<!-- ENDIF -->
Success
styles/subsilver2/themes/stylesheet.css
Cannot locate file

mut2nt
Registered User
Posts: 47
Joined: Sun Feb 21, 2010 8:22 pm
Location: HELL
Name: none mut2nt
Contact:

Re: [RC] User Rank Progression Bar v0.2.0

Post by mut2nt » Sun Jun 27, 2010 3:48 pm

It works now, well done :* i like it :D

User avatar
IBBoard
Registered User
Posts: 542
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK
Contact:

Re: [RC] User Rank Progression Bar v0.2.0

Post by IBBoard » Mon Jun 28, 2010 7:13 pm

mut2nt: That was a statement, not a question ;) Did eman's instructions help? Seeing the text but not any boxes sounds like you've got the template but not the CSS.

eman: I'm glad you liked it and it worked. Hopefully I'll get it submitted one day soon!

mao: What isn't working? If you want me to be able to help then you need to give me a bit more than just "not working" and a copy of a load of instructions.

User avatar
mao43
Registered User
Posts: 80
Joined: Thu Jul 23, 2009 5:08 am
Location: Santa Rosa Laguna
Contact:

Re: [RC] User Rank Progression Bar v0.2.0

Post by mao43 » Tue Jul 06, 2010 1:24 pm

well im using the latest Forum the 3.0.7 PL 1
then i installed this via Auto Mod
thats all

EDIT:
the result of the AutoMod Installation for this MOD is already posted and can be seen before this post

User avatar
IBBoard
Registered User
Posts: 542
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK
Contact:

Re: [RC] User Rank Progression Bar v0.2.1

Post by IBBoard » Tue Jul 06, 2010 5:56 pm

Firstly, you didn't say anything about using AutoMod. Secondly, I've never used AutoMod and never plan to since patching a pre-modded board is never going to be simple and will always include user intervention. Third, you didn't explain what that output was (which looked very much like the instructions on an initial skim), you just dumped it there and said "doesn't work", which isn't helpful.

From a brief look at the files, it appears that the optional extra SubSilver instructions use the path "themes" instead of "theme". Edit the path to remove the "s" and it should be fine.

[edit] v0.2.1 is out now and fixes the SubSilver instructions.

User avatar
mao43
Registered User
Posts: 80
Joined: Thu Jul 23, 2009 5:08 am
Location: Santa Rosa Laguna
Contact:

Re: [RC] User Rank Progression Bar v0.2.0

Post by mao43 » Wed Jul 07, 2010 10:02 am

so i can't install this via automod

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC] User Rank Progression Bar v0.2.0

Post by RMcGirr83 » Wed Jul 07, 2010 10:22 am

No, it will not install with Automod as the file edits for the finds are out of order (like with the edits to viewtopic.php). Also, the author should remove the svn stuff from the zip download as well. ;)
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
IBBoard
Registered User
Posts: 542
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK
Contact:

Re: [RC] User Rank Progression Bar v0.2.0

Post by IBBoard » Wed Jul 07, 2010 6:08 pm

Gah, I forgot about the SVN stuff.

As for the ordering of the edits, I thought that they should be in the correct order. I'll double-check that at some point and release a new version.

mut2nt
Registered User
Posts: 47
Joined: Sun Feb 21, 2010 8:22 pm
Location: HELL
Name: none mut2nt
Contact:

Re: [RC] User Rank Progression Bar v0.2.1

Post by mut2nt » Wed Jul 07, 2010 6:47 pm

Instructions for update from 0.2.0 RC to 0.2.1 RC ?

User avatar
IBBoard
Registered User
Posts: 542
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK
Contact:

Re: [RC] User Rank Progression Bar v0.2.1

Post by IBBoard » Wed Jul 07, 2010 7:03 pm

Basically none - I had a file path wrong because of an extra "s", which completely confused the AutoMod but which any human could work out and fix themselves.

mut2nt
Registered User
Posts: 47
Joined: Sun Feb 21, 2010 8:22 pm
Location: HELL
Name: none mut2nt
Contact:

Re: [RC] User Rank Progression Bar v0.2.1

Post by mut2nt » Wed Jul 07, 2010 7:20 pm

so.. what i have to do to update to 0.2.1 to replace a file , a edit a file ? etc?

User avatar
mao43
Registered User
Posts: 80
Joined: Thu Jul 23, 2009 5:08 am
Location: Santa Rosa Laguna
Contact:

Re: [RC] User Rank Progression Bar v0.2.1

Post by mao43 » Thu Jul 08, 2010 11:16 am

err MOD really hard to install

i wish this MOD can be installed via AutoMOD

so hard
first
not all lines given by the xml file are on the file...

>_<

User avatar
IBBoard
Registered User
Posts: 542
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK
Contact:

Re: [RC] User Rank Progression Bar v0.2.1

Post by IBBoard » Sat Jul 10, 2010 2:03 pm

mut2nt: If you did a manual install then the chances are you don't have to do anything because you already worked out that the SubSilver CSS file that AutoMOD thought was "missing" was just a typo in the path. If you did a manual install, couldn't find the CSS and didn't look around for it (just ignored the change) then you need to make the changes to the CSS file. The exact changes made to the instructions are available here

Mao: This is one of the smaller and simpler mods available. I'll double-check that all of the instructions are correct, but no-one else has reported problems. I also don't remember any errors from when I patched my forums up to the latest version of phpBB, so the instructions shouldn't interfere or be invalidated by the later versions of the forum.

User avatar
mao43
Registered User
Posts: 80
Joined: Thu Jul 23, 2009 5:08 am
Location: Santa Rosa Laguna
Contact:

Re: [RC] User Rank Progression Bar v0.2.1

Post by mao43 » Sat Jul 10, 2010 4:39 pm

i want this MOD to be installed by AutoMOD
cause i always get wrong installing it manually
:(

Locked

Return to “[3.0.x] MODs in Development”