<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Blogging Emergency&#187; Wordpress Blogging Emergencies &#8211; Wordpress Security &#8211; Wordpress Hacks</title>
	<atom:link href="http://www.bloggingemergency.com/category/premium-content/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bloggingemergency.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 11 Nov 2009 20:15:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Add jQuery Accordion Layout</title>
		<link>http://www.bloggingemergency.com/add-jquery-accordion-layout/</link>
		<comments>http://www.bloggingemergency.com/add-jquery-accordion-layout/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 20:15:09 +0000</pubDate>
		<dc:creator>Emergency Blogger</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://www.bloggingemergency.com/?p=601</guid>
		<description><![CDATA[Moving on with Part III of our five part series on creating a jQuery accordion with tabs inside.
Remember that our final goal is to create a page like this one that we created for Mox &#38; Dom.  It has tabs within an accordion.
But for Part III of this series, we&#8217;re going to just get [...]]]></description>
			<content:encoded><![CDATA[<p class="dummy">Moving on with Part III of our five part series on creating a jQuery accordion with tabs inside.</p>
<p class="dummy">Remember that our final goal is to create <a href="http://www.moxdom.com/the-goods/">a page like this one that we created for Mox &amp; Dom</a>.  It has tabs within an accordion.</p>
<p class="dummy">But for Part III of this series, we&#8217;re going to just get the accordion laid out so that it looks something like this:</p>
<h3>jQuery Accordion Demo</h3>
<div id="accordion-demo">
<h3><a href="#">Accordion One</a></h3>
<div>
<p class="dummy">Accordion One Content goes here. You can put anything you want here</p>
</div>
<h3><a href="#">Accordion Two</a></h3>
<div>
<p class="dummy">Accordion Two Content goes here. You can put anything you want here.</p>
</div>
</div>
<p class="dummy" style="padding-top: 15px;">So let&#8217;s get started</p>
<p class="dummy">There&#8217;s 2 parts to any jQuery insertion.  The HTML Layout, and the jQuery calls that reference the HTML layout.  Let&#8217;s start with the HTML layout first.</p>
<p class="dummy">Here&#8217;s the exact HTML code I&#8217;m using for the demo above. Just add this into your Wordpress post or page.</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;accordion-demo&quot;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>h3<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;#&quot;</span><span style="color: #339933;">&gt;</span>Accordion One<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>h3<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>div<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Accordion One Content goes here<span style="color: #339933;">.</span> You can put anything you want here<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span><br />
<br />
<span style="color: #339933;">&lt;</span>h3<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;#&quot;</span><span style="color: #339933;">&gt;</span>Accordion Two<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>h3<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>div<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>Accordion Two Content goes here<span style="color: #339933;">.</span> You can put anything you want here<span style="color: #339933;">.&lt;/</span>p<span style="color: #339933;">&gt;</span><br />
<br />
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></div></td></tr></tbody></table></div>
<p class="dummy">Yes, that is the exact code.  And yes, it really is this easy!</p>
<p class="dummy">Basically you have a div with an id of accordion (line #1), the H3 tags (line #&#8217;s 2&amp;7) provide the accordion titles, and the href of # in the anchor tags is used by jQuery to open and close the accordion. The div right after your H3 tags is where you put your content.</p>
<p class="dummy">See? Easy!</p>
<p class="dummy">Now let&#8217;s take a look at the jQuery call.</p>
<p class="dummy">Remember from the previous post that we created a file called accordion-tabs.js an put it into the /wp-content/themes/theme-name/js/ directory</p>
<p class="dummy">Inside of the accordion-tabs.js file all we need are the following lines of code:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>ready<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
jQuery<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#accordion-demo'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>accordion<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>3 Lines of jQuery code.   Cool, Huh?</p>
<p>And if you want to get fancy, you can add some fun options too like this:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">jQuery<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#accordion-demo'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>accordion<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>active<span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> collapsible<span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> autoHeight<span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p class="dummy">Checkout the jQueryUI docs for more options you can use.</p>
<p class="dummy">
At this point, you should have a working accordion that opens and closes, and displays all the hidden content, one panel at a time. As you can see, this can be a HUGE space saver on a busy website.
</p>
<p class="dummy">
This concludes part III, next up is part IV of our five part series, where we will introduce you to tabs. Keep an eye out for it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingemergency.com/add-jquery-accordion-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[jQuery Tabs in an Accordion Layout]]></series:name>
	</item>
		<item>
		<title>Inserting jQuery Into Wordpress</title>
		<link>http://www.bloggingemergency.com/inserting-jquery-into-wordpress/</link>
		<comments>http://www.bloggingemergency.com/inserting-jquery-into-wordpress/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 16:49:58 +0000</pubDate>
		<dc:creator>Emergency Blogger</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://www.bloggingemergency.com/?p=598</guid>
		<description><![CDATA[This is Part II of a five part series on building jQuery accordions with tabs inside the accordion. Part II will show the details of installing the necessary jQuery files into your Wordpress blog.
To start, we need to insert the jQuery core library and the jQuery UR library into your Wordpress theme, so that we [...]]]></description>
			<content:encoded><![CDATA[<p>This is Part II of a five part series on building jQuery accordions with tabs inside the accordion. Part II will show the details of installing the necessary jQuery files into your Wordpress blog.</p>
<p>To start, we need to insert the jQuery core library and the jQuery UR library into your Wordpress theme, so that we have access to all the pre-built functions that jQuery provides.</p>
<p>There are 2 different libraries that we&#8217;ll need to download, the core jQuery library, and the user interface libraries for tabs and accordions. The core jQuery library is included with the jQuery UI library download, so there&#8217;s only one file to download.</p>
<p class="dummy">Go download the <a title="Download jQuery UI Libraries" href="http://jqueryui.com/download" target="_blank">jQueryUI libraries here</a>.</p>
<p style="text-align: center;"><a href="http://www.bloggingemergency.com/wp-content/uploads/jQuery-download.png"><img class="aligncenter size-full wp-image-628" style="margin-left: 55px; margin-right: 55px;" title="jQuery-download" src="http://www.bloggingemergency.com/wp-content/uploads/jQuery-download.png" alt="jQuery-download" width="417" height="325" /></a></p>
<p class="dummy">There is a long page of options, but if you read the top paragraph, you&#8217;ll see that there is a quick download link for the current version (1.7.2 as of this writing).  I recommend the quick download to get started. You can also create your own customized version with a custom css theme and if you choose to go that route, just make sure that you have the accordion and tabs widgets selected. </p>
<p>After the files are downloaded, unzip them into a safe place on your hard drive. We will need 3 files from this download, 2 javascript files and one css file.</p>
<p>The two javascript files we&#8217;ll need are jquery-ui-1.7.2.custom.min.js and jquery-1.3.2.min.js, located in the js directory.  The css file we&#8217;ll need is called jquery-ui-1.7.2.custom.css, and is located in the css directory of the download.</p>
<p>Next step &#8211; upload the files into your theme.</p>
<p>For this tutorial, I assume you know how to use an FTP client like Filezilla and know the location of your theme in wordpress.</p>
<p>I like to create a js and css directories in my theme for my custom javascript and css stylesheets.</p>
<p>I assume for this tutorial that you will be using a structure such as /wp-content/themes/theme-name/js and /wp-content/themes/theme-name/css for the directory location of your uploaded files.</p>
<p>Go ahead and upload the two javascript files and one stylesheet now.</p>
<p>Now we&#8217;ll need to modify the header.php file in your theme.  I&#8217;ve been told that they need to go below your call to wp_head(), as shown below.</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_head<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&lt;link rel=&quot;stylesheet&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/css/jquery-ui-1.7.2.custom.css&quot; type=&quot;text/css&quot; /&gt;<br />
&lt;script type=&quot;text/javascript&quot; src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/js/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;<br />
&lt;script type=&quot;text/javascript&quot; src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/js/jquery-ui-1.7.2.custom.min.js&quot;&gt;&lt;/script&gt;</div></td></tr></tbody></table></div>
<p>Since you know that you&#8217;re going to need to add some custom code, let&#8217;s insert the call to where you&#8217;ll put that custom code for your accordion and tabs.  Don&#8217;t worry about putting anything in it, we&#8217;ll take care of that soon.</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;script src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/js/accordion-tabs.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</div></td></tr></tbody></table></div>
<p>After you&#8217;ve saved the header.php file, load up your site, and look at the source to verify that it&#8217;s there, and being found.  Firefox makes the links to .js and .css files hyperlinks, so I click on them and verify that the files are found.</p>
<p>At this point, we&#8217;ve downloaded the proper jQuery files, uploaded them into your Wordpress themes directory, and made the proper calls in the header.php, and everything should be ready to go.</p>
<p>In the next part of the series, we&#8217;re going to be creating a jQuery accordion with one simple javascript call&#8230;. stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingemergency.com/inserting-jquery-into-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[jQuery Tabs in an Accordion Layout]]></series:name>
	</item>
		<item>
		<title>The Mission: jQuery Tabs &amp; Accordions</title>
		<link>http://www.bloggingemergency.com/the-mission-jquery-tabs-accordions/</link>
		<comments>http://www.bloggingemergency.com/the-mission-jquery-tabs-accordions/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 16:41:59 +0000</pubDate>
		<dc:creator>Emergency Blogger</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://www.bloggingemergency.com/?p=593</guid>
		<description><![CDATA[This five part series will teach you how to insert a jQuery accordion into a Wordpress page or post that has jQuery tabs inside of the accordion layout.   You can see an example of a straight accordion in action here on Blogging Emergency,  and you can see a live example of tabs within [...]]]></description>
			<content:encoded><![CDATA[<p>This five part series will teach you how to insert a jQuery accordion into a Wordpress page or post that has jQuery tabs inside of the accordion layout.   You can see an example of a straight accordion in action here on <a title="Example of jQuery Accordion" href="http://www.bloggingemergency.com/wordpress-blog-install/" target="_blank">Blogging Emergency</a>,  and you can see a live example of tabs within an accordion over at <a title="Example of jQuery Tabs &amp; Accordion in Action" href="http://www.moxdom.com/the-goods" target="_blank">Mox &amp; Dom</a>.</p>
<p>Before you get all edgy that this whole jQuery / javascript thing is over your head, I want to assure you that this tutorial won&#8217;t require you to do ANY javascript programming. Just some cut and paste from my tutorial to your site.</p>
<p>If you can handle HTML and CSS, and know the file structure of Wordpress, you&#8217;re golden.</p>
<p>Ready?</p>
<p>Let&#8217;s move on to Part II &#8211; Inserting jQuery Into Wordpress.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingemergency.com/the-mission-jquery-tabs-accordions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[jQuery Tabs in an Accordion Layout]]></series:name>
	</item>
		<item>
		<title>Installing Feedburner Counts For Feedburner RSS</title>
		<link>http://www.bloggingemergency.com/installing-counts-feedburner-rss/</link>
		<comments>http://www.bloggingemergency.com/installing-counts-feedburner-rss/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 23:14:49 +0000</pubDate>
		<dc:creator>Emergency Blogger</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://www.bloggingemergency.com/?p=460</guid>
		<description><![CDATA[If you look off to the right side of the page, at the RSS subscribe section, you&#8217;ll see (well, at the time of this writing anyhow) the count of the number of RSS readers that I currently have.
I had at first tried out the FeedBurnerCount wordpress plugin, but I couldn&#8217;t ever get it to register [...]]]></description>
			<content:encoded><![CDATA[<p>If you look off to the right side of the page, at the RSS subscribe section, you&#8217;ll see (well, at the time of this writing anyhow) the count of the number of RSS readers that I currently have.</p>
<p>I had at first tried out the FeedBurnerCount wordpress plugin, but I couldn&#8217;t ever get it to register my feed count. So after digging a little deeper, I found examples that were similar to what I needed, but not quite what I was looking for.</p>
<p>What I have below is the culmination of several ideas from many authors, and piled them into one conglomeration that works as of Wordpress 2.8.5.</p>
<p>The first thing I did was to add the following into my functions.php file in my theme:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span>ABSPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'wp-includes/class-snoopy.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> feedburner_textcount<span style="color: #009900;">&#40;</span><span style="color: #000088;">$arg</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
<span style="color: #000088;">$fb</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;feedburnersubscribecount&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$fb</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'lastcheck'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span> <a href="http://www.php.net/mktime"><span style="color: #990000;">mktime</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> 600 <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$snoopy</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Snoopy<span style="color: #339933;">;</span><br />
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$snoopy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://api.feedburner.com/awareness/1.0/GetFeedData?uri=BloggingEmergency&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<a href="http://www.php.net/preg_match"><span style="color: #990000;">preg_match</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/circulation=\&quot;([0-9]+)\&quot;/'</span><span style="color: #339933;">,</span><span style="color: #000088;">$snoopy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">results</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span>1<span style="color: #009900;">&#93;</span> <span style="color: #339933;">!=</span> 0<span style="color: #009900;">&#41;</span><br />
<span style="color: #000088;">$fb</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'count'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span>1<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$fb</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'lastcheck'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mktime"><span style="color: #990000;">mktime</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
update_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;feedburnersubscribecount&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$fb</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$arg</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$fb</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'count'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">return</span>  <span style="color: #000088;">$fb</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'count'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>On line 1 we include the snoopy class, which is an open source library of functions to access other networks.</p>
<p>Line 3 declares a new function called feedburner_textcount, that takes an optional argument.  The argument can be anything you want, and if an argument is used, will return the value to be used in functions, otherwise, it will echo the result out, as is usually needed for HTML output.</p>
<p>This is also the function name that we&#8217;ll use in a bit to put the feedcount in place.</p>
<p>The rest of the code is mostly for obtaining the feed count and storing it in the database.</p>
<p>Line 18 is what checks for the input arguments.  If an argument was found, it returns the value, otherwise it echos it out (which is what you want most of the time).</p>
<p>Then to display the code in the sidebar, you&#8217;ll want to display something like this in sidebar.php:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;div&gt;<br />
&lt;p&gt;Become One Of Our&lt;/p&gt;<br />
&lt;a href=&quot;http://feeds2.feedburner.com/BloggingEmergency&quot;&gt;<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$subs</span> <span style="color: #339933;">=</span> feedburner_textcount<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ret'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$subs</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&lt;/a&gt;<br />
&lt;p&gt;Loyal RSS Readers&lt;/p&gt;<br />
&lt;/div&gt;</div></td></tr></tbody></table></div>
<p>I chose to have a return value and echo $subs (the number of subscribers), but you should also be able to do this if you want to:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span> feedburner_textcount<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>That&#8217;s really about it.  Just create your div for images/text (look at the source of mine as a starting point), and insert your feedburner_textcount() function in the right place, and your subscribers will be listed for the public to see just how popular your blog really is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingemergency.com/installing-counts-feedburner-rss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selective Stylesheets For Wordpress Pages</title>
		<link>http://www.bloggingemergency.com/selective-stylsheets-wordpress-pages/</link>
		<comments>http://www.bloggingemergency.com/selective-stylsheets-wordpress-pages/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 01:44:59 +0000</pubDate>
		<dc:creator>Emergency Blogger</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://www.bloggingemergency.com/?p=351</guid>
		<description><![CDATA[Pages in Wordpress blogs often times are created purposefully different from the rest of the blog, for instance, if one wants a separate sales page, or special event &#8211; Even certain posts might need to be look different and use a selective stylesheet.
But how do you load up a special CSS file, without having to [...]]]></description>
			<content:encoded><![CDATA[<p>Pages in Wordpress blogs often times are created purposefully different from the rest of the blog, for instance, if one wants a separate sales page, or special event &#8211; Even certain posts might need to be look different and use a selective stylesheet.</p>
<p>But how do you load up a special CSS file, without having to create special classes and ids that will muck up the original CSS file?</p>
<p>The answer lies in selective loading of a stylesheet for only the <a title="Wordpress Pages" href="http://codex.wordpress.org/Pages" target="_blank">pages</a>, <a title="Wordpress Writing Posts" href="http://codex.wordpress.org/Writing_Posts" target="_blank">posts</a>, <a title="Wordpress Category Information" href="http://codex.wordpress.org/Glossary#Category" target="_blank">categories </a>or <a title="Wordpress Author Templates" href="http://codex.wordpress.org/Author_Templates" target="_blank">author pages</a> that you want it to load for.  And the great thing is that it isn&#8217;t only for pages or posts.</p>
<p>Below are some code snippets of various selective loading for stylesheets, based on what type of selective page you&#8217;re looking for.  If you want more functions to help you be even more selective than what I&#8217;ve shown you here, checkout the <a title="Wordpress Codex on Conditional Tags" href="http://codex.wordpress.org/Conditional_Tags" target="_blank">Wordpress Codex page on Conditional Tags</a>.</p>
<p>First, locate your original stylesheet, which will look something like this:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;link rel=&quot;stylesheet&quot;<br />
href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;</div></td></tr></tbody></table></div>
<p>Or possibly even this:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;style media=&quot;screen&quot;&gt;<br />
@import url( <span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> );<br />
&lt;/style&gt;</div></td></tr></tbody></table></div>
<p>After you&#8217;ve located where your style sheet is, then you just need to decide how you want to be selective.</p>
<p><strong>On a Category Archive Page</strong></p>
<p>This is to style category archives of a particular category so that something like www.mydomain.com/category/special-category looks different from your other category archive pages. You can be selective by category id, category name, or category slug (permalink).  This makes use of the<a title="Wordpress is_Category function description" href="http://codex.wordpress.org/Conditional_Tags#A_Category_Page" target="_blank"> is_category() Wordpress function</a> to get the job done.</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #666666; font-style: italic;">// does category have ID 99?</span><br />
<span style="color: #666666; font-style: italic;">// If so, use the special CSS file</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'99'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;stylesheet&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php bloginfo('template_url'); ?&gt;/special.css&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// otherwise use the default stylesheet (style.css)</span><br />
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&lt;link rel=&quot;stylesheet&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;;<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p><strong>On a Particular Post</strong></p>
<p>This is for putting a special style on a particular post, and makes use of the <a title="Wordpress is_Single function description" href="http://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page" target="_blank">is_single() wordpress function</a>. As with other functions, you can select based on ID, Post Name, or post slug (permalink)</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #666666; font-style: italic;">// Does post have slug of cool-post-slug</span><br />
<span style="color: #666666; font-style: italic;">// If so, use the special CSS file</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_single<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cool-post-slug'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;stylesheet&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php bloginfo('template_url'); ?&gt;/special.css&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// otherwise use the default stylesheet (style.css)</span><br />
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&lt;link rel=&quot;stylesheet&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;;<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p><strong>Let Author Pages Stand Out</strong></p>
<p>Let your author pages look different by selecting a different stylesheet.  This is just like the other code selections, but uses the <a title="Wordpress is_Author function description" href="http://codex.wordpress.org/Conditional_Tags#An_Author_Page" target="_blank">is_author()</a> function.</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #666666; font-style: italic;">// Does this author have a nickname of John?</span><br />
<span style="color: #666666; font-style: italic;">// If so, use the special CSS file</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_author<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'John'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;stylesheet&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php bloginfo('template_url'); ?&gt;/special.css&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// otherwise use the default stylesheet (style.css)</span><br />
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&lt;link rel=&quot;stylesheet&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;;<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p><strong>Set Your Pages Apart</strong></p>
<p>Have a special event that doesn&#8217;t fit your blog, try using the <a title="Wordpress is_Page function description" href="http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page" target="_blank">is_page() wordpress function</a>.</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #666666; font-style: italic;">// Is the page title 'Event Page'?</span><br />
<span style="color: #666666; font-style: italic;">// If so, use the special CSS file</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Event Page'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;stylesheet&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php bloginfo('template_url'); ?&gt;/special.css&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// otherwise use the default stylesheet (style.css)</span><br />
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&lt;link rel=&quot;stylesheet&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;;<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>There are many, many more selective functions that you can use, and I highly recommend that you visit the <a title="Wordpress Codex on Conditional Tags" href="http://codex.wordpress.org/Conditional_Tags" target="_blank">Wordpress Codex on Conditional Tags </a>to see if there&#8217;s another selective function that you can use to style your wordpress blog the way you want it to look.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingemergency.com/selective-stylsheets-wordpress-pages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->