vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Hide welcome guest message on mobile? (https://vborg.vbsupport.ru/showthread.php?t=302466)

pjkcards 09-20-2013 10:04 AM

Hide welcome guest message on mobile?
 
I want to hide the welcome guest message to mobile users. It doesn't format properly and needs to be hidden on mobile. What is the best way to do this?

Thanks.

RickyH 09-21-2013 08:53 AM

Find it in the mobile styles are remove it really.

ozzy47 09-21-2013 09:43 PM

If you are talking about viewing the full site on a mobile device, versus the mobile style, this would require you to add some code to detect if it is a mobile device, and then wrap the welcome message with a conditional.

Off the top of my head this is not a easy task, but I have not looked into it.

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

Actually looking around you can use this mod, https://vborg.vbsupport.ru/showthread.php?t=292704

You will have to edit the plugin, Mobile Browser Check found in the group Mobile Browser Detector (BOP5)

In the bottom of that plugin add the following.

At the bottom add lines such as:
PHP Code:

     if ($vbulletin->detect->isMobile())
  
$vbulletin->options['isMobile'] = 1


Then in a template you can go in you header template and find this code.

Code:

                <li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
And change it to this code.

Code:

                <vb:if condition="$vboptions['isMobile']">
                    <li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
                </vb:if>

This is completely untested but in theory it should work.

pjkcards 09-27-2013 01:01 AM

Quote:

Originally Posted by ozzy47 (Post 2447154)
If you are talking about viewing the full site on a mobile device, versus the mobile style, this would require you to add some code to detect if it is a mobile device, and then wrap the welcome message with a conditional.

Off the top of my head this is not a easy task, but I have not looked into it.

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

Actually looking around you can use this mod, https://vborg.vbsupport.ru/showthread.php?t=292704

You will have to edit the plugin, Mobile Browser Check found in the group Mobile Browser Detector (BOP5)

In the bottom of that plugin add the following.

At the bottom add lines such as:
PHP Code:

     if ($vbulletin->detect->isMobile())
  
$vbulletin->options['isMobile'] = 1


Then in a template you can go in you header template and find this code.

Code:

                <li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
And change it to this code.

Code:

                <vb:if condition="$vboptions['isMobile']">
                    <li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
                </vb:if>

This is completely untested but in theory it should work.

Thanks for your idea. Do I add this:
Code:

if ($vbulletin->detect->isMobile())
  $vbulletin->options['isMobile'] = 1;

At the very bottom (below the last } ) of bop5_mobile_detect.php?

Edit: Also, I don't see this code in the header or headerinclude default template:
Code:

                <li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
Thanks.

ozzy47 09-27-2013 01:11 AM

When viewing your site, on a mobile device, are you viewing it with a regular style or a mobile style?

tbworld 09-27-2013 01:30 AM

Quote:

When viewing your site, on a mobile device, are you viewing it with a regular style or a mobile style?
And maybe a link to the site, would help. So we can see what you see.

pjkcards 10-21-2013 08:54 AM

Ideally, I want mobile devices to default to the mobile style, but they still need to have the option to switch to the full browser. I did use useragent to switch the style, but then user complained that they couldn't view the full site on their phones.

How do most people deal with this?

Basically what I am trying to do atm is hide the guest welcome message (ie. notice) on mobile since it is a massive block that doesn't look well on mobile. Your instructions above seem close to what I need, but still wondering about my questions from post #4 above.

Thanks!

pjkcards 10-29-2013 02:14 PM

Ideally, I want mobile devices to default to the mobile style, but they still need to have the option to switch to the full browser. I did use useragent to switch the style, but then user complained that they couldn't view the full site on their phones.

How do most people deal with this?

pjkcards 11-11-2013 08:18 AM

Bump.

I'm considering getting the mobile suite. Does it work with 4.2.1?

Or alternatively, I'd like to have mobile users redirected to the mobile style, but still have the option to view desktop mode. Is this possible?

Thanks.


All times are GMT. The time now is 10:00 PM.

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.01242 seconds
  • Memory Usage 1,742KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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