NEWBIE: Change text on registration page

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
sealilly
Registered User
Posts: 9
Joined: Tue Feb 20, 2018 11:13 am

NEWBIE: Change text on registration page

Post by sealilly » Wed Feb 21, 2018 2:52 pm

newbie question, cant seem to find where I can change some text on pages. For example, on the registration page, under Username I wish to change the text to say "Must be real first and last name". I understand I may be changing this text in the script and will of course be careful :)

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49428
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: NEWBIE: Change text on registration page

Post by stevemaury » Wed Feb 21, 2018 3:11 pm

Text on the various pages is contained in language variables defined in one of the language/*/*.php files. You can edit it by editing the text between the single quotes on the right side of the =>. Use a good text editor. Dreamweaver and Frontpage are not good choices when it comes to file editors (find out why). See Tools needed to set up and customise phpBB for suggestions.

The entries you want are in language/*/ucp.php, but you need to edit all the USERNAME_*_EXPLAIN entries, because which is used depends on what character you all ow in usernames. But if you want to use real names, you should only be allowing alphanumerics. Or you could do them all, like:

Code: Select all

'USERNAME_ALPHA_ONLY_EXPLAIN'	=> 'Username must be between %1$s and %2$s long and use only alphanumeric characters.',
EDITS TO:

Code: Select all

'USERNAME_ALPHA_ONLY_EXPLAIN'	=> 'You must use your REAL last and first names and Username must be between %1$s and %2$s long and use only alphanumeric characters.',
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

sealilly
Registered User
Posts: 9
Joined: Tue Feb 20, 2018 11:13 am

Re: NEWBIE: Change text on registration page

Post by sealilly » Wed Feb 21, 2018 8:54 pm

Perfect, just what I needed, thank you!!

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49428
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: NEWBIE: Change text on registration page

Post by stevemaury » Wed Feb 21, 2018 9:06 pm

Don't forget to allow sufficient characters in the Username length in the ACP, User registration settings.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

sealilly
Registered User
Posts: 9
Joined: Tue Feb 20, 2018 11:13 am

Re: NEWBIE: Change text on registration page

Post by sealilly » Wed Feb 21, 2018 9:20 pm

I did 30, think thats safe?

sealilly
Registered User
Posts: 9
Joined: Tue Feb 20, 2018 11:13 am

Re: NEWBIE: Change text on registration page

Post by sealilly » Wed Feb 21, 2018 9:30 pm

Your advice worked perfectly! Could I also change the word Username in display?

User avatar
david63
Jr. Extension Validator
Posts: 14638
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: NEWBIE: Change text on registration page

Post by david63 » Wed Feb 21, 2018 9:41 pm

sealilly wrote:
Wed Feb 21, 2018 9:30 pm
Your advice worked perfectly! Could I also change the word Username in display?
You can change anything that you want but be aware of two things:

1. Some language variables are used in more than one place so changing it in one place may have the affect that it looks wrong elsewhere.
2. Any changes that you make to any core file (and language files are core files) many need to be reapplied whenever you do an update/upgrade.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2795
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: NEWBIE: Change text on registration page

Post by thecoalman » Wed Feb 21, 2018 9:55 pm

I would suggest you keep a list of files you edit, it's also a good practice to comment changes especially if the reasons are not obvious.

Code: Select all

//Your initials or something else unique that you can easily indetify - Explanation for the change if it's not obvious
'USERNAME_ALPHA_ONLY_EXPLAIN'	=> 'You must use your REAL last and first names and Username must be between %1$s and %2$s long and use only alphanumeric characters.',
You will need to account for them with updates. If you have the list of files you can download the changed files package when a new versions is released. This only contain files that have changed since the last version. Compare your list to them, if any match you can use tool like Winmerge to compare and merge you edits in the new file. This is where the comments come in because when you compare the files you'll know if any differences are because you changed it or it was changed by phpBB.

Also note you can also edit the templates themselves. In the registration template is going to be a placeholder that will look like this:

Code: Select all

{USERNAME_ALPHA_ONLY_EXPLAIN}
You can remove it and put whatever text you want. Either way gives same result.
Could I also change the word Username in display?
You can change whatever you want but you need to be careful about special characters. A single quote mark will break the script. If you run into any issues after altering the language files it's likely because of any punctuation you used.

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: DavidIQ, invenio, janus_zonstraal, Paul, Peter77sx, Tastenplayer and 32 guests