revjim.net

January 10th, 2003:

phpApp: a great idea; a conspiracy

The PHP application framework (phpApp) seems to be very close to what I am attempting to build with my controller.

There is a single file download for the installer. The installer accesses archives on the central server to install the components. There is a web-based administration console to configure the controller as well as the ability to configure it manually via the file system. These developers even invented an interesting use of the serialize() and unserialize() PHP functions to build a .par (PHP Archive) file for expansion within PHP.

Unfortunately, the installer doesn’t even work. Based on the code inside of it, I guessed at what was supposed to happen in order to give you the feature list above. I think it has trouble reading the .par files. Additionally, I don’t think it was ever tested (at least not remotely) as the installer attempts to call filesize() on a remote file, which isn’t allowed. Additionally, it looks like the last file update occured on June 27th, 2001 (unless the apache server has the wrong system time).

I think there is some conspiracy here. All of the applications that seem to get close to what I want are always incomplete and unmaintained.

Well, at the very least I can steal the PHP archive file format from them. That looks like a great idea.

weblogging: best practices?

If a tutorial or otherwise instructive piece of information is written and posted into a weblog, what is the best method to use to update it?

1) Edit the original post to include the changes, then make a new post linking to the old one and announcing that the item has been changed. Pros: Most up-to-date content remains in the same location. Cons: Historical information is lost due to the edit of the post.

2) Post the updated content as a new entry. Annouce in the new entry that it is an updated version of an older entry and link to the older entry. Edit the older entry to announce that newer information is available. Pros: Historical information is kept. Cons: The newest information constantly changes locations.

3) Make a separate page to hold the tutorial. When announcing the information in the weblog, simply provide a link to the location of the tutorial. When the information is updated, one need only post another link announcing its update. Pros: Official location for the information is constant. Historical information is preserved by means of annoucing the changes in the weblog while keeping the data in a separate location. Cons: One must realize that the information they are writing may need to be altered in the future in order to gain the most value from this method.

What do you think?

how to add a comments feed: version 2

About a month ago I wrote a tutorial on how to add a comments feed for MovableType. I’ve realized that there are a few errors in it and so I offer to you version 2. revjim.net has been updated with this new template.

If you’ve already added a comments feed, all you need to do is edit your comments feed template and replace the code found there with the code below. If you haven’t you’ll need to follow all of the instructions.

  1. Log into your MovableType install.
  2. Select “Manage Blog” underneath the blog you wish to add a Comments Feed for.
  3. Choose “TEMPLATES” in the navigation bar onthe left.
  4. Click on “Create new Index Template” at the top right hand corner.
  5. Type “Comments Feed” in the “Template Name” box.
  6. Type “comments.rdf” in the “Output File” box.
  7. Paste this under “Template Body”:
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:admin="http://webns.net/mvcb/"
        xmlns="http://purl.org/rss/1.0/">
        <channel rdf:about="<$MTBlogURL$>">
            <title><$MTBlogName encode_xml="1"$> - recent comments</title>
            <link><$MTBlogURL$></link>
            <description><$MTBlogDescription encode_xml="1"$></description>
            <dc:language>en-us</dc:language>
            <dc:date><$MTDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></dc:date>
            <admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=<$MTVersion$>" />
            <items>
                <rdf:Seq>
                    <MTComments lastn="15">
                        <rdf:li rdf:resource="<$MTCommentEntryLink$>#<$MTCommentID pad="1"$>" />
                    </MTComments>
                </rdf:Seq>
            </items>
        </channel>
        <MTComments lastn="15">
            <MTCommentEntry>
                <item rdf:about="<$MTEntryLink$ encode_xml="1">#<$MTCommentID pad="1"$>">
                    <title><$MTCommentAuthor encode_xml="1"$> comments on &quot;<$MTEntryTitle encode_xml="1"$>&quot;</title>
                    <description><$MTCommentBody encode_xml="1"$></description>
                    <link><$MTEntryLink encode_xml="1"$>#<$MTCommentID pad="1"$></link>
                    <dc:contributor><$MTCommentAuthor encode_xml="1"$></dc:contributor>
                    <dc:date><$MTCommentDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></dc:date>
                </item>
            </MTCommentEntry>
        </MTComments>
    </rdf:RDF>
  8. Click “SAVE”.
  9. Click “REBUILD”.
  10. Wait for the window to pop-up.
  11. Click “REBUILD” on that new window.
  12. Announce in your blog that you now have a comments feed.