Go Back   vBulletin Setup > vBulletinSetup Information > vBulletin SEO Tips and SEO Questions


Please Register to get full access to the forums.
Post New Thread  Reply



#1   07-02-2007, 11:06 AM
Cleck has a spectacular aura about Join Date: Mar 2007 Posts: 44
Removing CSS code from home page


I am trying to remove (condense) all of the CSS info at the top of my home page. I have been doing my best to clean it up by fixing errors, but I still see most pages just reference where the CSS code is found and not display it all out.

Any ideas as to where I can fix this in vbulletin?

Home page: Go Take A Hike.com - Outdoor Activity Headquarters

Page Source: I removed the keywords to save tons of scrolling, and I condensed the code to show the beginning and end sections.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en">
<head>
<title>Go Take A Hike.com - Outdoor Activity Headquarters</title>

<!-- vBlogetin Edit -->

<!-- End vBlogetin Edit -->
<link rel="shortcut icon" href="favicon.ico" />

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="generator" content="vBulletin 3.6.4" />

	
<meta name="keywords" content="rock climbing.../>
<meta name="description" content="Go Take A Hike! Learn to rock climb, hike, bacpack and more in actual credit earning college classes!  Join the forum and plan your next outdoor adventure! You can use this site to learn about a trip, plan a trip, meet friends, and go take a hike!" />

	


<!-- CSS Stylesheet -->
<style type="text/css" id="vbulletin_css">
<!--
/* vBulletin 3 CSS For Style 'Default Style' (styleid: 1) */
body
{
	background: #BEC8CE;
	color: #000000;
	font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
	margin: 0px 0px 0px 0px;
	padding: 0px;
}
a:link, body_alink
{
	color: #496690;
	text-decoration: none;
}
a:visited, body_avisited
{
	color: #496690;
	text-decoration: none;
}
a:hover, a:active, body_ahover
{
	color: #26446d;
	text-decoration: underline;
}

...section removed



section removed...


padding-top: 3px;
padding-bottom: 3px;
background-color: #FFFFFF;
border-top: 1px dotted #505050;
border-right: 1px dotted #505050;
border-left: 1px dotted #505050;
border-bottom: 1px dotted #505050;
margin-bottom: 3px;
}

/* ***** online status ***** */
.online {
color: #339900;
}
.offline {
color: #4D528C;
}
.invisible {
color: #FF0000;
}
-->
</style>

<!-- / CSS Stylesheet -->

<script type="text/javascript">
<!--
var SESSIONURL = "";
var IMGDIR_MISC = "http://www.gotakeahike.com/forum/images/aria/misc";
var vb_disable_ajax = parseInt("0", 10);
// -->
</script>

<script type="text/javascript" src="http://www.gotakeahike.com/forum/clientscript/vbulletin_global.js?v=364"></script>
<script type="text/javascript" src="http://www.gotakeahike.com/forum/clientscript/vbulletin_menu.js?v=364"></script>

<link rel="alternate" type="application/rss+xml" title="Go Take A Hike.com RSS Feed" href="http://www.gotakeahike.com/forum/external.php?type=RSS2" />



<!-- vBlogetin Edit -->
<style type="text/css">
<!--
.invisibleBlog {
	background: #FFFFCC;
}

.deletedBlog {
	background: #FFCCD7;
}

.invisibleEntry {
	background: #FFFFCC;
}

.deletedEntry {
	background: #FFCCD7;
}

.invisibleComment {
	background: #FFFFCC;
}

.deletedComment {
	background: #FFCCD7;
}
-->
</style>
<!-- End vBlogetin Edit -->



</head>
<body>

<!-- top bar -->
<a name="top" id="top"></a>
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>

    <td width="15" style="background-image:url(http://www.gotakeahike.com/forum/images/aria/misc/left.gif)"><img src="http://www.gotakeahike.com/forum/images/aria/misc/left.gif" width="15"  border="0" alt="" /></td>
    <td width="100%">

<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center" class="header_bg">
<tr>

<td width="100%" align="right" valign="bottom">

<div style="padding: 6px 12px 6px 6px;" >

<font size="+2" color="gray">|</font>
<a href="http://www.gotakeahike.com" title="Outdoor Adventure Headquarters" class="white2"><font size="+1" color="white">Home</font></a>

.......

--------------------
Forums: GoTakeAHike.com, GroundsForDebate.com
Personal Blog: DerAmerikaner.com
Portfolio: RyanCleckner.com
Quote   |  



#2   07-02-2007, 03:57 PM
Paul M has a spectacular aura about Join Date: Jun 2007 Posts: 33 Location: Nottingham, UK
Re: Removing CSS code from home page


You need to enable the store css as files option in the ACP.
--------------------
Administrator - vbulletin.org
Quote   |  



#3   07-02-2007, 04:16 PM
Cleck has a spectacular aura about Join Date: Mar 2007 Posts: 44
Re: Removing CSS code from home page


FIRST RESPONSE-- Wow. Had no idea it was that simple. Thank you so much!



SECOND RESPONSE-- Well, that worked perfect on the home page, but my forums are all messed up.

My understanding is that the program tells the browser that the css info is found at /clientscript/vbulletin_css/... so it works on the home page, but it tries to tack that on the end of the forum urls and it obviously can't find it there since there is no clientscript folder in my /forum/f-coffee-house-29.html/...

Is this a rewrite issue? I found some simple problems like this with my photogallery and store looking for header images and I just forced the full path in as the location instead of the trailing info on the url and it seemed to work fine.

Where could I add http://www.gotakeahike.com/forum/cli...vbulletin_css/... as a hard coded option?



THIRD RESPONSE-- Alright...found it already. I first made a mistake and started editing options.php in admincp, but found that it was referencing /includes/adminfunctions_template.php so I edited that.

In /includes/adminfunctions_template.php I edited the following:

I found:
Code:
function delete_css_file($styleid, $csscontents)
{
	if (preg_match('#^<link rel="stylesheet" type="text/css" href="(/clientscript/vbulletin_css/style-\w{8}-0*' . $styleid . '\.css)"( id="vbulletin_css")? />$#', $csscontents, $match))
And changed it to:
Code:
function delete_css_file($styleid, $csscontents)
{
	if (preg_match('#^<link rel="stylesheet" type="text/css" href="(http://www.your-site.com/forum/clientscript/vbulletin_css/style-\w{8}-0*' . $styleid . '\.css)"( id="vbulletin_css")? />$#', $csscontents, $match))





And I also found:
Code:
$cssfilename = 'clientscript/vbulletin_css/style-' . $adblock_is_evil . '-' . str_pad($styleid, 5, '0', STR_PAD_LEFT) . '.css';
And changed it to:
Code:
$cssfilename = 'http://www.your-site.com/forum/clientscript/vbulletin_css/style-' . $adblock_is_evil . '-' . str_pad($styleid, 5, '0', STR_PAD_LEFT) . '.css';


It solved the problem for me, I hope it works for you too!

FOURTH RESPONSE-- Back to square one. I was wrong. CSS still present in order to keep the forum working on all pages.
--------------------
Forums: GoTakeAHike.com, GroundsForDebate.com
Personal Blog: DerAmerikaner.com
Portfolio: RyanCleckner.com

Last edited by Cleck; 07-03-2007 at 01:38 PM. Reason: Automerged Doublepost
Quote   |  



#4   07-08-2007, 03:21 PM
Cleck has a spectacular aura about Join Date: Mar 2007 Posts: 44
Re: Removing CSS code from home page


Any ideas?
--------------------
Forums: GoTakeAHike.com, GroundsForDebate.com
Personal Blog: DerAmerikaner.com
Portfolio: RyanCleckner.com
Quote   |  
Post New Thread  Reply
vBulletin Setup > vBulletinSetup Information > vBulletin SEO Tips and SEO Questions


Thread Tools
Display Modes

 
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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is the home page messed up ? Brandon Feedback and Suggestions 11 10-28-2007 03:01 PM
Home page login error sagar Feedback and Suggestions 9 08-12-2007 03:16 PM
how do I show sub-forums im home-page? sghackx vBulletin Questions 4 03-03-2007 01:26 PM
I need help removing a gap on the home page... aj8690 vBulletin Questions 4 01-13-2007 10:26 PM


All times are GMT -6. The time now is 12:34 PM.

vBulletin Setup, vBulletin Setup Forums, vBulletin Services, vBulletin Blogs, vBulletin SEO, vBulletin Questions, vBulletin Skins, Styles, Templates
vBulletin Hacks / Modifications, vBulletin Monetization, Blogs, vBulletin Link Directory,Quality Link Directory