Tag Archive for 'blogging'

Make Alex King’s Share This Plugin Play Nice With Unwakeable

Fixed. Unwakeable 2.0 will include this fix.

My Unwakeable WordPress theme doesn’t play nicely with Alex King’s Share This WordPress plugin. When Share This is being used, the livesearch feature of Unwakeable doesn’t work in Internet Explorer 6 or 7. I’m willing to bet K2 has the same issue. I know for a fact that Redoable had this problem at one point.

Livesearch breaks because prototype.js gets loaded twice, first by Unwakeable, then again by Share This. Now, Share This uses the prototype.js that will be included in WordPress 2.1, located at wp-includes/js/prototype.js. We use a custom prototype.js file for Unwakeable. The prototype.js file in Unwakeable will still provide all the functionality needed by Share This.

The prototype.js included in Unwakeable is located at wp-content/themes/unwakeable-1.2/js/prototype.js.php. It has a .php extension because there’s some PHP code at the top that needs processed before doing anything else. The PHP code tells the browser to cache the prototype.js file, it also sends correct content-type headers so the browser knows it’s dealing with a javascript file after all is said and done.

I’ve spent a few days thinking of possible solutions that could be implemented from within Unwakeable. That’s not possible though, unfortunately. Well, it is possible, but would require filtering all the HTML output by WordPress before it’s sent to the browser so we could strip out the prototype.js included by Share This. Doing something like that would probably result in a fairly dramatic decrease in performance, so it’s not an option.

Fortunately, it’s extremely easy to modify Share This to not load prototype.js. Here’s what you need to do:

  1. Open wp-content/plugins/share-this/share-this.php
  2. Go to line 352:
    <script type="text/javascript" src="'.$wp.'/wp-includes/js/prototype.js"></script>
  3. Delete all of line 352 (code above) and you should be left with this on line 351 to line 354
    print('
    <script type="text/javascript" src="'.$url.'?akst_action=js"></script>
    <link rel="stylesheet" type="text/css" href="'.$url.'?akst_action=css" />
    ');
  4. Save share-this.php and upload it to wp-content/plugins/share-this/

That’s all there is to do to stop Share This from loading prototype.js. It sorta sucks having to ignore the prototype.js that’s already included with WordPress 2.1. I will probably start working on making Unwakeable work with the prototype.js included in WordPress 2.1.

Does anyone know if it’s possible to determine if a javascript file has been loaded, from within javascript? I ask because I think Share This will still load a second prototype.js, even if I make Unwakeable work with prototype.js from WordPress 2.1 (the one used by Share This already).

I imagine Alex will come up with a method to determine if prototype.js has already been loaded. Unless javascript won’t allow identical .js files to be loaded, in which case determining if prototype.js has already been loaded would be pointless. If that’s the case then I should be good simply making Unwakeable work with prototype.js from WordPress 2.1.

Sorry for the scattered thoughts, this has really been bugging me lately. Anyway, you should be able to make your livesearch work with Share This in Internet Explorer now. This probably applies to most K2 based WordPress themes, but I’m not sure.

Popularity: 9% [?]

WordPress 2.1 Release Candidate 2

WordPress 2.1 Release Candidate 2 is out, roughly two days after RC1 was released. I’ve been keeping up to date with 2.1 releases since beta 2. You can download 2.1 RC2 here.

The only plugin I’m having trouble with in WordPress 2.1 is the FlickrRSS plugin. Ultimate Tag Warrior also had problems with WordPress 2.1, although I didn’t experience any of them. Ultimate Tag Warrior wasn’t slightly broken, it was trashed, and would delete tags for posts. Here’s what the guys at NeoSmart had to say:

Ultimate Tag Warrior is completely broken with WordPress 2.1 and you can lose all your tags by upgrading to WordPress 2.1. In the more recent SVN revisions of WordPress 2.1, any time a comment is added, deleted, or unapproved, you lose all the tags for that particular post.

Thankfully, Christine, the Ultimate Tag Warrior author, has released a new version of UTW that’s compatible with WordPress 2.1 (I think). I believe the new release implements a fix that was published for the UTW/WP2.1 issue back in December. There still seems to be some speculation over weather or not version 3.1415926 of UTW fixes all the problems with WordPress 2.1. I never had any problems with UTW and WordPress 2.1, even with versions prior to 3.1415926. Sounds like the problem may be somehow related to Akismet from the discussion going on at the UTW forum.

Popularity: 6% [?]

WordPress 2.1 Release Candidate 1

WordPress 2.1 Release Candidate 1 is out. Ryan Boren has the details over on his blog. There’s a list of changes in 2.1 at the WordPress codex, as well as a list of plugins that are compatible with WordPress 2.1.

If you’re using WordPress 2.1 RC1, you can give feedback via the testers mailing list or at the forum for beta releases.

The WordPress developers are already thinking about WordPress 2.2. With 2.2 they’re gonna start doing time based releases, trying to release every four months:

With 2.2 we’re going to start doing time based releases. We’re going to try to do a release every four months and limit the scope of the changes to what we can realistically achieve within that timeframe. The goal is to get cool new features into user’s hands more often instead of saving them up for the one big release every year.

Popularity: 6% [?]

WordPress 2.1 MySQL Requirements

Ryan Boren posted about MySQL requirements in the upcoming WordPress 2.1 release. WordPress 2.1 will require MySQL 4.0, MySQL 4.1 won’t be required until WordPress 2.2 comes around. So, WordPress 2.1 will require at least MySQL 4.0 to function correctly. No more MySQL 3 people. If you’re still using MySQL 3, it’s far past time to upgrade.

MySQL AB discontinued support for MySQL 4.0 back in September, so it’s likely hosting companies will be upgrading to 4.1 within a year or so.

Also, WordPress 2.1 beta 3 is out, it’s running on this blog right now.

Popularity: 7% [?]

WordPress 2.1 Beta 2

I decided to make the early upgrade to WordPress 2.1. I just pulled down the latest version of beta 2 via subversion. Pretty much everything is working great so far. Out of all the plugins I use, only the Flickr RSS plugin caused problems. It refused to load anything, preventing anything below it to load. So, I promptly disabled it and everything was totally normal. I may dig into it later on tonight.

Also, I’m pleased to say that Unwakeable 1.2 works nicely with WordPress 2.1 beta 2.

I’m not gonna go into details on the changes in WordPress 2.1. Lorelle has already taken the time to put together a nice list of features we’ll see in WordPress 2.1. All thanks to Ryan Boren for blogging up a storm on what will be found in WordPress 2.1.

I’d like to thank all the WordPress developers for all their hard work. As usual, it’s very apparent the WordPress developers have put a great amount of work in WordPress 2.1. I’m really looking forward to the release of 2.1, Beta 2 has been great so far.

Popularity: 5% [?]

WordPress Theme: Unwakeable 1.2

Unwakeable 1.2 is out! You can download it or you can visit the Unwakeable page for some more details. You may also be interested in the ChangeLog, although I’ll go over a number of the changes in this post.

Probably the most notable change is the separate options for Unwakeable in the wp_options table. Let me explain a little bit. Basically, I’ve renamed the options to be unwakeable specific. Previously, Unwakeable would pick up options already set in K2 or it would just set the default values, still with the K2 names. So, if you’re upgrading to Unwakeable 1.2 from an earlier version, you’ll want to click the “Copy Options” button from the Unwakeable Options page. Clicking that button will take the options you had set in previous versions and will update them to work with Unwakeable 1.2. You can also copy your options from K2 to Unwakeable 1.2 with this button. If you’re installing Unwakeable for the first time, this probably doesn’t apply to you.

Now, if you’d rather not copy your old options over, that’s OK. You can just go into the Unwakeable Options page and set the options as you normally would. If this scares you, don’t worry, you can’t really break anything by not copying options over. Really, you can’t break anything even if you do want to copy your previous options over. If you have any questions, just get in touch with me.

I’ve also added support for two more plugins, Landing Sites and Gregarious. Gregarious is a replacement for the Digg This Reloaded plugin, which is now dead. Unwakeable 1.2 still has support for the Digg Integrator plugin also. I suggeset you use Gregarious if you want Digg buttons on your pages. It makes use of the new Digg API where Digg Integrator loads Digg buttons in an iframe, not the ideal way to display Digg buttons these days.

Now, you may be wondering why I built in support for Gregarious. Gregarious has a feature called auto-append that will automatically place a Digg button on your page. However, that feature isn’t enabled by default. And, there’s no option to place the Digg button in the sidebar with the auto-append feature. So, I added some code that will detect if auto-append is enabled. If auto-append is enabled, the Digg button isn’t displayed on the sidebar. However, if auto-append isn’t enabled, the Digg button will be displayed in the sidebar. That way you still have the option of displaying the Digg button in your sidebar, even if you use Gregarious.

Also, I’ve made a small fix to the CSS that should get rid of the few pixels of whitespace that were showing in the header, between the black and gray sections. The black in the header is now flush with the right side of the page. You can see what it looked like previously in this image. And you can see it fixed in this image (or right here on this blog). I’d like to thank Jason for pointing out that whitespace.

Is there anything you guys would like to see in the next version of Unwakeable? Could be anything from support for a plugin to design changes. Anything? Anybody?

Enjoy this new version and let me know if you have any problems getting Unwakeable functioning properly. I will provide almost unlimited support for people having issues with Unwakeable. Although, I won’t always be able to support Unwakeable if you’ve made numerous changes to the CSS or PHP for your site.

And lastly, a big “thank you” to everyone who is using Unwakeable. I never anticipated that this theme would become so popular. At my last rough count, there’s about 300 blogs using Unwakeable, I expected maybe 20. :) Thanks again everyone for your support! It’s now far past my bed time…

Who would have thought that a theme like Unwakeable could help so many bloggers with easy web development by incorporating clever web design and simple search engine optimization. With the free installation of WordPress that comes with most web hosting packages, anyone with a desire to make their mark on the web can do so in style.

Popularity: 17% [?]



cheap xbox 360 games - buy from zavvi
cheap xbox 360 games - zavvi

mobile phones - Web Design - Personal Loans - Loans - Debt Consolidation - Best Credit Cards
Search Engine Optimisation - Mobile Phone - Bike Insurance - Landlords Insurance - Search Engine Marketing - Mobile Phone