Entries tagged with “blog” from shiny parts

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