Tue 21st Mar 2006
Posted late afternoon, filed under
Blogsome ,
JavaScript.
I couldn’t find a simple explanation of how to do this, so here is one.
First, a bit of background. I wanted to be able to delete a comment from a standard post page, without having to a) go to a confirmation page, and b) have to navigate back to the original page afterwards.
The following code creates an HTTP request, opens the required page, then fakes the header so it looks like it came from an admin page, before sending the request. When the request is complete, it refreshes the current page, so as to update the display.
(more…)
Tue 21st Mar 2006
Posted mid-afternoon, filed under
Blogsome ,
PHP.
A bit down the track, I want to fix some things with the way Posts are parsed when they are created or edited using Blogsome.
I’m loath to change too much the stuff in the actual edit box: people need to be able to put Raw HTML code in there if they want, and if they don’t, they can use the WYSI-editor.
However, the Title field needs to be escaped before being saved to the database. Having an & in the title generates invalid XHTML code. This is basically the same issue as what causes the errors when extended (non-latin) characters are used in the title, and transferred into the post-slug.
This should be fairly easy to fix: just a function that looks at this field on posting (and perhaps the post-slug field also, just to check), and replaces any invalid characters with the escaped version.
I only thought about this again, as I had two posts with & in their titles in the past week.
Tue 21st Mar 2006
Posted mid-morning, filed under
Blogsome.
Occasionally, people report a particular error when trying to delete posts or comments.
Sorry, you need to enable sending referrers for this feature to work.
I came across this twice in the past week. Once was when I changed my $siteurl variable, and this disappeared when I returned it to the normal value. The other was when I tried to set up a shortcut to delete a comment from the post page.
(more…)