Tag Archive for 'javascript'

Unwakeable: The Future And WordPress 2.3

I’ve waited far too long to post an update on Unwakeable 2.0 and it’s status, so here it is, almost. First, I’d like to address the issues with the current Unwakeable release (version 1.2.1) and WordPress 2.3. There’s a few issues, although most of them are fairly minor.

1. Tags: Unwakeable 1.2.1 does not support the new tagging system in WordPress 2.3. If you’re using the new tagging system, your tags will not be displayed. Ultimate Tag Warrior still works just fine with Unwakeable 1.2.1 and WordPress 2.3.

2. Prototype: Livesearch (and probably rolling archives) don’t work with WordPress 2.3. I really have no idea why, it’s probably a combination of a few things. One major contributor is probably the fact that WordPress 2.3 likes jQuery instead of Prototype, and Unwakeable relies heavily on Prototype for it’s ajax effects, such as livesearch, rolling archives, and live commenting. I only use livesearch, so I can’t say for certain if rolling archives and live commenting were truly broken. All I know is Firefox CPU usage skyrockets when loading this site when livesearch is enabled.

3. Archives Page: The archives page is slightly broken, it displays an error similar to this at the top:

WordPress database error: [Table 'tlongren_wordpress.wp_categories' doesn't exist]

That happens because Unwakeable 1.2.1 doesn’t know about the new taxonomy schema in WordPress 2.3. WordPress 2.3 does away with three tables, categories, post2cat, and link2cat. Those tables are replaced by three new tables that, when combined, offer much greater flexibility in handling post categories and blogroll categories. I think this new schema handles tags as well.

4.Tag Archives: This may be unique to this site, I haven’t tested, but whenever you try to visit a tag archive (my unwakeable tag archive for example), a 404 is received. Obviously, it should display all the posts with the given tag. Can anyone using Unwakeable 1.2.x confirm this is also broken on their WordPress 2.3 site?

5. Unknowns: There’s probably lots of broken things I’m not aware of. K2 Sidebar Modules may very well be one of them. I really doubt they work 100% because they make some use of categories. If you’ve got anything I’ve missed, please let me know about it so I can make sure it’s working in Unwakeable 2.0. One thing that DOES work that I entirely expected to be broken are the category archives. I was ready for all sorts of errors when trying to view a category archive, like the Unwakeable category archive, but they display exactly as they did with WordPress 2.2.x. Please let me know if you’re aware of any other incompatibilities between Unwakeable 1.2.x and WordPress 2.3.
Continue reading ‘Unwakeable: The Future And WordPress 2.3′

Popularity: 18% [?]

WordPress and Prototype

Lots of people have searching about wordpress and prototype.js and have been lading at my post about Alex King’s Share This plugin and prototype.js. At the time I made that post, I wasn’t aware of the wp_enueque_script() function in WordPress 2.1.

Making use of wp_enqueue_script will ensure that your script is only loaded once. It’s really handy, hopefully everyone that uses prototype in their theme or plugin will start using wp_enqueue_script to load the prototype.js file. To load prototype, you’d use wp_enqueue_script like so:

<?php wp_enqueue_script('prototype'); ?>

Prototype isn’t the only script that can be loaded with wp_enqueue_script. Take a look in wp-includes/script-loader.php to see some of the other scripts that wp_enqueue_script can load by default.

Popularity: 10% [?]

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% [?]

Mint: Fresh Visitor Tracking

Mint is wonderful. It has been so far at least. Mint is a fairly new website stats package written by the author of ShortStat, Shaun Inman.

Introducing Mint: The web is listening to what you have to say. Admiring your design. Talking about your product. Mint helps you identify where the most interest is being generated and over what.

Mint provides a fresh look at your site. It is concise, flexible and timely. And to sweeten the deal, this delicious little bundle of PHP, MySQL, and JavaScript joy is referrer-spam-proof.

I’ve only been using Mint for a few hours, but I’ve been looking at it for the last week or so. After wp-shortstat started causing really slow page loads, I wasn’t really using anything to log stats. I do use a couple other stats related WordPress plugins, but nothing that shows recent referers or client information in a pleasant way.

Typically, I wouldn’t buy a piece of software like this. There’s gotta be a couple thousand different web stats applications that are free. A large majority of those free apps though are either no longer being developed or the developers don’t know what they’re doing. Had Mint been more than $30/site, I wouldn’t be using it. I suspect Shaun will soon drop the price to $20 or $25. I’ve seen various people write that the cost of Mint is a little too high. I don’t know how many Mint users there are, but I’d think a lot more people would purchase if it were priced at $20. I had read enough about Mint though, that’s why I had no problem shelling out $30.

One of the best things about Mint is Pepper. Pepper is a plugin API that is supposed to make creating plugins very easy. Peppermint Tea features a variety of third party peppers (plugins), among other things, for Mint. One pepper I’m looking forward to trying out is Fresh View. Fresh View uses SVG images to help visualize Mint stats, unfortunately it’s only available for the development version of Mint. I believe it’s one of the few Peppers that work with Mint 1.2+, which is still the development version.

Some of the best currently available peppers can be found in a post Paul Stamatiou made at his blog.

A major motivator in my decision to purchase Mint was the ease in which it can be integrated with WordPress. The WP-Mint WordPress plugin does away with the need to add the tracking javascript to theme header files. So, you can switch themes in WordPress as much as you like without having to add the Mint tracking code to the header file of each theme. The Mint support forum has detailed instructions for setting Mint up to track your WordPress install.

All in all I’m very happy with Mint. I’ll post some screenshots within the next few days. If you’re interested, Adam at shibbyonline has a pretty all-inclusive post about Mint, from purchase to installing Peppers.

Linked at Basil’s Blog, Outside The Beltway, and Mudville Gazette.

Popularity: 8% [?]

Google Reader

Google announced Google Reader at the Web 2.0 Conference. It’s supposed to make it easier to manage lots and lots of feeds. Check out the tour for more on how the whole thing works.

I’ve used it a little, not much yet though as it seems to be running incredibly slow at the moment. I really like how it shows your different feeds and how it displays articles from the feed. It’s got a nice interface but needs a lot of little things done to it. There’s really no confirmation after you click the “subscribe” button, when you go back to your Reader home, you’ll be notified of feeds you’ve recently subscribed to.

Hopefully it’s not truly as slow as it currently is. There’s no way in hell I could use it at this speed. It looks fun though. Thanks to Matt for the news. Om Malik’s Broadband Blog and Between The Lines have the news too.

UPDATE: I think Google Reader was getting hammered with requests earlier. It’s much snappier now and has an interface very similar to that of Gmail. I like it, I dun care what anyone says. I still love you Google, dun listen to all those haters. I’ve already forgotten about the failed web accelerator…

Popularity: 3% [?]

Ning

Lastnight, Marc Andresson (Co-Founder of Netscape) and his people released Ning. What is Ning you may ask?

Ning is a free online service (or, as we like to call it, a Playground) for people to build and run social applications. Social “apps” are web applications that enable anyone to match, transact, and communicate with other people.

Our goal with Ning is to see what happens when you open things up and make it easy to create, share, and discover new social apps. These might include for any city, your own take on Craigslist…for any passion, your own take on Match.com…for any interest, your own take on Zagat…for any event, your own take on Flickr…for any school, your own take on the Facebook…for any topic, your own take on del.icio.us…for any mammal, your own take on Hot or Not or Kitten War.

You choose the app, decide for whom it’s most relevant, create the categories, define the features, choose the language - or just clone an app that’s already up and running on Ning - and be on your way.

Check out SiliconBeat for more. To me, it basically sounds like a framework for building new applications that gather information from many different sources. Or maybe a method for combining select pieces of a service into one larger service.

Richard MacManus, over at Web 2.0 Explorer makes a good point in that the API provided by various web services will become very important. Jeff Clavier points out this could end up being the meta-framework for building social media applications.

Should make for some interesting applications in the near future. All this in the move to Web 2.0, which I find to be mostly a marketing ploy. Web 2.0 can’t come about until the security is there and everyone has reliable and fast internet access.

Popularity: 2% [?]



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

mobile phones - Web Design - Loans - Credit Card - Mortgage - Vegas Hotel
Search Engine Optimisation - Mobile Phone - Bike Insurance - Landlords Insurance - Search Engine Marketing - Mobile Phone