Categories
Uncategorized

Speeding up your PC

A collection of tips for improving the performance of your PC.

Temporary Internet Files

Dumping your browser cache should speed things up.

In IE, select Tools > Internet Options > Delete Files… will clear the cache.

Then you can limit the size the cache will grow to by selecting Tools > Internet Options > Settings… and limiting the cache to 100 mb or so.

Slow Browser Performance

The Java cache setting defaults to 1,000 Mb, far larger then needed. A setting of 100mb would be sufficient for most users.
To fix this: Start > Control Panel > Programs (if necessary) > Java. Under Disk Space, change the space allotment from 1000mb to 100mb.

Categories
WordPress

Default Sidebar Widgets in WordPress MU

The following plugin code, placed in the indicated directory, will set the default plugins for any MU blogs created after this plugin is installed. By examining the code you can see that sidebar-1 and sidebar-1 can be controlled separately.

If you don't wish to place anything by default in either of those two sidebars, simply omit any references to it.

/wp-content/mu-plugins/default-mu-sidebar.php

1
2
3
4
5
6
7
8
9
10
11
12
<!--?php 
function new_blogs_setting( $blog_id ) {
  add_option( 'widget_categories',array( 'title' =--> 'My Categories' ));
 
  add_option("sidebars_widgets",array(
    "sidebar-1" =&gt; array("categories","links"),
    "sidebar-2" =&gt; array("tag_cloud"),
    "sidebar-3" =&gt; array("pages"),
    "sidebar-4" =&gt; array("archives")));
}
add_action('populate_options', 'new_blogs_setting');
?&gt;
Categories
CSS

Using Conditional Comments to add CSS file for IE browsers

Due to a lack of standards compliance in Internet Explorer (particularly older versions) it is often necessary to add CSS code to get around the shortcomings of IE.

However, there's no point in using the file on browsers other than those older versions of IE.  To do so would only clutter the site, slow load times, and introduce possible conflicts.

Fortunately IE can recognize Conditional Comments, which are HTML comments with a little logic added to them.

In the example below, the conditional comment is used to determine whether the user's browser is Internet Explorer prior to version 7.

The condition may be read as "If browser is less than IE version 7" or, more accurately, "If browser is Internet explorer AND has a version number less than 7".

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="ie.css" />
<![endif]-->

If the condition is met, the browser will load the CSS file.

Typically, such files contain CSS code which works around problems caused by the standards non-compliance of older IE browers.

The code block above should be placed in the <head> section of your page, below all other css file references. Placing it last will ensure that it's CSS declarations will not be overridden by subsequent declarations in other CSS files.

Categories
Web Development

Creating a Google Analytics Account

Google Analytics is a great tool, but it has some quirky aspects that must be understood if you are setting it up for anything but your own personal website.

For reasons nobody seems to be able to figure out, Google doesn't allow Analytics accounts to be transferred. This means that if you're setting up Google Analytics for a client or anyone else, you must not set it up with your own Google/Gmail account! And if you're hiring someone to do it for you, don't let them do so. The account must not be tied to any person, or used for any purpose other than the administration of your website or domain.

I've reached the conclusion that the only way to handle this is to create a dedicated GMail account for each client. Immediately set the mail to forward to an appopriate person(s), because you'll not often log into it. You can use this account to set up Google Analytics, AdSense, Google Apps, and anything else related to the website or domain.

Be sure to record the account name and password carefully and include the information in your handover package if doing this for a client. The domain name might be a good choice for the account name as it's easy to remember, i.e. "mydomain.com@gmail.com".

Once you've set up the new Google account, recorded its name and password, and set the mail forwarding, go to http://analytics.google.com. Make sure you're signed in with the new account.

A short series of questions will lead you to your tracking code.

The tracking code must be placed in each page to be tracked, so it's best to place it in the footer if you want all pages tracked. I choose the footer because I want the page to load before external actions are carried out. Page loads should not be delayed while tracking code accesses an external server.

Categories
Uncategorized

WordPress Plugins & Ideas

This is just a collection of plugins that I find useful or have caught my attention.  I haven't tried them all, this is just my little scratchpad to keep notes on these things.

  • http://wordpress.org/extend/plugins/menu-manager/
  • Bubblecast Video for WordPress Flash video player, embed YouTube, WordPress MU fully supported, …

And some reference ideas for working with WordPress