Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2019, 01:41 PM
popimp3069 popimp3069 is offline
 
Join Date: Feb 2018
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default General Request - Site Logo for Mobile Device (vBulletin Cloud)

I need help assigning a specific site logo file in the header when our forum is viewed from mobile devices. How can this be achieved?

Right now our forum header looks like the first image below on desktop. However, when viewing from a mobile device, the logo is too wide and doesn’t display properly.



I’d like to assign a different site logo image to display on mobile devices. Something like the second image below.



Can anyone please help us implement the proper CSS to achieve this? Thank you.
Attached Images
File Type: jpg Screen Shot 2019-06-27 at 10.23.01 PM.jpg (29.3 KB, 0 views)
File Type: png example.png (44.8 KB, 0 views)
Reply With Quote
  #2  
Old 06-29-2019, 08:55 AM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As your site forces guests to the mobile style, we cant see the site on a mobile device in the desktop style.

As the example below in on a vb 4 site i run to correct for ads & bg images, not really fixing the logo size on the site, you can modify your templates & implement the changes using the @media for css, the code below is just an example.

As the pelican advert isnt part of your logo, id add some better screenshots of what youre trying to achieve.

Code:
.above_body {
    background-image: url(forums/images/logo-bg-fade-2.png);
  }

  @media screen and (min-width: 320px) {
    .above_body {
      background-image: url(forums/images/logo-bg-fade-600x200.png);
    }
  }
  @media screen and (min-width: 640px)
  {
    .above_body {
      background-image: url(forums/images/logo-bg-fade-900x200.png);
    }
  }
  @media screen and (min-width: 1024px) {
    .above_body {
      background-image: url(forums/images/logo-bg-fade-1900x200.png);
    }
  }
Reply With Quote
  #3  
Old 06-29-2019, 10:37 AM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The easiest solution would be to put the ad in a header ad module. Then the logo would resize according to the existing breakpoints.
Reply With Quote
  #4  
Old 06-29-2019, 11:08 AM
popimp3069 popimp3069 is offline
 
Join Date: Feb 2018
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First and foremost, thank you for the reply. It's very much appreciated.

Just for clarification, I am using vBulletin Cloud.

The Pelican logo is part of my header site logo. It is all one, continuous image. The 2 logos are not separate files. I joined these together in Adobe Illustrator and saved them as one file. When I first added this logo file to the header, it wouldn't display properly. So I went in to the Edit Site section on vBulletin cloud and there is a STYLE tab. I clicked on that and changed the max-with and max-height of the site logo CSS to 100% so that the single image would display across the entire section where the site logo goes in the header. See image.



However, when viewing from mobile devices, this image doesn't respond as I'd like, so I think I need to utilize a different image or set of images altogether to replace the existing site logo. I imagine I would need to use some kind of CSS to keep the current site logo hidden on mobile, and then use media queries to assign a different site logo for mobile. My skillset just isn't there to tackle this. I'd like to have the 2 images stack one on top of the other, as such.

Reply With Quote
  #5  
Old 07-01-2019, 07:37 AM
delicjous's Avatar
delicjous delicjous is offline
 
Join Date: Nov 2014
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:

HTML Code:
.l-small #header .site-logo img {
	display: block;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	background: url("images/misc/vb_logo_darkblue.png") no-repeat; /* new logo path */
	width: 180px; /* Width of new image */
	height: 50px; /* Height of new image */
	padding-left: 180px; /* Equal to width of new image */
}
Reply With Quote
  #6  
Old 07-01-2019, 02:17 PM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This css gives you the desired outcome, but you need to upload another logo image. Adjust the code accordingly.

HTML Code:
@media screen and (max-width: 1024px){
  #header .site-logo img{
    height: 0px;
    width: 0px;
  }

  #header .site-logo a{
    display: inline-block;
    height: 40px;
    width: 200px;
    background: url("images/misc/vb_logo_darkblue.png") no-repeat top left;
    position: relative;
    z-index: 1000;
  }
}
Reply With Quote
  #7  
Old 07-02-2019, 12:06 AM
popimp3069 popimp3069 is offline
 
Join Date: Feb 2018
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried Seven Skins code but didn't have much luck. The original logo is still displaying with the logo that is assigned to the media query. How can I hide the logo that displays on desktop so it doesn't show on mobile?

Reply With Quote
  #8  
Old 07-02-2019, 10:35 AM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should add the code to the additional.css template.
I cannot see that code in your additional.css

PS. make sure you are editing the correct style.
Reply With Quote
  #9  
Old 07-02-2019, 11:15 AM
popimp3069 popimp3069 is offline
 
Join Date: Feb 2018
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did add it to the CSS of the template I’m currently using. It didn’t display properly, so I tried to revert back to what the CSS was before I implemented the new code. When I tried to revert the code, it didn’t revert back to what was previously there. I restored back to the default CSS and for some reason it removed all the CSS code that was previously there for the entire home page. I’m not sure how to get it back to what it had before any changes were made.

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

How can I center the logo on mobile so that when a phone is in landscape mode the logo stays centered?
Reply With Quote
  #10  
Old 07-03-2019, 10:16 AM
delicjous's Avatar
delicjous delicjous is offline
 
Join Date: Nov 2014
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by popimp3069 View Post
How can I center the logo on mobile so that when a phone is in landscape mode the logo stays centered?
https://vbulletin-forum.de/forum/eng...-view#post2005
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 04:02 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.04215 seconds
  • Memory Usage 2,280KB
  • Queries Executed 12 (?)
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
  • (1)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete