Since I published my previous post on inserting in-line comments into iWeb blog that isn’t hosted with a MobileMe account I have received several e-mails asking for advice as they don’t seem to be working as I published. So I followed my tutorial and found no problems and tried to offer advice as best I could. However, over the last few days I have found that I too am having problems and no matter how hard I try to follow my previous tutorial, in-line comments do not seem to work. Well now I have found a solution and here it is.If you still want to have in-line comments on your blog, I must warn you that before you go any further this ‘fix’ involves editing a little bit of HTML, but it is VERY basic, so no panic!!
When you create your new blog entry, once you have finished typing hit ‘Return’ a few times and type something along the lines of ‘REPLACETHISTEXT’. This is where the comments will be inserted later.
Save your page and ‘publish your site to a folder’ as you would normally do. Now we come to the HTML editing bit. Navigate to your blog entry that you just typed and open it in your favourite HTML editor. (I have started to use TextWrangler and can highly recommend it). You now have to find the line of code that contains the bit of text you typed (eg. REPLACETHISTEXT) and delete the whole line.
In my page the entire line I deleted looks like this:
Then all you need to do is copy the code below remembering to change the ‘username’ and ‘page name’ to your required settings, save your page and upload it to your web-space.
There are several pages you will need to upload to your server, but if you use an FTP application such as Cyberduck then you will be able to select each individual file(s) and just upload them rather than the whole site. For each blog entry there are 3 files which will be easy to spot within your Blog/Entries folder as they will all have the same name as your blog entry. In addition, you will need to upload a few files from the ‘Blog’ folder. These are: ‘Blog-main.xml’, ‘Blog.html’ and the folder ‘Blog-files’. Once you have done that, you will have in-line comments on your iWeb blog and you won’t have to get hosting on MobileMe.
So before you go ahead and give this a try I just want to stress that each time you write a new entry to your blog in iWeb and then publish it to a folder the code for the other entries will be overwritten. This means that if you do not do a selective publish (for example with Cyberduck) then you will have loads of entries that all end with REPLACETHISTEXT or whatever words you chose.
Additionally, if you only have a very short entry (or your blog front page excerpts are long) you may see the words REPLACETHISTEXT showing on your blog front page. Obviously this doesn’t show in the entry itself as you deleted the HTML code with it in, but because iWeb creates a separate xml file (Blog-main.xml) for the front page and enters the excerpt text onto it. You can obviously edit this xml file but why make things difficult if you don’t need to? Just remember to type at least 4 or 5 sentences for each blog entry and you won’t have to worry about it.
With any luck I should have my example iWeb site up soon with examples of the in-line comments in action. I have tried this method out 3 times and carried out a selective publish each time without any problems.
If you have any further problems, drop me a line through the contact page or leave a comment.Customisation, iWeb, Software