Blog Enhancements

I've made a few blog enhancements by tweaking the Movable Type template. The most significant controls the way that the extended text is handled. I didn't like the way that long posts take up too much space, but nor did I like it when clicking on the extension took you to another document. Now I have one of those cute pop-in pop-out Javascript extensions. You can test it on the following line.

I've tweaked the comment and trackback links so that they say different things depending how many comments and trackbacks I've received. So far, most of them are stuck on “Acquiescence (0) | Solitude (0)” but if you look through the blog entries below you can see some of the others.

I've also put RSS feeds from ICANNWatch and Slashodot in the left margin. This is an experiment, and I may take one or both of them off — especially if I don't figure out how to make mt-rebuild work so that I can make RSS updating a cron job. Currently the script is unhappy with

use vars qw( $VERSION );
$VERSION = '0.2';

Instead of doing something, when I test it it reports,

bash: use: command not found
bash: use: command not found
bash: mt-rebuild.pl: line 11: syntax error near unexpected token `qw('
bash: mt-rebuild.pl: line 11: `use vars qw( $VERSION );'

Suggestions for other site tweaks (and bug reports) always welcome.

Addendum: I had to change the category name “;>” to something alphanumeric as it was messing up the archives and the xml at least. So it's “completely different” now.

This entry was posted in Discourse.net. Bookmark the permalink.

15 Responses to Blog Enhancements

  1. Canadian Reader says:

    As a public service to your readers, let me explore what these values are, for comments at least… So far, from the available data:

    Comments
    0 = Acquiescence
    1 = Monolog
    2 = Dialogue
    3 = Triangulation
    4 = Quartets
    5 = ?
    6 = ?
    7 = Agora
    8 = Discourse

    Trackback
    0 = Solitude
    1 = Company

  2. Canadian Reader says:

    Post #2, going from Monolog to Dialogue…

  3. Canadian Reader says:

    Post #4, going from Triangulation to Quartets…

  4. Canadian Reader says:

    Post #5, going from Quartets to… what? Let’s find out.

  5. Canadian Reader says:

    Ah! 5 = Communications.

    Post #6, going from Communications to …? Let’s see.

  6. Canadian Reader says:

    OK then, 6 = Expressions.

    Post #7, going from Expressions to Agora…

  7. Canadian Reader says:

    Post #8, going from Agora to Discourse…

  8. Canadian Reader says:

    Having reached the blog name, will the list continue? Oh, the suspense! Trying for post #9…

  9. Canadian Reader says:

    Aha! It is still Discourse, and will be, I predict, from here unto infinity. Signing off, then, with a communication #10, and insincere apologies for having been unable to resist playing with your new toy…!

  10. Daniel says:

    How do we do the “cute pop-in pop-out Javascript extensions”?

  11. Michael says:

    I was going to post the explanation how to do it here, but MT interprets the tags even when they are surrounded by “pre” codes. So I can’t.
    I’ll email it to you.

  12. Nick Barnes says:

    You tell us your script looks like this:

    use vars qw( $VERSION );
    $VERSION = '0.2';

    That code is Perl (you knew that).

    Instead of doing something, when I test it it reports,

    bash: use: command not found
    bash: use: command not found
    bash: mt-rebuild.pl: line 11: syntax error near unexpected token `qw('
    bash: mt-rebuild.pl: line 11: `use vars qw( $VERSION );

    ‘Suggestions for other site tweaks (and bug reports) always welcome.

    This error message is from bash (a shell), not from Perl. I don’t know the first thing about Movable Type, or RSS, or any other parts of your infrastructure, but evidently it is running your script as a shell script. The most likely reason for that is that the operating system is being told to execute it without being given any hint as to how. Without any such hint, the OS will default to running the script in your account’s default shell, which is evidently bash. You can provide a suitable hint, making the OS run it as a Perl script, by putting a “shebang” on the first line, like this:

    #!/usr/local/bin/perl
    use vars qw( $VERSION );
    $VERSION = '0.2';

    (I’m assuming that Perl is found in /usr/local/bin/perl on your machine; type “which perl” into a shell to find out).

    Hope this helps.

  13. Nick Barnes says:
    My careful comment
    Exploded into whitespace
    By a broken tool
  14. Michael says:

    The first line of that script is and has been a path to Perl.

    Obvious errors
    Often found in my coding
    I wish this were one
  15. Nick Barnes says:

    All sorted out now
    Cast not your Perl before bash
    With shebang or not.

Comments are closed.