1
Cuidiu
Hide Rank
  • 2006/7/27 21:58

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Is it possible someone could help me with a quick hack to hide or remove the user rank from showing to the anonymous users group? The site I'm working on is a membership association site with professionals listed in a directory available to the public. The public can click to find someone in their area and then view that professional's profile. I've done really well using extended profiles, etc. However, I would like to hide user rank as it's not quite what this company needs. I don't mind if the rank displays for the registered users but it is not necessary for the public. Is there any way I can hack the code to hide from anonymous? I assume I'd hack the userinfo.php but not sure how. Can someone help?

Thanks in advance.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

2
aph3x
Re: Hide Rank
  • 2006/7/28 3:37

  • aph3x

  • Theme Designer

  • Posts: 834

  • Since: 2004/12/26


To remove the rank field from the user profile in XOOPS 2.2.4, go to modules/profile/ and open the "userinfo.php" file, then locate those lines Quote:
$userrank =& $thisUser->rank();
$user_rankimage = "";
if (isset($userrank['image']) && $userrank['image'] != "") {
$user_rankimage = ''.$userrank['title'].'
';
}
$categories[0]['fields'][] = array('title' => _PROFILE_MA_RANK, 'value' => $user_rankimage.$userrank['title']);


and remove them, update the module and thats it.

The field will not show for both registered users and anonimous aswell

REMEMBER to backup first just in case.
Good Luck!
Everything I'm not made me everything I am
The Themes

3
Cuidiu
Re: Hide Rank
  • 2006/7/28 3:45

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Thanks DefianceB0y! I was able to show only to the registered users group but I may end up taking the whole thing out. It's just not necessary.

Thanks again!
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

Login

Who's Online

431 user(s) are online (314 user(s) are browsing Support Forums)


Members: 0


Guests: 431


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits