October 2007 Archives

My favorite smiley: Bang head on wall

| 2 Comments

smiley-bangheadonwall.gif smiley-bangheadonwall-yellow.gif
Favorite: Red smiley banging its head against a red brick wall!

A close second: Yellow smiley banging its head again a red brick wall.

MT 4 Plugins I've installed

| No Comments


Movable Type 4.01 came with these plugins pre-installed:

  • Feeds.App Lite
  • MultiBlog 2.0
  • StyleCatcher 2.0
  • Template Backup and Refresh 1.2
  • Textile 2.04
  • WXR Importer 1.0
  • Weblog Cloner 2.0
  • Widget Manager 1.0
  • Markdown 1.0.1 and SmartyPants 1.5.1 (plugin set)
  • SpamLookup - Lookups 2.11, SpamLookup - Link 2.11, SpamLookup - Keyword Filter 2.1 (plugin set)

I have installed these plugins:

* These plugins have proven very helpful! So far, I haven't used the others.

And, I tried these plugins but removed them due to Internal Server Error messages (500 Server Error) or 3-minute publish times for 1 entry or a comment. These plugins displayed errors in the MT 4 Activity Log.

  • Bookmarks 1.0b2
  • MT-Quicktags
  • reCaptcha - just could not get it to work (this is the version included in the MT 4 "mt/extras/examples/plugins/reCaptcha" folder)

[Update July 3, 2008] Additional plugins I've installed for MT version 4.1 (some a while back, some today):

* These plugins have proven very helpful!

Trusted Commenters 1.2 doesn't work consistently. But, TinyTuring has proven very helpful by ending spam comments on this blog.

Note: It seems that the pre-installed-with-MT-4.01 Weblog Cloner 2.0 was renamed Blog Cloner 2.0 with MT 4.1.

The move to MT 4 so far

| No Comments


Last night, I created all single-page template modules and widgets as Index Templates and set them to output to files so I could then use PHP includes to put that content in other templates. In this way, I can add an item to those content modules, such anything in the sidebar, without publishing the entire site. I set to automatically publish only the index templates that need to be published with each new or modified entry.

Publishing 1 entry still takes 35-45 seconds. Adding a very short test comment the other day took 35 seconds. Publishing the entire blog takes 45-60 minutes - yes, 1 hour. There are no errors in the Activity Log and no errors in the web server log file, so none of the plugins seem to be the cause.

The slowness of Movable Type 4.01 is going to drive people away from using it.

If I can get past the frustration level that is WordPress templates, I may just move this blog (yes, another move) to WordPress.

Use rename to change multiple filenames

| 1 Comment


I {heart} UNIX! In addition to the 'find' commend, I just found another very useful command that is now my second favorite!

rename

The rename command renames files according to a pattern, such as:

I needed to rename almost 800 files from a format like "2007_XXXXXXXXXXXXXX.php" to use a hyphen (dash) instead of the underscore after the year - such as "2007-XXXXXXXXXXXXXX.php". I did this with the following for each year (there's probably a way to rename all years at once, but I didn't have a backup and didn't want to screw it up):

rename 2007_ 2007- 2007*.php

which means "change the string 2007_ to 2007- in all filenames resulting from 2007*.php".

Worked like a charm!!!

I am not responsible for any problems you may encounter. Backup all files first.

100020 miles

| 2 Comments


1999cavalier1.jpg
My bright red 1999 Chevrolet Cavalier Z24 passed the 100000 mile mark during the commute home tonight. I brought her home on April 30, 2000 with only 53 miles on her - most of which I had driven during my rather lengthy test drive. She's still a great car!


I started working for my current employer as their Web Designer almost 6 years ago. I worked with one of the System Administrators to setup a new web server environment and processes. She built two SuSE UNIX servers (one for development, the other for "live" published websites), installed the Zope web content management system, and used Apache to handle the website. She kept all access to root and managed the hardware and software on the servers - even today, I don't know where they live on campus!

When she left about 2 years ago, one of the other System Administrator's inherited management of "my" web servers. Soon, however, he agreed to give me root access so he wouldn't have to change file/directory permissions for user directories, add Rewrite commands to the httpd.conf file, modifying other config files (ht://dig, Webalizer, etc.), manage large files when the Zope database needs to be packed, and do other administrative tasks on the web servers that took him away from bigger projects. That was okay with me! I'm comfortable at the UNIX command line and am perfectly capable of doing those tasks.

When the servers were setup, directory browsing was turned off on the server for better overall security. A year or so later, one user wanted to be able to list the files in a single website directory, but the System Administrator wasn't able to set httpd.conf so that it worked. Then, about 2 years ago, another user (a more demanding one) wanted to do the same thing with a bunch of his Camtasia files. The one remaining System Administrator at that time was a Microsoft Windows only guy so nothing could be done. I learned a bit about httpd configuration commands but was unsuccessful in getting "Options Indexes" to work. So, I wrote a PHP script to be placed in a directory as index.php. When that file is accessed in a browser, it displays the foldernames and filenames contained in that directory and its subdirectories. It worked great!

But it's always bugged me that directory browsing wouldn't work on the servers! Well, today I spent most of my work day Googling away for anything that could help (such as (no quotes) "disable directory browsing", "enable directory browsing", "enable directory browsing for one directory", "suse apache directory browsing") and making modifications to the httpd.conf file on the development server. I must have restarted Apache 50 times or more!

I learned what the httpd configuration commands do (important!). I discovered Include statements in the httpd.conf that included *.conf files for SuSE, and thought maybe I had finally found where the problem might be. No luck.

About 30 minutes before the end of the day, I Googled "directory browsing not working" (no quotes) and found this thread on a forum that pointed me to, ta da, the solution!

From Ddr/Dale's response post:

-------------------------
IndexIgnore *

(will prevent listing of all files, the "*" is a wildcard)
-------------------------
IndexIgnore *.gif *.jpg

(will prevent listing of any files with .gif or .jpg extensions, but will allow other listings)
-------------------------

Could it be? Was there an "IndexIgnore *" command in the httpd.conf file?

Yes. Yes, indeed. It was there, bold and bright as day, jumping from the screen saying "I'm here, I'm here!" (now that I knew what it meant)!

So, I removed it. And all was fine with the world again. Well, maybe just my little corner of the world.

Summary:

  • To disable directory browsing, use "Options -Indexes" or remove "Indexes" from an "Options" command (i.e., "Options Indexes FollowSymLinks" becomes "Options FollowSymLinks").
  • To enable directory browsing, use "Options +Indexes" or add "Indexes" to an "Options" command (i.e., "Options FollowSymLinks" becomes "Options Indexes FollowSymLinks"). Make sure "AllowOverride Options" is included in the httpd.conf file in a <Directory> section for the directory where the DocumentRoot is.
  • Do not use "IndexIgnore *" to disable directory browsing. It is used to disable display of certain folders/files - not all folders/files - while directory browsing.

Now I feel I must address why I am a former UNIX System Administrator with 10+ years experience and have not worked with Apache configuration!

Way back before Windows 3.1, my employer used UNIX servers with terminals (we referred to them as dumb terminals because they had no processing capabilities - they just displayed what was delivered to them from the UNIX main frame computer).

I was the System Administrator for the UNIX systems. Again, that was before Windows 3.1 - and before the World Wide Web became widely used with the help of GUI web browsers.

Anyway… I was the System Administrator for those 8 or 9 systems. As such, I created UNIX user accounts, configured software (including UNIX-based WordPerfect!), wrote shell scripts, troubleshooted problems, created/managed Informix databases, wrote programs to interface with the databases, considered the vi editor and the "find" command my best friends. And more. Even after the WWW became popular, my employer didn't have a website until, I think, 1997 or 1998, but I had already left that employer in May 1996. But that's not the point here…

The point is: Although I was a UNIX System Administrator until 1996, I have never been the administrator for a UNIX-based web server (such as Apache)! Sure, I've played around with my own web hosting accounts on UNIX servers using the Apache web server since 1998 (maybe earlier?), but I haven't gotten into the nitty gritty of how Apache works.

Until today!


The Calendar that comes with Movable Type 4.01 links to the last Entry made on a day, instead of to a Daily Archive page for that day - probably because MT 4 doesn't ship with Daily Archives turned on. And, it doesn't highlight the current day.

So, I added MTCalendarIfToday in the Calendar code, created a "today" class in my custom stylesheet template, added a Daily Archive template and set its filename to /yyyy/mm/dd/index.php, and changed the day links in the Calendar code. Works great! The Calendar code changes are:

<div class="widget-calendar widget">
<h3 class="widget-header"><$MTDate format="%B %Y"$></h3>
<div class="widget-content">
<table summary="Monthly calendar with links to each day's posts">

<tr>
<th abbr="Sunday">Sun</th>
<th abbr="Monday">Mon</th>
<th abbr="Tuesday">Tue</th>
<th abbr="Wednesday">Wed</th>
<th abbr="Thursday">Thu</th>
<th abbr="Friday">Fri</th>
<th abbr="Saturday">Sat</th>
</tr>
<MTCalendar>
<MTCalendarWeekHeader><tr></MTCalendarWeekHeader>
<td <MTCalendarIfToday>class="today"</MTCalendarIfToday>>
<MTCalendarIfEntries>
<MTEntries lastn="1">
<a href="<$MTEntryLink archive_type="Daily"$>"><$MTCalendarDay$></a>
</MTEntries>
</MTCalendarIfEntries>
<MTCalendarIfNoEntries>
<$MTCalendarDay$>
</MTCalendarIfNoEntries>
<MTCalendarIfBlank> </MTCalendarIfBlank></td>
<MTCalendarWeekFooter></tr></MTCalendarWeekFooter>
</MTCalendar>
</table>
</div>
</div>

CSS for Calendar in MT 4

| No Comments


Without additional CSS markup, the default style of the Calendar widget in Movable Type 4.01 is squished, so I'm using these styles for the small monthly calendar in the sidebar:

.widget-calendar {
line-height: 120%;
padding: 0px;
text-align: center;
}
.widget-calendar th {
font-weight: bold;
line-height: 140%;
padding: 2px;
}
.widget-calendar td.today {
background-color: #E1E1E1;
color: #000000;
}

Test reCaptcha for comments

| 1 Comment


Test reCaptcha plugin with Movable Type 4.01. test test2 test3 test4 test5 test6 test7 test8 test9 test10

[Update 7:30pm October 24, 2007] Two nights ago, I worked on getting Captcha (built into Movable Type 4 as an option under Blog Settings) or reCaptcha to work correctly so commenters would need to enter the letters displayed on an image in order to submit a comment.

At one point, the Captcha image displayed, but I was having trouble with TypeKey so comments weren't being posted. When I authenticate to TypeKey, the TypeKey token does display in Registration under Blog Settings. But, when I try to leave a comment, a message displays something like "the owner of the blog hasn't setup TypeKey authentication".

So, then I decided to go with reCaptcha. I signed up (free) at the reCaptcha website and got my public and private keys. I made the recommended modifications in the README file. Google searches revealed that MT 4 has a bug in reCaptcha plugin settings that won't store those keys, so as recommended, I hard-coded them into the recaptcha.pl file. No luck.

So, I decided to use the TinyTuring plugin instead - and it worked right away! With TinyTuring, the commenter is required to type a single letter in order to post a comment. The letter will vary randomly with each entry.

Ah, success!

Of course, as noted on the TinyTuring web page, it doesn't prevent actual humans from going to your weblog and manually posting spam. But is is one more strike against comment spam!

I've seen a Movable Type (version 3.3 at this time) blog with reCaptcha working so I might give it another try sooner or later.


I wanted to change "/artscrafts/" to "/blog/" in all popup image files (these are not stored in the MT database so search-and-replace inside the Movable Type 4.01 administrative interface doesn't work for those files). The file for each popup image is stored in the same directory as the popup image.

The following worked for me, but there is no guarantee that it will work for you. I am not responsible for any problems you may encounter. Backup all files first.

To change a string of characters to a different string of characters in multiple files:

  1. At a Unix prompt, cd to directory where the files to be modified are located
  2. Type on one line: for f in *php; do sed 's/string1/string2/g' $f > $f.new && mv $f.new $f; done

Line 2 means: For every file ending with php, replace string1 with string2 and save the result into a new file, then move the new file over the original file.

For each slash in the string, I needed to use \ in front of it, as follows:

for f in *php; do sed 's/\/artscrafts\//\/blog\//g' $f > $f.new && mv $f.new $f; done

Multiple lines can also be used at a Unix prompt as follows:

for f in *php
do
sed 's/string1/string2/g' $f > $f.new &&
mv $f.new $f
done

Based on information in a thread at dBforums. Note: That code uses the Unix find command to locate files which could be in subdirectories. Back up all files and learn about the find command before using.

for fname in $(find . -name "*" -print)
do
sed '/word/s/word/new_word/g' ${fname} > ${fname}.new &&
mv ${fname}.new ${fname}
done


After all the re-publishing and researching I did yesterday, I realized that the filenames on my old blog site used underscores - not dashes - and, because of that, some links were broken on this new blog! Ack! (I knew I wanted to use dashes so I thought I had already been using dashes on the old blog!) I was by then too tired to try to fix it.

Today, however, I was ready to tackle this new problem! A Google search for "htaccess underscores dashes" revealed just what I needed! Using .htaccess Voodoo For Underscore and Dash Woes provides the solution with the exact lines to copy and paste into the .htaccess file. Changes I made:

  • There were 2 extra spaces that caused 500 errors until I removed them from the last and next-to-last lines just before \.html$
  • Changed "RewriteBase /" to the subdirectory for this blog, i.e., "RewriteBase /blog/"
  • Since I use .php extensions, I changed .html to .php
  • Added lines for $7, $8, $9 ,$10, and $11 because full titles use more than 6 words in some cases

Works like a charm!

[Update October 28, 2007] It seems that the wildcards go to only $9. So I added this line (it's one line, not three!) above the $9 line - it catches the first nine wildcard variables then the lines below this one catch the rest.

RewriteRule ^([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)
_([^_]*)_([^_]*)_(.*)\.php$
http://www.tamemymind.com/$1-$2-$3-$4-$5-$6-$7-$8-$9.php

More MT 4 configuration notes

| No Comments


Whew. I spent another bunch of hours here and there throughout the day fooling around with this blog. I researched and then tried Movable Type 4.01's dynamic publishing. Errors - "/blog/ not found" - but with the correct header and footer template modules. I researched more and still couldn't get it to work - kept getting "quot;/blog/ not found"quot; errors. So, I reverted back to static publishing.

Then I discovered pages on the site were broken - well, not broken, but gone! MT had renamed all files with a .static extension (example: index.php.static). So, I removed all the *.static files, re-published all (and waited at least 45 minutes...).

Then I discovered MT had reverted to 30-character basenames instead of using full entry titles for filenames. So, I removed all entry files, re-set the Entry template's filename format, re-published all again (and waited at least 45 minutes...).

Then I discovered that all templates were set to "Enable dynamic publishing for this template" so I unchecked that box for each template and re-published all again (and waited at least 45 minutes...).

Then I discovered that filenames were using underscores when I remember them being dashes (hyphens) yesterday. So, I researched that - and find it amazing that MT doesn't just offer users two more filename choices: full titles with dashes and full titles with underscores. Ack! I found the DirifyPlus plugin, installed it, configured the template filename format, and then...yes...re-published all yet again (and waited at least 45 minutes).

Now that I've unsuccessfully tried MT's dynamic publishing, I have two options to make updating the sidebar and making changes to styles, templates and template modules:

  1. Reconfigure the widgets and template modules to output to a file and then use PHP includes (which is how I did things before MT 4 - but I hoped to use more of MT's features, such as widgets and MTIncludes).
  2. Try to figure out WordPress - again.

This blog has been moved

| No Comments


I spent most of today from about 9:15am to about 6:30pm installing and configuring Movable Type 4.01, and moving the Tame My Mind - Cheryl's Arts 'n' Crafts blog to a new directory. Please change your links to http://www.tamemymind.com/blog/. This new URL allows me to re-title this blog - which is right now just Tame My Mind - at will without the URL being inconsistent. Redirects have been placed in an .htaccess file at the old URL, but that is only a temporary fix to help prevent most broken links.

After a few hours, moving around the MT 4 administrative interface was second nature. It's slow, but the layout is good. Display of the blog itself is still quick.

I like being able to create Pages that aren't date-based entries in the blog. I like that MT 4's Search and Replace works in the Keywords field too - I put thumbnail images in the Keywords field and place that field at the top of entries before the Body. I like the auto-save feature. But, why does the Rich Text format use <b> instead of <strong>?

I miss being able to save and rebuild a template or template module after modifying it - having to rebuild, err, publish the index templates to check a change I've made to a template, template module, sidebar, or widget and publish all to have those changes show up on each entry is a pain. The MT 4 documentation on dynamic publishing doesn't explain clearly enough how it works, but I may give it a try.

Subcategories are imported as top-level categories, so subcategories with the same name were imported into the same top-level category! Ack! For example, entries assigned the subcategory of Crochet > General or Knit > General were combined into General - not what I wanted. That issue required removing all entries from the new blog, changing all categories in the old blog to top-level categories with unique names (example: Crochet General, Knit General), re-exporting, re-importing into the new blog, and re-publishing. The import procedure on the new blog then created all of those uniquely-named top-level categories. The redirects in the .htaccess file take the category/subcategory changes into account.

Then I discovered the default basename (filename) for MT 4 is 30 characters and since the assigned basename for entries is not exported, all entries imported into the new blog had truncated filenames with a maximum of 30 characters. This wouldn't have been a problem if the old blog didn't use the full entry title (longer than 30 characters in many cases) as the filename. So, I modified the archive path for the Entry archive template, removed all date-based folders, category folders, and pages folder from the server, and published all again.

There were other hiccups which caused me to have to remove folders and re-publish multiple times.

By the way, there are only 649 entries and only 388 comments as of this moment. To publish all takes about 45 minutes. Ridiculous. Oh, and to publish 1 entry takes almost 35 seconds. Also ridiculous.

In the past, I've looked into WordPress, but just haven't been able to dig into the spaghetti (and thorough) documentation and Template Tags enough to really understand WP. Movable Type makes more sense to me. However, 45 minutes to publish all entries when the header, footer, sidebar, a template module or a widget is modified makes it worth looking into again. (Besides, understanding WordPress will come in handy at work too - WP is free and free is good for colleges.)

Moving This Blog

| No Comments


I'm upgrading to Movable Type 4.01 and am moving this blog to:

http://www.tamemymind.com/blog/.

I'm still fine-tuning a bit and want to eventually add an image header and implement a server redirect to point this old website to the new one.

Got it! Ravelry invite!

| No Comments


20071015logoravelrybeta.gif My Ravelry invite arrived the other day! I've gotten as far as signing up (I'm "cherylcrochets") and taking a brief look around. Good grief! 586 Ravelers are online at this moment! Wow!

I'm not sure just how much I'm going to input into my account there. I use my blog for tracking current and future projects. I'm not interested in tracking how much yarn I have on hand. But, I'm looking forward to seeing what other people are making!

Got it! Crazy Aunt Purl's book!

| No Comments

A great laugh. A cute smile.

| No Comments



So adorable! Tony Stewart laughing.

Such a cute smile!

Is this the color of your house?

| 1 Comment


[I started this entry on September 28! I'm just not feeling the bloggy or email love lately... By the way, I had to turn off commenting (for now) on this blog due to receiving about 200 spam comments in a few hours.]

Just after we had new colored stucco applied to our house two weeks ago, our next door neighbor, Dee, stood in front of our screen door and called my name. I walk outside onto the porch and she says "Dude and I have a bet for dinner tonight." She points to the medium-gray-with-a-faint-olive-green-tint stucco recently placed on the walls and gables of our house and says disbelievingly, "Tell me. Is this the color of your house?"

I smile knowingly (I was in disbelief too). "Well, it is the colored stucco - not an undercoat waiting to be painted - but the color is not what we thought it would be based on the one-inch by half-inch color chip. So, you're both right!" Pause. "It is currently the color of our house but it is medium grey - unfinished grey looking - and we're thinking about painting over it in a few weeks after the stucco cures."

To top it off, it rained a few days after the stucco had been applied and it got stained from roof-to-ground dirty water splatter because the gutter downspouts had been removed in preparation for new gutters being installed - see the darker areas that have an olive green-ish tint in the above photos?

So, even if we decide we like the medium grey color of the stucco, we may still decide to paint because of the staining.

Adventures in Finding the Right Color for Our House

The trials and tribulations of choosing a color to paint our house is underway. The first green we tried turned out to be a light mint green color (above) on the test wall of the shed in our backyard. The second green so far is a medium mint green and the third color more grass green than sage - also not what we wanted. I'm bummed a bit by the waste of paint and time and energy of this color-choosing process. However, we're closer now than we were a few days ago to finding something we like.

The Garage Door

Our garage door is cream colored. It needs to be washed with soap, but it'll still be cream. Because of the expense to replace it with a white garage door, we'll probably keep it cream as I don't think the panels will hold paint well.

Trim

The medium and chocolate brown trim colors are slowly being covered with white - three coats of white - after trim areas are sanded and putty applied where needed.

The Side Gates

The side gate on the north side of the house was replaced. Since the side gate on the south side is shorter, Bill wants to replace it with a taller gate. And, since both will need painting/staining, I've decided they'll be the dark red-ish color of the backyard fence.

Prep Work

To prepare for re-stuccoing the back wall of our house, Bill removed the shade cover between the house and the shed and cleaned the area up by moving around the junk - err, stuff, that had been there. It looks much better!

And, all the plants in pots in front of the house, on the porch, and on the plant benches in the backyard needed to be moved. I tried to find shaded areas for those that want shade, and sunny areas for those that need sun. Most of the plants seem to have made it through.

So the gutters could be replaced, Bill trimmed about 4 inches off the side of the shade cover over the backyard deck and potted plant benches. He also needed to replace the brace he had attached to the house to hold up the 4th corner of the plant area shade cover with a fourth post - and cut through the one of the planter benches to fit around the post.

Tony and Jeff.

| No Comments


Tony Stewart talks with Jeff Gordon.

I'm a Tony fan. Bill is a Gordon fan. A co-worker wonders how hubby and I are able to live together. That's easy, I said. I let him believe he is right, and he lets me believe I am right.

Sketch of Cheryl

About Cheryl

Enjoys crocheting, gardening, cats, NASCAR (especially Tony Stewart and Kyle Busch!), reading, photography, snorkeling in Kailua-Kona with sea turtles, Sizzler's Mega Bacon Cheeseburgers, hot and iced decaf coffee, dark chocolate, color (yarn, fabric), playing around with web technologies - not necessarily in that order! Still very much a beginner with quilting, knitting, and sewing. Donates crocheted lap blankets.

List maker, detail-oriented, organized, leans heavily toward perfectionism. ISTJ. Libra.

January 2017

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Disclaimer: This is a personal website - my place of self expression. The views expressed are mine alone and do not necessarily reflect the views of my employer or any other organization I am a member of or affiliated with.
Creative Commons License
This blog is licensed under a Creative Commons License.
Powered by Movable Type 5.2.2

About this Archive

This page is an archive of entries from October 2007 listed from newest to oldest.

September 2007 is the previous archive.

November 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Cat playing with strand of yarn.

Categories





Recent Comments

  • debbbie30612: Thanks Cheryl I had a swatch of this pattern many read more
  • adam.primecp: Love this! I work with AllFreeCrochet and have been trying read more
  • https://me.yahoo.com/a/D8Oev_8Mxu75CBjlEjpcBlE_WLRYeJVqR0Jhe5AjA2PaNlLJrA--#cc2f1: Hello... I am looking for a Cheryl Lambert that is read more
  • https://me.yahoo.com/a/.dRNnEghie74uO4s1u4NP1Y4PSzW1GVfFAoIpA--#dfeb8: Please please also let me know how to contact read more
  • ancyvan66: I am working on one of these right now. I read more
  • joebrazauskas: Cheryl, I really meant to respond on your page about read more
  • https://me.yahoo.com/a/RDxFQ8NirpKvRNfxRFmBw2ZtMUo43MRsMYAD#1a2df: Hi, just came across your blog today and wanted to read more
  • jeaninkpr: Thanks so much - this is exactly what I was read more
  • Marion Vanstone: Hi Cheryl I received an email from Katherine Keselowsky (aka read more
  • Sandra: 'A Dozen & One Tunisian Dishcloths' by Annie's Attic I read more
HERE1 HERE2