Hello 
I'm Siobhan Curran/Kisa Naumova, and this is my weblog. I tend to write about stuff like crossdressing, Macs, code, cats, wine and Second Life, but in general it's just an ongoing conversation about all sorts of stuff. If you'd like to know a little bit more about what this all is, I recommend starting on this page which has a little bit of info on who I am, and what I'm trying to do — or you could dive into my five years worth of archives if you like.
Otherwise, feel free to close this box and explore...
dev
Prepare for borkage...
I find that I need to be in a particular headspace to Get Things Done™. It's a headspace that doesn't come at will — but rather descends on me from compeltely out of the blue, and can disappear just as easily.
It can also take an extraordinarily large amount of time to arrive — completely unrelated to the urgency (or pesterings of others) of the task in hand.
For example, yesterday I flung myself into tweaking our Course Website and addig new features — being able to keep a track on the conversations you were having through comments seemed like a good idea, as did implementing an internal messaging system¹. Some might say that I should have diverted my efforts into actually fixing things that peope have asked for...
...but I wasn't in that headspace.
This morning though, I was. And I managed to knock-up an "edit your comments" thing which some of the students have been pestering me to do ever since January ![]()
Then, having done-and-dusted that (all before 9am as it happens
), I thought that maybe I'd turn my attention to something on this site that people have been asking me to do ever since I redesigned back in March(?)²...
...a preview button ![]()
...
Normally, whenever I do something like this, I leave everything live, but test things out on an old page — but I thought "sod it. Let's test things out on the front page for a change".
So, I'm imagining that today could be rather embarassing, as I expose the sheer fudginess of how I work.
But it could be fun...
¹ It works — but it's insecure. If you know how, anyone can read anyone else's messages. I really must fix that...
² Must look that up later...
Graham
OK, first off whatever you just did screwed up Gravatars ![]()
Hmm ![]()
The way I'm doing this, BTW, is to take advantage of the kludgey way I implemented the comments in the first place. For some unknown reason, I append the comment to the browser and the source-file in two places:
$raw_text = $raw_text.$comment_post ;
...which makes the comment display when you hit 'Post!', and...
if (fwrite($handle, $comment_post) === FALSE) {
...(etc) which actually writes it to disk. All I have to do (obviously) is not write it to disk if it's being previewed rather than posted.
Coffee break...
Siobhan
...So what I should probably do is have something show up so I can see if I can spot when 'preview' is clicked on rather than 'post'...
Ages ago, when I first wrote this, I was pretty inexperienced with dealing with $_POST stuff — so there's a very bad bit of code that checks if you're posting a comment or not.
Some would perhaps wonder why I don't just go back and rewrite it all from scratch...
Graham
(I like to justify it by saying that this site has 'grown' with me, when in actual fact it's because I'm a lazy cow)
...
Right, so that's working
If you hit 'preview' it shows you what the comment will look like — but not actually post it.
Of course, what I need now is to make sure all the variables — in particular the comment itself — gets chucked into the form exactly as it should be...
This is the bit I always find hard — making sure that what appears in the <textarea> matches what you posted. This morning — for example — I was having a nightmare with double lines and stuff, because of nl2br() being a bit overzealous...
It'll probably be best to start off with the form that's displayed if you've clicked on the 'remember me' thing...
(Note to self: do something about the dialogue...)
Let's see if this works...
How about some formatting?
Hmm ![]()
Is that a Markdown thing?
Try again
Well now that's interesting
If you use Markdown syntax to make a <blockquote>, but don't put a new line at the end, the formatting screws up. I'd never noticed that before...
One thing I must do before anything else, is to turn off the "email me the comment" script for previews — otherwise my inbox is going to fill up ![]()
oh
How's this for meta — I'm currently in your gallery in Munck, telling some visitor about you, while watching your split personalities code here...
How do I turn the URL cube off — it keeps thinking I'm trying to give it a keyword?
This is the bit I always find hard — making sure that what appears in the
<textarea>matches what you posted.
See, the thing is, if I just squirt in the value that's in $_POST[], then I lose thml entities.
I'm not explaining that well — what I mean is that if I type < to make a "<" in a comment, then it gets translated to a "<" in the <textarea> as well.
Graham
How's this for meta
That's übermeta ![]()
How do I turn the URL cube off
Um, you can't — I need to comment out part of the code on that copy
Try saying "currantly" at it — that should shut it up
...
OK, so the preview is working for the "remember me" form (sort of — I'll come back to the entity problem in a bit) — I'll try and make it work for the normal form...
More coffee...
Good plan...
La la la
Well, that seemed to work ![]()
Graham
Right. Can I tentatively say that I've now got the preview thing working — but I'm sure that there will be countless bugs and weird behaviour ... which I'd appreaciate being told about ![]()
I just need to tidy up the formatting a bit, and do something about the clumsy language...
With the < <-> "<" thing, I'm wondering if I just did a simple search-and-replace changing "&" to "&" whether that would work...
& if it would screw up normal ampersands...
Well, what do you know? It works ![]()
Graham
la la la
foo
Well now that's weird ![]()
Well now that's weird
I always seem to have problems with <blockquotes> — the formatting always goes screwy if there isn't a line-break after the comment.
Automagically putting one in seems to work though
My father-in-law takls to himself when he's coding too.
Mind you, he is schizophrenic.
takls
*sheesh* I spend all morning writing a preview function, and you don't bloody use it ![]()
I'm ostensibly testing this Preview feature in a blatant attempt to increase page views on my own blog.
Hmm. My Gravatar seems to have vanished.
I spend all morning writing a preview function, and you don't bloody use it wink
Really? Are you sure about that? *Really* sure?
And it looks like your winking smiley borks when I jsut copied the text...
a blatant attempt to increase page views on my own blog
I only wrote it in the hope that I might get some comments for a change ![]()
Hmm. My Gravatar seems to have vanished.
Aye — seems to be a web-wide phenomenon today
And it looks like your winking smiley borks when I jsut copied the text...
That's because the alt text for the image is "wink" rather than ";)". If I changed them all so that they matched the code to make them, then that would work. Yes?
I'd not thought of that before...
If I changed them all so that they matched the code to make them, then that would work. Yes?
I guessed that that was the explanation. I wasn't having a go — just pointing out something you might want to consider. I'm well aware that the best people to test a site or system are not the people who wrote it... about the only time that dumb clucks like me add any value...
Interesting thing though — Safari doesn't copy the alt text, so I never knew that was a possibility
I wasn't having a go
I know ![]()
The one thing I'm waiting for though — is someone on IE6 to turn round and tell me the whole thing is borked to hell...
Then again — with my "accessibility" hat on — if you change the alt text, that makes things worse for those with a visual impairment, such as someone who uses a screen reader to read out the contents of a page.
Which maybe raises a point of discussion for another time — what percentage of readers of a site like Tranniefesto have a visual impairment? Is transvestism essentially a visual thing — and if so, is it something that those with a visual impairment would tend to be less involved with? Or do the non-visual dimensions (touch, for example) mean that such a distinction is not so likely?
I've no idea. The thought hadn't occurred to me before.
Is transvestism essentially a visual thing — and if so, is it something that those with a visual impairment would tend to be less involved with?
That's very interesting. I know I have at least one reader who reads the draGnet with a text to speech reader. She's a tranny. I wonder what the user experience is like.
And like you say, I wonder if we're all visually fixated. I know I am.
if you change the alt text, that makes things worse for those with a visual impairment, such as someone who uses a screen reader to read out the contents of a page.
Yes, but I also have text-equivalents of the smilies — so I'm replacing the alt-texts with those. Have a peek at the code to see what I mean.
I know I have at least one reader who reads the draGnet with a text to speech reader. She's a tranny. I wonder what the user experience is like.
There's also Stephaine of course.
Or did you mean Stephanie?
This has got to be one of your more surreal posts. What with you, Kisa and Graham all chatting away, I started to wonder if any of your readers (me included) were real!
using a screen-reader
I seem to recall one of your readers mentioning using a screen-reader, can't remember who though (sorry). At the time the whole "trannieing for the visually impaired" thing ran through my mind. The other thing that occurred to me (some time later) was: remember when you posted the audio file? Well it made me wonder if a blind reader could use it to 'train' a screen-reader so as to read your blog in your voice.
'train' a screen-reader so as to read your blog in your voice
A scary prospect ![]()
B.T.W. I'm using IE6 and the whole thing is borked to hell ![]()
Just kidding — It behaves just as it always does under IE (unpredictably / oddly)
Looks OK to me.. even in crappy IE6
Hurrah! ![]()
Anyway
I think I might be all coded out.
Have a pretty picture of some wine bottles instead...
![]()
I suppose if a mental asylum ever needs someone who can code and mutter madly at themself at the same time........
Or you could download the ZNC Browser and just convert the whole thing to music.
Second Life Flickr Geotagging
Oh boy
Today seems to have been a bit of a Code Day™. Sorry
In the wake of Flickr being all groovy and doing geotags, I wondered if there was some way of doing similar things with images from Second Life.
Wouldn't it be nice if we could somehow hack the new geotags in Flickr so that Organizr used the SL map and we could add locations to our snapshots?
(http://www.flickr.com/groups/secondlife/discuss/72157594269254751)
Anyway, having ploughed through a few bits of mail-parsing today, and having recently got my head (a little) around phpFlickr, I figured I'd dive into a task I've been meaning to do for a while — stripping the gumpf off the emails that "Send a Postcard" generates when you choose itfrom the new-fangled Snapshot Menu.
(Great this eh? Coding and Second Life — what's not to love?)
A couple of hours (and good deal of "WHY AREN'T YOU WORKING?!") later, and I've got a script that accepts emails straight from in-world, parses the crud and uploads the actual postcard to Flickr, complete with a title, description, tags for the location, and a Slurl to give you a link straight to where it was taken.
It's kinda like this, but an SL variant (and you don't need to carry lots of gadgets around with you) ![]()
Here's an example...
Two Three things to do:
Sort out the authentication methods so that people other than myself can use it.
Make sure the tags are constructed in such a way as to be useful for map-based mashups.
Maybe do something like adding them to a set — or a group — or something

Anyway, I think I've earned a rest. So I'm going to wash my hair, jump into a dress, and spend the night slobbing in front of the telly, slowly (?!) getting absolutely shit-faced ![]()
...
Just before I do though (get shit-faced that is), I have one question about all of this that I'm really hoping someone might know about...
To authenticate, I sent my API key and my API secret to Flickr using Dan Coulter's http://www.phpflickr.com/tools/auth/ page — which is cool, but it ties the uploading to me.
What I was thinking, was that I could set up a web page where you could link your Avatar name with your Flickr account — which would then call the Authentication API stuff, and I could store that in a database so that I'd be able to forward the snapshots to Flickr to the right account.
But...
That means I'd be storing sensitive information
So what I'm asking, is does anyone know what exactly is the best way to handle Flickr authentication from within a script rather than a browser?
Just thought I'd ask — before I email Dan...
I think it's too late, BUT...
Perhaps it would have been easier to just open another window with the previewed pink speech bubble... ?
Thank you for the preview, good job ![]()
Perhaps it would have been easier to just open another window with the previewed pink speech bubble...
Actually, no ![]()
THe problem with this weblog is that it's grown exponentially from where it started — and there are bits of code lying all over the place that do various things to the source text before it gets displayed.
TO go through and try and replicate them all, so that the previewed comment appears on its own would be a nightmare — and seeing as how I kinda already had a preview thing by default, it was a lot easier to just go down that route.
Plus, I like how it appears in situ as it were ![]()
===? is that some funky equivalence I've not seen/used before. For a split second I thought you coded in my language, but realised that it was php?
Btw, can you link to the "audio" file, I so wanna hear the accent.
Crap — I can't find it now
The === FALSE bit, BTW is (I believe) a PHP thing. It means 'identical' — "TRUE if $a is equal to $b, and they are of the same type.". It's used when a function could return a value that was equivalent to FALSE (like "0"), but not actually false.
strpos() is a good example of something like that — it returns the position of needle in haysytack, which could be 0, yet still TRUE.
(Note to self: Don't try to explain code the minute you get out of bed in the morning)
Why not that explanation worked for me ![]()
Btw, can you link to the "audio" file, I so wanna hear the accent.
Crap — I can't find it now
http://media.eyefood.co.uk/voices.mp3
![]()
Genette
Genette
I do talk a lot of shite sometimes...





Just make sure you back up the files first OK?