Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Put Your Logo on CSS [vBulletin] Details »»
Put Your Logo on CSS [vBulletin]
Version: 1.00, by LOGECT LOGECT is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Board Optimization - Version: 4.x.x Rating:
Released: 03-26-2011 Last Update: Never Installs: 34
Template Edits
Re-useable Code  
No support by the author.

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 ...




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.

Screenshots

File Type: png logo_css_logect.png (29.3 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-05-2011, 09:51 PM
TheGrimReaper2 TheGrimReaper2 is offline
 
Join Date: Feb 2011
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #13  
Old 06-05-2011, 04:11 AM
raulin raulin is offline
 
Join Date: Dec 2009
Location: PR
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
Reply With Quote
  #14  
Old 06-06-2011, 04:53 AM
Hdeaf.com's Avatar
Hdeaf.com Hdeaf.com is offline
 
Join Date: Jul 2009
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font color="DarkOrange">Thanks .....</font>
Reply With Quote
  #15  
Old 06-10-2011, 02:13 PM
doctorsexy's Avatar
doctorsexy doctorsexy is offline
 
Join Date: Mar 2011
Location: earth
Posts: 383
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works...thanks
Reply With Quote
  #16  
Old 07-03-2011, 08:55 AM
fxwoody's Avatar
fxwoody fxwoody is offline
 
Join Date: Jun 2010
Location: On Earth
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Cudo my friend
Reply With Quote
  #17  
Old 08-17-2011, 05:05 PM
reddyink reddyink is offline
 
Join Date: Aug 2007
Posts: 236
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #18  
Old 08-28-2011, 03:49 AM
Akangage Akangage is offline
 
Join Date: Apr 2010
Location: Jakarta - Indonesia
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
}
Reply With Quote
  #19  
Old 09-20-2011, 02:05 AM
maxie maxie is offline
 
Join Date: Mar 2008
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice code but my header is modefied with some code, i cant use this css, so sad
Reply With Quote
  #20  
Old 09-20-2011, 02:15 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a suggestion....

Instead of this:
Quote:
Originally Posted by tarzan22 View Post
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>
Reply With Quote
  #21  
Old 11-22-2011, 10:23 PM
OldSchoolDSL OldSchoolDSL is offline
 
Join Date: Oct 2010
Posts: 1,196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 07:40 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06112 seconds
  • Memory Usage 2,340KB
  • Queries Executed 27 (?)
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
  • (7)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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