Wednesday, March 10, 2010

oh hai... iz in ur templatez hakin ur scripz

Step away from the template momentarily. kthxbai.

UPDATE: Done editing template.

OK, interesting - this template is a bit narrower than the one on my test blog, so I set the adjusted image width to 350... This looks OK to me, but I'm happy to change it.

So:

img:"url"

posts the image "as is"... suitable for small images, emoticons, etc...

imgw:"url"

posts the image with width="350"
... and this width may change in the future, as we change templates, etc..

Have at it! But keep in mind this feature is still effectively in beta; don't get terribly attached to images posted in the next couple of days; it's still well within my capability to screw things up!

UPDATE2: Thanks all for the kind words of thanks - you're all very welcome! It's fun playing around with this stuff...
...and I'm already working on the emoticon thing.

At this point I'm leaning away from trying to implement automatic recognition of emoticons [like transforming all instances of ;) into Smiley] and towards providing a palette of emoticons - possibly customizable, so that the emoticons that you use are on your "short list".

Doing both is also a possibility; I would do the palette first.

Doing automatic recognition is not hard, but doing it in a way that doesn't slow down the blog will take some doing.

In fact, this is true for more or less any feature: I've found that a great deal can be done with the "wait for the page to load and then hack up the HTML with javascript" trick which I've used for the images, but the limit is how slow and clumsy the page will become. This will especially show up on the long (100+ comment) threads, and for people who don't have the latest and greatest hardware.

Finally, about that tedious img:"url" syntax: I selected it based on a) people's passing familiarity with the HTML img tag, b) speed of scanning the post on page load (see above), c) future extensibility (e.g. img:"url":"tooltip" and d) ease of post processing the whole blog database when (someday) we migrate from blogspot.

Thanks for your patience... lewy is happy coding up all kinda crap but his alter ego vikram cautions against feature creep and bloat that makes maintenance difficult.

46 comments:

  1. I can't look...

    imgw:"http://i35.photobucket.com/albums/d170/lewy14/rosie1.jpg"

    ReplyDelete
  2. Awesome. Done.

    imgw:"http://i35.photobucket.com/albums/d170/lewy14/-1-1.jpg"

    ReplyDelete
  3. img"350":"http://i627.photobucket.com/albums/tt358/redhawkclan/happydance.png"

    ReplyDelete
  4. Crap! Let me try that again.

    img350:"http://i627.photobucket.com/albums/tt358/redhawkclan/happydance.png"

    ReplyDelete
  5. ACK! I didn't put the width in that time, and I broke TCKT!

    ReplyDelete
  6. Oh, I see what I'm doing wrong. Trying again.

    imgwidth="350":"http://i627.photobucket.com/albums/tt358/redhawkclan/happydance.png"

    ReplyDelete
  7. imgw:"http://i627.photobucket.com/albums/tt358/redhawkclan/happydance.png"

    ReplyDelete
  8. Oh. The width is already preset if I type in imgw:

    Maybe? I'm trying it!

    imgw:"http://i627.photobucket.com/albums/tt358/redhawkclan/happydance.png"

    ReplyDelete
  9. I know Lewy, it's old now. And it's not a cat. But it is a GSD.

    imgw:http://img204.imageshack.us/img204/5183/68120220xe4.jpg

    ReplyDelete
  10. Yay! I did it! Thank you Lewy darling!

    ReplyDelete
  11. lady red - you can see exactly what I typed in the "Recent Comments" sidebar.

    This is what you type - exactly!

    Don't worry about posting images that are too wide - they don't mess up the blog layout here, they just get clipped on the right.

    ReplyDelete
  12. I deleted the giant dragon.

    Luther, you forgot your quotation marks around your URL. Try again!

    ReplyDelete
  13. The thing I don't like is that my only 'edit' choices are leave or delete.

    So... I'll try again, using the quotes...

    imgw:"http://img204.imageshack.us/img204/5183/68120220xe4.jpg"

    ReplyDelete
  14. Luther - you forgot the quotes...

    imgw:"http://i35.photobucket.com/albums/d170/lewy14/wink/398610.jpg"

    ReplyDelete
  15. imgw:"http://i627.photobucket.com/albums/tt358/redhawkclan/dancingcat.gif"

    ReplyDelete
  16. Wow! Look at my giant cat! Hahahaha!

    ReplyDelete
  17. Heh, OK, you guys have the hang of it... I gotta run; I'll be back...

    (I realize the syntax is a bit unforgiving; I have a reason for that, but in the meantime, keep in mind I aim to implement a button which will make this easy and transparent).

    ReplyDelete
  18. It's working great, Lewy. Again, thanks for your time.

    Lady Red... your cat is making me crazy. :)

    ReplyDelete
  19. Luther, I didn't know it would be so huge!

    imgw:"http://i627.photobucket.com/albums/tt358/redhawkclan/hahaha.gif"

    ReplyDelete
  20. Okay let's see here...

    Is my fat Canadian housewife's arse hanging out?

    img:"http://i4.photobucket.com/albums/y113/phasewest/Women%20Clothes/rufflebuttpantiespink.jpg"

    ReplyDelete
  21. All righty, we all owe Lewy a HUGE drink! Thanks Lewy, great job.

    And did I say, thank you? If not, thank you!

    ReplyDelete
  22. Lewy's reward:

    imgw:"http://i627.photobucket.com/albums/tt358/redhawkclan/ahhirschreserve16.jpg"

    ReplyDelete
  23. Luther: Heh. Demi Moore did a shot like that long ago. A little weird I'd say.

    imgw:"http://i4.photobucket.com/albums/y128/aridog/surprised_baby_2.jpg"

    ReplyDelete
  24. That looks good lady red, can I have a shot too?

    ReplyDelete
  25. Rahm does his Vito Coreleone immitation...

    imgw:"http://rahmfacts.com/RahmColbert.jpg"

    ReplyDelete
  26. It does look good. The bottle is big enough for all of us to enjoy a snort of Lewy's gold-plated bourbon!

    Do you think it's too soon to nag him about emoticons? img:"http://i627.photobucket.com/albums/tt358/redhawkclan/battingeyelashes.gif"

    Maybe we should let him sip on his whiskey and enjoy a cigar first...

    ReplyDelete
  27. I think we should give him the rest of the night off lady red.

    As long as he knows he has to be up and at the emoticons toot sweet in the a.m. ;0)

    ReplyDelete
  28. How'd you do that dawg?

    I deleted my comment that contained that image 'cos it only showed the code...

    ReplyDelete
  29. Ah, Lady Red, I love laughing pigs. Are would that be shoats in this instance?

    That fat Canadian housewife ass is fine, I say, Fay.

    Ari... weird for sure.

    But, what an inspired pic to illustrate it.

    And... thank you Lewy, for making all this possible.

    ReplyDelete
  30. pfft, and now it's gone.

    Gremlins be here.

    ReplyDelete
  31. Testing

    img:"http://i4.photobucket.com/albums/y113/phasewest/Women%20Clothes/vcvg2.jpg"

    ReplyDelete
  32. Okay that worked. Now I'll try the other one.

    Get your summer shoes here EWOK's!

    img:"http://i4.photobucket.com/albums/y113/phasewest/Women%20Clothes/high_tide_heels.jpg"

    ReplyDelete
  33. Ah! I was typing url: instead of img:

    Duh me...

    img:"http://i4.photobucket.com/albums/y113/phasewest/Emoticons/45acd99d.gif"

    ReplyDelete
  34. For the one and lovely florrie, ta dah!

    img:"http://i4.photobucket.com/albums/y113/phasewest/Music%20Faces/markseligerpaperback.jpg"

    ReplyDelete
  35. Proof positive that 40+ years of s*x, drugs and rock'n roll keeps you thin!

    img:"http://i4.photobucket.com/albums/y113/phasewest/Music%20Faces/iggy-pop-4.jpg"

    Oy Iggy.

    ReplyDelete
  36. Fay, I think it's the sugar. It's bad for the skin.

    ReplyDelete
  37. Aww, Fay posted my man Lenny, thanks, luv!

    img:"http://i4.photobucket.com/albums/y117/floranista/rwcguy.jpg"

    ReplyDelete
  38. Wow, Lewy, excellent work! U iz gude koder :-)

    BTW, what time zone is this blog on? And Lewy's place?

    Fay, that picture has made me bilious (that's a good word to use first thing in the morning). I'm going to suffer all day now!

    ReplyDelete
  39. March 11, 2010 12:34 AM

    OK, you're 8 hours behind me. Slowcoaches :-).

    And now for my test picture...

    imgw:"http://i5.photobucket.com/albums/y169/annekl/Emoticons/ATT2.jpg"

    ReplyDelete
  40. you did it annie! img:"http://i35.photobucket.com/albums/d170/lewy14/Onigiri_cheerleader.gif"

    ReplyDelete
  41. Here's one for Lewy, to go with the bourbon..... :-)

    imgw:"http://bakascorner.files.wordpress.com/2007/09/lee-honey-title.jpg"

    ReplyDelete
  42. Another photo of "Honey" Lee (Lee Ha Nee), Miss Korea 2007, 3rd Dan Taekwondo, college graduate, and now Tommy Hilfiger model. (Just for Lewy, of course...what'd you think?)

    imgw:"http://bakascorner.files.wordpress.com/2007/06/honey2.jpg?w=450"

    ReplyDelete
  43. This comment has been removed by the author.

    ReplyDelete
  44. For those that missed the point of my Rahm Emanuel shot...the body language says this:

    "I'm Rahm, and you're not, Colbert. You want we should do this, nekid, in the shower?"

    img:"http://i4.photobucket.com/albums/y128/aridog/cat_01.gif"

    ReplyDelete