PDA

View Full Version : new users problem solved?


Gas
07-09-2009, 12:29 PM
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, 02: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:

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

Poltergeist
07-14-2009, 12:09 PM
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, 10:04 PM
Untested but like this, though you may need to tweak as desired:

<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, 10:04 PM
Untested but like this, though you may need to tweak as desired:

<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, 07: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.