FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Display user names in profiles
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Display user names in profiles [message #16234] Wed, 21 January 2004 10:48 Go to next message
math_adm is currently offline  math_adm   France
Messages: 126
Registered: September 2003
Location: France
Karma: 0
Senior Member
Hi

I would like my forum (used in an engineer school) to display the names of students and teachers (ie users) when I click on their user name to display their profiles.

In other words, I want to add the regular name of a user to the fields displayed when I view a profile.

Is there a secret option to do that ? Or do I need to modify the source code ? Should I ask this in fudforum hacks ?

Thanks

FD
Re: Display user names in profiles [message #16260 is a reply to message #16234] Fri, 23 January 2004 22:55 Go to previous messageGo to next message
Wild_Cat is currently offline  Wild_Cat   Ukraine
Messages: 144
Registered: November 2002
Location: Odessa, Ukraine
Karma: 0
Senior Member
I were wondering about this myself.
Since Ilia said the name is intended only for the admin in his vision, I can tell that this should be a hack - with source code modification. I haven't done this yet on my forum but that's a good occasion to do so:

You should modify the $DATA_DIR/src/usrinfo.php.t as following:
you have a set of similar short lines (121-130 for 2.6.0) like
$location = $u->location ? '{TEMPLATE: location}' : '';
add a line at the top of this block
$user_name	= $u->name ? '{TEMPLATE: user_name}' : '';


Then you should modify $DATA_DIR/thm/default/trml/usrinfo.tmpl (or whatever theme you use in place of deafult) as following:
add the above mentioned TEMPLATE SECTION anywhere in upper part of the file between {SECTION: END} and next {SECTION: user_image} e.g. as following:
{SECTION: user_name}
<tr class="{ALT-VAR: search_alt RowStyleA RowStyleB}"><td nowrap class="GenText">{MSG: register_name}</td><td 
class="GenText">{VAR: u->name}</td></tr>
{SECTION: END}

Then find the {PAGE_USERINFO line (186 for now)
scroll down to a start of a set of lines beginning with {TEMPLATE-DATA:
at the top of this block of similar lines add a line that will display the user_name actually
{TEMPLATE-DATA: user_name}


Now you're done, all the users can see each other names (if they entered it - it's not a required field in this forum normally).

I guess this thread should really be in hacks and let's hope moderators will move it there.


Lady of Avalon
icon6.gif  Re : Re: Display user names in profiles [message #16345 is a reply to message #16260] Mon, 26 January 2004 13:09 Go to previous message
math_adm is currently offline  math_adm   France
Messages: 126
Registered: September 2003
Location: France
Karma: 0
Senior Member
Thanks Wild cat, it worked just wonderfully ! Smile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Question about Referrals
Next Topic: Allow anonimous to recognize whether there are new posts?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 14:45:46 GMT 2024

Total time taken to generate the page: 0.03320 seconds