<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Toxic Web &#187; Site News</title>
	<atom:link href="http://www.toxic-web.co.uk/blog/category/site-news/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.toxic-web.co.uk</link>
	<description>The ramblings of a toxic mind... polluting a browser near you...</description>
	<lastBuildDate>Wed, 15 May 2013 10:27:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>WordPress and the Twitter Bootstrap Carousel&#8230;</title>
		<link>http://www.toxic-web.co.uk/blog/2012/10/10/wordpress-and-the-twitter-bootstrap-carousel/</link>
		<comments>http://www.toxic-web.co.uk/blog/2012/10/10/wordpress-and-the-twitter-bootstrap-carousel/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 12:46:05 +0000</pubDate>
		<dc:creator>Toxic Web</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Teh Interweb]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[Carousel]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[Sites]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Twitter Bootstrap]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.toxic-web.co.uk/?p=2469</guid>
		<description><![CDATA[...how to make it work. How to add the active class to the first item in the Carousel with the dynamic output of the WordPress loop.<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2012/10/10/wordpress-and-the-twitter-bootstrap-carousel/">Toxic Web &#8594;</a></p>]]></description>
				<content:encoded><![CDATA[<p>&#8230;how to make it work.</p>
<p>I&#8217;ve been using <a href="http://twitter.github.com/bootstrap/" title="Twitter Bootstrap">Twitter Bootstrap</a> as the starting block for a site redesign and wanted to incorporate the <a href="http://twitter.github.com/bootstrap/javascript.html#carousel" title="Twitter Bootstrap Carousel">Carousel</a> on the front page to cycle through last five news posts.</p>
<p>The problem arises with the fact that the code used for the Carousel isn&#8217;t set up to handle the dynamic output of the WordPress loop.</p>
<pre>
<code>

&lt;div id=&quot;myCarousel&quot; class=&quot;carousel slide&quot;&gt;
  &lt;!-- Carousel items --&gt;
  &lt;div class=&quot;carousel-inner&quot;&gt;
    &lt;div class=&quot;active item&quot;&gt; 1st news item here &lt;/div&gt;
    &lt;div class=&quot;item&quot;&gt; 2nd news item here &lt;/div&gt;
    &lt;div class=&quot;item&quot;&gt; 3rd news item here &lt;/div&gt;
  &lt;/div&gt;
  &lt;!-- Carousel nav --&gt;
  &lt;a class=&quot;carousel-control left&quot; href=&quot;#myCarousel&quot; data-slide=&quot;prev&quot;&gt;&lsaquo;&lt;/a&gt;
  &lt;a class=&quot;carousel-control right&quot; href=&quot;#myCarousel&quot; data-slide=&quot;next&quot;&gt;&rsaquo;&lt;/a&gt;
&lt;/div&gt;

</code>
</pre>
<p>The first item <code>div</code> needs the class <code>active</code> but with a dynamic WordPress loop that&#8217;s not immediately possible.</p>
<pre>
<code>

&lt;div id=&quot;slider-id&quot; class=&quot;carousel slide&quot;&gt;
  &lt;!-- Carousel items --&gt;
  &lt;div class=&quot;carousel-inner&quot;&gt;
&lt;?php 
$args = array(all the custom loop args here);
$my_query = new WP_Query($args);
  while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();
  $do_not_duplicate = $post-&gt;ID; ?&gt;

    &lt;div class=&quot;item&quot;&gt;
    &lt;?php get_template_part( &#039;content&#039;, get_post_format() );?&gt;
    &lt;/div&gt;&lt;!-- /.item --&gt; 
  &lt;?php endwhile; ?&gt;
  &lt;/div&gt;&lt;!-- /.carousel-inner  --&gt;
  &lt;!-- Carousel nav --&gt;
  &lt;a class=&quot;btn btn-orange carousel-controls carousel-control-left&quot; href=&quot;#news-slider&quot; data-slide=&quot;prev&quot;&gt;&lsaquo;&lt;/a&gt;
  &lt;a class=&quot;btn btn-orange carousel-controls carousel-control-right&quot; href=&quot;#news-slider&quot; data-slide=&quot;next&quot;&gt;&rsaquo;&lt;/a&gt;
&lt;/div&gt;&lt;!-- /#slider-id  --&gt;

</code>
</pre>
<p>Add that and nothing shows up because the Boostrap CSS file has&#8230;</p>
<pre>
<code>

.carousel .item {
  display: none;
  position: relative;
  -webkit-transition: 0.6s ease-in-out left;
  -moz-transition: 0.6s ease-in-out left;
  -o-transition: 0.6s ease-in-out left;
  transition: 0.6s ease-in-out left;
}

</code>
</pre>
<p>&#8230;so all the posts are hidden.</p>
<p>So a quick look round some sites found through a &#8220;WordPress Twitter Carousel&#8221; Google search finds some answers.</p>
<p>First up is a plugin. Now I don&#8217;t really want to use a plugin, try not to use too many, especially for things I think can be done without resorting to one.</p>
<p>Only other solution seems to be using two custom loops, inside the <code>carousel-inner</code> <code>div</code>. The first has the <code>active</code> class added to the <code>item</code> <code>div</code> and the loop $args is set for just one post <code>'posts_per_page' => 1</code>. The second loop uses <code>'offset' => 1</code> $arg so that it doesn&#8217;t show the post called in the first loop and then the number of posts you want to show minus one, so in my case 4 as I wanted a total of 5 <code>'posts_per_page' => 4</code>.</p>
<p>It works but two loops just seems like a touch of overkill and it adds more queries on the database which I prefer to keep as low as possible.</p>
<p>There was other php based methods of figuring out which was the first post and adding the <code>active</code> class to it but another thing jumped out during the search. The Carousel wasn&#8217;t automatically cycling through the items for people.</p>
<p>To start it going you need to add the following bit of JavaScript after plugin&#8230;</p>
<pre>
<code>

$(&#039;.carousel&#039;).carousel({
  interval: 2000
})

</code>
</pre>
<p>&#8230;with the interval set at what ever speed you want. Which all got me thinking, the whole thing is based on using JavaScript so why not just use that very same thing, through jQuery, to add the <code>active</code> class to the first <code>item</code>.</p>
<p>Number of ways you can do it&#8230;</p>
<pre>
<code>

$(&quot;.carousel-inner&quot;).first().addClass(&#039;active&#039;);

$(&quot;.carousel-inner .item:first&quot;).addClass(&#039;active&#039;);

$(&quot;.carousel-inner .item:first-child&quot;).addClass(&#039;active&#039;);

$(&quot;.carousel-inner&gt;:first-child&quot;).addClass(&#039;active&#039;);

</code>
</pre>
<p>Haven&#8217;t checked them on all different browsers, especially not the old Internet Explorers, some might not make work with them, though I&#8217;ll probably only be checking 8 and above &#8211; 6 and 7 are dead to me.</p>
<p>You&#8217;ll just have to add some CSS for users that have JavaScript switched off in their browsers. Assuming you use <code>no-js</code> class in the <code>&lt;html lang=&quot;en&quot; class=&quot;no-js&quot;&gt;</code> tag.</p>
<pre>
<code>

.no-js .carousel .item {display: block;}

</code>
</pre>
<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2012/10/10/wordpress-and-the-twitter-bootstrap-carousel/">Toxic Web &#8594;</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.toxic-web.co.uk/blog/2012/10/10/wordpress-and-the-twitter-bootstrap-carousel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced jQuery background image slideshow&#8230;</title>
		<link>http://www.toxic-web.co.uk/blog/2012/09/06/advanced-jquery-background-image-slideshow/</link>
		<comments>http://www.toxic-web.co.uk/blog/2012/09/06/advanced-jquery-background-image-slideshow/#comments</comments>
		<pubDate>Thu, 06 Sep 2012 13:52:55 +0000</pubDate>
		<dc:creator>Toxic Web</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Teh Interweb]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[slideshow]]></category>
		<category><![CDATA[Toxic Web]]></category>

		<guid isPermaLink="false">http://www.toxic-web.co.uk/?p=2438</guid>
		<description><![CDATA[...plugin. I've altered the Advanced jQuery background image slideshow plugin to make things a bit easier.<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2012/09/06/advanced-jquery-background-image-slideshow/">Toxic Web &#8594;</a></p>]]></description>
				<content:encoded><![CDATA[<p>&#8230;plugin version 1.2.</p>
<p>Since posting about Marco Kuiper&#8217;s <a href="http://www.marcofolio.net/webdesign/advanced_jquery_background_image_slideshow.html" title="Advanced jQuery Background Slideshow">Advanced jQuery Background Slideshow</a>, and the <a href="http://www.toxic-web.co.uk/blog/2011/10/12/advanced-jquery-background-image-slideshow/" title="Advanced jQuery background image slideshow…">modifications I made to it</a> it&#8217;s garnered a bit of interest and a few requests for various additions as you can see in the comments.</p>
<p>Well I&#8217;ve changed a couple of things since that first version, to make things a bit easier to use.</p>
<p>First up there&#8217;s the latest version of jQuery, 1.8.1, so it works with that &#8211; I&#8217;ve only checked it with Chrome, so other browsers may require some finessing, or dropping down a version of jQuery.</p>
<p>All the options have been moved from the <code>plugin.js</code> file to the <code>.html</code> file, as it really should be, with some new additions.</p>
<pre>
<code>

&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/plugin.js&quot;&gt;&lt;/script&gt;	
&lt;script type=&quot;text/javascript&quot;&gt;
$(function() {	
$(&#039;headerimgs&#039;).bgimgSlideshow({
slideshowSpeed: 6000,
method : &quot;fade&quot;, /* slide or fade, default is fade */
fadeSpeed : 2000, /* how quickly one image fades/slides into the next */
contDiv : &quot;#header&quot;, /* id or class of div you want the images to appear in. */
imgDir : &quot;images/&quot;,
markup1 : &#039;&lt;div id=&quot;headerimgs&quot;&gt;\
	   &lt;div id=&quot;headerimg1&quot; class=&quot;headerimg&quot;&gt;&lt;/div&gt;\
	   &lt;div id=&quot;headerimg2&quot; class=&quot;headerimg&quot;&gt;&lt;/div&gt;\
	   &lt;/div&gt;&#039;,
markup2 :&#039;&lt;div id=&quot;headernav-outer&quot;&gt;\
	  &lt;div id=&quot;headernav&quot;&gt;\
	  &lt;div id=&quot;back&quot; class=&quot;btn&quot;&gt;&lt;/div&gt;\
	  &lt;div id=&quot;control&quot; class=&quot;btn&quot;&gt;&lt;/div&gt;\
	  &lt;div id=&quot;next&quot; class=&quot;btn&quot;&gt;&lt;/div&gt;\
	  &lt;/div&gt;\
	  &lt;/div&gt;\
	  &lt;div id=&quot;headertxt&quot;&gt;\
	  &lt;p class=&quot;caption&quot;&gt;\
	  &lt;span id=&quot;firstline&quot;&gt;&lt;/span&gt;\
	  &lt;a href=&quot;#&quot; id=&quot;secondline&quot;&gt;&lt;/a&gt;\
          &lt;/p&gt;\
	  &lt;p class=&quot;pictured&quot;&gt;\
	  Pictured:\
	  &lt;a href=&quot;#&quot; id=&quot;pictureduri&quot;&gt;&lt;/a&gt;\
	  &lt;/p&gt;\
	 &lt;/div&gt;&#039;,
photos : [{
	&quot;title&quot; : &quot;Stairs&quot;,
	&quot;image&quot; : &quot;vacation.jpg&quot;,
	&quot;url&quot; : &quot;http://www.sxc.hu/photo/1271909&quot;,
	&quot;firstline&quot; : &quot;Going on&quot;,
	&quot;secondline&quot; : &quot;vacation?&quot;
	}, {
	&quot;title&quot; : &quot;Office Appartments&quot;,
	&quot;image&quot; : &quot;work.jpg&quot;,
	&quot;url&quot; : &quot;http://www.sxc.hu/photo/1265695&quot;,
	&quot;firstline&quot; : &quot;Or still busy at&quot;,
	&quot;secondline&quot; : &quot;work?&quot;
	}, {
	&quot;title&quot; : &quot;Mountainbiking&quot;,
	&quot;image&quot; : &quot;biking.jpg&quot;,
	&quot;url&quot; : &quot;http://www.sxc.hu/photo/1221065&quot;,
	&quot;firstline&quot; : &quot;Get out and be&quot;,
	&quot;secondline&quot; : &quot;active&quot;
	}, {
	&quot;title&quot; : &quot;Mountains Landscape&quot;,
	&quot;image&quot; : &quot;nature.jpg&quot;,
	&quot;url&quot; : &quot;http://www.sxc.hu/photo/1271915&quot;,
	&quot;firstline&quot; : &quot;Take a fresh breath of&quot;,
	&quot;secondline&quot; : &quot;nature&quot;
	}, {
	&quot;title&quot; : &quot;Italian pizza&quot;,
	&quot;image&quot; : &quot;food.jpg&quot;,
	&quot;url&quot; : &quot;http://www.sxc.hu/photo/1042413&quot;,
	&quot;firstline&quot; : &quot;Enjoy some delicious&quot;,
	&quot;secondline&quot; : &quot;food&quot;
	}]});
	});
	&lt;/script&gt;
</code>
</pre>
<p>The images are now just the name of the image file and doesn&#8217;t include the folder path to the file, that&#8217;s part of the options <code>imgDir</code>. The value of this needs changed to reflect where the images are in relation to the <code>.html</code> file.</p>
<p>The <code>plugin.js</code> file has also been altered to reflect the image directory path option.</p>
<p><del datetime="2013-03-11T16:06:44+00:00">Download version 1.2 &#8211; version 1.0.1 is still available, so you can view the changes &#8211; there&#8217;s also a version 1.2 with thumbnails that was requested v1.2 thumbs.</del> </p>
<p>The latest version is <a href="http://goo.gl/MDJgu" title="Download Advanced jQuery background image slideshow v1.3.1">v1.3.1</a>. It has added options for randomising, as asked about below in the comments, along with the thumbnails, which have been made better. And the whole thing has been cleaned up to come up error free when checked with JSHint and checked with the latest version of jQuery (1.9.1)</p>
<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2012/09/06/advanced-jquery-background-image-slideshow/">Toxic Web &#8594;</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.toxic-web.co.uk/blog/2012/09/06/advanced-jquery-background-image-slideshow/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Call to undefined function get_header()&#8230;</title>
		<link>http://www.toxic-web.co.uk/blog/2012/08/31/call-to-undefined-function-get_header/</link>
		<comments>http://www.toxic-web.co.uk/blog/2012/08/31/call-to-undefined-function-get_header/#comments</comments>
		<pubDate>Fri, 31 Aug 2012 13:01:16 +0000</pubDate>
		<dc:creator>Toxic Web</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Teh Interweb]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.toxic-web.co.uk/?p=2432</guid>
		<description><![CDATA[...WordPress. Used to get a lot of the above/following errors in my error log files. There's a simple reason and a simple way to stop it.<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2012/08/31/call-to-undefined-function-get_header/">Toxic Web &#8594;</a></p>]]></description>
				<content:encoded><![CDATA[<p>&#8230;WordPress.</p>
<p>Used to get a lot of the above/following errors in my error log files&#8230;</p>
<p><code>Fatal error: Call to undefined function get_header() in /server_path/wp-content/themes/theme_folder/index.php on line 16</code></p>
<p>General response in most of the forums and blogs I found from a Google search seemed to based round people thinking it&#8217;s because the theme&#8217;s index.php file had been put into the root folder WordPress was installed in. When you know you haven&#8217;t done that and you look at the file in question, the theme <code>index.php</code>, and everything is as it should be you start wondering.</p>
<p>Well it&#8217;s all down to something or someone accessing the themes folder. So without the core functions of WordPress to tell it what <code>get_header()</code> should do it&#8217;ll throw up the error.</p>
<p>So if it&#8217;s a bot searching places it shouldn&#8217;t &#8211; it&#8217;ll probably be grabbing the link of your <code>style.css</code> then going up the directory tree to get to the theme folder &#8211; it&#8217;s time to fire up the <code>robots.txt</code> file. Put the following in it.</p>
<pre>
<code>
User-agent: *
Disallow: /wp-content/themes/
</code>
</pre>
<p>If you don&#8217;t already have one it should be in the root folder of the domain. Change the <code>Disallow:</code> path if your <code>wp-content</code> isn&#8217;t in the root directory.</p>
<p>It could also be someone checking out the folder of your theme, again looking at the <code>style.css</code> file then lopping off that end bit and getting the error message. And that error message will be showing the full path of your files from the server, kind of information you probably don&#8217;t want someone seeing.</p>
<p>So it&#8217;s probably best to stick in a bit of php to stop errors being displayed. You can find more about error reporting at <a href="http://php.net/manual/en/function.error-reporting.php" title="php.net - error reporting">php.net</a>. Placing the <code>error_reporting(0);</code> before the <code>get_header()</code> call should stop anything showing up.</p>
<pre>
<code>
error_reporting(0);
get_header();
</code>
</pre>
<p>So no more reports about something you know about and can&#8217;t do much about.</p>
<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2012/08/31/call-to-undefined-function-get_header/">Toxic Web &#8594;</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.toxic-web.co.uk/blog/2012/08/31/call-to-undefined-function-get_header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced jQuery background image slideshow&#8230;</title>
		<link>http://www.toxic-web.co.uk/blog/2011/10/12/advanced-jquery-background-image-slideshow/</link>
		<comments>http://www.toxic-web.co.uk/blog/2011/10/12/advanced-jquery-background-image-slideshow/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 14:38:48 +0000</pubDate>
		<dc:creator>Toxic Web</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Teh Interweb]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[slideshow]]></category>
		<category><![CDATA[Toxic Web]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.toxic-web.co.uk/?p=2079</guid>
		<description><![CDATA[...plugin. Looking around for such a thing I found something that didn't quite work for what I required but I've got the plugin to work and added a few touches.<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2011/10/12/advanced-jquery-background-image-slideshow/">Toxic Web &#8594;</a></p>]]></description>
				<content:encoded><![CDATA[<p>&#8230;plugin.</p>
<p>I was searching around teh interweb for a piece of jQueried javascript that would rotate background images for the header of a site I&#8217;m thinking of redoing.</p>
<p>There&#8217;s a number out there but mainly just standard carousel type things for image viewing rather than background changing. The one I kept coming back to was Marco Kuiper&#8217;s <a href="http://www.marcofolio.net/webdesign/advanced_jquery_background_image_slideshow.html" title="Advanced jQuery Background Slideshow">Advanced jQuery Background Slideshow</a> (<a href="http://demo.marcofolio.net/bgimg_slideshow/" title="Advanced jQuery Background Slideshow demo">demo</a>). </p>
<p>Marco&#8217;s work put all the info for stuff like the blocks of text within the <code>.js</code> file, while I required a plugin style where I could have info generated in the html file passed to the script. Luckily Sylvain Papet from <a href="http://www.com-ocean.com/" title="Com Ocean">Com-Ocean</a> had converted Marco&#8217;s script into such a plugin. Unfortunately it still didn&#8217;t quite meet my requirements. Couldn&#8217;t find a way for it to handle the markup spat out by a WordPress widget.</p>
<p>Anyway the main problem to begin with was getting the plugin to work, lot of people commentating on Marco&#8217;s original post seemed to be struggling as well. So after a bit of searching round and some actual work on my part, I think I may have cracked it.</p>
<p>I&#8217;ve changed a few things and added a couple. You can check out and download my version from <a href="http://goo.gl/kcb0o" title="Toxic Web Slideshow">here</a> &#8211; this is version 1.0.1 there&#8217;s a new version (<a href="#edit" class="scroll">see below</a>). There are three new options.</p>
<pre>
<code>
options = jQuery.extend({
slideshowSpeed: 6000,
method : &quot;fade&quot;, /* slide or fade, default is fade */
fadeSpeed :2000, /* how quickly one image fades/slides into the next */
contDiv : &quot;#header&quot;, /* id or class of div you want the images to appear in. */
</code>
</pre>
<p><strong>Method</strong>: this is how the images change from one to the next. Default is <strong>fade</strong> as in the original or you can change it to <strong>slide</strong> so the images slide out to the left, revealing the next one.</p>
<p><strong>fadeSpeed</strong>: This is the speed at which the fade or slide occurs.</p>
<p><strong>contDiv</strong>: This is the id or class of the containing div you want the background images, control buttons and text boxes to be in. #header in the original can be changed to what ever you want, just remember the . for class or # for id. As I&#8217;ve kept the same css as Marco&#8217;s original a different way had to be found for the plugin to add the markup.</p>
<p>The images and text box options have been moved from the script to the html file. So your version of the following should be added below the plugin which is below the call for jQuery.</p>
<pre>
<code>
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/plugin.js&quot;&gt;&lt;/script&gt;
		
	&lt;script type=&quot;text/javascript&quot;&gt;
	$(function() {	
	    $(&#039;headerimgs&#039;).bgimgSlideshow({photos : [{
		&quot;title&quot; : &quot;Stairs&quot;,
		&quot;image&quot; : &quot;images/vacation.jpg&quot;,
		&quot;url&quot; : &quot;http://www.sxc.hu/photo/1271909&quot;,
		&quot;firstline&quot; : &quot;Going on&quot;,
		&quot;secondline&quot; : &quot;vacation?&quot;
	}, {
		&quot;title&quot; : &quot;Office Appartments&quot;,
		&quot;image&quot; : &quot;images/work.jpg&quot;,
		&quot;url&quot; : &quot;http://www.sxc.hu/photo/1265695&quot;,
		&quot;firstline&quot; : &quot;Or still busy at&quot;,
		&quot;secondline&quot; : &quot;work?&quot;
	}, {
		&quot;title&quot; : &quot;Mountainbiking&quot;,
		&quot;image&quot; : &quot;images/biking.jpg&quot;,
		&quot;url&quot; : &quot;http://www.sxc.hu/photo/1221065&quot;,
		&quot;firstline&quot; : &quot;Get out and be&quot;,
		&quot;secondline&quot; : &quot;active&quot;
	}, {
		&quot;title&quot; : &quot;Mountains Landscape&quot;,
		&quot;image&quot; : &quot;images/nature.jpg&quot;,
		&quot;url&quot; : &quot;http://www.sxc.hu/photo/1271915&quot;,
		&quot;firstline&quot; : &quot;Take a fresh breath of&quot;,
		&quot;secondline&quot; : &quot;nature&quot;
	}, {
		&quot;title&quot; : &quot;Italian pizza&quot;,
		&quot;image&quot; : &quot;images/food.jpg&quot;,
		&quot;url&quot; : &quot;http://www.sxc.hu/photo/1042413&quot;,
		&quot;firstline&quot; : &quot;Enjoy some delicious&quot;,
		&quot;secondline&quot; : &quot;food&quot;
	}]});
	});
	&lt;/script&gt;
</code>
</pre>
<p>The images need the path to the folder they&#8217;re in from the html file.</p>
<p>You can view/download my version of things here &#8211; this is version 1.0.1 there&#8217;s a new version (<a href="#edit" class="scroll">see below</a>) &#8211; and check them against the original files found at Marco&#8217;s site (link above).</p>
<p>I&#8217;ve checked it in the latest Chrome &#038; Firefox and IE9 and it all seems to work but chances are there&#8217;ll be bugs somewhere and would be better to move some of the options out of the plugin file.</p>
<p><strong id="edit">Edit:</strong> there&#8217;s a new version of the plugin available see <a href="http://www.toxic-web.co.uk/blog/2012/09/06/advanced-jquery-background-image-slideshow/" title="Advanced jQuery background image slideshow…">this post</a>.</p>
<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2011/10/12/advanced-jquery-background-image-slideshow/">Toxic Web &#8594;</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.toxic-web.co.uk/blog/2011/10/12/advanced-jquery-background-image-slideshow/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>And we&#039;re back&#8230;</title>
		<link>http://www.toxic-web.co.uk/blog/2011/05/06/and-were-back/</link>
		<comments>http://www.toxic-web.co.uk/blog/2011/05/06/and-were-back/#comments</comments>
		<pubDate>Fri, 06 May 2011 10:37:11 +0000</pubDate>
		<dc:creator>Toxic Web</dc:creator>
				<category><![CDATA[Teh Interweb]]></category>
		<category><![CDATA[Toxic Web]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://www.toxic-web.co.uk/?p=1932</guid>
		<description><![CDATA[...in the room. The new improved version of Toxic Web - v4.5 now with added html5 and css3 - is online which pretty much looks like the old version but isn't the default 'bland' setting of late.<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2011/05/06/and-were-back/">Toxic Web &#8594;</a></p>]]></description>
				<content:encoded><![CDATA[<p>&#8230;in the room.</p>
<p>So things are back being reddish and orangey around here instead of deafultish and <q>bland</q> I believe was the word <a href="http://flashwarner.com">Flash</a> used. Hey it&#8217;s only taken how long???</p>
<p>Well we&#8217;ll see how long the server stands up to version 4.5 of Toxic Web &#8211; all new and improved now with added <a href="http://en.wikipedia.org/wiki/HTML5">html5</a> and <a href="http://www.css3.info/">css3</a>. OK so the look is still very roughly the same.</p>
<p>A load of plugins have been given the heave-ho, lot of functionality switched to javascript, so you&#8217;re browser does the work not my server, therefore you&#8217;ll need jscript switched on if it isn&#8217;t there&#8217;s a nice warning telling you over on the right hand side. Speaking of browsers if anyone&#8217;s using an old one then tough, certain things ain&#8217;t gonna be looking right. Forget Microisoft&#8217;s campaign to <a href="http://www.theie6countdown.com/default.aspx">rid us of Internet Explorer 6</a>, I&#8217;ve gone one better as I really couldn&#8217;t be arsed figuring out what was wrong with IE 7.</p>
<p>Update now or better change *cough*Chrome*cough* or be left behind.</p>
<p>So it&#8217;s been tested on the the last couple of versions of <strong>Chrome</strong> (10 to 12), Safari (4 &#038; 5), Opera (10 &#038; 11), Firefox (3.6 &#038; 4.0) and on IE8 and is working to my satisfaction but there may be a couple of glitches here and there but there&#8217;ll get ironed out.</p>
<p>First thing I have to check is how well the caching setup works with new posts and that&#8217;ll be done by this post</p>
<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2011/05/06/and-were-back/">Toxic Web &#8594;</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.toxic-web.co.uk/blog/2011/05/06/and-were-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where&#039;s all the red, orange and skulls&#8230;</title>
		<link>http://www.toxic-web.co.uk/blog/2011/02/22/wheres-all-the-red-orange-and-skulls/</link>
		<comments>http://www.toxic-web.co.uk/blog/2011/02/22/wheres-all-the-red-orange-and-skulls/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 14:17:45 +0000</pubDate>
		<dc:creator>Toxic Web</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Toxic Web]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[last.fm]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.toxic-web.co.uk/?p=1871</guid>
		<description><![CDATA[...gone? Toxic Web looks a little denuded after it was down due to causing a massive strain on the server, things will slowly get back to the red and orange.<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2011/02/22/wheres-all-the-red-orange-and-skulls/">Toxic Web &#8594;</a></p>]]></description>
				<content:encoded><![CDATA[<p>&#8230;gone?</p>
<p>Anyone stumping up here over the last couple of days &#8211; anyone? anyone? no-one? &#8211; will have been met with a nice <a href="http://www.checkupdown.com/status/E403.html">403 error page</a>, for the second time this year.</p>
<p><em>I never touched it, honest guv.</em></p>
<p>Second time and again it&#8217;s due to the same thing, something within the site is taking up far too much of the server&#8217;s resources and so taking down the whole thing. So the hosts had really no option than to block access to the index page and inform me, with a few suggestions.</p>
<p>First time round I reckoned it was due to a backup plugin, which emailed me a gzipped backup of the database every week. Database had got so big that the file wasn&#8217;t being zipped and email but just put in a folder on the server. So back then the plugin was deactivated and deleted. A couple of other plugins went the same way, moving from php to jscript, mainly the external link icon and the last.fm latest track list.</p>
<p>Another of the suggestions was to use a caching plugin, namely W3 Total Cache, which I did, hosts tested it and things seemed to be fine by them. Wasn&#8217;t too sure about the caching, seemed to slow things down a lot and things weren&#8217;t right with other sections of the site, especially admin such as deleting spam comments.</p>
<p>So at the time I decided on an upgrade of the theme, switching more things from php to javascript, finding ways of shifting things from plugins and widgets, generally cutting down queries to the database, less use of php and everything that puts strain on the server.</p>
<p>Then the other night another email, same thing. Of course I was away at the time and knew nowt about it and so yesterday the site was down for quite a bit. This time round it seemed the main culprit was a mixture of the Twitter Tools plugin and W3 Total Cache both of them leading to a massive error_log file.</p>
<p>Now the process of upgrading everything had been put on the back-burner due to other commitments. So when faced with this again it seemed the easy option and best to get the site up and running again was a switch to the default WordPress theme and get rid of all the plugins possible. That is most of those not involved in stopping spam and securing the site, a few were kept which are necessary to the running of the place and the caching plugin was replaced with another suggested one, which so far seems to have far a far less negative impact on the site.</p>
<p>So that&#8217;s why we find ourselves here in default land. Everything was done in a bit of a hurry, so things might not be working perfectly but I&#8217;m on the case&#8230;</p>
<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2011/02/22/wheres-all-the-red-orange-and-skulls/">Toxic Web &#8594;</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.toxic-web.co.uk/blog/2011/02/22/wheres-all-the-red-orange-and-skulls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating JonRauhouse.com and solving&#8230;</title>
		<link>http://www.toxic-web.co.uk/blog/2010/12/16/updating-jonrauhouse-com-and-solving/</link>
		<comments>http://www.toxic-web.co.uk/blog/2010/12/16/updating-jonrauhouse-com-and-solving/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 14:44:10 +0000</pubDate>
		<dc:creator>Toxic Web</dc:creator>
				<category><![CDATA[Jon Rauhouse]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[Chris Coyier]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[Nicolas Gallagher]]></category>
		<category><![CDATA[Style]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.toxic-web.co.uk/?p=1806</guid>
		<description><![CDATA[...problems. Having updated the markup for Jon Rauhouse's site to html5 and css3 I needed to find a way to stop content scrolling under a fixed header when the solution fell into my lap.<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2010/12/16/updating-jonrauhouse-com-and-solving/">Toxic Web &#8594;</a></p>]]></description>
				<content:encoded><![CDATA[<p>&#8230;problems.</p>
<p>A bit back I decided it was time to leap into the all new sparkling <a href="http://en.wikipedia.org/wiki/HTML5">html5</a> and <a href="http://www.css3.com/">css3</a>. Think it was a move to a browser that can handle the new markup &#8211; from the old Mozilla based Flock to Firefox, which of course is still Mozilla based but was a few versions on from the base of Flock and then onto Chrome.</p>
<p>So which site to go with, after a few experiments for this place I decided that Rauhouse&#8217;s site could do with a bit of spit and polish, nothing drastic design wise and would be easier. The existing markup was pretty much valid xhtml 1.1 so it was easy to replace the old <code>
&lt;div&gt;</code> with the various new elements &#8211; <code>
&lt;header&gt;
&lt;footer&gt;
&lt;section&gt;
&lt;nav&gt;
&lt;article&gt;</code> etc. Does make things easier to read and know exactly where you are. Also of course means workarounds for IE, so the <a href="http://code.google.com/p/html5shiv/">shiv</a> is added.</p>
<p>Now one of the first problems I came across was also present in the previous version of the site so nothing to do with the new markup or style. It was the problem of using hash links in a page when there&#8217;s a static header at the top of a page.</p>
<p>So the style for the header includes <code>position:fixed;</code> and is about 80px heigh. So when the page contains internal hash links  &#8211; <code>&lt;a href=&quot;#track-list&quot;&gt;Track Listing&lt;/a&gt;</code> &#8211; and they are clicked the page scrolls down so the block the link corresponds to &#8211; <code>
&lt;section id=&quot;track-list&quot;&gt;</code> &#8211; is visible. Unfortunately the way it works is the page scrolls down until you can see the maximum amount of the section so basically until the top of the section is as far up the window as possible and so a number of times the top of the section is at the top of the window and thus underneath the header.</p>
<p>Not ideal as you can&#8217;t now see the first 80px of the section.</p>
<p>I racked my brain for a while previously when I came up with the design and again when redoing it how to get over this. First idea is to give the section a top padding of about 80px but that leaves a whacking big space on the page if you just scroll down manually. Second could I give the section the padding but only when the corresponding hash link is clicked, could work but still a bit of an ugly workaround. Third, move the id from the section to somewhere at least 80px higher on the page, very ugly.</p>
<p>And then when it was really bugging me what pops up but the perfect solution in my feed reader. A fancier clean html/css method to achieve the perfect results. Using <code>:before</code> for the sections in the css.</p>
<pre>
<code>
  section:before {
  display: block;
  content: &quot; &quot;;
  margin-top: -85px;
  height: 85px;
  visibility: hidden;
  }
</code>
</pre>
<p>So thanks to <a href="http://css-tricks.com/hash-tag-links-padding/">Chris Coyier on css-tricks.com</a>. At the bottom he points out there can be difficulties under certain circumstances which <a href="http://nicolasgallagher.com/jump-links-and-viewport-positioning/">Nicolas Gallagher has addressed</a>.</p>
<p>For my part the simple version above works for the main browsers for the site I&#8217;ve used it on &#8211; as you can see on any of the <a href="http://www.jonrauhouse.com/discography/">Solo Recording</a> pages on Jon&#8217;s site &#8211; so perfect.</p>
<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2010/12/16/updating-jonrauhouse-com-and-solving/">Toxic Web &#8594;</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.toxic-web.co.uk/blog/2010/12/16/updating-jonrauhouse-com-and-solving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strange qq829.com referrer&#8230;</title>
		<link>http://www.toxic-web.co.uk/blog/2010/04/22/strange-qq829-com-referrer/</link>
		<comments>http://www.toxic-web.co.uk/blog/2010/04/22/strange-qq829-com-referrer/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 12:58:30 +0000</pubDate>
		<dc:creator>Toxic Web</dc:creator>
				<category><![CDATA[Teh Interweb]]></category>
		<category><![CDATA[Toxic Web]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[adverts]]></category>
		<category><![CDATA[China]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[Sites]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[virus]]></category>
		<category><![CDATA[websites]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.toxic-web.co.uk/?p=1595</guid>
		<description><![CDATA[...stats. Noticed a few days back that all of a sudden that top of this sites stats everyday seemed to from this weird address I hadn't heard of before...<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2010/04/22/strange-qq829-com-referrer/">Toxic Web &#8594;</a></p>]]></description>
				<content:encoded><![CDATA[<p>&#8230;stats.</p>
<p>Noticed a few days back that all of a sudden that top of this sites stats everyday seemed to from this weird address I hadn&#8217;t heard of before&#8230;</p>
<pre>qq829.com/web_stat.asp?dn=toxic-web.co.uk</pre>
<p>Now being the curious type I started to wonder what it was all about &#8211; Alfie &#8211; but being the suspicious type I didn&#8217;t just click it, like a number of folks seem to have done, to find out, but a quick Google and up comes a number of sites where people are asking the same questions. Where&#8217;s it from and what&#8217;s it doing.</p>
<p>So a quick squizz at this <a href="http://www.google.com/support/forum/p/Google+Analytics/thread?tid=753964c1b74e57d4&#038;hl=en">Google analytics forum thread</a>, looks to have some answers. China is teh answer to the first question but is it just old fashioned referrer spam or is it something more malicious. Well it may look like it&#8217;s a good job that I didn&#8217;t click the link to check. Much talk of malware. More details on what precisely&#8230;</p>
<blockquote>
<p>..it seems that this may be a new variant of trojan.adclicker, as reported by Threatexpert, which places cookies on the user&#8217;s computer then generates false hits on various websites and displays malicious adverts over the top of a website&#8217;s pages&#8230;</p>
<p>It is also believed that if a webmaster clicks on the link via their logs, it displays the animated graph and possibly tries to download malicious software onto their computer. Some webmasters have also reported changes to their website upon noticing this traffic such as php-injections. <cite><a href="http://hubpages.com/hub/qq829com-What-is-it">HubPages</a></cite></p>
</blockquote>
<p>&#8230;great. A quick look through the files on the site with FileZilla to see when they were modified to find any anomalies, thankfully nothing looked out of the ordinary.</p>
<p>So what to do about it well the IP address isn&#8217;t static so individual banning is out of the window, could of course <a href="http://www.parkansky.com/china.htm">ban the whole of China</a>, but is that overkill some Chinese folks out there might be interested in the crap posted here &#8211; I said <em>might be</em> &#8211; and my .htaccess file is big enough as it is.</p>
<p>So in the Google thread there&#8217;s a post from AurelloSoft <a href="http://www.aurellosoft.org/site/index.php/component/content/article/114.html">suggesting the fix</a> of placing the below in the.htaccess file.</p>
<pre><code>
SetEnvIfNoCase Referer &quot;^qq829&quot; TOBLOCK=1
SetEnvIfNoCase Referer &quot;^cnzz&quot; TOBLOCK=1

&lt;filesMatch &quot;(.*)&quot;&gt;
Order Allow,Deny
Allow from all
Deny from env=TOBLOCK
&lt;/filesMatch&gt;
</code></pre>
<p>I did this but the hits kept coming, until someone pointed out that it works if you put it before the WordPress code in the file and since I did that it does look to have worked. No mention in the referrers stats since.</p>
<p>If it doesn&#8217;t work for you AurelloSoft have another possible solution, again for the .htaccess file of&#8230;</p>
<pre><code>
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} cnzz.cn [NC,OR]
RewriteCond %{HTTP_REFERER} qq829.com [NC]
RewriteRule .* - [F]
</code></pre>
<p>So if you&#8217;ve got the site showing up in your stats &#8211; the toxic-web.co.uk bit will be replaced by your site domain &#8211; then don&#8217;t click it and get blocking the bastards&#8230;</p>
<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2010/04/22/strange-qq829-com-referrer/">Toxic Web &#8594;</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.toxic-web.co.uk/blog/2010/04/22/strange-qq829-com-referrer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>As well as being a big image used with CSS a sprite&#8230;</title>
		<link>http://www.toxic-web.co.uk/blog/2010/03/11/as-well-as-being-a-big-image-used-with-css-a-sprite/</link>
		<comments>http://www.toxic-web.co.uk/blog/2010/03/11/as-well-as-being-a-big-image-used-with-css-a-sprite/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 14:23:21 +0000</pubDate>
		<dc:creator>Toxic Web</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Teh Interweb]]></category>
		<category><![CDATA[Toxic Web]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[broadband]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS Sprites]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Icons]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Mint]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[Menu]]></category>
		<category><![CDATA[PNG]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[Sites]]></category>
		<category><![CDATA[Sprite]]></category>
		<category><![CDATA[Sprites]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://www.toxic-web.co.uk/?p=1560</guid>
		<description><![CDATA[...is also a type of goblin. But I'm not interested in the littlle green fella but the use of CSS Sprites to combine all the layout graphics used on Toxic Web to big images and cut down on HTTP-Requests.<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2010/03/11/as-well-as-being-a-big-image-used-with-css-a-sprite/">Toxic Web &#8594;</a></p>]]></description>
				<content:encoded><![CDATA[<p>&#8230;is also a type of goblin.</p>
<p>This sprite&#8217;s not so refreshing after an all-nighter and it likes to <a href="http://www.youtube.com/watch?v=YdPDr36qbn0">feel the wind in it&#8217;s hair</a>.</p>
<p>But less of the little green fella. Don&#8217;t know why but it&#8217;s taken me some time to actually get round to using CSS sprites for the background images here on Toxic Web, after all I think the first article I saw about them was on &#8220;<a href="http://www.alistapart.com/articles/sprites/">A List Apart</a>&#8221; and that is just over 6 years old. Added to that I&#8217;ve used them elsewhere, mainly for such things as menu lists with a rollover effect, but in a smaller individual basis.</p>
<p>In fact even on this site, with the rollover effect for the submit button on the comments form (below). Pretty much every image to do with the site&#8217;s layout is a background image so I decided to go the whole hog and create one huge image, which turned out not as workable so I ended up with two sprites.</p>
<p>I tried a couple of the Sprite generators but they didn&#8217;t exactly work out for me, the <a href="http://spriteme.org/">SpriteMe bookmarklet</a> looked like a good one &#8211; there are more in <a href="http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/">this Smashing Magazine article</a> &#8211; but in Firefox it produced a strange box that covered the working are making it partially unusable.</p>
<p>So it was down to a bit of DIY, importing the images into a big transparent background image, marking all the coordinates and making sure that there&#8217;s no overlapping when rendered on the page.</p>
<p>First one an image for all the borders (in the main content area), boxes (red &#038; orange over there on the right) and all the little icons (again over there on the right next to ever list menu oh and down below and the date on the left), it came out at 150px high and 15,000px long but was only 21kb and replaced 37 individual images that in total were about 5kb more. The second image was for the navigation menu tabs at the top, one the left and at the bottom, this weighed in at 6kb replacing 16 images totally 10kb.</p>
<p>But it wasn&#8217;t the size of the images that I was bothered about, this day and age of broadband what difference does 9kb make? Bugger all.</p>
<p>It was partly just to do it and see about getting 53 images down to just 2 and thus reducing the number of <a href="http://yuiblog.com/blog/2006/11/28/performance-research-part-1/">HTTP-Requests</a> by at least 50.</p>
<p>Using <a href="http://www.toxic-web.co.uk/blog/2010/02/25/fabio-let-me-introduce-you-this-is-your-arse/">this post as a test subject</a> (mainly because it is just text, no videos or images), <a href="http://www.getfirebug.com/">Firebug</a> shows that before the sprite there was 133 HTTP-Requests, after it was down to 78. The total download time was reduced by about 33%.</p>
<p>Then I looked at the site a Linux Mint live disc and of course even though it&#8217;s Firefox, it&#8217;s not the same as in Windows. Great, top nav is miles above where it should be. Hmmm positioned absolutely, obviously not measuring the same from the bottom of the containing div. Positioning it from the top gets it to work but of course the search box on the right drops down below where it should be.</p>
<p>And all this started when I was thinking about CSS3ing the whole site after changing back from Flock to Firefox when the latter moved to v3.6 &#8211; more on that later &#8211; and viewing a number of examples that would negate the use of images all together with nice border radii, alpha transparencies, glossy style boxes which of course won&#8217;t work in the most used browser.</p>
<p>Bloody interweb, can&#8217;t live with it, can&#8217;t hit it over the back of the head with a shovel and bury it under the patio&#8230;</p>
<p><a href="http://www.kontraband.com/show/mediaplayer.swf?iframe=true&width=500&height=376&width=590&#038;height=410&#038;displaywidth=500&#038;displayheight=360&#038;file=http://208.116.9.205/10/content/18703/450.flv&#038;backcolor=0x000000&#038;frontcolor=0xFFFFFF&#038;lightcolor=0xFF6600&#038;searchbar=true&#038;overstretch=true&#038;autostart=true&#038;shuffle=false&#038;customKb=true&#038;kb_engagement_url=http://kontraband.com/videos/18703/Banned-Sprite-Advert&#038;kb_engagement_title='Banned' Sprite Advert&#038;kb_contentid=18703" rel="pp[post-1560]" title="Click to watch video"><img src="/wp-content/uploads/blog/video-default.png" width="320" height="240" alt="Click to watch video" class="center video-center video flash flash-center" /></a></p>
<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2010/03/11/as-well-as-being-a-big-image-used-with-css-a-sprite/">Toxic Web &#8594;</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.toxic-web.co.uk/blog/2010/03/11/as-well-as-being-a-big-image-used-with-css-a-sprite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Again it was worth the admission&#8230;</title>
		<link>http://www.toxic-web.co.uk/blog/2009/09/11/again-it-was-worth-the-admission/</link>
		<comments>http://www.toxic-web.co.uk/blog/2009/09/11/again-it-was-worth-the-admission/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 13:44:39 +0000</pubDate>
		<dc:creator>Toxic Web</dc:creator>
				<category><![CDATA[Jon Rauhouse]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Teh Interweb]]></category>
		<category><![CDATA[banjo]]></category>
		<category><![CDATA[Favorite]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[Glasgow]]></category>
		<category><![CDATA[guitar]]></category>
		<category><![CDATA[Kelly Hogan]]></category>
		<category><![CDATA[Middle Cyclone]]></category>
		<category><![CDATA[Neko Case]]></category>
		<category><![CDATA[Paul Rigby]]></category>
		<category><![CDATA[pedal steel]]></category>
		<category><![CDATA[Scotland]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.toxic-web.co.uk/?p=1409</guid>
		<description><![CDATA[...price*. Again thanks to Mr. Jon Rauhouse I got to see some damn fine music in the form of the Neko Case band in Glasgow on Monday for a very reasonable admittance, actually managed some photos and videos this time.<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2009/09/11/again-it-was-worth-the-admission/">Toxic Web &#8594;</a></p>]]></description>
				<content:encoded><![CDATA[<p>&#8230;price*.</p>
<p>Neko Case was back at the &#210;&#39;ran M&#243;r in Glasgow on Monday night with her band, nearly three years since the last visit, illness prevented me getting down to the London show earlier in the year.</p>
<p><a href="http://www.flickr.com/photos/toxicweb/3904086528/" title="Neko Case - &#210;&#39;ran M&#243;r in Glasgow 2009"><img src="http://farm3.static.flickr.com/2604/3904086528_68af2abb12_m.jpg" width="" height="" alt="Neko Case - &#210;&#39;ran M&#243;r in Glasgow 2009" class="img right img-right img-ext" /></a></p>
<p>They (Neko Case: vocals, tenor guitar, 7 string acoustic &#8211; Paul Rigby: guitar &#8211; Tom V. Ray: bass double &#038; electric &#8211; Kelly Hogan: vocals &#8211; Barry Mirochnick: drums &#8211; Jon Rauhouse: pedal steel, guitar, banjo) put on another great show in the old church&#8217;s basement, from the classics, &#8220;Favorite&#8221;, &#8220;Deep Red Bells&#8221;, to tracks from her current, excellent, album &#8220;Middle Cyclone&#8221; all top notch stuff.</p>
<p>Actually remembered to use my camera before it was time for them to pack up all their gear, can view some dark blurry pics like that on the right either at <a href="http://www.jonrauhouse.com/tour/tour-pics/#oran-mor-glasgow-2009">Jon&#8217;s site</a> or on <a href="http://www.flickr.com/photos/toxicweb/sets/72157594370434470/">flickr</a>.</p>
<p>Also got a couple of videos from the sound check, here&#8217;s Jon and part of Paul&#8230;</p>
<figure class="gallery-item youtube-item video-item aligncenter video-legacy-figure youtube-legacy-figure"><span class="gallery-icon youtube-icon youtube-large-icon video-icon"><a href="http://www.youtube.com/watch?v=mQ4Nj-nsmig?width=1280&height=720" rel="pp[post-1409]" title="Click to watch video"><img src="http://img.youtube.com/vi/mQ4Nj-nsmig/0.jpg" width="480" height="360" alt="Click to watch video" title="Click to watch video" class="align video-aligncenter video-large video-img video youtube youtube-480" /><span class="img-video-overlay overlay-play"><p>click to play</p></span></a></span></figure>
<p>&#8230;the rest of Mr. Rigby&#8217;s is again either at <a href="http://www.jonrauhouse.com/tour/tour-videos/#glasgow-2009">Jon&#8217;s site</a> or on <a href="http://www.youtube.com/watch?v=1FzR6wDXMjE">YouTube</a>.</p>
<p>There&#8217;s still a number of dates to go on the tour in England, one in Scotland tonight and one in Amsterdam so if you want to hear some damn fine music <a href="http://www.jonrauhouse.com/tour/">check if there&#8217;s somewhere near you now</a>, tickets are a very reasonably price and enjoy&#8230; can&#8217;t guarantee the same price I paid, little pass with AAA meant it was a little cheaper than usual.</p>
<p>Read the rest of this crap at <a href="http://www.toxic-web.co.uk/blog/2009/09/11/again-it-was-worth-the-admission/">Toxic Web &#8594;</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.toxic-web.co.uk/blog/2009/09/11/again-it-was-worth-the-admission/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
