jump to navigation

A note on comments July 2, 2008

Posted by a1291762 in : site , add a comment

Comments on some pages (most notably, the AttnGrab page) are not for general use so any attempt to leave a comment on these pages will result in your comment no being seen. I’ll put a note on the AttnGrab page… I’m not sure if it’s possible to hide the leave a comment link though. I’ll have to look at it (possibly some kind of CSS trick will work).

I’ve also got some comments that want replies but there’s no email address supplied to reply to. I’ve come up with a solution for these too… I’ll publish Q&A (edited for brevity and clarity) as comments on my Contact Me page. If you’ve left me a note but didn’t get a reply, try looking at that page.

Konq thinks it's a small screen? March 15, 2008

Posted by a1291762 in : site , add a comment

Either that or it chokes on the CSS 3 media elements…

I tried to setup the stylesheets so mobile browsers like Opera Mini and Blazer wouldn’t use the box model but both Opera Mini and Blazer just went and used the stylesheets anyway. Sigh. My blog template is in some Google XML format. I don’t think I get to do server-side condtionals (eg. to deliver different content for those browsers) and I’m not sure that I can do this client side. Possibly I could do a document.write() from JavaScript… That would assume JavaScript was available (which it often isn’t in mobile browsers).

Ugh.

AttnGrab update, Blog template update March 6, 2008

Posted by a1291762 in : programs, site , add a comment

AttnGrab has been updated to 1.2. I’m going to post a comment on it’s page so that people can track new versions without having to wade through my regular posts.

I’ve fixed the “Subscribe to comments for this post” link too. I guess nobody has been doing that because it’s been broken for a long, long time.

Fun with Google July 10, 2007

Posted by a1291762 in : site , add a comment

So according to Google, the correct way to indicate that a page has moved is to serve a HTTP 301 response. Great but what about those of us using ISP storage?!?!?

I’ve noticed two things that I’ve taken steps to try and fix. The first is that the old blog comes up in search results but the new blog doesn’t. I have updated all the old blog pages to point to the equivalent page on the new blog. I can’t do a 301 but with the links in place the new blog should get seen by Google. I’ll retire the old blog eventually but I wanted to give it some time so that people can update bookmarks and such.

The second thing I’ve noticed is that adding in all the feed links means the feed .xml files are coming up in Google results. Yuck. I’ve added rel=’nofollow’ to all of the feed links to hopefully prevent this. I don’t have access to robots.txt on either of my blog sites so I can’t fix it using robots.txt (again, the “correct” way is not possible).

Given the time it takes to update Google’s cache I’d say the old blog will have to stay up for at least a few more weeks. Luckily I haven’t changed ISPs so there’s no hurry to do that but it’s still annoying to me that I can’t fix it properly.

Update 17 July 2007

That’s… interesting.

With just my redirection bits stuck into my old pages Google has shifted over to my new location on blogspot. It’s as if I had included 301s except that I didn’t.

So if you want to move a page in Google and you can’t put up a HTTP 301 page, put content like this on instead.

This goes in the header, it redirects automatically (for most people anyway).

<meta http-equiv="refresh" content="5;url=NEW_URL">

This goes in the body. It gives people a real link to click if the redirect doesn’t work.

You will be redirected to <a href="NEW_URL">NEW_URL</a> in 5 seconds…

At least… that’s what I used. Ensure that you do this for every page and ensure that NEW_URL is set correctly. I used a quickly hacked-together perl script to tweak all my HTML files to have this.

A note on contacting me July 10, 2007

Posted by a1291762 in : site , add a comment

My blog used to have my email address on every page but it was down the bottom and I think most people missed it.

Since I enabled comment moderation, leaving a comment is equivalent to emailing me and as long as I don’t publish the page the message remains private.

I’ve tweaked the text that appears on the comment page and even created a page specifically to indicate private comments (then linked to it from the sidebar).

So if you want to contact me, don’t try to figure out what my email address is, just use the “contact me” link in the sidebar.

Using Conditional IE tags in Blogger Templates July 5, 2007

Posted by a1291762 in : site , add a comment

For some reason I can’t figure out, the “Search this blog” function in Blogger is implemented using ActiveX (at least when you use IE to view a blog). If like me, you care about security and have disabled ActiveX this poses an obvious problem. I whipped up a 2 line form that lets you search without having ActiveX enabled and made it conditionally show only in IE.

The problem is, it didn’t show up at all!

I have conditional comments to load up IE-specific CSS fixes… so why didn’t the same tags work in the body? I looked again and noticed that the content didn’t even show up in the page source… it looked like Blogger was removing the comment (instead of letting the browser do it). I had already encountered a problem with Blogger and conditional tags so it didn’t surprise me that something odd was happening.

So there’s 3 thing you need to know about conditional tags in Blogger templates.

The first is that downlevel-revealed tags (<![if !IE]>HTML<![endif]>) don’t work at all. Blogger chokes on these because I guess they aren’t valid XML.

The second is that comments, including downlevel-hidden tags (<!–[if IE]>HTML<![endif]–>), are removed by Blogger if they are inside widgets. Since HTML is only allowed outside of sections and inside widgets that means you need to arrange the conditional content to live in one of these areas.

For me it was easy. I’ve got a positioning div for the sidebar on the right. I have a section that holds the widgets that make up the content of the sidebar. I had originally put the search box inside the first widget but that means Blogger removes the content. Moving the content above the section (but still in the positioning div) makes it appear at the top of the sidebar.

Now if I’d wanted it in the middle of your sidebar… that can be done but you have to close the section and create another one after the conditional stuff. For me that’s a problem because sections have to have unique IDs and my CSS styles the sidebar based on id rather than class. Mind you, that’s just a tweak to the CSS to fix. I tested it out and it works. It makes the GUI layout tool a bit strange to look at but then I only use that to edit widget settings, my template is all hand-crafted.

The third thing you need to know is that blogger magic doesn’t work inside conditional comments. Outside of sections they’re not stripped from the output but the Blogger engine doesn’t look inside them. I’m constructing the search form’s action field using the expr: notation but since that doesn’t work with conditional comments I’ve had to change it to just be inside a div that’s display:none for all except IE. I suppose I could have hard-coded the blog URL in there but I don’t like doing things like that.

Mind the gap June 19, 2007

Posted by a1291762 in : site , add a comment

I’ve decided to take the plunge. My blog still exists in it’s previous location but every page has a link to the new location on blogspot. I’m in the middle of updating my xml template I did ages ago to more closely match my classic template. Of course, I can’t stand to use default crap for everything (and doing _anything_ with the online tools screws up the XML Blogger returns to you) so I’ve had to learn more than I really wanted to know about the XML format Blogger uses. I mostly did this last time I looked at this but then back then I was trying to mimic a much less featureful blog :(

One thing I’m already peeved about… conditionals. Admittedly they are more powerful than what classic templates had but they have no boolean logic. AND can be kind of done with nested ifs (doing the else for this is a pain though). OR requires copying the code or using an includeable… Thank God for includables! They’re a great way to separate common bits of code.

I imagine it will take some weeks to get everything sorted out.

Keywords have been removed from all posts and added as Labels.

Stuff like images and some links will be broken until I go and update all the links. The old blog had images and stuff beside the blog content, relying on the base URL being set but I can’t put such things on blogspot and I use relative links to all the blog pages so I’m going to have to update all the non-page links. Ugh.

It’s so fast not having to wait for FTP uploads. Then again, I can’t test anything locally anymore so I have to hit the blogger server much more often when making template changes.

The searching is much better than what I had before. I’ve just removed my stuff because there’s a search box on the blogger toolbar (that I have to use now I’m on blogspot).

Update 20 June 2007

The main page and item pages should now have parity with the old blog (it even says “1 comment” instead of “1 comments” now!). I’ve taken all the “flexibility” out of the template and as a result it’s actually possible to understand what it’s doing now. Using the GUI controls to edit the template kills my modifications anyway so it’s not like I’m going to miss that ability.

I’ll start on archive pages tomorrow (they could be a bit tricky).

Update 21 June 2007

Archive pages are back up to full function. I had to create a second archive widget so that I could get access to the archive data (used for the next/prev month links).

Most impressive is what I’ve managed for the label and search pages. They both show up as index pages so I’ve had to sniff out the title and use JavaScript to fix the display. Search even highlights your terms like Safari 3 does though my code is bogus, it just calls innerHTML.split(” “) which can break HTML tags up.

Update 22 June 2007

I finally got around to testing out the new blog in a variety of browsers. Unsurprisingly there are no issues in Firefox or Konqueror. Equally unsurprisingly IE 7 (what I have at work) screws up both the layout and the JavaScript. I’ll get around to fixing it but it’s not exactly high on my priority list. I think I’ll put up a suggestion for IE users to upgrade to Safari ;)

Update 26 June 2007

This has to be the most updates to a post evar!

Thanks to the awesome MultipleIEs program, I’ve got IE 5.5, 6 and 7 all running at once (7 is native, 5.5 and 6 are standalone). The installer comes with IE 3, 4 and 5 too but they’re all not supported by Blogger anyway (3 works unstyled, 4 and 5 break on the Navbar).

I see the changes I made (blind because I didn’t have IE 7 installed at the time) work in IE 7 so that’s good. One thing I tried to fix (not very well apparently) is that Blogger’s search box doesn’t work if you’ve got ActiveX disabled (so much for having strict security). Since searching is done via a trivial URL I put in my own search box that just uses a form but it doesn’t seem to be working. I’ll fix that up later.

Just to weigh in on the whole Safari vs Windows rendering issue… I much prefer Safari’s rendering. I’m using “light” because it matches the system a bit better. The system’s rendering to me looks like… well, it looks like it’s not being smoothed at all. The “blurry” text that Safari uses makes my eyes feel better… except for this: IIIIIIIIIIIIIIIIIII. Those I characters (I’m using a Sans font) all look different because my font size and DPI mean that the vertical lines aren’t all sitting on a pixel boundary. I guess the Microsoft algorithm would do that “more correctly” but while this does show a problem with Apple’s rendering it’s not actually relevent when reading a block of text. It’s like people who test cameras by pointing them at walls or test charts intsead of actually taking pictures.

Update 26 June 2007

Safari 3.0.2 ate this post!

3.0 exhibited a similar bug but I didn’t see it in 3.0.1. In 3.0 I noticed that some sites would not get all the text in a text area widget. When I submitted an update to this post with 3.0.2, it ate all of the text. Luckily I hadn’t closed the browser and I could press Back to get the contents of this post!

Apple doesn’t let you download “old” Safari releases and I installed both 3.0.1 and 3.0.2 via Software Update so I thought I was out of luck but then I found this site that has copies of the old releases. Yay!

Hacking on the feed URLs May 2, 2007

Posted by a1291762 in : site , add a comment

So… at some point Blogger added comment feeds and even per-post comment feeds. Awesome right? Not for me. I only noticed them today but when I tried to enable them I found that despite being “supported” they didn’t work.

The problem is that FTP publishing means I only ever get a file called atom.xml which has the posts in it. The other feeds aren’t actually published to the FTP server. A bit of digging revealed that blogger can generate these files for you if you use the right URLs. What are these URLs? They look like this:

Posts – http://www.blogger.com/feeds/BLOGID/posts/default
Comments – http://www.blogger.com/feeds/BLOGID/comments/default
Per-post comments – http://www.blogger.com/feeds/BLOGID/POSTID/comments/default

There’s no way to ask Blogger for your blog’s ID but then I already have my ID hard coded all over the place so it’s not a big deal to put it in here too. The post ID can be obtained using the <$BlogItemNumber$> tag.

Of course, it shouldn’t be this hard. Blogger’s own help page told me to use <$BlogFeedsVertical$> and <$BlogItemFeedLinks$> but the former only give me a link to atom.xml and the latter didn’t seem to work at all. I filed a bug report on these tags but since I can construct working URLs myself, that’s what I’m going to do for now.

Update 2 May 2007

I am noticing a new and annoying behaviour in FTP publishing. A full publish (which you need to do when you change your template) takes a long time to complete. In the old Blogger starting another publish would abort the first one. In new Blogger the first publish completes before the next one happens. Updates aren’t stacked either, they’re queued. I updated the template a few times, clicking republish each time then posted to my blog and it took 10 minutes before the post showed up because it was queued behind redundant publish actions.

Update 2 May 2007

Something extra for Safari. It seems setting the feed URL but leaving the filename blank (to prevent uploading atom.xml to the FTP server) isn’t enough to get Safari’s RSS icon working. So I set the filename back to atom.xml and the icon works but Blogger uploads atom.xml and rss.xml. I suppose it’ll ensure anyone with links to these files won’t get a 404.

Update 3 May 2007

I don’t see an easy way to have Safari’s RSS icon linked to the comment feed on item pages. I suspect I could do it but I’d have to put the <Blogger> tags in the header and then output all the content using Javascript. Yuck.

Can you spot the auto-reply? February 28, 2007

Posted by a1291762 in : site , add a comment

Here’s the reply I got from Blogger. It’s not explicitly mentioned but this is in reply to my question about labels (The known issues with labels are reported here).

Hi there,

Thanks for writing in. Due in large part to your input and feedback, we have reviewed and recently fixed several bugs on the new version of Blogger. Please check our Know Issues page and Status page for more details on current known issues on the new version of Blogger:

http://knownissues.blogspot.com

http://status.blogger.com

Hmm… Except that these sites don’t mention my problem and the issue hasn’t been fixed.

Please note that Blogger Support does not currently support questions regarding customizing/customized template code or CSS/HTML in general. Please see our Blogger Help articles for some brief tutorials and pointers to more resources:

http://help.blogger.com/bin/topic.py?topic=10274 (New Blogger)

http://help.blogger.com/bin/answer.py?answer=42433 (Old Blogger/ Classic Templates)

Again, this isn’t actually helpful because I wasn’t asking about how to use templates, I was commenting on how the labels should have been exposed in the Classic templates. The link to New Blogger templates shows they didn’t even bother to notice that I don’t host at blogspot.com and don’t have the option to use New Blogger templates.

Websites and programs that integrated with the old Blogger will need to be updated before they can work with the new Blogger. Check with the particular service provider you’re interested in to find out if they’ve made these changes yet. For downloadable desktop applications, you may need to install a new version of the software.

What a strange comment. I guess some people are using offline apps to update their blogs or something.

If you are still experiencing issues with your blog and cannot find the answer to your question in our Help Center (http://help.blogger.com), please simply reply to this message with the details of your problem. In order to help improve the new version of Blogger as quickly as possible, we’re going to focus our efforts on reading the problems you are experiencing and working on solutions immediately. We’ll follow up with you only if we require more info or if we have additional info to share. If you are providing us with a bug report, please rest assured that we will take action as necessary, even if you don’t hear back from us.

Yeah. Right. Just like they helped me with this reply.

We sincerely appreciate your continued patience.

Sincerely,
The Blogger Team

Forced to upgrade to New Blogger February 15, 2007

Posted by a1291762 in : site , add a comment

Ugh. You’d think people would realise the downside to forcing people to upgrade. Nobody liked New Coke. Why on earth did they think I’d like New Blogger?

If anything on the site is broken, it’s because New Blogger isn’t quite the same as Blogger. The most obvious thing is the login box that got broken but I guess that’s just an annoyance for me ;)

What does an FTP blog look like with New Blogger? Virtually the same as Blogger. I can’t use any of the new layout stuff but I can add Labels to my posts. Labels are New Blogger’s attempt to re-implement my Keywords thing but it’s all done on the server so it’s less brittle. Good in theory but there’s a catch.

The content that New Blogger wants to put on your page because of the Labels is just dumped into the end of the post. More useful would have been the pattern established for all sorts of other things in Blogger. Then again, it’s better than nothing and I can work around it with CSS. The bigger problem is that I have no way to customise the output of the label browse page. That’s the page New Blogger generates for each label that contains the posts for that label. Now to my mind, labels work like Archives and should be handled the same way. New Blogger doesn’t seem to think so. The page either didn’t go through my template or it went through the tag instead of the tag. This means the label browse page has all the post text on it which isn’t what I want. Click the date on this post to see what my archive pages look like. That’s what I want label pages to look like! Of course, there are differences with label pages so it would be even better if there was a tag I could use to customise the output.

I’ve sent a bug but I have doubts that it’ll get anywhere. At least my Keywords thing is still working.

Update 19 February 2007

I don’t know what they did but I’m not longer able to use Konqueror to maintain my blog. Login to Google? Crash. Edit a post? Crash. Sigh. I realise it’s better to support Firefox than to only support IE but Konqueror is a real browser too. It’s even based on the same rendering engine as Safari.

I’ve whipped up some magic around the existing keywords thing so that I can start filling in the labels now and switch over to them once they’ve fixed the display problems. Of course, nothing on this blog ever goes according to plan and this was no exception. I’m using innerHTML to pull out the text of each post. I then run a regular expression over this to find the Keywords bit (which is always at the end of a post). Well, the labels have been squeezed into the post too so I have to remove them before doing the Keywords regexp (I put them back afterwards and use CSS to hide them). Here’s where it gets tricky. After getting a regexp that works I came home and noticed that Safari was borking. After much hair pulling, I finally found that Safari is re-interpreting the HTML when I call innerHTML. I’m not being given the HTML code in the file but something Safari thinks is equivalent. Luckily, it’s just using uppercase HTML elements. That’s easily solved by doing a case-insensitive search. However, it concerns me that Safari might be doing other things to the HTML…