News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Display Name On Registration

Started by Liam., April 04, 2009, 04:07:47 PM

Previous topic - Next topic

Valkrider

I'll give it another go on my testing site and report back.

rking2981

Hey all,

Not sure if anyone posted a new solved issue with regards to getting this mod to work on the latest release of smf, but here it is.

Find:
<input type="text" name="user" id="smf_autov_username" size="30" tabindex="', $context['tabindex']++, '" maxlength="25" value="', isset($context['username']) ? $context['username'] : '', '" class="input_text" />
<span id="smf_autov_username_div" style="display: none;">
<a id="smf_autov_username_link" href="#">
<img id="smf_autov_username_img" src="', $settings['images_url'], '/icons/field_check.gif" alt="*" />
</a>
</span>

</dd>


Add After:
<dt><strong><label for="smf_autov_username">',$txt['display_name'], ':</label></strong></dt>
                                                <dd>
                                                        <input type="text" name="real_name" id="smf_autov_username" size="30" tabindex="', $context['tabindex']++, '" maxlength="25" value="', isset($context['real_name']) ? $context['real_name'] : '', '" />
<span id="smf_autov_username_div" style="display:none;">
<a id="smf_autov_username_link" href="#">
<img id="smf_autov_username_img" src="', $settings['images_url'], '/icons/field_check.gif" alt="" />
</a>
</span>
                                                </dd>


Hope it works for you all as it did for me :)

allisondk


Matthew K.

./Themes/default/Register.template.php

tensai

#124
hello, was able to install this mod but the data of the display name won't save it to the database , it still uses the username. has anyone been able to fix this or has anyone have the same problem? thanks.

Edit: Scratch that it works only if you've allowed user to edit their display name in the features and option, if it's off then it won't work.

Matthew K.

Thanks for the information. I'll keep that in mind for the next patch.

gr8shivam


Matthew K.

It should, I'm not sure. Try using Version Emulate and do *not* proceed if you encounter any errors.

cruzer076

hey guys, I am using 2.0.9 and tried the code above in Theme/default ...so it shows a little bit but the text for "Display Name" is blank, the only thing you see is ":"

Are there any additional changes we need to get this to work with 2.0.9?

Thanks

Matthew K.

Attach any files that the modification edits to this topic and I'll fix any issues for you.

mysiar1

Could author or anybody prepare this MOD for late version 2.0.9 ?

Big thanks in advance.

mysiar1

Polish translation:

$txt['display_name'] = 'Ustaw nazwę użytkownika';
$txt['display_name_desc'] = 'To jest nazwa użytkownika, która będzie wyświetlana';]]>

maxfiddler

I am a new user of SMF and would like to get this mod to install and work. I read through the thread and don't see what I would need to do to make it work. I am using 2.0.9 and when I try to install the _2RC2 version it says "The package you are trying to download or install is either corrupt or not compatible with this version of SMF."
thanks,
max

Westwegoman

Click on "Advanced" at the bottom of your package manager page and use emulate.

Shades.

I know this mod hasn't been updated since October 09, 2012 but I see a couple of the authors are still active so @JBlaze  & @Mathew K is there a chance this can be updated for 2.1.1? I have it working but with just a couple small errors in error log!

I have a "Family Tree" sort of web site and I need the display name on registration and preferably required but I can live with it either way as long as I can get it to work properly on 2.1! ;)

Thanks,
Shades 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Steve

Why not just create a custom field and check the box to have it on the registration page?
DO NOT pm me for support!

Shades.

Quote from: Steve on May 02, 2022, 11:49:34 AMWhy not just create a custom field and check the box to have it on the registration page?
Because I don't want it displayed under their username, I want it to just show their "Display Name" instead of the "username". But as a last resort I may have to do that! ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

I think I figured it out so I'm going to post this for reference and for anybody else that wants to use it until maybe this mod gets updated or not.

Backup database and files first!!

This is for SMF 2.1.1...

Install the mod by emulating for 2.0RC2 and don't worry about the errors that pop up.

After installed in Register.template.php...

Find:
<dt><strong><label for="smf_autov_reserve1">', $txt['user_email_address'], ':</label></strong></dt>

Add before:
<dt><strong><label>', $txt['display_name'], ':</label></strong><br />
<div class="smalltext">', $txt['display_name_desc'], '</div></dt>
<dd>
<input type="text" name="real_name" id="smf_autov_username" size="30" tabindex="', $context['tabindex']++, '" maxlength="25" value="', isset($context['real_name']) ? $context['real_name'] : '', '" />
<span id="smf_autov_username_div" style="display: none;">
<a id="smf_autov_username_link" href="#">
 <img id="smf_autov_username_img" src="xxx://yourdomain.xxx/Themes/default/images/icons/field_check.gif" alt="" /> </a>
</span>
</dd>

Please not that you will have to change "xxx://yourdomain.xxx with your actual domain or you will get errors!
Could possible just remove this line completely but I am no coder so I'm not sure if it's actually needed or not!

Enjoy! 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Advertisement: