vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Best way to hide guest welcome header on certain style (https://vborg.vbsupport.ru/showthread.php?t=275682)

pjkcards 12-19-2011 04:00 PM

Best way to hide guest welcome header on certain style
 
I'd like to hide the "default_guest_message" notice from just 1 style (the mobile style). What is the best way of doing this?

Can I put conditionals in the notice itself, or is there a better way?

Thanks!

kh99 12-19-2011 11:05 PM

1 Attachment(s)
You can't put conditionals in a notice (or at least it didn't seem to work for me), and there doesn't seem to be any way to negate a condition. I did try setting up a blank notice for that style and then setting the existing guest notice to show if criteria didn't match my blank notice, but then I got a blank yellow box.

Anyway, I already had this product that adds a "day of week" criteria to notices, so I threw in a few lines to add a "user is browsing using style other than..." criteria which I think will do what you want. I'm attaching it here (I may get around to releasing it some day :) ).

pjkcards 09-17-2012 09:19 PM

Quote:

Originally Posted by kh99 (Post 2279236)
You can't put conditionals in a notice (or at least it didn't seem to work for me), and there doesn't seem to be any way to negate a condition. I did try setting up a blank notice for that style and then setting the existing guest notice to show if criteria didn't match my blank notice, but then I got a blank yellow box.

Anyway, I already had this product that adds a "day of week" criteria to notices, so I threw in a few lines to add a "user is browsing using style other than..." criteria which I think will do what you want. I'm attaching it here (I may get around to releasing it some day :) ).

Thanks for the reply. I know this is old, it got burried at the bottom of my to-do list.

I installed this product. I can't find a way to configure it for my mobile style. Where are the configuration options? How can I actually use this?

Thanks!

Stefan118 09-17-2012 10:12 PM

You could also copy the default guest message and create the same message in a new notice.
Then you select: User is browsing using style
to the style you DO want to show the message.
For instance, you have 3 styles and a mobile style.
Then you create 3 the same default guest messages, and set every notice to an other style.
That way your mobile style is the only style it doesn't show the message.

Not the best way probably, but the most simple solution.

kh99 09-18-2012 02:04 AM

Quote:

Originally Posted by pjkcards (Post 2366271)
Thanks for the reply. I know this is old, it got burried at the bottom of my to-do list.

I installed this product. I can't find a way to configure it for my mobile style. Where are the configuration options? How can I actually use this?

All the options added by this mod show up when editing a notice. You should now have a "User is browsing using style other than..." choice in the list of notice criteria.

BTW, I did actually release this here: https://vborg.vbsupport.ru/showthread.php?t=277022 , and there's a screen grab showing the added options.
So, go to the notices manager, edit the default guest message, check the box next to "User is browsing using style other than", and select your mobile style from the drop down menu.


Quote:

Originally Posted by Stefan118 (Post 2366291)
...
Not the best way probably, but the most simple solution.

That is a good point. When I originally read this thread I assumed that pjkcards knew it could be done that way but was asking about a way to avoid creating the same notice multiple times, but maybe I should have pointed that out before suggesting a mod.

pjkcards 09-24-2012 05:59 PM

Thanks guys, I appreciate it. I didn't know about either of those options, but the hack provided works great.

Thanks again for your time.


All times are GMT. The time now is 04:35 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.01012 seconds
  • Memory Usage 1,725KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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