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 09-20-2013, 10:04 AM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 09-21-2013, 08:53 AM
RickyH RickyH is offline
 
Join Date: Dec 2011
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find it in the mobile styles are remove it really.
Reply With Quote
  #3  
Old 09-21-2013, 09:43 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 09-27-2013, 01:01 AM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
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.
Reply With Quote
  #5  
Old 09-27-2013, 01:11 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When viewing your site, on a mobile device, are you viewing it with a regular style or a mobile style?
Reply With Quote
  #6  
Old 09-27-2013, 01:30 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 10-21-2013, 08:54 AM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #8  
Old 10-29-2013, 02:14 PM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #9  
Old 11-11-2013, 08:18 AM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 01:58 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.04040 seconds
  • Memory Usage 2,250KB
  • 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
  • (6)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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