Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

Reply
 
Thread Tools
Preferred Name (Display Name) Details »»
Preferred Name (Display Name)
Version: 1.00, by Hex_legend Hex_legend is offline
Developer Last Online: Oct 2015 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.x Rating:
Released: 12-14-2007 Last Update: Never Installs: 28
Template Edits
Re-useable Code Translations  
No support by the author.

This minor template edit will enable your users to have a "Preferred Name" instead of their username showing on their posts and navbar. Users would still log in using their username and password just that their preferred name would show up instead of their username.

This will not change the displayed name in the "Who's online" box.

This would be a good protection against cases where an admin from another site steals passwords. Meaning they try to log in with the password of a username they recognise. But in the end, it isn't really the right username. Regardless .. this is a feature that would be useful to some members.

Step 1.

Go into your Admin CP
User Profile Fields
Add New Profile Field
Single Line Text Box

Name: Preferred Name
Description: What would you like to be known as on the site? you will still use your username to log in.
Required: Yes, Always
Private Field: No
Field Searchable: No
Show On Member List: No

Leave everything else the same.

Make a note of the user field number that is assigned to this field (for this example, we will use Field5)

Step 2.

In Styles & Templates

Open Navbar (Under Navigation Templates)

Search For:
Code:
$bbuserinfo[username]
Replace With:
Code:
$bbuserinfo[fieldX]
Where X is the field number from step 1.

Save.

Open up Postbit / Postbit Legacy (Depending on which one you use.

Search For:
Code:
$post[musername]
Replace With:
Code:
$post[fieldX]
Where X is the field number from step 1.

Save.

Step 3.

Click Language & Phrases.
Search For Phrase.
"Thank you for logging "
Click Edit.

Replace with:

Code:
Thank you for logging in, $bbuserinfo[fieldX] .
Where X is the field number from step 1.

Done. No more template edits.


THANKS TO
  • Kirk Y
  • DJ RREBEL

REMEMBER TO CLICK INSTALL

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-15-2007, 07:33 PM
Hex_legend Hex_legend is offline
 
Join Date: May 2007
Posts: 750
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*reserved*
Reply With Quote
  #3  
Old 12-15-2007, 07:56 PM
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

as explained here

Good job Hex.
Thanks for bringing it here.
Reply With Quote
  #4  
Old 12-15-2007, 08:07 PM
Hex_legend Hex_legend is offline
 
Join Date: May 2007
Posts: 750
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well seeing as I created the thread on vbulletin.com, I thought I'd bring it here too lol, Credit to all those who helped me.
Reply With Quote
  #5  
Old 12-15-2007, 08:31 PM
iogames's Avatar
iogames iogames is offline
 
Join Date: Jan 2007
Location: Las Vegas, NV.
Posts: 1,433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will wait for version 2.0
Reply With Quote
  #6  
Old 12-15-2007, 08:37 PM
DJ RRebel DJ RRebel is offline
 
Join Date: Jul 2002
Location: CANADA
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't help much at all .. just brainstormed a bit out loud to hopefully point you in the right direction.

Unfortunately .. as mentioned by Boothby in the other thread at vB.com .. you still have the issue of things like search not working.

You wouldn't have to worry about people clicking on a PM button to sent members a private message ... but users would get errors if they fill in the field manually. Even worse .. Case where User1 has display name Frank, while another user has Frank as his real username. The wrong member would get the PM. Same thing with manual searching unless they used the searchlink directly from the person's post or profile.


For the who's online page .. I'm only guessing here and haven't tried it myself .. but in the "whosonlinebit" template, change this:
Code:
<a href="member.php?$session[sessionurl]u=$userinfo[userid]">
$userinfo[musername]</a>$userinfo[hidden]
<if condition="$show['buddy']">+</if>
into this:
Code:
<a href="member.php?$session[sessionurl]u=$userinfo[userid]">
$userinfo[fieldX]</a>$userinfo[hidden]
<if condition="$show['buddy']">+</if>
Reply With Quote
  #7  
Old 12-15-2007, 08:41 PM
iogames's Avatar
iogames iogames is offline
 
Join Date: Jan 2007
Location: Las Vegas, NV.
Posts: 1,433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
I was thinking of that!
it's a Coin with just one side
Reply With Quote
  #8  
Old 12-15-2007, 08:56 PM
Hex_legend Hex_legend is offline
 
Join Date: May 2007
Posts: 750
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well. This is where the cleverness comes in

I have edited it just enough so it will only change on navbar and in posts, so if you click on the drop down on a post (for their profile) it will show their username and the same for the who's online part.

Besides the point I know, but can't think how to change it lol.

DJ RRebel, can you PM me please?
Reply With Quote
  #9  
Old 12-15-2007, 10:15 PM
DJ RRebel DJ RRebel is offline
 
Join Date: Jul 2002
Location: CANADA
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Note .. I think this template might be the one for the stuff like birthdays and who's online at the bottom of your homepage:

memberlist_resultsbit

You'll definitely have to track down stuff on your calander, memberlists and profile pages.

Plus probably a few more I haven't thought of.
Reply With Quote
  #10  
Old 12-15-2007, 10:21 PM
DJ RRebel DJ RRebel is offline
 
Join Date: Jul 2002
Location: CANADA
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hex .. I'm working on a few things right now and am about to eat and possibly go out .. if you have any questions feel more than free to post them here or at vB.com and I'll do my best. It's always better to post questions out in the open, that way the information can help the entire community and anyone having problems in the future!

However .. if there's anything personal in nature, feel free to PM anytime!

I'm not a programmer .. I guess I'm more of a vB tinkerer and philosopher! lol .. So while I'll often be able to tell you what you should do .. I often will not be able to give you the exact technical details you need to know.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:20 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07239 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete