Martin Atkins (mart) wrote in lj_dev,
Martin Atkins

LJ FunkyURLs

After the discussion in this thread which started off about 'Handy-Dandy Markup' I've knocked together a rudimentary LJ FunkyURL parser. It still needs work, and there's a lot of extra stuff in there just to make it work nicely as an independant CGI script.

  • It needs to be able to see the database to work out which userpic to use for the lj://userpic/... URLs. There's a placeholder pic in there for now.
  • I remembered afterwards I forgot about lj://talk/1354250 stuff, for talkread URLs. That'd take five seconds to add, but since I've already uploaded it I can't really be bothered! :)
  • The code needs tidying. It's all over the place, and there aren't very many comments. I hope people can work out what's going on in there. It also could to with being put in a sub itself, really.
  • It's, for now, using the ReadParse sub from to parse the form data. That is by no means how I intend it to stay! :)

You can see it actually working, along with the test input I was using, and then when you've done playing (or even before, if you like!) there's also the source code itself.


  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded