Archive for June, 2007


Who would have thought….I’ve been grumping about the lack of buttons in TinyMCE, the “visual editor” or WYSIWYG editor in Wordpress, and come to find out, all this time there is so much more!

I went hunting for a plugin I’d seen that allowed custom buttons, and discovered that the standard installation of WordPress actually has a keyboard command that toggles some extra goodies off and on. Obviously, mine have all been off!

Turns out, you can Show/Hide the Advanced Editor Toolbar in the standard Wordpress installation and unlock a dozen or so extra buttons, including “Paste as Plain Text” and “Paste from Word”. When the Advanced Editor Toolbar is enabled, there is a toggle button available to turn it off. However, when it is off, you must use Alt-V (IE) or Shift-Alt-V (Firefox) to toggle the advanced buttons back “on”.

Adding Buttons is something I haven’t delved into yet. I need to play with this new toy first. But I learned from the Codex that under “Rich Editor Filters” in the Plugin_API/Hooks page, you can see a simple means of adding your own buttons to TinyMCE in WordPress.

http://codex.wordpress.org/Plugin_API/Filter_Reference#Rich_Text_Editor_Filters

Advanced Editing Plugins

If the Advanced Editing Toolbar buttons are not sufficient, perhaps you’re looking for a plugin to extend the functionality of the TinyMCE editor, or to add custom code snippets. Here are two you can try:

Custom TinyMCE Buttons (for WordPress 2.1)

Advanced TinyMCE Editor (for Wordpress 2.2)

It was the former that I recalled having seen, which started me on this quest, and the latter which I discovered in the process, and informed me of the advanced toggle option. Surprised that I had never heard of it in two years of hanging out on the WordPress forums, I personally added the information to the Codex. I also added links to these two amazing plugins, which I’m sure will come in handy for others.


An intriguing discussion has been taking place on the wp-hackers list, regarding what to call the “links manager” a.k.a. “blogroll” a.k.a. “bookmarks” function in WordPress. At the core of the discussion are two sides: the “links” gang says links is a universal term, understood by every novice internet user, and that’s what they are, so let’s call ‘em that — even if they can dance and sing. The “bookmarks” camp says they are much more than links, and have much more potential, so let’s give ‘em a more meaningful name that causes folks to notice how much more they can do. What do you think? What makes most sense to you? Which one is more practical, useful, understandable, sensible…??? We are all very curious what the WordPress community of users has to say on this! So if you’re a WordPress user, visit Scot Hacker’s site and vote for your preference.


This recipe from my Great Aunt Anne is wonderful for snacking, buffet or potluck desserts, and for gift giving. It keeps well (but avoid warm temperatures!).

  1. Boil a pound of butter with a pound of sugar (about 2 1/4 cups) until the mixture turns a rich dark carmel color.
  2. Mix in 1/2 cup of toasted almonds (I usually use chopped almonds that I toast about 10 minutes at 300F).
  3. Pour mixture into a 13×9″ baking dish or pan.
  4. Sprinkle chocolate chips on top to cover about 80% of the surface. These will melt within a few minutes, although they keep their shape. As soon as they are soft, spread with a spatula to cover the whole surface evenly.
  5. Sprinkle with toasted chopped almonds.
  6. Cool completely (you can put it in the fridge) and break into pieces.

You might want to make two batches. This is addicting and yummy!


If you’ve tried to use wp_link_pages outside your sidebar (for example, at the end of your Page content, to list child Pages), you’ve probably noticed that it creates it’s own set of LI tags before the title….which is non-standard code for a standalone list.

This manifests itself in an unexpected (and probably unwanted) bullet before your list title (or a lone bullet alongside your first Page link, if you used the title_li=0 argument), and often by making the “bullet” for all subsequent Page links appear as something other than a bullet (in mine, it looks like this: >> ) because it’s reading them as sub-nested list items. What a mess!

Maybe this is convenient if you only use wp_list_pages inside of an existing ordered or unordered list, but I generally don’t….so I have been fighting this strange bullet problem for quite some time.

It may be possible for you to style away this problem by adding CSS classes for .pagenav and .page_item, but if that’s not working for you, then you might want to edit the function itself. Editing the core of WordPress isn’t generally recommended, but sometimes it becomes necessary.

Here are instructions for WordPress 2.1.3. Other versions are probably similar. Don’t forget to make a back up before you do this!!!

You’ll be changing this file:

/wp-includes/post_functions.php.

Locate “function wp_list_pages” (line 265 in my 2.1.3)

Look for the “if” statement and remove the opening and closing LI tags in the two lines that begin with ?output= (one of them includes class=pagenav), so it reads as follows:


if ( !empty($pages) ) {
    if ( $r['title_li'] )
      $output .= '' . $r['title_li'] . '<ul>';
 
    global $wp_query;
    if ( is_page() )
      $current_page = $wp_query->get_queried_object_id();
    $output .= walk_page_tree($pages, $r['depth'], $current_page, $r);
 
    if ( $r['title_li'] )
      $output .= '</ul>';
  }

When looking at the whole function, you’ll see you can also remove the page_item class for the inner nested LIs if you want, but you can also just not define that class in CSS and it won’t do anything.


I think there are 193 countries in this comma separated list of countries. Give or take. This can easily be copied and pasted into Cimy User Extra Fields (in the “label” box) for a quick drop down list, or otherwise modified for other list or drop down box needs.

The US and Canada are listed at the beginning, as well as in their respective alphabetical positions. You can easily modify this if you prefer it another way. Enjoy.

United States, Canada, Afghanistan, Albania, Algeria, Andorra, Angola, Antigua & Deps, Argentina, Armenia, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Belize, Benin, Bhutan, Bolivia, Bosnia Herzegovina, Botswana, Brazil, Brunei, Bulgaria, Burkina, Burundi, Cambodia, Cameroon, Canada, Cape Verdi, Central African Rep, Chad, Chile, China, Columbia, Comoros, Congo, Congo {Democratic Rep}, Costa Rica, Croatia, Cuba, Cyprus, Czech Republic, Denmark, Djibouti, Dominica, Dominican Republic, East Timor, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Ethiopia, Fiji, Finland, France, Gabon, Gambia, Georgia, Germany, Ghana, Greece, Greneda, Guatemala, Guinea, Guinea-Bissau, Guyana, Haiti, Honduras, Hungary, Iceland, India, Indonesia, Iran, Iraq, Ireland {Republic}, Israel, Italy, Ivory Coast, Jamaica, Japan, Jordan, Kazakhstan, Kenya, Kiribati, Korea North, Korea South, Kuwait, Kyrgyzstan, Laos, Latvia, Lebanon, Lesotho, Liberia, Libya, Liechtenstein, Lithuania, Luxembourg, Macedonia, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshall Islands, Mauritania, Mauritius, Mexico, Micronesia, Moldova, Monaco, Mongolia, Morocco, Mozambique, Myanmar, {Burma}, Namibia, Narau, Nepal, Netherlands, New Zealand, Nicaragua, Niger, Nigeria, Norway, Oman, Pakistan, Palau, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Poland, Portugal, Qatar, Romania, Russian Federation, Rwanda, St Kitts & Nevis, St Lucia, St Vincent & Grenadines, San Marino, Sao Tome & Principe, Saudi Arabia, Senegal, Seychelles, Sierra Leone, Singapore, Slovakia, Slovenia, Solomon Islands, Somalia, South Africa, Spain, Sri Lanka, Sudan, Suriname, Swaziland, Sweden, Switzerland, Syria, Taiwan, Tajikstan, Tanzania, Thailand, Togo, Tonga, Trinidad & Tobago, Tunisia, Turkey, Turkmenistan, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, United States, Uruguay, Uzbekistan, Vanuatu, Vatican City, Venezuela, Vietnam, Western Samoa, Yemen, Yugoslavia, Zambia, Zimbabwe


The following is an integrated list of US states and Canadian provinces. If you prefer to put them all in one drop down box together, this makes it really simple. Just copy and paste! This is especially convenient if you are using Cimy User Extra Fields (paste list into “label” box).

Alabama, Alaska, Alberta, American Samoa, Arizona, Arkansas, British Columbia, California, Colorado, Connecticut, Delaware, District of Columbia, Florida, Georgia, Guam, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Labrador, Louisiana, Maine, Manitoba, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, Newfoundland, New Brunswick, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Northern Marianas Islands, Northwest Territories, Nova Scotia, Nunavut, Ohio, Oklahoma, Ontario, Oregon, Pennsylvania, Puerto Rico, Prince Edward Island, Quebec, Rhode Island, Saskatchewan, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Virgin Islands, Washington, West Virginia, Wisconsin, Wyoming, Yukon


Here are two simple text lists: one of all the US states and one of the Canadian provinces, separated by commas. This works great in Cimy Extra Field Values if you happen to need a drop-down box of states and/or provinces. Just copy and paste into the “label” box for a drop down list.

Alabama, Alaska, American Samoa, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, District of Columbia, Florida, Georgia, Guam, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Northern Marianas Islands, Ohio, Oklahoma, Oregon, Pennsylvania, Puerto Rico, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Virgin Islands, Washington, West Virginia, Wisconsin, Wyoming

Alberta, British Columbia, Manitoba, New Brunswick, Newfoundland, Labrador, Northwest Territories, Nova Scotia, Nunavut, Ontario, Prince Edward Island, Quebec, Saskatchewan, Yukon


For your programming pleasure, here is a simple text list of all the US states, separated by commas. This works great in Cimy Extra Field Values if you happen to need a drop-down box of states. Just copy and paste into the “label” box for a drop down list.

Comma Separated List of US States and Territories

Alabama, Alaska, American Samoa, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, District of Columbia, Florida, Georgia, Guam, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Northern Marianas Islands, Ohio, Oklahoma, Oregon, Pennsylvania, Puerto Rico, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Virgin Islands, Washington, West Virginia, Wisconsin, Wyoming


I just started using Cimy User Extra Fields on a site I’m working on, and it has some really fantastic features if you want to add information to your registration form, and your author bio or profile pages.
The one thing I have struggled with is getting the contents of a field to appear outside the Loop. I am using get_cimyFieldValue, which is disabled by default (so the first step is to enable it!). The readme explains how to get a field value to display in the Loop, but not outside of it.

The following instructions explain what to do, provided you are working with an Author Template file (author.php) per the instructions in the WordPress codex. Read the rest of this entry »


How to set up WordPress is something I will leave to the experts at WordPress. But there are a few things I do immediately after setting up WordPress, before I make any posts or even change the theme.

  • The very first thing I do is go to Users –> Authors & Users (default tab) and click “edit” for my new admin profile….and CHANGE THE PASSWORD. I will never remember the random one WordPress gives me. (If you installed WordPress with Fantastico, you chose your own password, so you can skip this step.)
  • Next, I set privacy settings in Options –> Privacy. If I have a lot of set up to do and don’t want visitors yet, I will opt for a private blog for now. This prevents WordPress from pinging Update Services every time I make a test post.
  • Another important step before you start posting is your Permalinks options (Options –> Permalinks). I prefer “pretty permalinks” and so do search engines. They look nicer, are more memorable to users, and can tell the search engines more about the content of your site than a link with ?p=4 in it. Be sure you have a file in your root (top level) WordPress directory (same place as index.php) named .htaccess (it can be completely blank, but it must exist) which is CHMOD 666, so that WordPress can update the file for you.
  • If this site will allow comments, I enable the Akismet plugin to prevent comment spam. You’d be amazed at how fast spammers find new installations of WordPress and start spamming them.

Once these preliminary set up steps are completed, I install the theme, start adding plugins and making test posts. The plugins usually lead to theme modifications, so now the real fun begins. :)

ok