Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Vanilla 2.6.1 is here with critical security patches. One of them has been publicly disclosed.

Change Text in the registration page

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

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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 called register.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:

    <div class="FormTitleWrapper">
        <h1><?php echo t("Apply for Membership") ?></h1>
    
        <div class="FormWrapper">
    

    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.

    Bleistivtui_designer
Sign In or Register to comment.