Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.images.systemImageRef
on systemImageRef (imgPath, usemap="", align="", hspace="", vspace="", flFileUrl=false, alt="") {
<<Changes:
<<12/27/02; 1:06:19 PM by JES
<<Add a space and forward slash before closing the img tag. Fixes a validation problem for XHTML pages, and still validates for HTML 4.01 Transitional pages.
<<1/31/02; 4:32:46 PM by DW
<<Added optional alt parameter.
<<4/18/01; 4:10:59 PM by DW
<<Moved from myUserLandSuite.
local (adrimage, url = radio.images.systemImageUrl (imgPath, @adrimage, flFileUrl));
if usemap != "" {
usemap = " usemap=\"#" + usemap + "\""};
if align != "" {
align = " align=\"" + align + "\""};
if hspace != "" {
hspace = " hspace=\"" + hspace + "\""};
if vspace != "" {
vspace = " vspace=\"" + vspace + "\""};
if alt != "" {
alt = " alt=\"" + alt + "\""};
local (hw = "");
bundle { //set hw
local (adrincache = @system.temp.radio.hwCache.[imgPath], hwlist);
if defined (adrincache^) {
hw = adrincache^}
else {
case getbinarytype (adrimage^) {
'GIFf';
'gif ' {
hwlist = html.getGifHeightWidth (adrimage)};
'JPEG' {
local (f = file.folderfrompath (frontier.getprogrampath ()) + "tmp.jpeg");
file.writewholefile (f, adrimage^);
hwlist = html.getJpegHeightWidth (f);
file.delete (f)}};
hw = " width=\"" + hwlist [2] + "\" height=\"" + hwlist [1] + "\"";
adrincache^ = hw}};
return ("<img src=\"" + url + "\" border=\"0\"" + hw + usemap + align + hspace + vspace + alt + " />")}
<<bundle //test code
<<local (pt)
<<new (tabletype, @pt)
<<new (tabletype, @pt.radioResponder)
<<pt.radioResponder.flsamemachine = true
<<html.setpagetableaddress (@pt)
<<webbrowser.displaytext (imageRef ("apacheIcons/folder2"))
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.