1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to solve the problem of Registration Terms being the same as Site Rules?

Discussion in 'XenForo Questions and Support' started by CyclingTribe, Nov 21, 2011.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    At the moment (1.1 RC1) there is a phrase for registration terms that you can present to new members. Nothing wrong with that, it outlines how you operate before they sign up, and I imagine most sites will want/have such text.

    However, my problem is that I also have a separate list of site rules and guidelines that are nothing to do with registration at all, but the ACP offers me no alternative "Site rules" phrase and if I use the Default URL the board re-uses the registration phrase - so I end up with completely irrelevant text for when people want to double-check the rules.

    I suppose I could post a guest viewable thread in my support and feedback forum, but I'd rather have the site rules appear when someone uses the link at the bottom right.

    How have the rest of you got around this?

    Cheers,
    Shaun :D
     
    dieketzer likes this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Have you considered creating a new phrase/page and replacing the one in the registration form with it?
     
  3. CyclingTribe

    CyclingTribe Well-Known Member

    Would that be this part of the registration form?:

    Code:
                <xen:if is="{$tosUrl}">
                    <ul>
                        <li>
                            {xen:phrase i_agree_to_terms_and_rules, 'checkbox=<input type="checkbox" name="agree" value="1" id="ctrl_agree" class="Disabler" />', 'terms_attributes=href="{$tosUrl}" target="_blank"'}
                            <ul id="ctrl_agree_Disabler">
                                <li><input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" /></li>
                            </ul>                       
                        </li>
                    </ul>
     
    
    It currently appears to link out to the "Terms" page.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, but you can easily edit that to point to another URL, a Page for example, a different phrase, or replace it with a custom template.
     
  5. CyclingTribe

    CyclingTribe Well-Known Member

    Okay, I'll have a play with that later - I'm off to get some sleep now ... :sleep:
     
  6. CyclingTribe

    CyclingTribe Well-Known Member

    Okay, well I've done it this way - created a new phrase: registration_terms containing the HTML formatted sign-up terms.

    Then I modified the registration form:

    Code:
    <xen:title>{xen:phrase sign_up}</xen:title>
    
    <form action="{xen:link 'register/register'}" method="post" class="xenForm AutoValidator"
        data-fieldValidatorUrl="{xen:link register/validate-field}"
        data-normalSubmit="1"
    >
        <xen:if is="{$errors}">
            <div class="errorPanel">
                <h3 class="errorHeading">{xen:phrase please_correct_following_errors}:</h3>
                <div class="baseHtml errors">
                    <ol>
                    <xen:foreach loop="$errors" value="$error">
                        <li>{xen:raw $error}</li>
                    </xen:foreach>
                    </ol>
                </div>
            </div>
        </xen:if>
    
        <dl class="ctrlUnit">
            <dt><label for="ctrl_username">{xen:phrase name}:</label></dt>
            <dd>
                <input type="text" name="username" value="{$fields.username}" class="textCtrl" id="ctrl_username" autofocus="true" autocomplete="off" />
                <p class="explain">{xen:phrase this_is_name_that_will_be_shown_with_your_messages}</p>
            </dd>
        </dl>
    
        <dl class="ctrlUnit">
            <dt><label for="ctrl_email">{xen:phrase email}:</label></dt>
            <dd><input type="email" name="email" value="{$fields.email}" dir="ltr" class="textCtrl" id="ctrl_email" /></dd>
        </dl>
    
        <fieldset>
            <dl class="ctrlUnit">
                <dt><label for="ctrl_password">{xen:phrase password}:</label></dt>
                <dd><input type="password" name="password" class="textCtrl OptOut" id="ctrl_password" autocomplete="off" /></dd>
            </dl>
    
            <dl class="ctrlUnit">
                <dt><label for="ctrl_confirm_password">{xen:phrase confirm_password}:</label></dt>
                <dd>
                    <input type="password" name="password_confirm" class="textCtrl OptOut" id="ctrl_confirm_password" />
                    <p class="explain">{xen:phrase enter_your_password_in_first_box_and_confirm_it_in_second}</p>
                </dd>
            </dl>
        </fieldset>
        
        <dl class="ctrlUnit OptOut">
            <dt>{xen:phrase date_of_birth}:</dt>
            <dd>
                <xen:include template="helper_birthday_input">
                    <xen:map from="$fields" to="$user" />
                </xen:include>
                <xen:if is="{$dobRequired}"><p class="explain">{xen:phrase your_date_of_birth_is_required}</p></xen:if>
            </dd>
        </dl>
        
        <dl class="ctrlUnit">
            <dt>{xen:phrase gender}:</dt>
            <dd>
                <ul>
                    <li><label for="ctrl_gender_male"><input type="radio" name="gender" value="male" id="ctrl_gender_male" {xen:checked "{$fields.gender} == 'male'"} /> {xen:phrase male}</label></li>
                    <li><label for="ctrl_gender_female"><input type="radio" name="gender" value="female" id="ctrl_gender_female" {xen:checked "{$fields.gender} == 'female'"} /> {xen:phrase female}</label></li>
                    <li><label for="ctrl_gender_"><input type="radio" name="gender" value="" id="ctrl_gender_" {xen:checked "!{$fields.gender}"} /> ({xen:phrase unspecified})</label></li>
                </ul>
            </dd>
        </dl>
        
        <xen:include template="custom_fields_edit" />
    
        <dl class="ctrlUnit">
            <dt><label for="ctrl_timezone">{xen:phrase time_zone}:</label></dt>
            <dd>
                <select name="timezone" class="textCtrl {xen:if $fields.timezoneAuto, 'AutoTimeZone'} OptOut" id="ctrl_timezone">
                    <xen:foreach loop="$timeZones" key="$identifier" value="$name">
                        <option value="{$identifier}" {xen:selected "{$identifier} == {$fields.timezone}"}>{$name}</option>
                    </xen:foreach>
                </select>
            </dd>
        </dl>
    
        <xen:if hascontent="true">
            <fieldset>
                <xen:contentcheck>
                    <xen:include template="helper_captcha_unit" />
                </xen:contentcheck>
            </fieldset>
        </xen:if>
    
        <dl class="ctrlUnit submitUnit">
            <dt>Terms:</dt>
            <dd>
                <xen:if is="{$tosUrl}">
                    <ul>
                        <li>
                            <div>{xen:phrase registration_terms}</div>
                            {xen:phrase i_agree_to_terms_and_rules, 'checkbox=<input type="checkbox" name="agree" value="1" id="ctrl_agree" class="Disabler" />', 'terms_attributes=href="{$tosUrl}" target="_blank"'}
                            <ul id="ctrl_agree_Disabler">
                                <li><input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" /></li>
                            </ul>                        
                        </li>
                    </ul>
                <xen:else />
                    <input type="submit" value="{xen:phrase sign_up}" accesskey="s" class="button primary" />
                </xen:if>
            </dd>
        </dl>
    
        <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
    </form>
    
    It's not the sexiest or most foolproof (or future proof) of ideas, but it does the trick. (y)

    Cheers,
    Shaun :D
     

Share This Page