Page 3 of 5

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

Posted: Sat Jun 26, 2010 2:24 pm
by eman80
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

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

Posted: Sun Jun 27, 2010 12:54 am
by mao43
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

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

Posted: Sun Jun 27, 2010 3:48 pm
by mut2nt
It works now, well done :* i like it :D

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

Posted: Mon Jun 28, 2010 7:13 pm
by IBBoard
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.

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

Posted: Tue Jul 06, 2010 1:24 pm
by mao43
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

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

Posted: Tue Jul 06, 2010 5:56 pm
by IBBoard
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.

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

Posted: Wed Jul 07, 2010 10:02 am
by mao43
so i can't install this via automod

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

Posted: Wed Jul 07, 2010 10:22 am
by RMcGirr83
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. ;)

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

Posted: Wed Jul 07, 2010 6:08 pm
by IBBoard
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.

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

Posted: Wed Jul 07, 2010 6:47 pm
by mut2nt
Instructions for update from 0.2.0 RC to 0.2.1 RC ?

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

Posted: Wed Jul 07, 2010 7:03 pm
by IBBoard
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.

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

Posted: Wed Jul 07, 2010 7:20 pm
by mut2nt
so.. what i have to do to update to 0.2.1 to replace a file , a edit a file ? etc?

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

Posted: Thu Jul 08, 2010 11:16 am
by mao43
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...

>_<

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

Posted: Sat Jul 10, 2010 2:03 pm
by IBBoard
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.

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

Posted: Sat Jul 10, 2010 4:39 pm
by mao43
i want this MOD to be installed by AutoMOD
cause i always get wrong installing it manually
:(