Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-29-2013, 08:30 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default style chooser missing in mobile theme

I have enabled allow user to change styles in vb options, but when visiting my site via mobile, it does not show the drop down style chooser. There are 10 color variation styles I'm using. They have to click full site link to go back and choose the different mobile skin option.

How can I add this in the footer area?

I tried adding below in footer before last </div> doesn't work

Quote:
<vb:if condition="$show['quickchooser']">
<select name="styleid" onchange="switch_id(this, 'style')">
<optgroup label="{vb:rawphrase quick_style_chooser}">
{vb:raw quickchooserbits}
</optgroup>
</select>
</vb:if>
Reply With Quote
  #2  
Old 03-29-2013, 11:00 PM
kNeo kNeo is offline
 
Join Date: Jun 2009
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

EDIT: This doesn't work all the way, the "onchange" event doesn't fire correctly. Sorry about that. I think it needs some bit of the desktop javascript... hmm

[S]Since this bit of code uses a form, you need to include the entire section (although you can leave out the language bit if you want)

This is what it looks like in a default theme:

Code:
	<form action="{vb:link forumhome|nosession}" method="get" id="footer_select" class="footer_select">

		<vb:if condition="$show['quickchooser']">
			<select name="styleid" onchange="switch_id(this, 'style')">
				<optgroup label="{vb:rawphrase quick_style_chooser}"><option class="hidden"></option></optgroup>
				<vb:if condition="$quickchooserbits1">
					<vb:if condition="$quickchooserbits2">
					<optgroup label="&nbsp;{vb:rawphrase standard_styles}">
					</vb:if>				
					{vb:raw quickchooserbits1}
					<vb:if condition="$quickchooserbits2">
					</optgroup>
					</vb:if>					
				</vb:if>
				<vb:if condition="$quickchooserbits2">
					<vb:if condition="$quickchooserbits1">
					<optgroup label="&nbsp;{vb:rawphrase mobile_styles}">
					</vb:if>
					{vb:raw quickchooserbits2}
					<vb:if condition="$quickchooserbits1">
					</optgroup>
					</vb:if>					
				</vb:if>
			</select>	
		</vb:if>
		
		<vb:if condition="$show['languagechooser']">
			<select name="langid" onchange="switch_id(this, 'lang')">
				<optgroup label="{vb:rawphrase quick_language_chooser}">
					{vb:raw languagechooserbits}
				</optgroup>
			</select>
		</vb:if>
	</form>
If you take that and stick it in the the footer templates for each mobile style right before the last </div> your mobile users should see the style chooser; I just tested it on my dev board and the default mobile style but just a disclaimer: I don't know if it will work for your mobile themes.

g'luck.[/S]
Reply With Quote
  #3  
Old 03-30-2013, 05:58 AM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. Anyone else know?
Reply With Quote
  #4  
Old 03-30-2013, 06:59 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The stylechooser has never been available in the vBulletin mobile style. There should be a full style link.
Reply With Quote
  #5  
Old 03-30-2013, 04:56 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes the full site link is there, but I have 10 color options in mobile theme. It would be nice to add the style chooser, OR even direct links if possible.

--------------- Added [DATE]1364662628[/DATE] at [TIME]1364662628[/TIME] ---------------

Another question, how can I add total users online in mobile theme?

I tried this code,

<span style="float:right">{vb:rawphrase x_members_and_y_guests}</span>

But it came back this way

%1$s members and %2$s guests

Thanks
Reply With Quote
  #6  
Old 03-30-2013, 10:27 PM
kNeo kNeo is offline
 
Join Date: Jun 2009
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can just make actual links, ?styleid=X

and just repeat until you've got a link for each mobile style version and then just stick it in the footer template for the mobile styles.

basically: vB can't do it automatically, but you can still hardcode it.

eg:

Code:
<ul>
  <li><a href="?styleid=XX">Xxxxx</a>
  <li><a href="?styleid=XX">Xxxxx</a>
  <li><a href="?styleid=XX">Xxxxx</a>
</ul>
or whatever
Reply With Quote
  #7  
Old 03-30-2013, 11:01 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks I have done that earlier and opened a new thread

https://vborg.vbsupport.ru/showthread.php?t=296676

Can't figure out how to center align :x
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:12 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.04333 seconds
  • Memory Usage 2,222KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete