Categories
Application Tips

Alternation Row Colors in Excel

Follow the steps below to set up alternating row colors in Excel:

  • Highlight the rows that you wish to apply the formatting to. You can also select the entire sheet.
  • Under the Format menu, select Conditional Formatting.
  • When the Conditional Formatting window appears, select “Formula Is” in the drop down list.
  • Enter the following formula: =mod(row(),2)=1
  • To select the color you want to see in the alternating rows, click on the Format button.
  • In the Format Cells window, select the Patterns tab. Then select the color you want to use and click OK.
  • Click OK again to close the Conditional Formatting window.
Categories
Application Tips

Pasting content from Microsoft Word to WordPress

Pasting content directly from Microsoft Word can create serious formatting problems, but there is a trick to avoid it.

When pasting from MS Word, click the  button at the end of the editor toolbar in WordPress to open out the second row of the toolbar.

Then click the "Paste from Word" button  on the second row which gives you a pop-up to paste the content into.

This pastes it in without all the MS Word codes.

Most alternate text editors in WordPress, as well as those in Joomla, seem to have an equivalent "Paste from Word" button.

Categories
Joomla!

Tips for Setting up Joomla! websites

1. Create a demo site with a standard set of components and plugins (delete config file, add installation folder for a clean Joomla install).

2. Create a sample database import after installing a new site, containing only relevant articles, etc.  This will save time deleting all the detrius from the sample data.

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.