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

version» Context lines:

Roxen.git/server/modules/graphics/gbutton.pike:1: - // Button module. Generates graphical buttons for use in Roxen config - // interface, Roxen SiteBuilder and other places. + // Button module. Generates graphical buttons for use in the + // ChiliMoon administration interface and other places.   //   // Copyright © 1999-2001 Roxen IS. Author: Jonas Walldén, <jonasw@roxen.com>         // Usage:   //   // <gbutton   // bgcolor -- background color inside/outside button   // textcolor -- button text color   // href -- button URL
Roxen.git/server/modules/graphics/gbutton.pike:18:   // icon-data -- inline icon data   // align -- left|center|right text alignment   // align-icon -- left|center-before|center-after|right icon alignment   // valign-icon -- above|middle|below icon vertical alignment   // >Button text</gbutton>   //   // Alignment restriction: when text alignment is either left or right, icons   // must also be aligned left or right.       - constant cvs_version = "$Id: gbutton.pike,v 1.96 2002/10/23 23:36:30 nilsson Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.97 2002/11/07 15:57:53 mani Exp $";   constant thread_safe = 1;      #include <module.h>   inherit "module";      roxen.ImageCache button_cache;   int do_ext;      constant module_type = MODULE_TAG;   constant module_name = "Graphics: GButton";
Roxen.git/server/modules/graphics/gbutton.pike:702:    // However, . is not a valid character in the ID, so just cutting at    // the first one works.    return button_cache->http_file_answer( (f/".")[0], id );   }      mapping __stat_cache = ([ ]);   int get_file_stat( string f, RequestID id )   {    int res;    -  // -1 is used to cache negative results. When SiteBuilder crawler runs -  // we must let the stat_file() run unconditionally to register -  // dependencies properly. +  // -1 is used to cache negative results.    if (!id->misc->persistent_cache_crawler)    if (res = __stat_cache[f])    return (res > 0) && res;       call_out( m_delete, 10, __stat_cache, f );    int was_internal = id->misc->internal_get;    id->misc->internal_get = 1;    res = __stat_cache[ f ] = (id->conf->stat_file( f,id )    || file_stat( f )    || ({ 0,0,0,0 }))[ST_MTIME] || -1;