Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: RedtopX on July 09, 2014, 11:34:04 AM

Title: Change Name Fields?
Post by: RedtopX on July 09, 2014, 11:34:04 AM
Hi,

Is there a way I can change some of name fields like in profile page
eg: Name change it to Real Name?

QuoteName <<--- Default
This is the displayed name that people will see.

QuoteReal Name <<-- Modified
This is the displayed name that people will see.


What file should I edit in the back-end?

thanks
Title: Re: Change Name Fields?
Post by: margarett on July 09, 2014, 12:44:23 PM
That is acquired from index.english.php --> $txt['name']
But to change it has probably implications in other places...

The safest way would be to add to index.english.php
$txt['name_real'] = 'Real Name';
Then edit Sources/Profile-Modify.php and find:
'label' => $txt['name'],
(under "real_name" array item)
And replace with:
'label' => $txt['name_real'],
Title: Re: Change Name Fields?
Post by: RedtopX on July 10, 2014, 06:20:16 PM
Thanks @Margarett for the file idea, I did change the default index.english.php "Name" to "Real Name"

Now on the Registration page part:

QuoteChoose Display Name: <<=== Default
This is the name that will be displayed

change to

QuoteReal Name: <<=== Modified
This is the name that will be displayed

Where to find this line?


Thanks again for the support.
Title: Re: Change Name Fields?
Post by: margarett on July 10, 2014, 06:35:18 PM
No idea :o I don't know that string in registration...
Do you use a MOD for entering display name at registration?
Title: Re: Change Name Fields?
Post by: RedtopX on July 23, 2014, 10:01:25 AM
sorry for the late reply...

no i am not using MOD for registration, still the default one.
Title: Re: Change Name Fields?
Post by: margarett on July 23, 2014, 10:36:46 AM
Can you printscreen that? I have no idea where that comes from...
Title: Re: Change Name Fields?
Post by: Illori on July 23, 2014, 10:47:25 AM
cant be default registration as that is not a default entry on the registration form.
Title: Re: Change Name Fields?
Post by: RedtopX on August 05, 2014, 09:30:51 AM
Quote from: margarett on July 23, 2014, 10:36:46 AM
Can you printscreen that? I have no idea where that comes from...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi62.tinypic.com%2Fxdi7mv.png&hash=868014477112d1c8f91c63c150daec6685636ba4)
Title: Re: Change Name Fields?
Post by: Arantor on August 05, 2014, 09:34:49 AM
That's not standard in SMF. So, what mod was it that you added?
Title: Re: Change Name Fields?
Post by: RedtopX on August 05, 2014, 09:46:12 AM
1)Birthday on Registration
2)Social Login (OneAll Social)
Title: Re: Change Name Fields?
Post by: Arantor on August 05, 2014, 09:50:28 AM
I'm sorry, I have no idea how you added that field - I have no idea if it's part of the Social Login mod or not - but that field simply does not exist in SMF out of the box. A search on 'change display name' yields nothing in the entirety of 2.0.8.
Title: Re: Change Name Fields?
Post by: RedtopX on August 05, 2014, 09:55:13 AM
Oh sorry here's one more "Display Name On Registration"
Title: Re: Change Name Fields?
Post by: margarett on August 05, 2014, 09:59:59 AM
There ya go :P
Title: Re: Change Name Fields?
Post by: RedtopX on August 05, 2014, 10:06:05 AM
Ok got the file:


<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>JBlaze:DisplayNameOnRegistration</id>
<version>2.0</version>

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end" />
<add><![CDATA[
$txt['display_name'] = 'Choose Display Name';
$txt['display_name_desc'] = 'This is the name that will be displayed';
]]>
</add>
</operation>
</file>


I hope this is correct
Title: Re: Change Name Fields?
Post by: margarett on August 05, 2014, 10:12:00 AM
Yup, exactly ;)
Edit your Modifications.english.php and change the text as you wish. Do note that doing this will prevent the MOD from uninstall cleanly, in case you ever need to do it ;)
Title: Re: Change Name Fields?
Post by: Kindred on August 05, 2014, 05:24:20 PM
Also note, for the future -- questions regarding a specific mod should be asked and discussed in the thread dedicated to supporting that mod
Title: Re: Change Name Fields?
Post by: RedtopX on December 01, 2014, 01:01:54 PM
Thanks for your @margarett :)

Will do that next time @Kindred, thanks ;)