Recently in weblog Category

in weblog | | comments (0)

The rest of the site was converted to the new look.

For the about section, I thought using the “3-column footer in a 2-column theme” — putting categories, links, delicious tags etc that is all the rage now. But that means relegating static pages to the bottom of the screen and no one will ever read them.

Instead I created a new blog for the about section, to include — 100 things, faq, specs and the 25 square personal pages. There’s no actual about.php page, because there isn’t much to say. I figured out how to use the Pages function for these. Added the Pages widget to the sidebar, create a new page, save in its own folder and they get published. The standard Pages widget includes nesting by folder, but I took it out since it’s all flat in the hierarchy.

The download page on hidden doors is a page.

I fixed the divs on the 404 page too.

I think this is it.

delicious  digg  facebook  google  reddit  stumbleupon
in images , weblog | | comments (0)

maratreeblue
I got tired of the fugly minimalist white header and boring text at the top so I made myself a logo and new header.

The logo is a variation of maratree; this time it’s the bright blue-orange combo version. If anyone asked me how I got from the original to this, I will have to shrug and say no idea. I was playing around with photoshop. The text is based on the blue and orange colour of the image. I fiddled with margins and padding in the header to fix the position.


mt4header

delicious  digg  facebook  google  reddit  stumbleupon
in weblog | | comments (0)

main index

The main index for hidden doors is pretty much unchanged from before. Instead of the default entry view it shows category title, category description and a horizontal listing of individual entries. In other words: story title, story information and chapter headings.

With the new modular system the main index template is so much cleaner:

<MTSetVar name=”body_class” value=”mt-main-index”>
<MTSetVar name=”main_template” value=”1”>
<MTSetVar name=”main_index” value=”1”>
<MTSetVar name=”sidebar” value=”1”>
<MTSetVar name=”module_recent_entries” value=”1”>
<MTSetVar name=”module_category_archives” value=”1”>
<MTSetVar name=”module_author_archives” value=”1”>
<MTSetVar name=”module_monthly_archives” value=”1”>

<$MTInclude module=”Header”$>

<$MTInclude module=”Disclaimer”$>

<$MTInclude module=”Categories Summary”$>

<div class=”content-nav”>
<a href=”<$MTLink template=”archive_index”$>”>archives</a>
</div>

<$MTInclude module=”Footer”$>

I created 2 new modules. The disclaimer is just text contained in a box. Categories summary is a modification of the default category listing that is usually found in the sidebar. Hardly any change from 3.35.

<MTTopLevelCategories>
<MTSubCatIsFirst></MTSubCatIsFirst>
<MTIfNonZero tag=”MTCategoryCount”>
<div class=”asset-header”>
<h2 class=”asset-name”><a href=”<$MTCategoryArchiveLink$>”
title=”<$MTCategoryLabel$>”><MTCategoryLabel></a></h2>
</div>
<$MTCategoryDescription$>
<div class=”asset-content”>
<MTEntries sort_by=”title” sort_order=”ascending” glue=” | “>
<a href=”<$MTEntryPermalink$>”><$MTEntryTitle$></a>
</MTEntries> | <a href=”<$MTBlogURL$>download.php” title=”download”>downloads</a>
</div>
<MTElse>
<h1 class=”archive-title”><MTCategoryLabel></h1>
</MTElse>
</MTIfNonZero>

<MTSubCatsRecurse>
<MTSubCatIsLast></MTSubCatIsLast>
</MTTopLevelCategories>


So happily I went off to publish, expecting a similar look to before. And I tried again. And again. And again. What was wrong? The entries simply refused to list in ascending order even though I’d specified MTEntries sortby=”title” sortorder=”ascending”. It turns out that it’s a known issue. How ridiculous is that? They’re at version 4 and they can’t get something this simple to work?

Blimey.

entry listing archive

Normally this is the “Recently in [category] category” page that shows full entries. My modification is to use this archive template to list all chapters in one story.

<MTSetVarBlock name=”body_class”>mt-archive-listing mt-<MTVar name=”archive_class”></MTSetVarBlock>
<MTSetVar name=”sidebar” value=”1”>
<MTSetVar name=”module_about_context” value=”1”>

<MTSetVarBlock name=”page_title”><$MTArchiveTitle$></MTSetVarBlock>

<$MTInclude module=”Header”$>

<h1 class=”archive-title”>
<MTUnless name=”datebased_archive”>
<MTIfArchiveType archive_type=”Category”>
<em><$MTArchiveTitle$></em>
</MTIfArchiveType>
<MTIfArchiveType archive_type=”Author”>
Recently by <em><$MTArchiveTitle$></em>
</MTIfArchiveType>
<MTElse>
<$MTGetVar name=”page_title”$>
</MTUnless>
</h1>
<$MTCategoryDescription$>
<MTIf name=”datebased_archive”>
<MTEntries>
<$MTEntryTrackbackData$>
<$MTInclude module=”Entry excerpt”$>
</MTEntries>
<MTElse>
<MTEntries limit=”auto”>
<$MTEntryTrackbackData$>
<$MTInclude module=”Entry excerpt”$>
</MTEntries>
</MTIf>

<div class=”content-nav”>
<MTArchivePrevious>
<a href=”<$MTArchiveLink$>”>« <$MTArchiveTitle$></a> |
</MTArchivePrevious>
<a href=”<$MTLink template=”main_index”$>”>Main Index</a> |
<a href=”<$MTLink template=”archive_index”$>”>Archives</a>
<MTArchiveNext>
| <a href=”<$MTArchiveLink$>”><$MTArchiveTitle$> »</a>
</MTArchiveNext>
</div>

<$MTInclude module=”Footer”$>


I added an include for category description and created a new module called entry excerpt. This is based on entry summary, changing MTEntryBody to MTEntryExcerpt. Word count (so important!) is from the mt-wordcount plugin. which I’ve used since I started with mt.

<div id=”entry-<$MTEntryID$>” class=”entry-asset asset”>
<div class=”asset-area”>
<div class=”asset-title”><a href=”<$MTEntryPermalink$>”><$MTEntryTitle$></a></div>
<MTIfNonEmpty tag=”EntryBody”>
<div class=”asset-area”>
<$MTEntryExcerpt$> <br />
Date: <$MTEntryDate format=”%e %B %Y”$><br />
Word count: <$MTWordCount$> words<br />

</div>
</MTIfNonEmpty>
<MTIfTagSearch>
<$MTInclude module=”Tags”$>
</MTIfTagSearch>
<MTIfNonEmpty tag=”EntryMore” convert_breaks=”0”>
<div class=”asset-more-link”>
continue reading <a href=”<$MTEntryPermalink$>#more”><$MTEntryTitle$></a>.
</div>
</MTIfNonEmpty>
</div>
</div>



archive page

Lists all entries in chronological order. Since I use simple entry titles (“part 06”) it’s not a very useful page.

about

The new feature in mt4 is the about blurb at the top of the sidebar. Sometimes it’s useful. I changed the wording somewhat to reflect that I have stories and chapters instead of categories and entries. For the single entry archive I had to re-implement the previous next in category plugin. I’m glad it still works with mt4. Simple substitutes for MTEntryPrevious and MTEntryNext and a little change in formatting.

<MTEntryPreviousInCategory>
<p><a href=”<MTEntryPermalink>” title=”Previous in category”>« <MTEntryTitle></a> |
</MTEntryPreviousInCategory>
<MTEntryNextInCategory>
<a href=”<MTEntryPermalink>” title=”Next in category”><MTEntryTitle> »</a></p>
</MTEntryNextInCategory>

I suppose the single entry page shouldn’t have a sidebar, but *whatever*.

delicious  digg  facebook  google  reddit  stumbleupon
in weblog | | comments (0)

Templates

This was the toughest part of the upgrade. And the most scary. New features to the templates are:

  • new archive types — for example category: monthly, entry, entry listing and page
  • paginated archives — not sure how useful these are to me, but it’s all good
  • consolidated archive templates
  • restructured default templates — instead of a long and cluttered file full of code, it’s now a modular system
  • widgets — what used to be includes

There are official instructions on how to upgrade 3.3 templates to 4 templates. Mostly it involves editing existing templates to fit the new version.

What SixApart called for the brave of heart only, is to use the default 4 templates in order to take advantage of “all the new features, new archive types, new template tags, new widgets and new template structure.” Why is it so daunting? Because it’s basically a fresh install, rendering all old templates inactive. In practice this means deleting all the old templates and starting from scratch.

My old templates were full of includes and little hacks here and there. I thought about it — will I lose a lot by implementing fresh templates? The answer was no. I know I will end up learning more about the system this way.

*deep breath* here goes.

the easy part

  1. retrieve index txt files from the backup
  2. create a new blog — I’ve talked about the recipe section for years, now is the perfect opportunity
  3. set preferences
  4. under design>templates check each template — I found that no configuration was needed and looking at the main index made me appreciate the clean-ness of the modular system
  5. check out the new archive templates — again no configuration needed, I’m still learning
  6. click on template modules — look at the building blocks

  7. mt4modules

  8. configure header to show site name
  9. edit entry metadata so it shows preferred date format and category
  10. by far the most editing is in the sidebar but it’s relatively painless using widgets — I added calendar, bloglines list, buttons and an admin section; the search bar I moved down from where it was at the top
  11. talking about widgets, these are great … pretty intuitive
  12. no change to system templates
  13. save and publish (I’m getting used to calling it publish instead of rebuild)

I made a couple of new posts just to see how it all looks, and it was okay.

the hard part

  1. start with the travel section — fewest posts, and I figured this is the one section I can afford to completely rebuild if necessary
  2. check preferences
  3. under Design>templates go first to the index template section, take a deep, cleansing breath and delete all the templates
  4. with 2 tabs open — one with the current blog and one with the baseline recipes blog — copy the baseline templates one by one and create an identical new one in the target blog
  5. repeat with all templates — this will take about an hour of intense ⌘-c and ⌘-v
  6. some of the templates can be just refreshed (menu under more actions) but just to be pedantic, it’s worth double checking each one
  7. save and publish
  8. re-edit any parts that need tweaking

So that was it. Took 2 nights working till very late to accomplish. I still need to look at all the archive pages further down the hierarchy and change some of the verbage and positioning. But I consider it 90% done for every section except hidden doors. Talking about hidden doors, the modular system worked very well, I created a new module to hold the disclaimer and use mt-include on the main index to call it. The trick is to change the main index and category archive to show categories rather than entries.

delicious  digg  facebook  google  reddit  stumbleupon
in weblog | | comments (0)

I guess I can break down the process of upgrading into 3 parts: Installation, Templates and Styles. I’ll split them up into 3 posts.

Installation

There are two official methods for upgrading. The first is to replace old files with new: this preserves existing indexes, templates and customisations. The second, and recommended, is to download MT4 into a fresh installation, then copy over plugins and customisations. Step 5 of the recommended way says:

Login to Movable Type - The first time you access Movable Type, the system will detect the new version of MT installed on your system and take you through the automated process of upgrading your database. When this process is complete, you will be able to begin using Movable Type immediately.

Except it didn’t work for me. When I logged in as usual by pointing the browser to mt.cgi I got a server 500 error. What SixApart didn’t point out, or assumed, was that the permissions on the cgi files are correctly set. This isn’t the case. In any event, Elise’s instructions on how to safely upgrade to mt3.3 also apply for mt4. The steps I followed:

  1. back up everything — ftp the entire site to my computer, exported all entries by clicking the Import/Export button, exported the database using myphpadmin
  2. rename 3.35 folders — mt became mt3.35 and mt-static became mt-static3.35
  3. place the mt4 folders in their proper place on my hard disk — the mt folder in cgi-bin and mt-static in the root directory
  4. make a duplicate of mt-config.cgi-original and call it mt-config.cgi
  5. edit mt-config.cgi to configure urls, paths, database and to copy the customised directives from the mt3 mt-config file
  6. ftp mt4 files to the server
  7. I did not copy plugins into the new installation — I’ll reinstall the ones I need after installation
  8. change the permissions of all cgi files to 755
  9. login as normal
  10. hey presto! I got the Time to Update prompt
  11. allow to update then return
  12. afterwards change permissions of old cgi files to 644

mt4upgrade

I was then greeted with the new “back in black” dashboard. Heh, they even took the name from Wordpress. What I like about the dashboard:

  • looks clean and sleek
  • easy stats — though it’s probably more useful for a multi-authored, more complicated blog
  • system-wide configurations — very useful for those of us with more than one blog in the installation
  • switching to another blog brings me to (roughly) the same point in that blog rather than the homepage
  • autosave
  • easy edit entry screen, with tabs for body and extended body, easy selection of tags and categories (pop ups are gone forever, thank god)
  • wysiwyg preview
  • publish (what used to be rebuild) is faster and is on the main menu
  • did I mention the shiny black header?

What I dislike about the dashboard:

  • posting a new entry is now 2 extra clicks away; they desperately need to list all the blogs on the home dashboard page to give users one click posting (ie the old dashboard). I know I can set up bookmarklets but I don’t like them [ETA: there’s a plug-in which replicates the 3.35 screen which is great. my bugbear is that it’s at the bottom of the screen]
  • the contextual menus activate far too easily, just mouse over accidentally and they drop down
  • no breadcrumbs — going back and forth when updating templates (more later) was a nightmare of clicking, clicking and more clicking
  • while the stats are interesting, it’s of little or no use for me as a single author on a personal site
  • too much clicking

mt4dashboard


delicious  digg  facebook  google  reddit  stumbleupon
in images , weblog | | comments (0)

After yesterday’s musings, I made a prototype page for the gallery using simpleviewer and flickrviewer.

  1. download SimpleViewer
  2. download flickrviewer
  3. get flickr api key
  4. configure api key — the instructions are supposed to be simple but proved to be more fiddly than I thought

    • make a note of the key and the shared secret key
    • click “edit key details”
    • enter details of the application — I put simpleviewer and flickrviewer
    • under callback url enter the location of the simpleviewer application:
      http://invisiblecompany.com/gallery/simpleviewer
    • create a login link in the format:
      http://flickr.com/services/auth/?api_key=[api_key]&perms=[perms]&api_sig=[api_sig]
      [api_key] is my api key
      [perms] can be read, write or delete — write includes read and delete includes r/w
      [api_sig] is the md5 sum of [secret]api_key[api_key]perms[perms], meaning if [secret]=123 and [api_key]=999 and I set write permissions I get 123apikey999permswrite. A simple online tool converts to md5: 3062e84e9b0014d31c5ee946ef4283a9
      my login link is: http://flickr.com/services/auth/?api_key=999&perms=write&api_sig=3062e84e9b0014d31c5ee946ef4283a9
    • enter the login link in the browser and flickr will ask me to grant permission for simpleviewer to access my flickr folders
  5. in Dreamweaver or a text editor edit flickrviewer.php according to instructions in the file
  6. ftp to server
  7. point browser to gallery location
  8. clear cache if necessary

This displays all the pictures in my favourites flickr set. Full screen shot to see the location of the flash viewer.

gallery with flickrviewer

delicious  digg  facebook  google  reddit  stumbleupon
in weblog | | comments (0)

Started with the cleaning up. It’s easy to copy entries from one blog to another, just follow these simple instructions. I found I didn’t need to ftp the data txt file to my computer because my website’s control panel allows me to text edit. I did it anyway to backup the file.

Copied over entries in delicacies to quiet thoughts — just the few entries on where I lived and odd bits.

Merged both writing sections. Reorganised so there were parent categories and each story / article is a sub-category. Twiddling with the main index template code so it displayed sub-categories the way I wanted wasn’t as difficult as I thought. I took the MT3 default index template, made small changes and previewed after each change. I kept the old code.

<MTTopLevelCategories>
<MTSubCatIsFirst></MTSubCatIsFirst>
<MTIfNonZero tag="MTCategoryCount">
<h2 class="title"><a href="<$MTCategoryArchiveLink$>"
title="<$MTCategoryDescription$>"><MTCategoryLabel></a></h2>
<$MTCategoryDescription$><br /
<MTEntries>
<a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a> |
</MTEntries><a href="<$MTBlogURL$>download.php" title="download">downloads</a>
<br /><br />
<MTElse>
<br /><h2 class="date"><MTCategoryLabel></h2>
</MTElse>
</MTIfNonZero>
<MTSubCatsRecurse>
<MTSubCatIsLast></MTSubCatIsLast>
</MTTopLevelCategories>


<!--original code for 2.661 when there weren't sub-categories
<MTCategories>
<h2 class="date"><a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a></h2>
<$MTCategoryDescription$><br />
<MTEntries>
<a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a> |
</MTEntries><a href="<$MTBlogURL$>download.php" title="download">bonus features</a>
<br /><br /><br />
</MTCategories>
-->

I deleted a couple of unused folders. So this morning I had 9 blogs on my installation. Now I have 7, including 2 that will be deleted eventually — I’m keeping them so I can test when I next upgrade. The gallery will be moved away from MT … what to, I don’t know yet. Ultimately I’ll have 4 sections, and pizzaorme.

delicious  digg  facebook  google  reddit  stumbleupon
in weblog | | comments (2)

Done it. Thanks Elise.

Deleted everything I did yesterday in terms of upgrading.

Create new MT folders
Renamed the final 2.661 mt folder to mt 2.661. Copied 3.35 folder and renamed it mt. This means none of the old files are in the new folder. MT suggests that we overwrite new files into the existing folder — this is confusing, as there is a potential for old files and scripts to stay in the folder.

Renamed existing mt-static file to mt-static 2.661. Copied 3.35 mt-static to the root directory (it must be outside cgi-bin).

Configure setup script
Duplicated mt-config.cgi-original and renamed it mt-config.cgi. Made changes to database parameters. In 3.35 there is no longer mt-db-pass.cgi, the password is in the config.

ObjectDriver DBI::mysql
Database invisibl_mtDB
DBUser [username]
DBPassword [password]
DBHost localhost
DBSocket /tmp/mysql5.sock

Scrolled through the 2.661 final cfg file and copied over custom commands.

#================ CUSTOM SETTINGS ==================
# These are copied over from the final 2.661 cfg file

CommentScript mt-cmts.cgi
TrackbackScript mt-tbk.cgi

DBUmask 0022
HTMLUmask 0022
UploadUmask 0022
DirUmask 0022

HTMLPerms 0775
UploadPerms 0775

The last two were really important. These directives set the permission for archives and pages generated. In the tutorial and default, it’s set at 644. But when I rebuilt the site (more later), I got a 500 error (top). Now that 500 error must be a server side error because I have my custom 500 error page (bottom). Which is what tweaked me to the fact that I needed to specify permissions.

500errors

Upgrade
Once the files were in place, I pointed the browser to the MT admin panel: http://www.invisiblecompany.com/cgi-bin/mt/mt.cgi and hey presto! It automatically detected the new installation. I clicked “Begin Upgrade” and it zipped through the process. There was just about enough time to do a couple of screenshots, and it was done.

mt335upgrade

Rebuild
I decided against dynamic publishing, so not so many additional customisations. All I did was to take out the dirify on uri names and switched to the new (well, new in MT3) basename naming convention. So now pemalinks have the format: /archives/yyyy/mm/dd/entrytitle.php.

Rebuilding was done blog by blog. It was quite harrowing, I deliberately left the 2 most important till last — pizzaorme and *quiet thoughts* — rebuilding my main journal with 900+entries was scary. There was too much there at risk.

New Look
And for posterity’s sake, the final 2.661 admin screen and the initial 3.35 admin screen.

mt2661final

mt335initial


delicious  digg  facebook  google  reddit  stumbleupon
in weblog |

MT comes with atom, rss1 and rss2 feeds. But I never know what to do, or cared what happened, to them. Then I decided my bloglines feed should be full body post and not excerpt only. I made a small change to the template and I got my entry text but no line breaks.

A little searching around and I came across a tutorial from etc that enables full post + comments in my rss2 feed.

<?xml version="1.0" encoding="iso-8859-1"?> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">

<channel>
<title><$MTBlogName remove_html="1" encode_xml="1"$></title>
<link><$MTBlogURL$></link>
<description><$MTBlogDescription remove_html="1" encode_xml="1"$></description>
<dc:language>en-us</dc:language>
<dc:creator><MTEntries lastn="1"><$MTEntryAuthorEmail$></MTEntries></dc:creator>
<dc:rights>Copyright <$MTDate format="%Y"></dc:rights>
<dc:date><MTEntries lastn="1"><$MTEntryDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></MTEntries></dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=<$MTVersion$>" />
<admin:errorReportsTo rdf:resource="mailto:<MTEntries lastn="1"><$MTEntryAuthorEmail$></MTEntries>"/>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

<MTEntries lastn="15">
<item>
<title><$MTEntryTitle remove_html="1" encode_xml="1"$></title>
<link><$MTEntryLink encode_xml="1"$></link>
<description><$MTEntryExcerpt remove_html="1" encode_xml="1"$></description>
<guid isPermaLink="false"><$MTEntryID$>@<$MTBlogURL$></guid>
<content:encoded><![CDATA[<$MTEntryBody$><MTEntryIfExtended><p><a href="<$MTEntryLink$>" title="Continue Reading: <$MTEntryTitle$>">Continued reading <$MTEntryTitle$>...</a><p class="font-family:Verdana, Arial, sans-serif; font-size:11px; color: #333333; background-color: #f5f5f5; border: 1px solid #c0c0c0; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 4px; display: block;"></MTEntryIfExtended></p>
<p>
<MTEntryIfAllowPings><a href="<$MTCGIPath$><$MTTrackbackScript$>?__mode=view&entry_id=<$MTEntryID$>" onclick="OpenTrackback(this.href); return false">TrackBack (<$MTEntryTrackbackCount$>)</a> | </MTEntryIfAllowPings><MTEntryIfAllowComments><a href="<$MTEntryLink$>#comments" title="Comment on: <$MTEntryTitle$>">Comments (<$MTEntryCommentCount$>)</a></p>
<p>Comments on this Entry:</p>

<MTComments><p>(<MTCommentAuthorLink show_email="0" > on
<MTCommentDate format="%b %e, %Y %l:%M %p">)

<MTCommentBody convert_breaks="0"
remove_html="1"></p>
</MTComments></description>
</MTEntryIfAllowComments>]]></content:encoded>
<dc:subject><$MTEntryCategory remove_html="1" encode_xml="1"$></dc:subject>
<dc:date><$MTEntryDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></dc:date>
</item>
</MTEntries>

</channel>
</rss>


delicious  digg  facebook  google  reddit  stumbleupon
in weblog |

I’d already tidied up the format of entry files so they have both enty ID and title. Now finally I get round to tidying up the category names.

Posts now have the uri:

home/section/archives/category/000123title.php

The spec to use under Archiving in weblog config is from elise.com, both category and post names are trimmed to 20 characters

<$MTEntryCategory dirify="1" trim_to="20"$>/<$MTEntryID pad="1"$><$MTEntryTitle dirify="1" trim_to="20"$>.php

Categories have their own subdirectory now:

home/section/archives/category/index.php

/index.php
delicious  digg  facebook  google  reddit  stumbleupon
in weblog |

I enabled Markdown and Smartypants in all the MT powered sections. These plug-ins are supposed to help with text formatting. Let’s see.

“pretty double quotes”

‘pretty single quotes’

emphasis

strong

— en dash

—- em dash

… ellipsis

Link to the homepage

Thanks, Daring Fireball.

delicious  digg  facebook  google  reddit  stumbleupon
in security , weblog |

When I first set up bullko, I got hit by the stupid poker guy comment spam, where seemingly profound but basically useless comments were left on every single entry, with a link to his website of course. A quick visit to the wordpress support forums yielded a couple of preventative measures.

Do this for all wp powered sites.

wp-blacklist

Like mt-blacklist this is a plug-in that is copied and pasted into wp config. Last updated 21 Sept 2004, I just downloaded it. I'm not sure if it's as good as mt-blacklist (I mean, Jay Allen, wow) but someone has obviously made a huge effort so kudos.

comments file
First I renamed wp-comments-post.php to wp-stopcmts.php. The name doesn't matter, it can be a random jumble of letters like asdfasd.php.

Then I renamed occurences of wp-comments-post.php in the other comments files to the new name. Apparently this is called in 3 files, so I went in and made the changes:

  • wp-comments.php
  • wp-comments-popup.php
  • wp-comments-reply.php

Boy I hate spammers.

delicious  digg  facebook  google  reddit  stumbleupon
in weblog |

In the writing sections the chapters are titled, for want of something original, Part 1, Part 2 etc. In the category and individual archives these entries are sorted by title, in ascending order.

<MTEntries sort_by="title" sort_order="ascend">

When I reached Part 10, I saved and rebuilt as normal, but initially I couldn't find the Part 10. Then I looked more closely and found out it was stuck between Part 1 and Part 2. Huh?

So I had to rename all the early parts Part 01, Part 02 etc. Not only within the MT interface, but in the control panel too, cos the individual pages got renamed from like 000488part_1.php to 000488part_01.php and I had to physically delete the old files.

Not so pretty but nothing too displeasing either. Strange how logic works, in human minds, 10 doesn't come between 1 and 2 but obviously not so in the world of bytes and bits.

delicious  digg  facebook  google  reddit  stumbleupon
in how to code , weblog |

One of the requirements on bullko.com is to display future dated entries. Say you're planning an event that's spread over 2 weeks and you want people to see what events are on which day, even in the future, so people can plan. That's how.

As more and more people use the likes of MT and WP as cms this is becoming important. MT does it, I tried on quiet thoughts with no problem. WP initially didn't, until I searched for it in the support forums.

First, show the entry in the main body.

In wp-blog-header.php find:

if ($pagenow != 'post.php' && $pagenow != 'edit.php') { if ((empty($poststart)) || (empty($postend)) || !($postend > $poststart)) { $where .= ' AND post_date <= \''.$now.'\''; }

Add // before the $where:

if ($pagenow != 'post.php' && $pagenow != 'edit.php') { if ((empty($poststart)) || (empty($postend)) || !($postend > $poststart)) { //$where .= ' AND post_date <= \''.$now.'\''; }

Then, make sure it shows in the calendar. In templates-function-general.php in the wp-includes folder, find:

AND post_date < '" . current_time('mysql') . '\'', ARRAY_N);

change to:

AND post_date <> '" . current_time('mysql') . '\'', ARRAY_N);

A bit further down, find:

."AND post_date < '".current_time('mysql')."' "

change to:

."AND post_date <> '".current_time('mysql')."' "

Nifty.

delicious  digg  facebook  google  reddit  stumbleupon
in weblog , what's new |

I got approved for obscured logs and verbosity, both webrings. I was checking, the previous and next links for obscured logs seem to be random links but for verbosity they're fixed. The previous verbosity is called heart failure by this 21 year old girl. The next link is someone's test blog. I'm a bit annoyed at that. And there's no link to the ring, which I think contravenes the rules?

I got a comment for quiet thoughts. Amazing. I did a trackback to Mena Trott's post on weblogging, I guess people do read her writings, seeing that she's co-founder of Six Apart afterall. I don't know whether the commenter came from the trackback or via the rings. I'm just glad someone's popped by.

Scary. It's like first night on stage, peeping my head out, trying not to get noticed, but wanting to be.

delicious  digg  facebook  google  reddit  stumbleupon
in weblog , what's new |

I did a couple of little something to see if I can get some traffic onto the site. Search engine submission places charge money, so that was out. Not that desperate.

I went over to ringsurf and looked at web rings. There were a few interesting ones, I put quiet thoughts on one called obscure logs — 300-odd members and quite a high hit count. There was another Buffy related ring that I was interested in, but when I clicked on random sites it kept bringing me to sites that either don't exist or very bare. The ringmaster at obscure seems much more on top of things.

I also updated the page I had at tripod with a stripped down version of the homepage. I'd forgotten I had a homepage at tripod, just figured I had the weblog. For a long while it was an under construction page, what an opportunity wasted.

Look and feel are the same, with the animated gif logo banner and sidebar. Wasn't sure if they supported php so I took out the includes and the random image rotator. At first I did an animaged gif of just 6 images but it turned out to be too big so I loaded a plain image instead. Links are all in place, pointed back here to the site. I took out hidden doors completely. Kept it simple, html but still css.

Repeated at geocities.

Figured, these are the 2 biggest free web page providers around, perchance someone might stumble across those pages and follow the links.

invisiblecompany.tripod.com
geocities.com/invisiblecompany

That's not cheating, right?

delicious  digg  facebook  google  reddit  stumbleupon
in security , weblog , what's new |

In the weblog I added a script from orange haired boy which password protects entries.

It involves setting a restricted category so all entries there need a password to get in. It has to be implemented on all pages that show individual entries, meaning main index and all the archive pages.

I also highlight weblog entries on the homepage, but I get a php parse error, probably because I'm trying to run a php script where part of it is on an include. I need to fit it.

Once the password is entered it works until cookies are deleted so I'll have to be careful about reading on other people's machines.

Cool script though.

delicious  digg  facebook  google  reddit  stumbleupon
in how to code , weblog |

I re-did the homepage. Again.

Same stylesheet as before, ie left sidebar and main content area.

I rewrote the preamble, still not happy with it. People coming to the homepage for the first time isn't likely to know what the hell's happening by reading it, but it's the best I can do. The body text follows the blogbody style instead of the more obvious bodystyle, so links actually show up. I've tried to incorporate links to the rest of the site in the write-up.

Didn't want to make the weblog the front page, because the question is, which weblog? Quiet thoughts? Shiny parts? Or the semi-static pages?

I did want to highlight recently updated weblog content though, so the most recent entry shows up on the homepage. So I used the php include trick I just learnt.

Step 1: In each of the weblogs I want to hightlight, I created a new index template and called it highlight.inc.

Step 2: I used the code on the main index that relate to the entries as basis, adding the attibute lastn="1" to the MTEntries tag, so I'm only capturing the last entry made in that weblog. I wanted to also keep the information about when the post was made and into which category. I ended up with a text file:

<MTEntries lastn="1">

<h3 class="title"><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a></h3>

<$MTEntryBody$> </$MTEntryBody$><br />

<div class="posted">
Posted at <a href="<$MTEntryPermalink$>"> <$MTEntryDate format="%x"$></a>
in <MTEntryCategories glue=" , "> <a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$>
</a>
</MTEntryCategories>
</div>

</MTEntries>

Step 3: In the homepage I used a simple code to include the highlight, so for quiet thoughts:

<? include "/home/invisibl/www/www/quiet/highlight.inc"; ?>

Step 4: Repeat for shiny parts.

delicious  digg  facebook  google  reddit  stumbleupon
in design & content , weblog , what's new |

I'm using MT to power shiny parts, so updates are in weblog format. I created a new weblog in the MT edit menu and copied the templates over from quiet thoughts. I'll also be moving the technical entries over from quiet thoughs to shiny parts. While I'm at it I'm switching the pages to php.

There will be a few pages within shiny parts that are not inside MT, like the sitemap, siteplan and old homepages. They'll just sit in the folder.

Yet another page converted to php and, look, no tables!

I've been reading up a lot on MT, CSS, php and learnt a great deal. Some people power their entire website on MT. I've decided not to do that 100%, because some of it doesn't sit in a weblog interface environment. Also I have Dreamweaver, and I'm beginning to handcode some pages, so I don't need to rely solely on MT. Even though I think the people who do use MT all through their sites do so because they are so good at it.

The biggest advantages are: consistency, structure and the ability to update using a web interface. I like it.

But as usual, once I discover something it changes and something which may be perceived to be better comes along. Just after I get properly started on MT, and I'm on MT 2.661, they announce MT3D, a developers edition of version 3. Lots more new stuff, but at a price. They've just today announced they are revising the pricing structure, still it's $70 for a personal license, that provides support and is limited to 5 authors. It's a better deal than the first pricing proposal, which limits the number of weblogs also. If the no. of logs are limited, people like me won't then have the luxury of using one log per section.

Then after reading up more, I discover WordPress. Sigh. Just great.

delicious  digg  facebook  google  reddit  stumbleupon
in how to code , security , weblog |

I made some changes to the templates today, cos I learnt a bit more about plug-ins. All of this with much help from Learning Movable Type.

My god I have to much to learn.

As a reminder to myself, here's what I did.

1. category archive

To put a menu at the top of the category archive that points the readers to the previous and next category, I got a plug-in from bradchoate.

After installation, add this to the category archive template:

<div id="menu"> <MTCategoryPrevious> <a href="<$MTCategoryArchiveLink$>"> « <$MTCategoryLabel$></a> | </MTCategoryPrevious> < a href="<$MTBlogURL$>">Main</a> <MTCategoryNext> | <a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$> »</a> </MTCategoryNext> </div>

2. blacklist

Then I got the mt-blacklist plug-in from jayallen. It's dead easy to install and configure.

To maintain, execute from here:

http://invisiblecompany.com/cgi-bin/mt/mt-blacklist.cgi

3. comments & trackback files

Renamed mt-comments.cgi to mt-cmts.cgi, similarly mt-tb.cgi to mt-tbk.cgi and changed mt-cfg.

Replaced:

# CommentScript mt-comments.pl
# TrackbackScript mt-tb.pl
# SearchScript mt-search.pl
# XMLRPCScript mt-xmlrpc.pl
# ViewScript mt-view.pl

with (don't forget delete the #):

CommentScript mt-cmts.cgi
TrackbackScript mt-tbk.cgi
# SearchScript mt-search.pl
# XMLRPCScript mt-xmlrpc.pl
# ViewScript mt-view.pl

4. close comments

This plug-in from rayners that closes comments and pings for entries x days old.

To maintain, execute here

http://invisiblecompany.com/cgi-bin/mt/mt-close.cgi

Hey it's fun to be a beginner.

delicious  digg  facebook  google  reddit  stumbleupon
in design & content , weblog |

I moved all the tripod weblog entries over here, painstakingly, manually. So now I'm on Movable Type. Cool.

For the website, conversion to xhtml is complete, but there's a whole lot more work to be done on formats and stuff. Next project is to convert to php, of course.

Content-wise, I'm adding to recipes, and need to start working on the food & drink pages. Writing on both innermost room and hidden doors continue.

One step at a time, right.

delicious  digg  facebook  google  reddit  stumbleupon
in weblog |

Started weblog. Everyone's doing it, why not me. Eventually I'll put it on the website but for the time being it's at tripod.

It's easy to set up, just register and select which default style to use. There's not a lot of customisation that the use can do, just changing the links and generally how the page looks. The free version has ads, which can be a bit annoying but it's a temporary measure for me anyway.

delicious  digg  facebook  google  reddit  stumbleupon

about

This page is a archive of recent entries in the weblog category.

stylesheets is the previous category.

what's new is the next category.

Return main index or look in the archives.

  • xhtml validated
  • css validated
  • made by mac
  • dreamweaver
  • photoshop
  • Get Firefox!
Powered by Movable Type 4.01