<?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"
	>

<channel>
	<title>Designs by Calvin Blog &#187; php</title>
	<atom:link href="http://designsbycalvin.com/blog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://designsbycalvin.com/blog</link>
	<description>Maine based design blog and design info for non-profit organizations.</description>
	<pubDate>Tue, 02 Sep 2008 02:52:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Using BBClone with WordPress</title>
		<link>http://designsbycalvin.com/blog/2007/12/using-bbclone-with-wordpress/</link>
		<comments>http://designsbycalvin.com/blog/2007/12/using-bbclone-with-wordpress/#comments</comments>
		<pubDate>Fri, 28 Dec 2007 00:47:25 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
		
		<category><![CDATA[php]]></category>

		<category><![CDATA[web design]]></category>

		<category><![CDATA[wordpress hacks]]></category>

		<category><![CDATA[bbclone]]></category>

		<category><![CDATA[counter]]></category>

		<category><![CDATA[hack]]></category>

		<category><![CDATA[text editor]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://designsbycalvin.com/blog/2007/12/27/using-bbclone-with-wordpress/</guid>
		<description><![CDATA[I love using BBClone as a quick on the fly page counting system. BBClone is a website counter written in php and gives the user a quick summary of who is on their site and where that visitor came from.
Note:
This post will be very technical assuming the reader has a basic understanding of BBClone and [...]]]></description>
			<content:encoded><![CDATA[<p>I love using <a href="http://bbclone.de/" title="BBClone PHP Stats Program" target="_blank">BBClone</a> as a quick on the fly page counting system. BBClone is a website counter written in php and gives the user a quick summary of who is on their site and where that visitor came from.</p>
<p id="note"><strong>Note:</strong><br />
This post will be very technical assuming the reader has a basic understanding of BBClone and the ability to edit your blog&#8217;s source code with a text editor.</p>
<p>For starters this is the snippet of code you will need:</p>
<p id="code"> &lt;?php<br />
define(&#8217;_BBC_PAGE_NAME&#8217;, <font color="#993300"><strong>$_SERVER['REQUEST_URI']</strong></font>);<br />
define(&#8221;_BBCLONE_DIR&#8221;, &#8220;<strong><font color="#008000">../website/bbclone/</font></strong>&#8220;);<br />
define(&#8221;COUNTER&#8221;, _BBCLONE_DIR.&#8221;mark_page.php&#8221;);<br />
if (is_readable(COUNTER)) include_once(COUNTER);<br />
?&gt;</p>
<p>There are two parts to this code that make it work with WordPress. The first is on the first line and is dark red. <font color="#993300"><strong>$_SERVER['REQUEST_URI']</strong></font> will display this when a visitor hits a page:</p>
<p><img src="http://designsbycalvin.com/blog/wp-content/uploads/2007/12/bbclone_blog.jpg" alt="bbclone sample" /></p>
<p>This is the complete path to the page minus the root directory.</p>
<p id="note"><strong>Note:</strong><br />
If you are familiar with BBClone those stats will make sense. For readers not familiar with BBClone this tells me I had a hit to my Changing Measurements Shortcut in InDesign blog post with referer digg.com and with a search query of indesign.</p>
<p>The green text on line two:  <strong><font color="#008000">../website/bbclone/</font></strong>  is the path where bbclone will write to.  This will be different depending what directory contains the bbclone files.</p>
<p>I have not been able to get it to work except when adding the code manually to the source code of each page in my blog.</p>
<p>What I did was opened the following pages in a <a href="http://www.pspad.com/en/" title="php text editor" target="_blank">php text editor</a>: 404.php, archive.php, index.php, links.php, page.php, search.php, single.php and then looked for this code:</p>
<p id="code"> &lt;?php get_sidebar(); ?&gt;<br />
&lt;?php get_footer(); ?&gt;</p>
<p>I placed the snippet of code directly after the get_footer() function. When I tried to place the code in the actual footer.php file all I received was error messages, so this was the next best thing.</p>
<p>Good luck, leave a comment if you get stuck and I will try to help debug.</p>



Share and Enjoy:


	<a rel="nofollow" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F&amp;title=Using%20BBClone%20with%20WordPress" title="Digg"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.designfloat.com/submit.php?url=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F&amp;title=Using%20BBClone%20with%20WordPress" title="Design Float"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/designfloat.gif" title="Design Float" alt="Design Float" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F&amp;title=Using%20BBClone%20with%20WordPress" title="del.icio.us"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F&amp;t=Using%20BBClone%20with%20WordPress" title="Facebook"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F&amp;title=Using%20BBClone%20with%20WordPress" title="Mixx"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F&amp;title=Using%20BBClone%20with%20WordPress" title="Google"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google" alt="Google" class="sociable-hovers" /></a>
	<a rel="nofollow" href="mailto:?subject=Using%20BBClone%20with%20WordPress&amp;body=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F" title="E-mail this story to a friend!"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/email_link.png" title="E-mail this story to a friend!" alt="E-mail this story to a friend!" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.furl.net/storeIt.jsp?u=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F&amp;t=Using%20BBClone%20with%20WordPress" title="Furl"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/furl.png" title="Furl" alt="Furl" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F&amp;title=Using%20BBClone%20with%20WordPress&amp;source=Designs+by+Calvin+Blog+Maine+based+design+blog+and+design+info+for+non-profit+organizations.&amp;summary=I%20love%20using%20BBClone%20as%20a%20quick%20on%20the%20fly%20page%20counting%20system.%20BBClone%20is%20a%20website%20counter%20written%20in%20php%20and%20gives%20the%20user%20a%20quick%20summary%20of%20who%20is%20on%20their%20site%20and%20where%20that%20visitor%20came%20from.%0D%0A%0D%0ANote%3A%0D%0AThis%20post%20will%20be%20very%20technical%20assum" title="LinkedIn"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow" href="javascript:window.print();" title="Print this article!"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/printer.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F&amp;title=Using%20BBClone%20with%20WordPress" title="Reddit"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F&amp;title=Using%20BBClone%20with%20WordPress" title="StumbleUpon"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://technorati.com/faves?add=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F" title="Technorati"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://twitthis.com/twit?url=http%3A%2F%2Fdesignsbycalvin.com%2Fblog%2F2007%2F12%2Fusing-bbclone-with-wordpress%2F" title="TwitThis"><img src="http://designsbycalvin.com/blog/wp-content/plugins/sociable/images/twitter.png" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://designsbycalvin.com/blog/2007/12/using-bbclone-with-wordpress/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
