Recent Topics

1 Feb 17, 2008 00:10    

My b2evolution Version: 2.x

This isn't rocket science but is a quick way to add a different colours/moods for any pages generated by "disp="
Simply load a copy of _html_header.inc.php into /skins/yourskin

Add the following to that php file between <head> and </head>

<?php if( $disp == 'about' ) { ?>
	 <style type="text/css">body{background:#7A963E ;}.bPosts h2{color:#213836;}.bPosts{color:#213836;background-color:#F0F7E8;}</style>
      <?php } ?>

This will load the css as Embedded styles and overwrite any styles in your main style.css .
You can make it as extensive as you like however just altering main sections like body, wrapper,bPosts etc does give the page a distinctive look.

You can also use this method to load any Javascript that may be specific to that page as well.
eg:

<?php if( $disp == 'about' ) { ?>
	 <style type="text/css">body{background:#7A963E ;}.bPosts h2{color:#213836;}.bPosts{color:#213836;background-color:#F0F7E8;}</style>
      <script type="text/javascript" src="http://wow-factor.com/skins/custom_wow/rsc/js/isiAJAX.js"></script>
      <?php } ?>


default style colours:
http://wow-factor.com
Embedded styles:
http://wow-factor.com/index.php?disp=about
http://wow-factor.com/index.php?disp=feed

2 Feb 17, 2008 00:41

Nice - thanks! I use an evopress-based skin and found a bazillion free header images for that. So I already take advantage of blog-specific CSS to put a different header image on each blog. Now I can add this trick and put a different header on each blog's unique disp pages.

3 Feb 18, 2008 00:42

an alternative

<body class="<?php echo $disp; ?>"

Then all your styles can stay in the stylesheet rather than bloating your html ;)

¥


Form is loading...