Roxen.git / server / modules / graphics / graphic_text.pike

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1:   // This is a roxen module. Copyright © 1996 - 2000, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.252 2000/10/19 09:17:03 per Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.253 2000/12/05 00:40:12 nilsson Exp $";      #include <module.h>   inherit "module";         // ------------------- Module registration ---------------------      constant module_type = MODULE_TAG;   constant module_name = "Graphic text";   constant module_doc =
Roxen.git/server/modules/graphics/graphic_text.pike:849:       class Frame {    inherit RXML.Frame;    array do_return(RequestID id) {    content=fix_text(content,args,id);    mapping p=mk_gtext_arg(args,id);    if(args->href && !p->fgcolor) p->fgcolor=id->misc->gtext_link||"#0000ff";    string ext="";    if(query("ext")) ext="."+(p->format || "gif");    if(!args->short) -  return ({ query_internal_location()+image_cache->store( ({p,content}), id )+ext }); +  return ({ query_absolute_internal_location(id) + +  image_cache->store( ({p,content}), id )+ext });    return ({ "+"+image_cache->store( ({p,content}), id )+ext });    }    }   }      class TagGTextID {    inherit RXML.Tag;    constant name = "gtext-id";    constant flags = RXML.FLAG_EMPTY_ELEMENT;       class Frame {    inherit RXML.Frame;       array do_return(RequestID id) {    mapping p=mk_gtext_arg(args,id);    if(args->href && !p->fgcolor) p->fgcolor=id->misc->gtext_link||"#0000ff";    if(!args->short) -  return ({ query_internal_location()+"$"+image_cache->store(p, id)+"/" }); +  return ({ query_absolute_internal_location(id) + +  "$"+image_cache->store(p, id)+"/" });    return ({ "+"+image_cache->store(p, id )+"/foo" });    }    }   }      class TagGText {    inherit RXML.Tag;    constant name = "gtext";    constant flags = RXML.FLAG_DONT_REPORT_ERRORS;   
Roxen.git/server/modules/graphics/graphic_text.pike:940:    string res="",split=arg->split;    if(lower_case(split)=="split") split=" ";    m_delete(arg,"split");    c=replace(c, "\n", " ");    int setalt=!arg->alt;    foreach(c/split-({""}), string word)    {    string fn = image_cache->store( ({ p, word }),id );    mapping size = image_cache->metadata( fn, id, 1 );    if(setalt) arg->alt=word; -  arg->src=query_internal_location()+fn+ext; +  arg->src=query_absolute_internal_location(id)+fn+ext;    if( size )    {    arg->width = (string)size->xsize;    arg->height = (string)size->ysize;    }    res+=Roxen.make_tag( "img", arg, xml )+" ";    }    return sprintf(lp,res);    }       string num = image_cache->store( ({ p, c }), id );    mapping size = image_cache->metadata( num, id, 1 );    if(!arg->alt) arg->alt=replace(c,"\"","'");    -  arg->src=query_internal_location()+num+ext; +  arg->src=query_absolute_internal_location(id)+num+ext;    if(size) {    arg->width=(string)size->xsize;    arg->height=(string)size->ysize;    }       if(arg->magic)    {    string magic=replace(m_delete(arg,"magic"), "'", "`");       if(p->bevel) p->pressed=1;
Roxen.git/server/modules/graphics/graphic_text.pike:1005:    " document.images[ri].src = hi.src;\n"    " if( txt != 0 )\n"    " setTimeout(\"top.window.status = '\"+txt+\"'\", 100);\n"    "}";    }    id->misc->gtext_magic_java="yes";       return    res+    " "+sn+"l = new Image("+arg->width+", "+arg->height+");"+sn+"l.src = \""+arg->src+"\";\n" -  " "+sn+"h = new Image("+arg->width+", "+arg->height+");"+sn+"h.src = \""+query_internal_location()+num2+ext+"\";\n" +  " "+sn+"h = new Image("+arg->width+", "+arg->height+");"+sn+"h.src = \"" + +  query_absolute_internal_location(id)+num2+ext+"\";\n"    "</script>\n"+    "<a"+ea+"href=\""+url+"\" "+    (input?"onClick='document.forms[0].submit();' ":"")    +"onMouseover=\"i('"+sn+"',"+sn+"h,"+((strlen(magic) && magic != "magic")?    "'"+replace(magic,"'","`")+"'":    "0")+"); return true;\" "    "onMouseout=\"document.images['"+sn+"'].src = "+sn+"l.src;\">"    +Roxen.make_tag("img",arg,xml)+"</a>";    }