vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Swapping Banner Logo based on signed in or not. (https://vborg.vbsupport.ru/showthread.php?t=273829)

Savage Circuits 11-11-2011 06:04 AM

Swapping Banner Logo based on signed in or not.
 
Is there a quick and painless way to change which banner logo is displayed for guests versus anyone signed in?

I have both a 400 pixel and an 800 pixel banner for my site. I want the 400 pixel banner to show for guests and the 800 pixel one to be displayed when members are signed in.

I appreciate any help anyone can offer.

HMBeaty 11-11-2011 06:08 AM

Doesn't get much easier than using a simple conditional :)
HTML Code:

<vb:if condition="$show['member']">
LOGGED IN LOGO CODE HERE
<vb:else />
LOGGED OUT LOGO CODE HERE
</vb:if>


Savage Circuits 11-13-2011 02:42 AM

Looks good, but would this code have to be in every template for the main parts of the site, like Blogs, Forums, CMS?

HMBeaty 11-13-2011 03:28 AM

I don't think so. It depends on how custom your skin is. You should only have to edit the header template since that is where the code for the logo is (in the default header)

Savage Circuits 11-13-2011 03:39 AM

Thank you very much. I will try it and see how it works! =)

Savage Circuits 11-15-2011 03:07 AM

First of all I wanted to reply and thank you very much! This works perfectly. A shorter version of my site banner is shown when not logged in, and the full length banner is shown when logged in. This prevents the login boxes from being obscured by the logo image. So that was a huge help!

Now for the fun part...I am wondering...if you can change the conditional to detect a certain usergroup or individual by username? That could allow for some fun modifications. :)

HMBeaty 11-15-2011 03:14 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=231525" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=231525</a>

Savage Circuits 11-15-2011 04:14 AM

Very nice! Thank you again!


All times are GMT. The time now is 08:24 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.01010 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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