My favorite billboard has a photo thread, in wich I put BBCode for Zooomr-hosted images — formerly by hand, now with this nice AppleScript.
Note that it only checks for “.jpg” since one should only reference previews or your admin will… ;-)
You need, of course, an Apple computer with OS X and Safari.
Copy the code in Script Editor and safe it nicely named in ~/Library/Scripts/Applications/Safari/ (create the folder if not exists).
Usage: Copy the HTML code provided with any image size (Apple+C), run the script from the script menu, insert into your forum post. Preview and have fun!
CODE:
(* BlogHTML to BBCode (Clipboard)
© 2008
www.thorix.de4.5.2008
Provides a feature missed in Zooomr:
the code for referencing an image’s representation like
<a href="image—detail—view" title="Photo Sharing"><img alt="image-title" height="683" src="image—url" width="1024" /></a>
— copied to the clipboard — will replaced by
[URL=image—detail—view][IMG]image—url[/IMG][/URL]
— still in the clipboard — to be copied in a forum post.
Installation: put me in ~/Library/Scripts/Applications/Safari/ (even if I do nothing with it)
*)
property URL_TAG : "URL"
property IMG_TAG : "IMG"
tell application "Safari"
set html to (the clipboard as text)
set oldDelimiters to AppleScript's text item delimiters
-- Brute force parsing
set AppleScript's text item delimiters to "\""
set htmlElements to html's text items
repeat with element in htmlElements
if element begins with "http://" then
-- I’ve got something real
if element ends with ".jpg" then
set pictureHref to element
else
set siteHref to element
end if
end if
end repeat
set AppleScript's text item delimiters to oldDelimiters
set the clipboard to "[" & URL_TAG & "=" & siteHref & "][" & IMG_TAG & "]" & pictureHref & "[/" & IMG_TAG & "][/" & URL_TAG & "]"
end tell