1
Xtracted
Add field (Rank) to memberlist
  • 2004/12/29 1:43

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


I once hacked the xoopsmembers files and added a extra field in the memberlist on one of my XOOPS sites.. I cant find the original posts that helped me with this (guess they are gone because of the rebuild of the site?) so I need some help again since I just updated to the latest version of xoops..

I want to add members Rank to the memberlist, so that the rank displays between the Real Name and Email.. help? =)

2
Xtracted
Re: Add field (Rank) to memberlist
  • 2004/12/29 13:32

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


I think it was something like adding the lines in the modules/xoopsmembers/index.php under the if ( $op == "submit" ) { line... should look just like this but with the user_name changed to something else.. user_rank perhaps? But I dont think that all this is nessecary since I dont want people to be able to search for rank, just that its displayed in the search result..




if ( !empty($HTTP_POST_VARS['user_name']) ) {
$match = (!empty($HTTP_POST_VARS['user_name_match'])) ? intval($HTTP_POST_VARS['user_name_match']) : XOOPS_MATCH_START;
switch ($match) {
case XOOPS_MATCH_START:
$criteria->add(new Criteria('name', $myts->addSlashes(trim($HTTP_POST_VARS['user_name'])).'%', 'LIKE'));
break;
case XOOPS_MATCH_END:
$criteria->add(new Criteria('name', '%'.$myts->addSlashes(trim($HTTP_POST_VARS['user_name'])).'%', 'LIKE'));
break;
case XOOPS_MATCH_EQUAL:
$criteria->add(new Criteria('name', $myts->addSlashes(trim($HTTP_POST_VARS['user_name']))));
break;
case XOOPS_MATCH_CONTAIN:
$criteria->add(new Criteria('name', '%'.$myts->addSlashes(trim($HTTP_POST_VARS['user_name'])).'%', 'LIKE'));
break;
}
}

3
Xtracted
Re: Add field (Rank) to memberlist
  • 2005/1/3 0:33

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


*bump*


I know that SOMEONE has an answer to this..

4
Lance_
Re: Add field (Rank) to memberlist
  • 2005/1/3 0:45

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Didn't read it, but is this the thread you were looking for?

https://xoops.org/modules/newbb/viewtopic.php?topic_id=15627&forum=20

5
Xtracted
Re: Add field (Rank) to memberlist
  • 2005/1/7 23:12

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


Yep, thats it... thank you..

Cant understand why I didnt check my profile for previous posts.. ack.. newbie mistake.. ohwell..

Login

Who's Online

305 user(s) are online (192 user(s) are browsing Support Forums)


Members: 0


Guests: 305


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