WP phpBB Bridge: Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given

Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in wp-content/plugins/wp-phpbb-bridge/inc/widgets/wpbb_topics_widget.php on line 149
This is an error caused by the fact that the WP phpBB Bridge plugin is naively written in places.
For instance, in this case the plugin authors don't expect you to be using a socket instead of a port. Looking at the documentation for mysql-pconnect you see that you can either use combination of hostname:port or hostname:socket. Since they are pulling the setup info straight from the phpBB config file, you have little to no control over the values there (especially if already configured).
What they ought to do is check to see if $port isset() && !empt() and only then append the ":" . $port. But instead, they tag on ":" to your db host EVERY TIME. This breaks your setup if you host is defined in phpBB with a socket. Most of what I just said sort of sounds like gibberish even to me, so, basically, if you are getting this error, the problem is actually line 147. Replace the current line 147 with this:
Events Calendar Pro Nav Formatting Messed up on Empty Calendar
The Events Calendar Pro (from http://tri.be/) has a few problems.
If you are trying to figure out why a calendar with no events in that month has completely screwed up header navigation, just put this line of code inside of table.php in the top of the display_day function (put it directly before the for loop):
$thisisherebecausethispluginSUCKSdontremoveit = has_excerpt() ? TribeEvents::truncate($post->post_excerpt) : TribeEvents::truncate(get_the_content(), 30);
This basically just runs some "truncate" function on the "TribeEvents" object. For some reason this truncate function magically fixes the header nav display issues.
Teaser of things to come…

Lots going on at ChomperStomp right now.
I've been up to my eyeballs in work and in babies (3 month old and 2.5 year old).
Here's a little teaser for something big I'm working on:




That's right, custom user ratings in Continuum Coming November 1st! (will require either Continuum 1.9 or Continuum Refactor 11.1101, both coming 11/01/11)
Haven't settled on the price yet, probably between $50 and $100 depending on how much longer it takes...
Updates – BASIC jquery ui tabs rotate documentation, a note on nodejs hosting, and a note on the re-design

nodejs, jquery ui tab rotate, and re-design. Just a few quick notes...
-
I'm actively working on documentation for the jquery ui tab rotation plugin. I've (finally) got a very basic working example up.
The plugin is stupidly easy to use:
$("#tabbedElement").tabs().tabs("rotate", 4000, true);
Note that you MUST first call tabs() before you can add the rotation with .tabs("rotate", [ms], [rotate]). Also note that as of right now none of those params are optional! You can also call .tabs("pause") and .tabs("unpause") to start and stop the rotation. You can instantiate a rotating element that starts as "paused" by passing in false for the [rotate] param.We use this plugin at FinishLine.com, and we are always on the most recent stable release of both jquery and jquery UI, which means that this plugin is nearly always guaranteed to work with the newest version of both. I'll be posting updates to this blog whenever there is anything to report. The plugin's official "homepage" is right here.
-
Node.JS is a server side implementation of JavaScript. It is basically PHP or ASP or [name your server side language of choice here] but with JavaScript. This fulfills Knuth's 3rd law, which states that any code that can be written will eventually be written in JavaScript, which fulfills Knuth's 4th law which states that Knuth's 3rd law will change languages every 10 years. In case you were wondering, Knuth's 2nd law is that a 12% improvement is easily obtainable and should not be marginalized, which compliments while nearly contradicting Knuth's 1st law, which states that premature optimization is the root of all evil.
ANYWAYS, I'm working on something FUN in node.js. If it works out, it's gonna be BIG. If not, you'll never hear about it again, lol. But that's not what I want to talk about. This is a quick note to make mention of the fact that if you are looking for a node.js server, they are out there. You don't have to roll your own. Check out no.de, or this stackoverflow question or this page on the project's wiki for hosting options.
-
And last but not least, you may notice that I have re-designed the blog. I'm now using a PREMIUM wordpress theme created by my good friends over at outerspiceweb.com. It's called Continuum, and it is spectacular. It is their newest offering.
I'm doing some work with it, so I installed it here to help me figure out how it works and debug and develop on it, but I like it so much I think I'll just leave it up. You too can have this rad-tacular theme by heading over to its page on themeforest.
- Oh, and one final thing. I am actually working on upgrading status-bar calculator for Firefox 4.0. I'm having trouble, I have no idea why it's not working, but when I figure it out there will be a write-up here.
Exploring jQuery getScript, or “How I created the jQuery getScriptLite plugin”!
I set out to discover how the getScript function in jQuery works today. Here is what I found. This post sort of illustrates just how easy it is to dig into the jQuery source and really learn the library.
The first thing I did is hop over to github and pop open the source for the 1.3.2 release:
http://github.com/jquery/jquery/tree/1.3.2/src
Since getScript() is an AJAX function, I naturally clicked on "ajax.js". On line 109 I found:
Oh wow! It's just a convenience method! It doesn't do anything magical at ALL. It simply calls $.get().
Now, I could have stopped there, but for fun, let's go deeper. On line 93 I found the get() function:
Ok, so get() is really just a convenience method for ajax(), so let's look for that. Line 25, the ajax() function:
Wait, that's not the one! I don't really know how this works, but that can't be the one because it strips out the script tags. I find another one later on on line 170 that goes all the way to line 451. Way down on line 253 it seems to handle the actual script loading:
Aha! Clever. Creates a script tag and sets it's source to the one we specified and then on line 278 appends it to the head of the document, I'm assuming at that point running the script because two lines later it returns out of the function:
So, there you have it! It would almost seem that you could do the same thing by:
In fact, that seems to work just fine. Hrm... Fork me on github and/or get the plugin!





