The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Geek Gazette (http://www.thevbgeek.com/forumdisplay.php?f=56)
-   -   new users problem solved? (http://www.thevbgeek.com/showthread.php?t=5206)

Gas 07-09-2009 11:29 AM

new users problem solved?
 
hi, in the past i've noticed that :
there is no way to make subscription to the newsletter to be set to YES by default for new users (i hope you understand what i mean).

Morgan, have you solved this problem?

thank you

Morgan 07-13-2009 01:50 PM

If you want 'yes' checked by default upon registration, you'd need to edit the gaz_profile_sub_option template, using the following template conditional to show what you want upon registration and the default gaz_profile_sub_option template otherwise:
Code:

<if condition="THIS_SCRIPT == 'register'">
        your edits here
<else />
        default template here
</if>


Poltergeist 07-14-2009 11:09 AM

Sorry but do we replace what is currently in the template with what is above or insert it somewhere in the template? What exactly should the template look like after editing it so that it is set to yes?

Morgan 07-14-2009 09:04 PM

Untested but like this, though you may need to tweak as desired:
Code:

<tr>
        <td width="100%" class="smallfont">$value[title]</td>
        <td style="white-space:nowrap;">
                <if condition="THIS_SCRIPT == 'register'">
                        <label for="rb_1_$key"><input type="radio" name="gaz_sub[$key]" id="rb_1_$key" value="1" tabindex="1" title="$vbphrase[yes]" checked="checked" />$vbphrase[yes]</label>
                        <label for=\"rb_0_$key\"><input type="radio" name="gaz_sub[$key]" id="rb_0_$key" value="0" tabindex="1" title="$vbphrase[no]" />$vbphrase[no]</label>
                <else />
                        <label for="rb_1_$key"><input type="radio" name="gaz_sub[$key]" id="rb_1_$key" value="1" tabindex="1" title="$vbphrase[yes]" <if condition="$newsletteron == true">checked="checked"</if>/>$vbphrase[yes]</label>
                        <label for=\"rb_0_$key\"><input type="radio" name="gaz_sub[$key]" id="rb_0_$key" value="0" tabindex="1" title="$vbphrase[no]"  <if condition="$newsletteron == false">checked="checked"</if> />$vbphrase[no]</label>
                </if>
        </td>
</tr>


Gas 09-09-2009 09:04 PM

Quote:

Originally Posted by Morgan (Post 29154)
Untested but like this, though you may need to tweak as desired:
Code:

<tr>
        <td width="100%" class="smallfont">$value[title]</td>
        <td style="white-space:nowrap;">
                <if condition="THIS_SCRIPT == 'register'">
                        <label for="rb_1_$key"><input type="radio" name="gaz_sub[$key]" id="rb_1_$key" value="1" tabindex="1" title="$vbphrase[yes]" checked="checked" />$vbphrase[yes]</label>
                        <label for=\"rb_0_$key\"><input type="radio" name="gaz_sub[$key]" id="rb_0_$key" value="0" tabindex="1" title="$vbphrase[no]" />$vbphrase[no]</label>
                <else />
                        <label for="rb_1_$key"><input type="radio" name="gaz_sub[$key]" id="rb_1_$key" value="1" tabindex="1" title="$vbphrase[yes]" <if condition="$newsletteron == true">checked="checked"</if>/>$vbphrase[yes]</label>
                        <label for=\"rb_0_$key\"><input type="radio" name="gaz_sub[$key]" id="rb_0_$key" value="0" tabindex="1" title="$vbphrase[no]"  <if condition="$newsletteron == false">checked="checked"</if> />$vbphrase[no]</label>
                </if>
        </td>
</tr>


i'm sorry morgan!
i've tried to copy and paste the code that you've written here, but after the user registration, under GAZ Subscription Options, the newsletter subscription is still set NO..
what should i do?
thanks!

Morgan 09-10-2009 06:04 PM

Not sure, haven't tested it, so I don't have a snippet to give you other than what I already posted. You might try adding some random text to the snippet and see what shows on screen to check whether the if or else condition is being used.


All times are GMT. The time now is 10:16 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.