Customizing SMF > SMF Coding Discussion

Modify mlist to include custom field

(1/7) > >>

thunderchld:
We have custom profile fields enable to include "real name" and "character name". My end-goal is to modify the View Members list (http://SITE/index.php?action=mlist) to include those fields on display.

I did a quick search and have not found a mod for this (there are a lot to look through), but I'm fairly comfortable (and I have a test forum) with modifying the view on the page to include this (I keep a change-log post with all changes made in the event we need to un-do or re-do for updates).

Has anyone done this successfully?  I am not far enough along yet to post code snippets. I just did not want to reinvent the wheel if I did not have to.  I plan on making another attempt at code changes tonight.

Pipke:
check this topic Custom profile fields in Who is online and Memberlist

pepa:
The old mod is here.   No-one, who has posted, has been able to get it working on 2.0.15.  If you get your code up and running I'd be interested in having a look.  What I'm interested in is having those fields show in search results of the member list.

thunderchld:
Just FYI to keep everything in the correct place: https://www.simplemachines.org/community/index.php?topic=481160.new#new

I'm going to mark this resolved and put my notes in that thread.

thunderchld:
I was incorrect in posting on the other thread. I've re-opened this topic, if that is allowed, to track.If this is not the correct location - please tell me exactly where you want me to post.

Notes:

I've updated the changes to account for 2.0.15. However, I'm running into the install issue:

Error:

--- Code: ---Table 'SCHEME.custom_fields' doesn't exist
File: /PATH/Packages/temp/install.php
Line: 16

--- End code ---

Line 16 of install.php:

--- Code: ---$columns = $smcFunc['db_list_columns']('custom_fields');
--- End code ---

First, I feel we are missing the database prefix.  My table should be SCHEME.testing_custom_fields.  Okay, I can fix that.

Second, and this is a dumb question I am sure. Are we -looking- for or -adding- "custom_fields".  If we are looking for - I believe it should be "cf_" or "cust_"  Or, I'm not understanding what this line should be doing.

Navigation

[0] Message Index

[#] Next page

Go to full version