hostname changes on PPP connection

I think this another thing new to Tiger: when I initiate a PPP connection, my hostname changes, to things like: fliax7-a170.dialup.optusnet.com.au Now, this doesn’t have too many issues, except when I try to initiate a connection with what the hostname used to be, such as a local VNC connection to the other user’s desktop. The solution is to do the following: edit /etc/hostconfig, and replace: HOSTNAME=-AUTOMATIC- with HOSTNAME=the_hostname

Tiger man page for bash dodgy?

I recently upgraded to Tiger, and just yesterday I noticed some strange behaviour from ManOpen, a great little tool for viewing man pages outside of a Terminal. Most man pages still work okay, but openman bash results in a long load time, followed by a crash. Every time. man bash still works fine. I might have to look back into the piping through Preview solution I was using a while ago. • Okay, there is a new version of ManOpen available. I’ll just use that.

Browser Incompatibilities

I’ve spent most of the day tweaking stuff, and have come across the following issues:

  • Safari has no ability to find either the cursor position or the selection in a TextArea. This means that Quicktags will not work under Safari. I’m going to file a bug report with Apple over this one, as it’s rather crap.
  • Neither Safari nor Mozilla support onTimer(), which means my plan to have the Comment Preview update every 3 seconds rather than on every keypress will not work. I still need to try to find a way to make the Preview faster on Mozilla. It’s fine on Safari.

I’ve also spent a fair amount of time playing around with trying to get comments to appear on the front page, but I think I need to be able to access the SQL database directly, and run a query in order to do this. And store the result in a variable. But I can’t figure out how (if it’s even possible) to do this.

Quicktags Update

Note: The seperate Quicktags toolbar is not supported. Please use the full toolbox script, or hack it any way you like. The remainder of this post remains for posterity only. • I’ve combined my two quicktags scripts into one, it now has an (optional) argument to the edToolbar(); function. If you pass it the argument of ‘Link’, then it will render the toolbar as a series of <a href="javascript:..."> links, rather than the buttons that it defaults to. You can get it from here. Or use the code <script type="text/javascript" src="http://schinckel.net/images/quicktags.jpg> </script> <script type="text/javascript">edToolbar(); </script> in your page, where you want the toolbar to appear, and <script type="text/javascript"> edCanvas = document.getElementById('comment'); </script> after the TextBox you are using to have comments in (make sure it’s id is comment, or change the second script.

Instant Preview in Mozilla Browsers

I’ve noticed that the Preview code that both the WordPress Dash, and my Comment Preview uses (okay, I stole it from there!) is really slow - read as unusable in Instant Preview mode - under Mozilla browsers (on Mac, at least). There is a noticeable lag between typing and the characters appearing on the screen, in the Text Box, let alone in the Preview Box. I wonder if it would be possible to rewrite the script so that it wasn’t onkeyup, but every 5 seconds, or something like that. Or possibly make it so it doesn’t redraw the whole lot? Perhaps the best would be that it only redraws when keys have been pressed, but not in the last 3 seconds. I’m not sure if any of these can actually be done!

Gravatar Weirdness

I’ve come across a couple of issues with Gravatars recently: they don’t always show. And the weird bit is if I play around with the &size=xx part, different gravatars work. And the ones that did display no longer do…

<img src="http://www.gravatar.com/avatar.php?gravatar_id=ff3502050b3b1b00cb6c810d5c41ffc9&size=48"alt="" /><img src="http://www.gravatar.com/avatar.php?gravatar_id=ff3502050b3b1b00cb6c810d5c41ffc9&size=49"alt="" />
<img src="http://www.gravatar.com/avatar.php?gravatar_id=833bfbcc9940cfcf0af6def751c23b05&size=34" alt="" /><img src="http://www.gravatar.com/avatar.php?gravatar_id=833bfbcc9940cfcf0af6def751c23b05&size=39" alt="" />
<img src="http://www.gravatar.com/avatar.php?gravatar_id=faee9dd9ddfedbbc82b61aaa6ee1e1fb&size=50" alt="" /><img src="http://www.gravatar.com/avatar.php?gravatar_id=faee9dd9ddfedbbc82b61aaa6ee1e1fb&size=45" alt="" />

Strange. And it’s not limited to my site, either, I noticed it on the Official Gravatar Forums. I assume that means it might be fixed soon.

Edit: That’s crap. The images in the bottom two pairs used to have one that worked, now they both appear grey!

**Edit 2: **Now both of the middle ones, and one of the bottom ones are all working!

Homer Loves Homer

Saw this on Drunkenblog, just had to snaffle and post it here. Homer loves Homer

Choosy Post Display

Someone on the Blogsome Forums wanted to be able to have the main page only display posts from a certain category. To do this, edit your post.html file, and add the following right at the start: {capture name=in_cat}{in_category category='1'}{/capture} {if $smarty.server.REQUEST_URI != '/' || $smarty.capture.in_cat == '1'} Then, right at the end, add {/if} If you are wanting a category other than the default one to be the only one shown on your front page, look up the category id in the dash, and replace the ‘1’ in the first line with this number. This could easily be extended to get a sticky-post setup. I’ll do that later tonight, when I’m drunk. Just to make it a challenge. Happy 30th Sam.

Autofill Acronyms in Comments

I created (or rather modified) some code to allow for quicktags, so commenters can have bold, italic and code text, amongst other features. I also added in abbr and acronym tags, just for fun. Today, I made this even more kick-ass. If you select some text, and click on abbr or acronym, and there is a valid acronym in the list in the script, it autofills the definition in the dialog for you. I got rather excited after doing this. But, I’m a nerd. • Note: The seperate Quicktags toolbar is not supported. Please use the full toolbox script, or hack it any way you like. The remainder of this post remains for posterity only. • Anyway, you can get the button version here, and the CSS link version here. Remember to Right-click and download, rather than just clicking on them.

Comment Preview Fix

One thing is missing from my Comment Preview script: when you click on the link button you get a window to enter the link URI, I need to implement the equivalent for the acronym/abbr. Actually, I can probably autofill most of the acronyms. That would be cool. And maybe get the code added back into the one that is used for the WordPress Dash.