PortalParts.com Site

 Forum Index > Geeklog > Forum Plugin Support New Topic Post Reply
 Show full name in the site members index report in the Forum Block
 |  Printable Version
StolidusX
 October 27 2007 16:23 PM (Read 2452 times)  
Forum Junior
Junior

Status: offline

Registered: 10/27/07
Posts: 9

Hi Blaine,

I'm hoping there is a simple snippet of code needed to change the usr name to the fullname only for the site member index in the forum block.

The forum block is only available to members and everyone already knows each other by real names when visiting at the fellowship, so they have requested that the full name show up on the forum block site member index to make it easier to communicate with each other.

Thanks for any help in advance.


 
Profile Email PM
Quote
Blaine
 October 27 2007 16:28 PM  
Forum Admin
Admin

Status: offline

Registered: 03/01/02
Posts: 3576

If you set the site config.php setting to show fullname then it will respect that setting and show the fullname as well.

At approx line 245 in your site's config.php

PHP Formatted Code

// Used by COM_getDisplayName to return Members's Full Name else username
$_CONF['show_fullname'] = 1; // 1 = show user's full nam
 


Please consider contributing to support my efforts ..
 
Profile Email Website PM
Quote
StolidusX
 October 27 2007 16:48 PM  
Forum Junior
Junior

Status: offline

Registered: 10/27/07
Posts: 9

Thanks Blaine for the quick response. I had already tried that and felt that the site was bogged down by the full names everywhere. I was hoping that we could just show the full name in the site member index.

If this would be a serious undertaking, I suppose we will have to do without. I was hoping for a simple fix, such as replacing a variable in the code to return the full name rather than the user name. Actually the line of code in the config.php file got me to thinking it might be possible to effect the change just in the block with something simple. Well, simple for the code writer anyway.

Thanks again Blaine.


 
Profile Email PM
Quote
Blaine
 October 27 2007 17:06 PM  
Forum Admin
Admin

Status: offline

Registered: 03/01/02
Posts: 3576

Well in that case, you will need to modify the code in few places - public/forum/memberlist.php and remember to re-apply the changes after any future upgrade.

1) You have to modify the SQL in 2 places to add the user.fullname field - approx line 190-200

2) Then modify the code to set the fullname value for the template variable
Approx line 285

PHP Formatted Code

        $report->set_var ('member_name',$siteMembers['fullname']);
 


Untested - but should work.


Please consider contributing to support my efforts ..
 
Profile Email Website PM
Quote
StolidusX
 October 27 2007 23:44 PM  
Forum Junior
Junior

Status: offline

Registered: 10/27/07
Posts: 9

Thank You Blaine!

The suggested code changes were perfect.

I appreciate the help. When I get the chance to update my paypal account I'll buy you a pint and a slice of pizza.


 
Profile Email PM
Quote
Content generated in: 0.20 seconds
New Topic Post Reply



 All times are CST. The time is now 11:34 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content