View Single Post
  #112  
Old 09-21-2007, 12:35 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was going to do a new release for this small modification, but thought I'd post up the change and release when there is more to add later.

Anyone who allows users to choose their own styles may want to replace the "modifyoptions" (In the "Modify User Options Templates" section ) template with the following code. This will add the ability for users to change their style via the UserCP, Modify Options section of the mobi skin. It's drop downs which may not work on some older phones, but people on older phones probably won;t want to change the style away from teh mobi one anyway. This will NOT change the users skin if you are using either the "Mobile Device Style Assignment" or the DDDS add-on as these override the users/forums styles.

Code:
<form action="profile.php?do=updateoptions" method="post">
<input type="hidden" name="s" value="$session[dbsessionhash]" />
<input type="hidden" name="do" value="updateoptions" />
<div class="titlebg">$vbphrase[edit_options]: $bbuserinfo[username]</div>
<div class="windowbg2">$vbphrase[login_privacy]</div>

<if condition="$show['invisibleoption']">				
<div><label for="cb_invisible"><input type="checkbox" name="options[invisible]" value="1" id="cb_invisible" $checked[invisible] />$vbphrase[use_invisible_mode]</label><input type="hidden" name="set_options[invisible]" value="1" /></div>
</if>

<if condition="$show['reputationoption']">
<div><label for="cb_showreputation"><input type="checkbox" name="options[showreputation]" value="1" id="cb_showreputation" $checked[showreputation] />$vbphrase[show_my_reputation_level]</label><input type="hidden" name="set_options[showreputation]" value="1" /></div>
</if>

<div><label for="cb_showvcard"><input type="checkbox" name="options[showvcard]" value="1" id="cb_showvcard" $checked[showvcard] />$vbphrase[allow_vcard_download]</label><input type="hidden" name="set_options[showvcard]" value="1" /></div>


<br />

<div class="windowbg2">$vbphrase[messaging_notification]</div>

<div><label for="cb_adminemail"><input type="checkbox" name="options[adminemail]" value="1" id="cb_adminemail" $checked[adminemail] />$vbphrase[receive_email_from_bulletin_board_staff]</label><input type="hidden" name="set_options[adminemail]" value="1" /></div>

<if condition="$show['receiveemail']">
<div><label for="cb_showemail"><input type="checkbox" name="options[showemail]" value="1" id="cb_showemail" $checked[showemail] />$vbphrase[receive_email_from_other_members]</label><input type="hidden" name="set_options[showemail]" value="1" /></div>
</if>

<if condition="!$vboptions['enableemail']">
<input type="hidden" name="options[showemail]" value="$bbuserinfo[showemail]" />
</if>

<if condition="$show['pmoptions']">
<div><label for="cb_receivepm"><input type="checkbox" name="options[receivepm]" value="1" id="cb_receivepm" onclick="toggle_disabled(this.checked, 'pmoptions')" $checked[receivepm] />$vbphrase[enable_private_messaging]</label><input type="hidden" name="set_options[receivepm]" value="1" /></div>

<div><label for="cb_receivepmbuddies"><input type="checkbox" name="options[receivepmbuddies]" value="1" id="cb_receivepmbuddies" $checked[receivepmbuddies] />$vbphrase[pm_from_buddies_only]</label><input type="hidden" name="set_options[receivepmbuddies]" value="1" /></div>
<div><label for="cb_emailonpm"><input type="checkbox" name="options[emailonpm]" value="1" id="cb_emailonpm" $checked[emailonpm] />$vbphrase[receive_email_notification_pm]</label><input type="hidden" name="set_options[emailonpm]" value="1" /></div>
<div><label for="cb_pmpopup"><input type="checkbox" name="pmpopup" value="1" id="cb_pmpopup" $checked[pmpopup] />$vbphrase[show_pm_popup]</label></div>
<else />
<input type="hidden" name="options[receivepm]" value="$bbuserinfo[receivepm]" />
<input type="hidden" name="options[emailonpm]" value="$bbuserinfo[emailonpm]" />
<input type="hidden" name="pmpopup" value="$bbuserinfo[pmpopup]" />
</if>

<br />

<div class="windowbg2">$vbphrase[visible_post_elements]</div>
<div><label for="cb_showsignatures"><input type="checkbox" name="options[showsignatures]" value="1" id="cb_showsignatures" $checked[showsignatures] />$vbphrase[show_signatures]</label><input type="hidden" name="set_options[showsignatures]" value="1" /></div>
<div><label for="cb_showavatars"><input type="checkbox" name="options[showavatars]" value="1" id="cb_showavatars" $checked[showavatars] />$vbphrase[show_avatars]</label><input type="hidden" name="set_options[showavatars]" value="1" /></div>
<div><label for="cb_showimages"><input type="checkbox" name="options[showimages]" value="1" id="cb_showimages" $checked[showimages] />$vbphrase[show_images] ($vbphrase[including_attached_and_img_code])</label><input type="hidden" name="set_options[showimages]" value="1" /></div>

<br />

<div class="windowbg2">$vbphrase[thread_display_mode]:</div>
<span>
<input type="radio" name="threadedmode"  value="0" $threaddisplaymode[0]>$vbphrase[linear] - $vbphrase[oldest_first]<br />
<input type="radio" name="threadedmode"  value="3" $threaddisplaymode[3]>$vbphrase[linear] - $vbphrase[newest_first]<br />
<if condition="$vboptions['allowthreadedmode']">
<input type="radio" name="threadedmode"  value="1" $threaddisplaymode[1]>$vbphrase[threaded]<br />
<input type="radio" name="threadedmode"  value="2" $threaddisplaymode[2]>$vbphrase[hybrid]<br />
</if>
</span>
<br />
<if condition="$show['styleoption']">
<div class="windowbg2">$vbphrase[board_skin]</div>
<span>
<label for="sel_newstyleset">$vbphrase[board_skin]:</label>
	<select name="newstyleset" id="sel_newstyleset">
		$stylesetlist
	</select>
</span>			
</if>	

<br />
<div>
<input type="submit" class="button" value="$vbphrase[save_changes]" accesskey="s" />
<input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
</div>
</form>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01179 seconds
  • Memory Usage 1,807KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete