October 04, 2003

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.


Posted by Michael : October 4, 2003 12:07 AM | Discourse.net | TechnoLinks
Slashdot   Slashdot It!
Comments

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

Posted by: Canadian Reader at October 4, 2003 04:59 PM

Post #2, going from Monolog to Dialogue...

Posted by: Canadian Reader at October 4, 2003 05:01 PM

Post #3, going from Dialogue to Triangulation...

Posted by: Canadian Reader at October 4, 2003 05:01 PM

Post #4, going from Triangulation to Quartets...

Posted by: Canadian Reader at October 4, 2003 05:02 PM

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

Posted by: Canadian Reader at October 4, 2003 05:03 PM

Ah! 5 = Communications.

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

Posted by: Canadian Reader at October 4, 2003 05:05 PM

OK then, 6 = Expressions.

Post #7, going from Expressions to Agora...

Posted by: Canadian Reader at October 4, 2003 05:07 PM

Post #8, going from Agora to Discourse...

Posted by: Canadian Reader at October 4, 2003 05:08 PM

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

Posted by: Canadian Reader at October 4, 2003 05:09 PM

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...!

Posted by: Canadian Reader at October 4, 2003 05:14 PM

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

Posted by: Daniel at October 4, 2003 07:04 PM

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.

Posted by: Michael at October 4, 2003 07:40 PM

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.

Posted by: Nick Barnes at October 5, 2003 05:00 PM
My careful comment
Exploded into whitespace
By a broken tool
Posted by: Nick Barnes at October 5, 2003 05:07 PM

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

Posted by: Michael at October 5, 2003 05:20 PM

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

Posted by: Nick Barnes at October 6, 2003 04:54 AM


Add Discourse.net to your RSS/RDF/XML reader: Full feed

Powered by Movable Type 2.64.


   out of