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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1:   // This is a ChiliMoon module. Copyright © 1996 - 2001, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.304 2004/06/03 23:15:05 mani Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.305 2004/06/04 08:29:21 _cvs_stephen Exp $";      #include <module.h>   inherit "module";         // ------------------- Module registration ---------------------      constant module_type = MODULE_TAG;   constant module_name = "Graphics: Graphic text";   constant module_doc =
Roxen.git/server/modules/graphics/graphic_text.pike:613:    text = Parser.parse_html_entities(text);       string res="",nspace="",cspace="";    foreach(text/"\n", string line)    {    cspace="";    nspace="";    foreach(line/" ", string word)    {    string nonum; -  if(strlen(word) && +  if(sizeof(word) &&    (nonum = replace(word,    ({"1","2","3","4","5","6","7","8","9","0","."}),    ({"","","","","","","","","","",""}))) == "") {    cspace=nbsp+nbsp; -  if((strlen(word)-strlen(nonum)<strlen(word)/2) && +  if((sizeof(word)-sizeof(nonum)<sizeof(word)/2) &&    (upper_case(word) == word))    word=((word/"")*nbsp);    }    else if(cspace!="")    cspace=" ";       res+=(nspace==cspace?nspace:" ")+word;       if(cspace!="")    nspace=cspace;
Roxen.git/server/modules/graphics/graphic_text.pike:743:    ([    "xsize":data[1][0],    "ysize":data[1][1],    "type":(args->format?id->conf->type_from_filename("x."+args->format):"image/png"),    ])    ]);   }      mapping find_internal(string f, RequestID id)   { -  if( strlen(f)>4 && query("ext") && f[-4]=='.') // Remove .ext +  if( sizeof(f)>4 && query("ext") && f[-4]=='.') // Remove .ext    f = f[..strlen(f)-5]; -  if( strlen(f) && f[0]=='$' ) +  if( sizeof(f) && f[0]=='$' )    {    array id_text = f/"/";    if( sizeof(id_text)==2 )    { // It's a gtext-id    string second_key = core.argcache->store( (["":id_text[1]]) );    return image_cache->http_file_answer( id_text[0][1..] +"$"+ second_key, id );    }    }    return image_cache->http_file_answer( f, id );    return 0;
Roxen.git/server/modules/graphics/graphic_text.pike:1117:    }       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_absolute_internal_location(id)+num2+ext+"\";\n"    "</script>\n"+    "<a"+ea+"href=\""+url+"\" "+    (input?"onClick='document.forms[0].submit();' ":"") -  +"onMouseover=\"gtext_mo('"+sn+"',"+sn+"h,"+((strlen(magic) && magic != "magic")? +  +"onMouseover=\"gtext_mo('"+sn+"',"+sn+"h,"+((sizeof(magic) && magic != "magic")?    "'"+replace(magic,"'","`")+"'":    "0")+"); return true;\" "    "onMouseout=\"document.images['"+sn+"'].src = "+sn+"l.src;\">"    +Roxen.make_tag("img",arg,xml)+"</a>";    }       if(input)    return Roxen.make_tag("input",arg+(["type":"image"]),xml);       return sprintf(lp,Roxen.make_tag("img",arg,xml));