User Rank Module
Posted by Chris Eaton
October 29, 2006 01:46PM |
Admin Registered: 22 years ago Posts: 4,495 |
October 29, 2006 02:33PM |
Admin Registered: 18 years ago Posts: 8,532 |
You'll have to disable and reenable the module from the Modules admin screen to make the new hook work. All module hooks are cached when saving module settings, so new hooks aren't automatically detected and used by Phorum.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team



Re: Version 1.3 October 29, 2006 03:33PM |
Registered: 16 years ago Posts: 99 |
Re: User Rank Module November 09, 2006 03:56PM |
Registered: 16 years ago Posts: 99 |
Hello,
Well I'm not certain if it is me that made a mistake but I think I did found a bug with this module. It happen when the number of post goes over 999.
I included the the following lines into the profil.php file:
{IF PROFILE->mod_userrank}
<tr>
<td nowrap="nowrap">{LANG->mod_userrank}: </td>
<td>{PROFILE->mod_userrank} </td>
</tr>
{/IF}
So when I click on the name of a author, and see his profile, I see the rank of that user. All is fine until his number of post reach 999. When the number of post become 1000 & +, the rank that appears will be that of 0 post.
Curiously this does not happen when I go through the Command Center. The real rank is OK, no matter how many post. The list and read template are OK too. It only happen in the profile when we click from the name in a list or read template.
Can anyone help?
Thanks,
Yves
Edited 1 time(s). Last edit at 11/09/2006 06:17PM by Yes.
Well I'm not certain if it is me that made a mistake but I think I did found a bug with this module. It happen when the number of post goes over 999.
I included the the following lines into the profil.php file:
{IF PROFILE->mod_userrank}
<tr>
<td nowrap="nowrap">{LANG->mod_userrank}: </td>
<td>{PROFILE->mod_userrank} </td>
</tr>
{/IF}
So when I click on the name of a author, and see his profile, I see the rank of that user. All is fine until his number of post reach 999. When the number of post become 1000 & +, the rank that appears will be that of 0 post.
Curiously this does not happen when I go through the Command Center. The real rank is OK, no matter how many post. The list and read template are OK too. It only happen in the profile when we click from the name in a list or read template.
Can anyone help?
Thanks,
Yves
Edited 1 time(s). Last edit at 11/09/2006 06:17PM by Yes.
Re: User Rank Module November 09, 2006 06:26PM |
Registered: 16 years ago Posts: 99 |
Re: User Rank Module November 13, 2006 10:18PM |
Registered: 16 years ago Posts: 99 |
Hello again,
Nobody answered me on this issue so I'm trying again.
I have further identified the problem with the profile template. It seams that the coma "," is being interpreted as a decimal.
999 = 999
1,000 = 1.00
So when the post count goes to 1000, it's become 1. I tested my theory by making an artificial user and incremented his post to 999000. And sure enough, User_rank count it as 999...
As i said, this only happen in the profile template. Anyone know how to correct it?
Thanks,
Yves
Nobody answered me on this issue so I'm trying again.
I have further identified the problem with the profile template. It seams that the coma "," is being interpreted as a decimal.
999 = 999
1,000 = 1.00
So when the post count goes to 1000, it's become 1. I tested my theory by making an artificial user and incremented his post to 999000. And sure enough, User_rank count it as 999...
As i said, this only happen in the profile template. Anyone know how to correct it?
Thanks,
Yves
November 14, 2006 06:20AM |
Admin Registered: 17 years ago Posts: 744 |
Hi Yves,
Open /mods/userrank/userrank.php
Replace line 36
by
Replace line 69
by
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Quote
Yes
Anyone know how to correct it?
Open /mods/userrank/userrank.php
Replace line 36
$userposts = $message["user"]["posts"];
by
$userposts = str_replace($PHORUM["thous_sep"], '', $message["user"]["posts"]);
Replace line 69
$userposts = $profile["posts"];
by
$userposts = str_replace($PHORUM["thous_sep"], '', $profile["posts"]);
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: User Rank Module November 14, 2006 02:35PM |
Registered: 16 years ago Posts: 99 |
November 14, 2006 02:55PM |
Admin Registered: 17 years ago Posts: 744 |
Hi Yves,
I used the version from this post.
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Quote
Yes
We must be using a different version
I used the version from this post.
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: User Rank Module November 14, 2006 06:07PM |
Registered: 16 years ago Posts: 99 |
Sorry, only registered users may post in this forum.