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.298 2004/05/22 19:52:24 _cvs_stephen Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.299 2004/05/23 02:56:52 mani 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:558: Inside #if defined(manual)
  <attr name='short'><p>    Returns a relative path to the image, i.e. a shorter one.   </p>   </attr>   <noex>"+gtextargs+"</noex>",]);   #endif         // -------------------- Image cache functions --------------------    - private roxen.ImageCache image_cache; + private core.ImageCache image_cache;   private string compat_level;   private int honor_supports;      string status() {    array s=image_cache->status();    return sprintf("<b>Images in cache:</b> %d images<br />\n"    "<b>Cache size:</b> %s",    s[0], String.int2size(s[1]));   }      mapping(string:function) query_action_buttons() {    return ([ "Clear cache":flush_cache ]);   }      void flush_cache() {    image_cache->flush();   }      void start(int num, Configuration conf)   { -  image_cache = roxen.ImageCache( "gtext", draw_callback ); -  roxen.dump( "etc/modules/GText.pmod" ); +  image_cache = core.ImageCache( "gtext", draw_callback ); +  core.dump( "etc/modules/GText.pmod" );    if(query("colorparse")) module_dependencies(conf, ({ "wiretap" }) );    compat_level = conf->query("compat_level");    honor_supports = query("honor_supports");   }      private constant nbsp = Roxen.iso88591["&nbsp;"];      private Image.Image|mapping draw_callback(mapping args, string text, RequestID id)   {    array data;
Roxen.git/server/modules/graphics/graphic_text.pike:759:      mapping find_internal(string f, RequestID id)   {    if( strlen(f)>4 && query("ext") && f[-4]=='.') // Remove .ext    f = f[..strlen(f)-5];    if( strlen(f) && f[0]=='$' )    {    array id_text = f/"/";    if( sizeof(id_text)==2 )    { // It's a gtext-id -  string second_key = roxen->argcache->store( (["":id_text[1]]) ); +  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;   }         // -------------- helpfunctions to gtext tags and containers -----------------