Archive

Author Archive

Creating posts and pages in WordPress

March 16th, 2011 No comments

Before creating posts or pages, you should have a high-level understanding of WordPress constructs – particularly posts and pages. This is not complicated stuff but is important. To write a post:

  1. Log in to your WordPress Administration Panel with the user name – http://YourSite/wp-admin/
  2. Click the Posts tab on the left
  3. Click the “Add New” Sub Tab
  4. Fill in the form making sure to include a meaningful title
  5. As needed, select a category, add tags, and make other
    selections from the sections below the post. Each of these
    sections is explained here:

    http://codex.wordpress.org/Writing_Posts

  6. When you are ready, click Publish.

    If you find that you are confused, take a moment to re-read the WordPress constructs page.

    To create pages, you follow roughly the same steps as above except that in step 2 you go to Administration > Pages > Add New tab

Categories: Wordpress Tags:

WordPress constructs

September 12th, 2010 No comments

There are several constructs in WordPress. They are not complicated but understanding them will make things make more sense. The are Pages, Posts, Categories, Tags, Widgits, and Plugins

  • Pages are the the main “permanent” content of the site. Most themes will automatically create buttons or tables for pages.
  • Posts are usually shorter and less important content. Examples might be “Dance this Friday” or “$5 discount through Saturday”. One page is designated as the page where posts will show up. This could be the main site page or something else such as “News”, “Blog”, or “What’s new”. Part of a site’s Google Page Rank is based on how often the site is updated. I like to make posts appear on the front page and create them frequently to keep the site fresh, current, and interesting.
  • Category is an attribute attached to a page or post. Depending on the theme, categories may automatically show up somewhere as a navigational aid – though most themes use Pages as the main navigational construct. Your site should have a relatively small number of Categories. Most themes key off of pages for navigation but a few key off of the category of the page or post – so navigation will quickly become unwieldy if you have too many categories. This link will show you all the posts on this site with the category “WordPress”
  • Tags are similar to Categories but more specific and are an aid for searching. So what’s the difference between a Category and a Tag?. If you had a news site, the a category might be Local, or National, and a news story in National might have tags like Obama or Scott Brown or health care.
  • Widgets are pre-canned thingies that might appear as a text sidebar, calendar, recent posts, archives, etc.
  • Plugins are essentially small programs that you extend the functionality of WordPress. For instance, you might have a plugin that gives you a guestbook, or shopping cart. There are thousands of plugins.
Categories: Wordpress Tags: , , ,

WordPress – adding links

September 12th, 2010 No comments

Once you become comfortable with basic HTML, you can type the link directly in the HTML editor. A link is created using the anchor tag and looks like this:
<a href=”http://google.com”>Click here to search&lt/a>
Click here to search.

Adding a link in WordPress:
From the Visual editor

  1. Edit the page and select the “Visual” tab in the top right of the of the edit window
  2. Enter the text that you want to go with the link. This could be the actual web address but more often it is the text that goes with the link – such as: “Click here to search” in the google example above.
  3. Highlight the text and click on the link icon – it looks like sideways figure eight. A box will pop up. Enter the address in the “Link URL” box. The “Target” entry will define if the link opens up in a tab/window or the current tab/window. “Title” is the text tha will popup up when the user puts their mouse over the link. “Class” defines the look and feel of the link based on the current theme options. Link URL is the only mandatory field. Click on “Insert” when done.

From the Visual editor

    1. Edit the page and select the “HTML” tab in the top right of the of the edit window
    2. Enter the text that the user will click on. Again, this can be the web address or something like “Click here to blah blah”.
    3. Highlight the text with your mouse and click on the link button above the edit area. Click OK.
Categories: Wordpress Tags:

Linux performance tools

March 4th, 2010 No comments

Linux.com has a decent decent article highlighting a some tools for monitoring Linux system performance.


You’ll find many, many, many utilities for measuring and improving Linux system performance. The utilities discussed here are chosen because they’re widely available, and provide a good scope functionality. Also, I chose to avoid tools that have too steep a learning curve. As an example, SystemTap is a bit more complex than should be covered in an overview article. I left out some of the more basic tools such as ps and top because most Linux users are exposed to them fairly early on. And I didn’t try to tackle any application-specific tools.

Covered in the article are

  • The KDE System Monitor and GNOME System Monitor
  • dstat – an interesting sounding tool that can measure the “normal” thingls like CPU, memory, IO, etc. Via plugins it can also monitor “MySQL performance, Postfix, Sendmail, Qmail, and much more.”
  • “Sysstat is actually a collection of several utilities, including sar, iostat, mpstat, and pidstat.”
  • ifstate – for network monitoring
Categories: Uncategorized Tags:

MRBS memories

February 26th, 2010 No comments

MRBS

MRBS screenshot by mrbs.sourceforge.net

I’ve been using open source software for many, many years now. The very first project I ever contributed code to was MRBS – the Meeting Room Booking System.

I’d been tasked by my manager to find a web based system that in-house engineers could use to book time on the company testers. With each machine costing potentially over $1M there weren’t all that many to go around. In pretty short order I came across MRBS which I think was originally forked from WebCalendar. It was real close to what I needed but not quite there. I felt that it needed some work in the navigation area. I added much of the top navigation panel that contains the search box, Help, Report, and some variables to easily customize the tool for your site. I wrote the “Help” page which still has my name in one of the example FAQ style questions. MRBS has been running for years without problem.

I’ve been on the MRBS mailing list for years. The traffic is steady but not overwhelming. Not so long ago, I saw a question posted from a familiar looking name – somebody from my town I was familiar with but had never met. He was having trouble with a client’s MRBS install and the list wasn’t helpful because it was obvious from the error messages that the tool had been customized. I contacted him and ended up getting the work subcontracted to me and made a few bucks. In fact at the moment I am writing a backup utility for the same customer and field a support call or two every other month or so.

It was this gig that made me decide to branch my small business out to include open source application support, PHP, perl, MySQL, and other technologies. Thanks Tony.

Categories: PHP Tags:

Thumbnail bug in Arras theme

February 26th, 2010 No comments

I’ve been playing around the with Arras WordPress theme version 1.3.6 – which I really like. You can apply an attribute of thumb with a value of an image URL. This will show an image in post preview on the main page – very nice. The layout has a configuration for showing/not showing post thumbnails in the actual posts. The config didn’t have any effect – clicking on the post showed the thumbnail regardless. I added this code to ThemeDir/library/filters.php starting at line 113:

 /* mjb mbelange */
if ( arras_get_option('single_thumbs') == '1' ) {
  $postheader .= '<div class="entry-photo"><img title="' . get_the_title() . \
   '" src="' . arras_get_thumbnail($w, $h) . '" alt="' . get_the_title() . '" /></div>';
}

After pouring through the PHP code, finding the bug and fixing it, of course I found this fix on the Arras forum. Oh well. Nothing like rolling your own to better understand the code.

Categories: Wordpress Tags:

Linux/Clearcase file deletions?

February 26th, 2010 No comments

I had a very strange event recently. A number of directories in an automounted NFS directory were being deleted every couple of minutes. This may be a bug in clearcase that is related specifically to Linux Redhat 4.x and can cause random deletion of files. Gulp!

This claims to have been fixed in Clearcase Patch 42 – we were at patch 49.

The problem is described in this bug report and also in this tech note.

To trouble shoot this, I created a loop on the command line that would tell me when the directory disappeared. At the same time, I did a snoop on the machine that contained the directory. This pointed me to another machine. Snooping on the suspect machine showed network calls such as rm and rmdir. The /var/log/messages file showed stuff simlar to this:



automount[11495]: rm_unwanted: unable to remove link: /path/truncated
                  , error: Permission denied

I shutdown clearcase and the problem remained. After unmounting and remounting the directory, the problem went away. I am including the tech note in full:


Problem
This technote identifies an IBM® Rational® ClearCase® defect relating to the MVFS on RedHat® Enterprise 4 Linux® (RHEL) where applied patches prior to clearcase_p2003.06.00-42 or 7.0.0.1-RATLC-RCC could cause file deletion under very specific circumstances while VOBs are mounted on the RHEL 4 file system and provides you with information on how to workaround the issue.

Cause

A Linux radix tree is a mechanism by which a (pointer) value can be associated with a (long) integer key. It is reasonably efficient in terms of storage, and is quite quick on lookups. Additionally, radix trees in the Linux kernel have some features driven by kernel-specific needs, including the ability to associate tags with specific entries. A radix tree contains leaf nodes, which contain slots, each of which can contain a pointer to something of interest to the creator of the tree. Empty slots contain a NULL pointer.

The radix tree in question is the one that records allocated and free minor device numbers for the anonymous devices [unnamed_dev_idr]: These are used for NFS mounts. During kernel debugger investigations, the free/in-use bits in the radix tree did not match up with mounted file systems device numbers: The device numbers were still in use while the tree reported that they were free.

The consequences are that an NFS mount can obtain the same device number. AutoFS uses these device numbers as part of its strategy to be sure it does not delete anything that was not created by itself when the cleanup process is triggered.

To trigger the condition described, two super blocks would have to be allocated the same device number (s_dev). In the cases we have seen, the two superblocks involved were an AutoFS mount and an NFS mount. When the AutoFS mount timed out, the AutoFS started to clean up prior created files, resulting in the deletion of files on the NFS mount.

If the unnamed_dev_idr radix tree becomes corrupt, then the cleanup of the mount tree can remove file systems that it was not intended. The function that does the cleanup is radix_tree_delete.

Defect APAR PK32893 has been submitted to address this behavior.

Solution

This specific problem only exists on RedHat 4 Enterprise systems with 2.6.9 kernels.

To avoid this defect, apply the User Space and MVFS patches for ClearCase 2003.06.00 and 7.0 servers (and clients) running RedHat Enterprise 4 systems with 2.6.9 kernels if the MVFS installed.

Refer to APAR PK32893 to download the patches.

Note: The MultiSite patch, multisite_p2003.06.00-16 (or the latest available patch), is also required if your VOBs are replicated to stay in sync with the User Space and MVFS updates.

Nested PVOBS

February 26th, 2010 No comments

If you’ve ever had to pull Clearcase UCM components from one project vob (PVOB) to another, you probably did some hair-pulling the first time you had to do. If you manage a mature environment or have had to integrate a new development team and source code base into your existing one, this IBM document might help you understand how it all hangs together.

I’ve managed multi-million line source code bases that came from five or six separate companies and multiple platforms (Linux, Solaris, Windows) and needed to marry components from one set of PVOBS to projects in another. It all comes down to AdminVOB hyperlinks.

Categories: Clearcase, Configuration management Tags:

Lotus Notes on Ubuntu 9.10

February 26th, 2010 No comments

If you are having trouble with Lotus Notes 8.5 on Ubuntu 9.1, download these files and copy them into /opt/ibm/lotus/notes.
See this page for more information

Categories: Linux Tags: