XF 2.1 How to add notice in registration page?

itstuff

Member
hello I want to add a notice in registration page for new users.

Use Only Gmail or Yahoo or Yandex for get inbox email, however if you are using another emails then check in spam box.

this notice I want to add....but how I can add it?

thanks you.
 
its looks bad I think I did not put in right place..
2B1VXb.jpg
 
I put it here:
Code:
<xf:textboxrow name="{$fieldName}" value="{$value}" type="email" autocomplete="email" required="required"
        maxlength="{{ max_length($xf.visitor, 'email') }}"
        label="{{ phrase('email') }}"
        hint="{{ phrase('required') }}"
        explain="{{ phrase('keine_einmal_adresse') }}" />

The last line with explain is what I add.
 
its looks bad I think I did not put in right place..
2B1VXb.jpg

thank you so much but where should I paste the exactly my message in the register_macros.....

You have two ways to do that
1- Through Template modification option under Appearance in your ACP
2- Direct edit of reigester_macros template which I do not recommend because every time you are going to upgrade to newest xf version your edit will be overwritten.

To do step 1 first you have to enable development mode by adding this to your config file $config['development']['enabled'] = true;
A- Navigate to Apperance> Template modification> add template modifcation.
B- in Template field call the template you are going to modify in this case register_macros
C- in Modification key which is the second field > add something that identifies your modification of your choice for example lets put: email_notice
D- scroll down to the (find) box and place this code

HTML:
<xf:macro name="email_row"
    arg-fieldName="email"
    arg-value="">

    <xf:textboxrow name="{$fieldName}" value="{$value}" type="email" autocomplete="email" required="required"
        maxlength="{{ max_length($xf.visitor, 'email') }}"
        label="{{ phrase('email') }}"
        hint="{{ phrase('required') }}" />
</xf:macro>

E- go to the replace box and add this code. Change this sentence
put your notice here.
with your notice. Make sure not to remove the brackets.

HTML:
<xf:macro name="email_row"
    arg-fieldName="email"
    arg-value="">

    <xf:textboxrow name="{$fieldName}" value="{$value}" type="email" autocomplete="email" required="required"
        maxlength="{{ max_length($xf.visitor, 'email') }}"
        label="{{ phrase('email') }}"
        hint="{{ phrase('required') }}"
        explain="{{ ('put your notice here.') }}"/>
</xf:macro>
$1

hit save and you are good to go.

Method number 2

go to template register macros and find this

HTML:
        label="{{ phrase('email') }}"
        hint="{{ phrase('required') }}" />

replace with this. do not forget to replace this sentence put your notice here with your notice.

HTML:
        label="{{ phrase('email') }}"
        hint="{{ phrase('required') }}"
        explain="{{ ('put your notice here.') }}"/>
save.

if you choose method 1 do not forget to disable development mode after you are done by removing $config['development']['enabled'] = true; from your config file.
 
You have two ways to do that
1- Through Template modification option under Appearance in your ACP
2- Direct edit of reigester_macros template which I do not recommend because every time you are going to upgrade to newest xf version your edit will be overwritten.

To do step 1 first you have to enable development mode by adding this to your config file $config['development']['enabled'] = true;
A- Navigate to Apperance> Template modification> add template modifcation.
B- in Template field call the template you are going to modify in this case register_macros
C- in Modification key which is the second field > add something that identifies your modification of your choice for example lets put: email_notice
D- scroll down to the (find) box and place this code

HTML:
<xf:macro name="email_row"
    arg-fieldName="email"
    arg-value="">

    <xf:textboxrow name="{$fieldName}" value="{$value}" type="email" autocomplete="email" required="required"
        maxlength="{{ max_length($xf.visitor, 'email') }}"
        label="{{ phrase('email') }}"
        hint="{{ phrase('required') }}" />
</xf:macro>

E- go to the replace box and add this code. Change this sentence with your notice. Make sure not to remove the brackets.

HTML:
<xf:macro name="email_row"
    arg-fieldName="email"
    arg-value="">

    <xf:textboxrow name="{$fieldName}" value="{$value}" type="email" autocomplete="email" required="required"
        maxlength="{{ max_length($xf.visitor, 'email') }}"
        label="{{ phrase('email') }}"
        hint="{{ phrase('required') }}"
        explain="{{ ('put your notice here.') }}"/>
</xf:macro>
$1

hit save and you are good to go.

Method number 2

go to template register macros and find this

HTML:
        label="{{ phrase('email') }}"
        hint="{{ phrase('required') }}" />

replace with this. do not forget to replace this sentence put your notice here with your notice.

HTML:
        label="{{ phrase('email') }}"
        hint="{{ phrase('required') }}"
        explain="{{ ('put your notice here.') }}"/>
save.

if you choose method 1 do not forget to disable development mode after you are done by removing $config['development']['enabled'] = true; from your config file.
thank you too much for extra effort...
I did it...
 
which I do not recommend because every time you are going to upgrade to newest xf version your edit will be overwritten
Just to note, this isn’t entirely true. The only way a template edit would be overwritten is if you edited the Master style which is only accessible when development mode is enabled. So as long as you’re editing the default style or a imported style it is fine. The outdated template system and merge tools make it quite easy to handle custom edits after updates (if required).
 
Just to note, this isn’t entirely true. The only way a template edit would be overwritten is if you edited the Master style which is only accessible when development mode is enabled. So as long as you’re editing the default style or a imported style it is fine. The outdated template system and merge tools make it quite easy to handle custom edits after updates (if required).

Some times you come across situations where template merge is not possible so you left only with the revert option. In such a case, all of what you had modified manually will be lost that is why I recommend changes to be done through the Template Modification feature.
 
Top Bottom