Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Change Text in the registration page
Martin2018
New
Hi everyone,
Which file actually controls the form data in the registration page. I have been trying to change the text and add some texts right at the beginning before the "Register" text in /entry/register?Target=discussions - all seems difficult at the moment.
I have tried to do it from here applications/dashboard/views/entry/ but nothing seems to change. It looks like I have been accessing the wrong file.
Any answer would be appreciated.
Thanks,
Francis
0
Comments
Please look at this tutorial, it would help you in your previous question, too
Changing one of Vanillas files is the wrong way
Apologies for late response. I've gone through the post and is still not clear. Can I get specifically where register.php is customised and how to change/add text there.
Thanks.
Martin
Well, I can try, but it will not be easy. You do not customize the file
register.php
. Not only that there is no file calledregister.php
but you will never customize files but instead add custom translations to your locale file.Step 1, as described in the tutorial, create yourself the file
/conf/locale.php
If it already exists, simply append your definitions at the end. If you are the one who created that file, please keep in mind that you have to add a
<?php
as the first line to make that file a PHP file.Step 2, find the translation string
That can be tricky. Are there any words/sentences that are most probably only used in the file where you would expect to find the string you want to change? On the registration page, there is some explanation for the password requirements. Do a full text search for "Your password must be"
The first appearance for me is in file "\applications\dashboard\views\entry\registerapproval.php". Now open that file for reading, not with the intention to change it!!!
Look at the top of the file:
That is the HTML that you would find when you inspect your forum. The php snippet
<?php echo t("Apply for Membership") ?>
transmogrifies into "Register", who would have thought that?!To be fair, you really have started with a hard to find string. Now back to what the tutorial told you.
Step 3, add this to your locale.php:
$Definition['Apply for Membership']='WE WANT YOU!';
And that's all the magic. You might need to clean some cached files, but I do not expect that this is needed.