vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Board Optimization - Put Your Logo on CSS [vBulletin] (https://vborg.vbsupport.ru/showthread.php?t=261013)

LOGECT 03-26-2011 10:00 PM

Put Your Logo on CSS [vBulletin]
 
1 Attachment(s)
Info:
Put your vBulletin logo on CSS, this can optimize your pages load time.

Live Demo

Installation:

1- Add the code below in the additional.css template

Code:

#vbulletin_logo {
background-image: url(http://www.YOURWEBSITE.com/images/logo.png);
display:block;
background-repeat: no-repeat;
text-indent:-9999px;
height:73px;
width:183px;
position:relative;
left:5px;
top:22px;
}

Red: You will need to change it with your own logo url and other options ...

https://vborg.vbsupport.ru/attachmen...1&d=1301246071


2- Find and replace the code below in the header template:

Code:

<a name="top" href="{vb:link forumhome}" class="logo-image"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a>
With:

Code:

<a href="{vb:link forumhome}{vb:raw session.sessionurl_q}" title="YOUR TITLE" id="vbulletin_logo">YOUR WEBSITE NAME</a>

use following code, if you are using the vbulletin suite version.

Code:

<a href="{vb:raw vboptions.homeurl}{vb:raw session.sessionurl_q}" title="YOUR TITLE" id="vbulletin_logo">YOUR WEBSITE NAME</a>
Note: it works fine with any version of vBulletin.

tarzan22 03-28-2011 03:36 PM

Thanks, but when you click on the logo redirects to:

http://www.foroxxx.com/www.foroxxxx.com

Greetings

LOGECT 03-28-2011 04:10 PM

Quote:

Originally Posted by tarzan22 (Post 2178386)
Thanks, but when you click on the logo redirects to:

http://www.foroxxx.com/www.foroxxxx.com

Greetings

Please change the url to:

Code:

<a href="{vb:link forumhome}{vb:raw session.sessionurl_q}" title="YOUR TITLE" id="vbulletin_logo">YOUR WEBSITE NAME</a>
The following url will only works with vbulletin suite.
Code:

href="{vb:raw vboptions.homeurl}{vb:raw session.sessionurl_q}"

tarzan22 03-28-2011 04:28 PM

I have not the vbulletin suite, only the forums

thanks

http://www.foroxd.com/

LOGECT 03-28-2011 04:35 PM

Quote:

Originally Posted by tarzan22 (Post 2178411)
I have not the vbulletin suite, only the forums

thanks

http://www.foroxd.com/

Please use the following code:

Code:

<a href="{vb:link forumhome}{vb:raw session.sessionurl_q}" title="YOUR TITLE" id="vbulletin_logo">YOUR WEBSITE NAME</a>

tarzan22 03-28-2011 04:49 PM

Perfect, thank you very much.

greetings

mfnforex 04-01-2011 04:57 AM

Thank you

BadgerDog 04-04-2011 11:30 AM

1 Attachment(s)
Hello LOGECT .. :)

Good idea to help performance ...

Installed for testing on 4.04 of vBulletin SUITE with thanks ... :up:

Trying to get it going, but seem to be missing something and would appreciate any help ...

I think I must have some measurements wrongs someplace and I'm not sure how to figure it out.

I installed your change on our "Light" style and left the "Brown" style for comparison, which is what it should look like. Notice from pics that on the "Light" style, our top navbar flows down into our regular black smaller navbar?

Logo measures at 498 wide by 120 high and according to element check...

position:relative;
left:0px;
top:0px;

... but, seems to screw up cosmetically and move the navbar?

Thanks ...

Regards,
Doug

LOGECT 04-04-2011 05:48 PM

Quote:

Originally Posted by BadgerDog (Post 2180714)
Hello LOGECT .. :)

Good idea to help performance ...

Installed for testing on 4.04 of vBulletin SUITE with thanks ... :up:

Trying to get it going, but seem to be missing something and would appreciate any help ...

I think I must have some measurements wrongs someplace and I'm not sure how to figure it out.

I installed your change on our "Light" style and left the "Brown" style for comparison, which is what it should look like. Notice from pics that on the "Light" style, our top navbar flows down into our regular black smaller navbar?

Logo measures at 498 wide by 120 high and according to element check...

position:relative;
left:0px;
top:0px;

... but, seems to screw up cosmetically and move the navbar?

Thanks ...

Regards,
Doug

Hello

the reason could be either your costume 'Header template' or incorrect values for 'width' and 'height'

BadgerDog 04-04-2011 07:14 PM

Quote:

Originally Posted by LOGECT (Post 2180838)
Hello

the reason could be either your costume 'Header template' or incorrect values for 'width' and 'height'

So, even though the 498x120 is the correct size of our logo banner, you're saying to fake it out and modify the settings (height I assume) until the navbar moves back into alignment?

Thanks for the feedback .. :)

Regards,
Doug

TheGrimReaper2 04-05-2011 09:51 PM

One of my users is reporting that they only see a link on the browser they are using (chrome) but It works for me (Opera). Any ideas?

It shows up as a link for me on some pages as well for some reason.

raulin 06-05-2011 04:11 AM

Thanks

Hdeaf.com 06-06-2011 04:53 AM

<font color="DarkOrange">Thanks .....</font>

doctorsexy 06-10-2011 02:13 PM

Works...thanks

fxwoody 07-03-2011 08:55 AM

Good one Logect! Cut my loading time from 10.76 seconds to 6.7 seconds!

Cudo my friend ;)

reddyink 08-17-2011 05:05 PM

one problem with this is that if you have a forum http://localhost/yoursuite/ and after doing the changes as mentioned here, clicking on log will direct you to localhost instead of correct location of install (localhost/yoursuite)

Akangage 08-28-2011 03:49 AM

Wow.... great :) i change lil' bit to mine in order to avoid disorder of style template, like this one
Code:

#vbulletin_logo {
background-image: url(http://localhost/****/****/****/logo.png);
background-repeat: no-repeat;
height: 100px;
width: 270px;
position:relative;
float: left;
left: 15;
top: 30px;
}


maxie 09-20-2011 02:05 AM

nice code but my header is modefied with some code, i cant use this css, so sad

HMBeaty 09-20-2011 02:15 AM

Just a suggestion....

Instead of this:
Quote:

Originally Posted by tarzan22 (Post 2178386)
With:
Code:

<a href="{vb:link forumhome}{vb:raw session.sessionurl_q}" title="YOUR TITLE" id="vbulletin_logo">YOUR WEBSITE NAME</a>
use following code, if you are using the vbulletin suite version.
Code:

<a href="{vb:raw vboptions.homeurl}{vb:raw session.sessionurl_q}" title="YOUR TITLE" id="vbulletin_logo">YOUR WEBSITE NAME</a>

Use this:
HTML Code:

<vb:if condition="$vb_suite_installed">
    <a href="{vb:raw vboptions.homeurl}{vb:raw session.sessionurl_q}" title="YOUR TITLE" id="vbulletin_logo">{vb:raw vboptions.bbtitle}</a>
<vb:else />
    <a href="{vb:link forumhome}{vb:raw session.sessionurl_q}" title="YOUR TITLE" id="vbulletin_logo">{vb:raw vboptions.bbtitle}</a>
</vb:if>


OldSchoolDSL 11-22-2011 10:23 PM

I used the above suggestion, but changed the code from the author to this

PHP Code:

#vbulletin_logo {
background-imageurl(http://www.YOURWEBSITE.com/images/logo.png); 
display:block;
background-repeatno-repeat
text-indent:-9999px;;
position:relative;
min-height:65px;


The mid-height values and site values you can change as needed.

hgleigh 06-29-2012 07:33 AM

Hi, I am a newbie at CSS code let alone the whole forum idea! I read a forum post on how good and easy vBulletin is so I purchased it and yes I do find it pretty self explaining though I am stuck and have been for 2 days now. I have vBulletin 4.2.0 suite and have succesfully installed it and wanted to add my own logo. Found this post and have completed the code change and it works fine my only question is how do I get it to center on my page? I can increase the px from the left but it does not load evenly on other devices or screen sizes. Many thanks for any help.

Leigh

Arrogant-One 08-14-2012 01:52 AM

Quote:

Originally Posted by fxwoody (Post 2216146)
Good one Logect! Cut my loading time from 10.76 seconds to 6.7 seconds!

Cudo my friend ;)

How do you measure this?

I just installed this mod and the load times seem only slightly better.


All times are GMT. The time now is 06:06 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.01300 seconds
  • Memory Usage 1,779KB
  • 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
  • (10)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)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