vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How can i change the thread subscription options to text links or input fields ? (https://vborg.vbsupport.ru/showthread.php?t=281350)

ishare 04-10-2012 07:21 AM

How can i change the thread subscription options to text links or input fields ?
 
Hi,
I am trying to customize the newthread page and i would like to use text links or input fields for each option of the thread subscription. Since the current/default one is in dropdown box, i am not sure if that is possible or not...

Default :
Code:

<if condition="$show['member']">
<fieldset class="fieldset">
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$vbphrase[notification_type]:<br />
<select name="emailupdate" tabindex="1">
<option value="9999" $emailchecked[9999]>$vbphrase[do_not_subscribe]</option>
<option value="0" $emailchecked[0]>$vbphrase[no_email_notification]</option>
<option value="1" $emailchecked[1]>$vbphrase[instant_email_notification]</option>
<option value="2" $emailchecked[2]>$vbphrase[daily_email_notification]</option>
<option value="3" $emailchecked[3]>$vbphrase[weekly_email_notification]</option>
</select>
</td>
<if condition="$show['subscribefolders']">
<td>$vbphrase[folder]:<br />
<select name="folderid" tabindex="1">$folderbits</select>
</td>
</if>
</tr>
</table>
</fieldset>
</if>


Is that possible to do something like below ?
Code:

<input type="checkbox" name="emailupdate" value="0" tabindex="1" $emailchecked[0] />
<input type="checkbox" name="emailupdate" value="1" tabindex="1" $emailchecked[1] />
<input type="checkbox" name="emailupdate" value="2" tabindex="1" $emailchecked[2] />

Regards...

kh99 04-11-2012 10:38 AM

I think if you use type="radio" instead (so that only one can be selected) then it will work. But there's a problem with the $emailchecked values since they are either selected="selected" for the selected choice or null, and a radio button needs checked="checked" instead. But something like this might work:

Code:

<input type="radio" name="emailupdate" value="0" tabindex="1" <if condition="$emailchecked[0]">checked="checked"</if> />
<input type="radio" name="emailupdate" value="1" tabindex="1" <if condition="$emailchecked[1]">checked="checked"</if> />
<input type="radio" name="emailupdate" value="2" tabindex="1" <if condition="$emailchecked[2]">checked="checked"</if> />


Did you mean to leave out the "no email notification" choice?


All times are GMT. The time now is 07:40 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01128 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete