Need help with code in MemberInfo

Hello everyone, as I wanted to add new field in Brief Member Info, I did following:

In BxDolMemberInfo I added a line:

case 'sys_interest':

return (empty($aData['Interest Category']) ? '' : $aData['Interest Category'] . ', ') . _t($GLOBALS['aPreValues']['Interest Category'][$aData['Interest Category']]['LKey']);

 

In sys_object_member_info:

Object: sys_interest; Title: _sys_member_info_interest; Type:info; Id:17;

The new value in Advanced Settings->Profile->Brief Profile Info-> is shown as  _sys_member_info_interest, when I choosing it is not working, shows blank where on it should be shown. Headline and status message works fine, but the new one I created is not doing any good.

Can someone please take a look at my code and help me with this? 

Thank you :)

Quote · 17 Mar 2013

Forgot to mention- my predefined value is named "Interest Category', and the system name for the selector in which user chooses the category is "Interest".

Quote · 18 Mar 2013

I want to be a core change. Do I need to edit template files? Do I need to change some other files besides 'sys_object_member_info' and 'BxDolMemberInfo'?

I also think my code for case 'sys_interest' is not written correctly. 

Thanks for attention :)

Quote · 19 Mar 2013

Not sure I am following the question.  Are you storing new info in the database?  If so, then you need database code to update the database with the info and database code to extract the info for display.

Geeks, making the world a better place
Quote · 19 Mar 2013

Well as I learned from some posts, to add new value to show in Brief Member Info, I have to edit sys_object_member_info


I attached a screen shot so you can see exactly what I did.

Also I added the code in red to BxDolMember info,

 /**

     * Get member info

     */

....

 case 'sys_headline':

            return $aData['Headline'];

 

        case 'sys_status_message':

            return $aData['UserStatusMessage'];

 

case 'sys_interest':

return (empty($aData['Interest Category']) ? '' : $aData['Interest Category'] . ', ') . _t($GLOBALS['aPreValues']['Interest Category'][$aData['Interest Category']]['LKey']);


'Interest' is the member info I added, which has a pre-defined value named 'Interest Category'.

sys_object_member_info.png · 148.7K · 241 views
Quote · 19 Mar 2013

Bump :)

Quote · 22 Mar 2013

Everything looks right.

I suspect that the problem in the following code:

return (empty($aData['Interest Category']) ? '' : $aData['Interest Category'] . ', ') . _t($GLOBALS['aPreValues']['Interest Category'][$aData['Interest Category']]['LKey']);

Try to begin with returning something simplem, like:

return 'test';

Then:

return $aData['Interest Category'];

etc, to identify the exact problem.

Rules → http://www.boonex.com/terms
Quote · 3 Apr 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.