Tech from Hel
Helene's ramblings on Wordpress, jQuery and other web technologies.
rss
twitter
  • About
  • Projects

WassUp Works Well with WP Widget Cache

no comments
Posted on Apr 8 2010 by helene

WassUp users looking for ways to speed up their site or blog should try WP Widget Cache plugin.

WP Widget Cache plays nicely with Wassup because it caches only the widgets on a page and does not affect other code in the document. It caches sidebar and footer widgets and allows you to customize cache settings for each widget individually. According to the author, you can achieve up 70% improvement in your site’s performance with this plugin. After installing it on my own blog and setting a cache timeout of 24 hours (86400 seconds) on all static widgets, I saw a impressive improvement in load speed, myself.

Read More


  Tags: cache, wassup, widget, wordpress Category: Plugins

CTRL+Z Undo: The Keyboard Shortcut You Can’t Do Without

no comments
Posted on Apr 3 2010 by hellioness

There is one keyboard shortcut that everyone should know about: the universal UNDO keyboard sequence: CTRL+Z (Command+Z on the Mac).

CTRL+Z ([CTRL]-key and Z-key pressed at the same time) undoes your previous edit. Multiple CTRL+Z’s will undo multiple edits and can even restore a document to an older revision, if it was changed during the same session. It works in almost every application…text editors, graphics editors, and even in games.

I thought it was a no-brainer that everyone knew about CTRL+Z until I had a recent encounter with a young relative who was struggling to recreate a project that she had accidentally erased before saving. A few “command+Z”s (on MacBook) and the document was back and I was a hero.

Read More


  Tags: keyboard shortcut, undo, universal Category: Miscellaneous

A Fine Fix for “get_currentuserinfo undefined”

no comments
Posted on Mar 24 2010 by helene

How to Fix the Fatal Error “get_currentuserinfo() undefined” in WordPress

If you write a WordPress plugin that calls the function “get_currentuserinfo()”, you should be aware that this could trigger the fatal error, “get_currentuserinfo undefined’, in some WordPress configurations. Depending on what your plugin does, this error could impact a WordPress site’s display, so it is important to prevent it from ever happening.

One fix (as published by several WP bloggers) is to edit your plugin to add the code, include "/wp-includes/pluggable.php", manually before you call “get_currentuserinfo()” (or other WordPress user functions). This methods works in most cases, but it runs the risk of causing an irreconcilable conflict with any membership or user management plugins that may be installed on the same site.

A better fix is to include a priority argument with your plugin hook function to make sure that it loads into WordPress after any membership/user management plugins and after “pluggable.php” loads.

Read More


  Tags: fatal error, get_currentuserinfo, wordpress Category: Blogging, Plugins

Optimize with MySQL Procedure Analyse

no comments
Posted on Dec 10 2009 by helene

How to Use “Procedure Analyse” to Optimize MySQL Table Size

MySQL provides a useful tool called “procedure analyse” that can help you optimize your tables for storage. “Procedure analyse” examines the contents of a table’s columns and suggests a field type for each column selected that reduces the total table size.

So, why bother to reduce table size when storage is cheaply available? Big tables not only use up memory, but queries on them eat up CPU usage as well. If you have a web site with large custom MySQL tables and your site is on a shared server, you could end up getting penalized monetarily or even have your site shutdown by your ISP, if queries on your MySQL tables consume more CPU than allocated. To keep this from happening you should optimize both your queries and your table size. “Procedure analyse” provides a quick and easy way to do the latter.

Read More


  Tags: MySQL, optimize, procedure analyse Category: MySQL

Sleeping with Javascript

no comments
Posted on Jun 7 2009 by helene

When I went looking for a built-in “sleep()” function in Javascript, I quickly learned that it does not exist. This is surprising considering that “sleep()” is in all other languages that I have used. To get around this javascript shortcoming, I decided to create my own sleep function. The result is a function that loops internally until the number of seconds passed is greater than the argument value, “naptime”.

Initial tests of “sleep()” were successful, however, I soon discovered that most browsers will interrupt “sleep()” and show a “Slow/Busy script” dialog message whenever the “naptime” argument is greater than 10 seconds (7 seconds in IE). Trying to work around this problem was too much effort, so I left the script as is. If you use this function, I recommend a “naptime” of less than 10 seconds so your site visitors won’t encounter this “slow script” dialog message.

Below are some examples of the javascript “sleep()” function. Just click on a link below to start sleeping for the preset amount of seconds shown.

Read More


  Tags: jquery, sleep Category: javascript

Horizontal Submenus for WordPress Admin Plugins

10 comments
Posted on Mar 25 2009 by helene

How to Add Horizontal Submenus to Your Administration Plugin in WordPress 2.7+

With the launch of version 2.7 in December 2008, WordPress added several new features and changed its user interface (UI). I especially like the new automatic update feature and the new vertical sidebar is sleeker and more modern looking. However, I find navigating the menus on that new sidebar to be very inefficient when administration plugins add more selections to it. [Wordpress screen shot]
Image #1: Plugin with sidebar menu

As an admin plugin author, I want my users to have easy access to my plugin menu and submenus. In WordPress 2.2 to 2.6, the built-in menu functions accomplished this with horizontal menus at the top of the page. In 2.7, however, the same menu functions now place the plugin menu (and submenus) near the bottom of the page, in the sidebar. This makes navigation more cumbersome because plugin menus are positioned outside the initial viewing area of the screen in a typical 1280×800 browser window. The user has to scroll down to select the plugin and, after the plugin is selected, scroll down again to navigate the plugin’s submenus. Worse, it not always obvious that there are submenus available for a plugin. You can see an example of this in image #1 where the green line indicates the end of the window area of a 1280×800 resolution browser window.

To workaround this problem in my own admin plugin, I inserted a new horizontal menu containing the submenu links at the top of each submenu page. plugin menu screen shot
image #2: Plugin with horizontal menu
To keep the look consistent with WordPress' new style, I positioned the menu inline with the “contextual help” button and also adopted it’s “look and feel”. This was a relatively simple task to do, once I located and copied the appropriate styles from WordPress' admin stylesheets. You can see an example of this new horizontal menu in the second image to the right.

Read More


  Tags: horizontal menu, wordpress Category: Plugins

A Simple Fix for “Simple Tags”

no comments
Posted on Aug 9 2008 by helene

I am not an official WordPress tester, but to keep up with the latest changes and to make sure my own plugins are always compatible with upcoming versions of WordPress, I run WordPress development version on this site.

There are several plugins installed on this site that end up also getting tested for compatibility with upcoming versions of WordPress, although that is not my intention. Wassup, cFormsII, Bad Behavior, and Akismet all run successfully on WordPress 2.7 development version . One plugin that failed was Simple Tags version 1.5.7 by Amaury Balmer. This plugin produced an error because of a test in the code that rejects unrecognized versions of WordPress.

Fortunately the fix was simple. It only required that the version test be replaced by one that tests for current or higher version of WordPress. I modified the code myself and now “Simple Tags 1.5.7a” runs on 2.7-dev.

Read More


  Tags: simple tags plugin, wordpress Category: Plugins
« Older Entries

Categories

  • Blogging
  • javascript
  • Miscellaneous
  • Multimedia
  • MySQL
  • Plugins

Recent Posts

  • WassUp Works Well with WP Widget Cache
  • CTRL+Z Undo: The Keyboard Shortcut You Can’t Do Without
  • A Fine Fix for “get_currentuserinfo undefined”
  • Optimize with MySQL Procedure Analyse
  • Sleeping with Javascript

Popular Posts

  • Horizontal Submenus for Wordpress Admin Plugins
  • Flv Videos in a Thickbox
  • YouTube Videos in a Thickbox
  • Sleeping with Javascript
  • Installing a More Secure Wordpress

Archives

Ads


  • About
  • Projects
Powered by Wordpress  |  Designed by WebTreats