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:
    
    
  3. Delete all of line 352 (code above) and you should be left with this on line 351 to line 354
    print('
    
    
    ');
    
  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.

Generate Easy To Remember Random Passwords

SafePasswd is awesome. Most random password generators simply generate random combinations of numbers and letters. Those passwords are often very difficult to remember, making it difficult for users to actually put these passwords into use anywhere. That’s where SafePasswd comes into play.

The default “type” of password generated by SafePasswd is an “Easy To Remember” password. These passwords include a pseudo-word, or words comprised of combinations of letters and numbers that resemble actual words found in the English language. It’s pretty neat, and works very well. I could actually memorize a large number of the passwords generated without much trouble. Definitely much easier than remembering 8 or 10 random numbers and letters.

SafePasswd lets you choose how many characters you want your password to be. The longer the better. You can also choose several different “types” of passwords, the default being “Easy To Remember”. The other types of passwords are “Letters (A-Z)”, “Numbers (0-9)”, “Letters & Numbers (A-Z,0-9)”, “All Characters (most secure)”, and finally, “Hex (0-9, A-F)”.

[Via UNEASYsilence]

NewsAlloy Down and Out

My favorite RSS feed reader, NewsAlloy, is down for an unknown amount of time. This message is currently being displayed on the NewsAlloy home page:

Unfortunately our HDD was full today. And unexpectedly we have to start moving tables again.

Bad thing that we do not have any sponsor or investor and News Alloy is running only for cost of its creator(s) 🙁 .

We ARE STRONGLY LOOKING FOR PEOPLE that may help us to rasie this project to new level and help with new hardware and hosting.

Please excuse us for inconvenience.

Scheduled startup time September 6, 13:00 GMT.


The lead developer says their server costs are between $2000 and $2500 USD per month. I hope this service does indeed make a comeback, because it’s the best web based feed reader IMO. I’m all for donating money, but I feel we’ll just be back in this boat again in another few months.

Perhaps I should offer my English language services to the developers. I think they’d get more assistance if they were better able to communicate with those likely to invest money.

Widgetbox In Public Beta

This Widgetbox service looks very promising. It’s an online directory of web widgets for blogs or other web sites. Similar to Apple and Yahoo Widgets, except these are for the web.

Widgetbox also has a section where developers can submit their own widgets for others to download and use. They also have a feature that allows you to quickly manage widgets you’ve already installed.

Widgetbox is currently free and will probably always be. As the service matures, they’re likely to add more features that will be available only after paying a fee for that feature. It’s a really neat service, one that looks like it will definitely become more popular as word gets out.

[via Ajaxian]

Ajaxify Your WordPress Theme

This AjaxWP WordPress extension looks pretty interesting. It adds some AJAX functionality to your existing WordPress theme:

AjaxWp is a lightweight JavaScript enhancement that adds AJAX functionality to WordPress blogs speeding up load times, increasing the responsiveness of the user interface and giving the blog an overall cooler look.

It’s supposed to work, with minimal configuration, right out of the box. This plugin could be interesting, I’m gonna see what it can do this weekend.

[via Weblog Tools Collection]