<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for The Home of B. A. Shelton (formerly zancarius.com)</title>
	<atom:link href="http://bashelton.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://bashelton.com</link>
	<description>Technology enthusiast gone rambling lunatic!</description>
	<lastBuildDate>Mon, 25 Feb 2013 04:55:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
	<item>
		<title>Comment on Musing about&#8230; Prepared Statements by Jonah H. Harris</title>
		<link>http://bashelton.com/2012/10/musing-about-prepared-statements/comment-page-1/#comment-68099</link>
		<dc:creator>Jonah H. Harris</dc:creator>
		<pubDate>Mon, 25 Feb 2013 04:55:36 +0000</pubDate>
		<guid isPermaLink="false">http://bashelton.com/?p=2145#comment-68099</guid>
		<description>&lt;cite&gt;Also, let’s start using prepared statements a little more often.&lt;/cite&gt;

Hell yes! Our default programming language may be PHP, but we require all queries to be parameterized in one way or another. Postgres, our default database, supports both parameterized as well as prepared statements; so we get to choose the right method for the job. Unfortunately, run-of-the-mill PHP developers don&#039;t seem to take proper database abstraction and usage into account when architecting their applications. If only PDO didn&#039;t suck. Regardless, I wrote a custom, PDO-compatible, wire-level Postgres driver in native PHP  which performs better than the C implementation.

Thanks for the post: it was great to read!</description>
		<content:encoded><![CDATA[<p><cite>Also, let’s start using prepared statements a little more often.</cite></p>
<p>Hell yes! Our default programming language may be PHP, but we require all queries to be parameterized in one way or another. Postgres, our default database, supports both parameterized as well as prepared statements; so we get to choose the right method for the job. Unfortunately, run-of-the-mill PHP developers don&#8217;t seem to take proper database abstraction and usage into account when architecting their applications. If only PDO didn&#8217;t suck. Regardless, I wrote a custom, PDO-compatible, wire-level Postgres driver in native PHP  which performs better than the C implementation.</p>
<p>Thanks for the post: it was great to read!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on setuptools Tutorial: Getting Started (Part 1 of 2) by Jonathan</title>
		<link>http://bashelton.com/2009/04/setuptools-tutorial/comment-page-1/#comment-60150</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Tue, 15 Jan 2013 03:59:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.zancarius.com/?p=345#comment-60150</guid>
		<description>This was a very helpful tutorial. Thank you so much!</description>
		<content:encoded><![CDATA[<p>This was a very helpful tutorial. Thank you so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Annoyances: vBulletin 4 Template Hooks by Benjamin</title>
		<link>http://bashelton.com/2011/02/annoyances-vbulletin-4-template-hooks/comment-page-1/#comment-55811</link>
		<dc:creator>Benjamin</dc:creator>
		<pubDate>Fri, 07 Dec 2012 19:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://bashelton.com/?p=1906#comment-55811</guid>
		<description>@Dave: Specifically, which statistics? &lt;i&gt;Just&lt;/i&gt; the currently logged in users or everything in the &quot;what&#039;s going on&quot; box?

Taking a quick look at it (it&#039;s a bit busy for me this time of year!), what I&#039;d suggest doing is to take a look at the FORUMHOME template. Do a text search for &quot;what&#039;s going on&quot; and you&#039;ll find a comment followed by a DIV containing a few variables. Those variables will be the ones you want (e.g. &lt;code&gt;{vb:raw totalonline}&lt;/code&gt;). However, you can&#039;t just move those variables into the &lt;b&gt;footer&lt;/b&gt; template as they&#039;re not defined (relevant code: includes/class_bootstrap.php ~line 495).

Instead, there are two possible solutions. I have no idea if they&#039;ll work.

First, you can try using &lt;a href=&quot;https://www.vbulletin.com/forum/entry.php/2387-Pushing-your-variables-to-vBulletin-4-templates&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;vB_Template::preRegister(&#039;footer&#039;, &lt;statistics variables here&gt;)&lt;/a&gt; and then add what you like to the footer template. This may be the easiest solution but it&#039;s also the most prone to breakage, and you&#039;ll probably want some logic (if statements, mostly) to detect whether or not the variables are set. This is mainly because they aren&#039;t defined everywhere.

Second, you can probably use the &lt;code&gt;template_hook&lt;/code&gt; to hold some pre-rendered templates containing what you&#039;d like after you&#039;ve pinched the values you need and passed them into your template. This solution is a bit more work, but I would classify it as the more &quot;correct&quot; solution.

Of course, both of these will only work for some pages (forumdisplay, forumhome, and showthread specifically), so with the second solution, you might need some additional logic that detects which your script is on. The &lt;b&gt;THIS_SCRIPT&lt;/b&gt; constant can help. Unfortunately, the statistics you want are only defined in a few front-controller scripts. Since they&#039;re not defined everywhere, you might run into some minor issues.

I suspect the reason it may be difficult to find an answer for what you&#039;re wanting to do is because moving those concepts into the footer isn&#039;t as straight forward as it might seem at first blush. There&#039;s no real concept of &quot;global&quot; template variables in vBulletin 4.x as far as I know, so you&#039;ll probably have to make do with &lt;code&gt;preRegister&lt;/code&gt;.

&lt;hr&gt;

@Alex Thanks! The vBulletin documentation is pretty sparse, and it seems that the only way to find most solutions to problems beyond the most basic ones is to examine the sources yourself.</description>
		<content:encoded><![CDATA[<p>@Dave: Specifically, which statistics? <i>Just</i> the currently logged in users or everything in the &#8220;what&#8217;s going on&#8221; box?</p>
<p>Taking a quick look at it (it&#8217;s a bit busy for me this time of year!), what I&#8217;d suggest doing is to take a look at the FORUMHOME template. Do a text search for &#8220;what&#8217;s going on&#8221; and you&#8217;ll find a comment followed by a DIV containing a few variables. Those variables will be the ones you want (e.g. <code>{vb:raw totalonline}</code>). However, you can&#8217;t just move those variables into the <b>footer</b> template as they&#8217;re not defined (relevant code: includes/class_bootstrap.php ~line 495).</p>
<p>Instead, there are two possible solutions. I have no idea if they&#8217;ll work.</p>
<p>First, you can try using <a href="https://www.vbulletin.com/forum/entry.php/2387-Pushing-your-variables-to-vBulletin-4-templates" target="_blank" rel="nofollow">vB_Template::preRegister(&#8216;footer&#8217;, <statistics variables here>)</statistics></a> and then add what you like to the footer template. This may be the easiest solution but it&#8217;s also the most prone to breakage, and you&#8217;ll probably want some logic (if statements, mostly) to detect whether or not the variables are set. This is mainly because they aren&#8217;t defined everywhere.</p>
<p>Second, you can probably use the <code>template_hook</code> to hold some pre-rendered templates containing what you&#8217;d like after you&#8217;ve pinched the values you need and passed them into your template. This solution is a bit more work, but I would classify it as the more &#8220;correct&#8221; solution.</p>
<p>Of course, both of these will only work for some pages (forumdisplay, forumhome, and showthread specifically), so with the second solution, you might need some additional logic that detects which your script is on. The <b>THIS_SCRIPT</b> constant can help. Unfortunately, the statistics you want are only defined in a few front-controller scripts. Since they&#8217;re not defined everywhere, you might run into some minor issues.</p>
<p>I suspect the reason it may be difficult to find an answer for what you&#8217;re wanting to do is because moving those concepts into the footer isn&#8217;t as straight forward as it might seem at first blush. There&#8217;s no real concept of &#8220;global&#8221; template variables in vBulletin 4.x as far as I know, so you&#8217;ll probably have to make do with <code>preRegister</code>.</p>
<hr />
<p>@Alex Thanks! The vBulletin documentation is pretty sparse, and it seems that the only way to find most solutions to problems beyond the most basic ones is to examine the sources yourself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Annoyances: vBulletin 4 Template Hooks by Alex Luneburg</title>
		<link>http://bashelton.com/2011/02/annoyances-vbulletin-4-template-hooks/comment-page-1/#comment-55282</link>
		<dc:creator>Alex Luneburg</dc:creator>
		<pubDate>Thu, 06 Dec 2012 14:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://bashelton.com/?p=1906#comment-55282</guid>
		<description>I absolutely love you for this, I have been banging my head against a wall and getting nowhere with the vBulletin docs and this saved me.
I can now see what I was expecting!</description>
		<content:encoded><![CDATA[<p>I absolutely love you for this, I have been banging my head against a wall and getting nowhere with the vBulletin docs and this saved me.<br />
I can now see what I was expecting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Annoyances: vBulletin 4 Template Hooks by Dave</title>
		<link>http://bashelton.com/2011/02/annoyances-vbulletin-4-template-hooks/comment-page-1/#comment-53997</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Tue, 04 Dec 2012 10:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://bashelton.com/?p=1906#comment-53997</guid>
		<description>Hey

Came across your website to find similar answers. I want to have the board stats in the footer of my vB. Example to have this shown with others: {vb:raw numbermembers}.

When I use parse_template with the php code, I navigate to my forum but only see the footer. Can you help?</description>
		<content:encoded><![CDATA[<p>Hey</p>
<p>Came across your website to find similar answers. I want to have the board stats in the footer of my vB. Example to have this shown with others: {vb:raw numbermembers}.</p>
<p>When I use parse_template with the php code, I navigate to my forum but only see the footer. Can you help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Unclobber your Last Session in Google Chrome by Andrew</title>
		<link>http://bashelton.com/2011/06/how-to-unclobber-your-last-session-in-google-chrome/comment-page-1/#comment-45089</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Fri, 16 Nov 2012 17:12:59 +0000</pubDate>
		<guid isPermaLink="false">http://bashelton.com/?p=1954#comment-45089</guid>
		<description>Nice. It worked for me!</description>
		<content:encoded><![CDATA[<p>Nice. It worked for me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on My Letter to the CPSC by Benjamin</title>
		<link>http://bashelton.com/2012/10/my-letter-to-the-cpsc/comment-page-1/#comment-42896</link>
		<dc:creator>Benjamin</dc:creator>
		<pubDate>Wed, 31 Oct 2012 22:46:35 +0000</pubDate>
		<guid isPermaLink="false">http://bashelton.com/?p=2217#comment-42896</guid>
		<description>I should note that this letter is largely a knee-jerk reaction in and of itself to the news I heard when Buckyballs announced their closure. I&#039;m upset--angry, in fact--but is it any worse a knee-jerk reaction to what the CPSC did in strong arming the magnetic toy industry as they have?

I don&#039;t think so.

Edit: I&#039;ve added a correction tonight (night of the 31st), because it turns out that Buckyballs isn&#039;t actually closing their doors. My interpretation was completely wrong as was the information I was told when I originally investigated. I apologize for the mistake. Please read my edit at the top of the letter for more information.</description>
		<content:encoded><![CDATA[<p>I should note that this letter is largely a knee-jerk reaction in and of itself to the news I heard when Buckyballs announced their closure. I&#8217;m upset&#8211;angry, in fact&#8211;but is it any worse a knee-jerk reaction to what the CPSC did in strong arming the magnetic toy industry as they have?</p>
<p>I don&#8217;t think so.</p>
<p>Edit: I&#8217;ve added a correction tonight (night of the 31st), because it turns out that Buckyballs isn&#8217;t actually closing their doors. My interpretation was completely wrong as was the information I was told when I originally investigated. I apologize for the mistake. Please read my edit at the top of the letter for more information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Unclobber your Last Session in Google Chrome by Benjamin</title>
		<link>http://bashelton.com/2011/06/how-to-unclobber-your-last-session-in-google-chrome/comment-page-1/#comment-34540</link>
		<dc:creator>Benjamin</dc:creator>
		<pubDate>Sun, 05 Aug 2012 19:01:34 +0000</pubDate>
		<guid isPermaLink="false">http://bashelton.com/?p=1954#comment-34540</guid>
		<description>@John

&lt;blockquote&gt;I use Ubuntu 12.04 and the Chrome history files are in: ~/.config/google-chrome/Default&lt;/blockquote&gt;

I originally wrote this under Windows; I now use Arch Linux exclusively but don&#039;t use Chrome regularly. Updated.

&lt;blockquote&gt;Unfortunately that didn’t work as the problem – that Chrome doesn’t restore the previous session – seems to occur when Last Session and Last Tabs are empty.&lt;/blockquote&gt;

The Last (Session&#124;Tabs) files are what contain your session information for restoration the next time you load Chrome/Chromium. Check that &quot;Settings -&gt; On Start Up -&gt; Continue where I left off&quot; is selected. If it isn&#039;t, this trick is useless because it&#039;s only intended to restore a session where you have session restore &lt;b&gt;enabled&lt;/b&gt; but you&#039;ve recently done something to clobber it.

I use Firefox now mostly because Chromium has exhibited some very frustrating bugs related to session restoration. Restoring multiple windows often doesn&#039;t work, but it seems to consistently restore a single window--if you don&#039;t clobber that session.</description>
		<content:encoded><![CDATA[<p>@John</p>
<blockquote><p>I use Ubuntu 12.04 and the Chrome history files are in: ~/.config/google-chrome/Default</p></blockquote>
<p>I originally wrote this under Windows; I now use Arch Linux exclusively but don&#8217;t use Chrome regularly. Updated.</p>
<blockquote><p>Unfortunately that didn’t work as the problem – that Chrome doesn’t restore the previous session – seems to occur when Last Session and Last Tabs are empty.</p></blockquote>
<p>The Last (Session|Tabs) files are what contain your session information for restoration the next time you load Chrome/Chromium. Check that &#8220;Settings -> On Start Up -> Continue where I left off&#8221; is selected. If it isn&#8217;t, this trick is useless because it&#8217;s only intended to restore a session where you have session restore <b>enabled</b> but you&#8217;ve recently done something to clobber it.</p>
<p>I use Firefox now mostly because Chromium has exhibited some very frustrating bugs related to session restoration. Restoring multiple windows often doesn&#8217;t work, but it seems to consistently restore a single window&#8211;if you don&#8217;t clobber that session.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Unclobber your Last Session in Google Chrome by anon</title>
		<link>http://bashelton.com/2011/06/how-to-unclobber-your-last-session-in-google-chrome/comment-page-1/#comment-34436</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Sun, 05 Aug 2012 02:21:29 +0000</pubDate>
		<guid isPermaLink="false">http://bashelton.com/?p=1954#comment-34436</guid>
		<description>That was very helpful, thanks for sharing!</description>
		<content:encoded><![CDATA[<p>That was very helpful, thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Unclobber your Last Session in Google Chrome by John</title>
		<link>http://bashelton.com/2011/06/how-to-unclobber-your-last-session-in-google-chrome/comment-page-1/#comment-32501</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 25 Jul 2012 11:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://bashelton.com/?p=1954#comment-32501</guid>
		<description>Unfortunately that didn&#039;t work as the problem - that Chrome doesn&#039;t restore the previous session - seems to occur when Last Session and Last Tabs are empty.</description>
		<content:encoded><![CDATA[<p>Unfortunately that didn&#8217;t work as the problem &#8211; that Chrome doesn&#8217;t restore the previous session &#8211; seems to occur when Last Session and Last Tabs are empty.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
