Recently I volunteered to help fix an existing project or develop an OpenID authentication plugin for the vBulletin platform. The group in need was UbuntuForums.org and I would have never known if it hadn’t been for Jorge Castro’s public request for help.
The existing plugin had been developed specifically for vBulletin 3.x, however, they are (as of writing this) in the process of upgrading their forums to vBulletin 4 especially wanted OpenID to be available when they make the upgrade. That’s where I came in.
Canonical, the company behind Ubuntu, provided me with necessary software licenses for vBulletin 4 and from there it was a lot of late nights attempting to simply get a successful OpenID process to occur.
Working a full time job doesn’t make projects like this as easy as I remember them once being… Nonetheless I was able to successful port the plugin to vB4 where there were several significant differences that took me some time to address and to be honest, the previous code was a bit more complicated to follow than it should have been.
One major change from vB3 to vB4 was the way templates work. I’d never worked with vBulletin before, but I’ve had an extensive amount of experience with phpBB and bbPress in the past. After getting over the frustration of how vBulletin prefers to store ALL template information (in the database rather than pull from template files) I was ready to begin the repair process.
This guide walks you through the necessary steps to configure the Eclipse IDE for PHP debugging. This can be very handy, especially when you’re trying to resolve an issue in a complex PHP application or plug-in.
Things you’ll need
Eclipse PHP Development Tools (PDT)
This article assumes that you are configuring Eclipse and Xdebug for development on a localhost web server. If you are not, be sure to make appropriate adjustments to accommodation your needs. Likely the only changes you will need to make will be differences in connecting to your server verses localhost.
For those that are unaware, Eclipse is a very popular IDE for developing in Java. However, Eclipse is much more powerful than that and can in fact easily be used for developing in many other languages including PHP.
Xdebug is a brilliant debugging extension designed for use with PHP. Once configured, Xdebug will allow you to remotely connect to your web server… or in my case connect to my development localhost web server. Rather than using crude echo and logging techniques to debug your PHP code, Xdebug allows you to literally step through and inspect values and function flows in real-time.
If you’ve ever made a web site and wanted it to look consistent from one browser to the next, then you’re well away of the difficulties that are involved. Fixing these sorts of styling issues can be a major annoyance, however, I like to hunt down issues on my own pages from time to time and stand up to the challenge.
One issue that I can across today was dealing with horizontal menu positioning using unordered lists (<UL>) and some positioning. The positioning wasn’t consistent between browsers or even operating systems.
I’ve dealt with spam registrations and spam posts for years now in an online forum that I host. Its a burden on the users and a burden on (especially) the owner. No one wants to use a forum that can’t seem to control spam and no one wants to have a daily routine of manually purging hundreds of posts and users either! That’s where Akismet comes into play. 😉
I’ve used it in combination with WordPress from the beginning and to-date it has blocked nearly 500k spam comments! I enjoy working with web stuff, but I enjoy hacking it together even more.. so I’ve put together a “mod” package that will harness the power of Akismet and its super easy to install! While it won’t take care of spam registrations (you’ll need something else for that), it should be able to dramatically curb spam posts!
What you need
A web server running at least PHP 5 with phpBB 3 installed (I do not support phpBB2 or lower).
An Akismet API Key (* Free for personal use, the donation bar DOES drop to $0, though donate if you wish).
A while back there was a neat little styling script being passed around that tuned the Ubuntu Forums to match the new official designs a little more closely. While its not official and no where near a perfect solution, it does dramatically improve the appearance of the forums overall.
To use this, all you have to do is download and install the Stylesheet or UserJS file and configure it in your browser! I’m using the UserJS version, but you may prefer the other. Either way, enjoy!
This is just a little hack I’ve used so I can subscribe to the “Specials” that are periodically released and published on the Steam website.
If you’re interested in letting your Feed client simplify your life by bringing the Steam updates directly to you then I suggest you subscribe to the feed that I’ve setup (via a great free service call Feed For Free).
When I searched for a feed for these Specials I came across one forum post after another asking the same thing. We all know how annoying that can be, so to remedy the situation I decided to post a solution myself. 😉
As you can see below, these pages don’t have feeds of their own, but the very awesome Feed For Free site will let you pull the updates straight into your feed reader with ease. See my Google Reader pictured below.
Hope everyone had a great Halloween this year! If you missed visiting my blog, then you also missed my Halloween theme!
Thats about as far as my Halloween decorations went (other than dressing up as a pirate) this year, but I saw a lot of great looking jack-o’-lanterns this year and some really great costumes at Moogfest! Had a blast!
Here’s a quick video of this random guy dancing during Massive Attack. 😀
We got to see MGMT, Dan Deacon, Girl Talk, Thievery Corporation, Massive Attack, Shiongle, Disco Biscuits and a few others. Overall, it was a pretty amazing Halloween weekend! If only they were all that way…
Today, The Chromium Blog has officially released their ECMAScript 3 conformance test suite in a form that is more friendly to test in your browser. The test contains over 5,000 tests (currently 5,246) and continues to grow!
The Chromium Blog has also posted some initial results among the top web browsers for Windows (emphasis is mine).
In this example, when running Sputnik on a Windows machine, we saw the following results: Opera 10.50: 78 failures, Safari 4: 159 failures, Chrome 4: 218 failures, Firefox 3.6: 259 failures and Internet Explorer 8: 463 failures.
Putting that into terms of 100% conformance rates: Opera 10.50: 98.5% successful, Safari 4: 97.0% successful, Chrome 4: 95.9% successful, Firefox 3.6: 95.1% successful and Internet Explorer 8: 91.2% successful.
Running the test myself in the latest Opera 10.50 snapshot for Linux (Build 6242) I’m seeing a solid 77, proof that Opera 10.50 is progressing still!
The Sputnik tests have been released as an open source project, so if you’re interested in providing conformance test cases to improve the future web..now is a perfect chance to get involved. 😉
If you’ve for whatever reason noticed that your WordPress website is generating errors similar to the following then I may have a solution for you.
Warning: getimagesize(/home/.some-dir/example.com/folder/httpd.www/wp-content/uploads/some-image.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/.some-dir/example.com/folder/httpd.www/wp-content/blah/blah/blah.php on line 123
I noticed that some pages that generated image information were printing errors out on my pages with private server file structures included. Generally you don’t want to see this printed out to the public. 😉
I’m not guaranteeing a fix for you, but rather what worked for me.
If you are getting an error link the one that I’ve listed above, more specifically the “failed to open stream: No such file or directory,” then you may be about to fix it in only a few minor steps.
Things you will need:
FTP (I use FileZilla)
Ability to add a new plugin to your site
Single quotes must be the normal ascii quotes. Chances are, if you copy and paste from my blog, they will be the wrong type so double check that as it could give you problems. 😉
First and foremost, make sure to backup your entire database to a safe place. I’m not liable in the case that you don’t backup your database and this procedure borks your blog (or any other case for that matter). 😉
Create a new file named “abstest.php” and upload it to your blog’s root directory after entering the following code into it: <?php define('ABSPATH', dirname(__FILE__).'/'); echo ABSPATH; ?>
Open a new browser tab and navigate to “http://www.your-website.com/abstest.php“. You should find a short page with the printout of your servers absolute path.
Check that the path provided by this test file matches the base path printed out by the getimagesize() error exactly. In my case, my server had changed slightly so the differences were similar to the following: /home/.some-dir/example.com/folder/httpd.www/ /home/example.com/folder/httpd.www/
If you find a mismatch, then you’ve found your problem and the rest is simple. If not, then my tips will most likely not solve your particular WordPress error(s).
If you’ve found a mismatch, then continue: Open a new browser tab and navigate to your phpMyAdmin interface. Select your WordPress database, then click Search. I searched all tables for a match of the path that was different, in my case it was “.some-dir/“.
If there are matches found then you need to click the SQL tab at the top (preferably in a new tab) and paste the following (making sure to edit it to match the table and fields you need) and run it to find and replace that changed part of the path. update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, ‘find this string’, ‘replace found string with this string’); For more information on SQL find and replace, either search Google or read this.
After replacing all of the affected tables and strings, your images should be properly address. You’re not done yet though.
Open WordPress Plugins and add/install a plugin named “Regenerate Thumbnails“. After installing it, make sure to activate it. 😉
In your Admin panel, find the Tools menu and expand it. You should see a menu item labeled “Regen. Thumbnails”…click it. This will open a page with a start button. Clicking this button will begin the process of correcting your thumbnail dimensions as well as other metadata. It will take some time depending on the number of thumbnails you have accumulated.
After the progress bar reaches 100% it will notify you that it is complete. You’re all done! You may need to clear your cache to refresh any pages that still generate the previous error message.
If you had any problems with the above mentioned procedure, I would suggest restoring your database using your backup copy and either trying again, paying someone to do it for you or just forgetting about it. 😉
If it works then great! If not then sorry you’ve wasted your time. It worked for me, so maybe it will work for you as well. 😀