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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - constant cvs_version="$Id: graphic_text.pike,v 1.188 1999/09/05 15:57:20 grubba Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.189 1999/10/04 10:27:10 nilsson Exp $";   constant thread_safe=1;      #include <config.h>   #include <module.h>   #include <stat.h>   inherit "module";   inherit "roxenlib";      #ifndef VAR_MORE   #define VAR_MORE 0   #endif /* VAR_MORE */    -  + #define old_rxml_compat 1 +    array register_module()   {    return ({ MODULE_PARSER,    "Graphics text",    "Generates graphical texts.<p>"    "See <tt>&lt;gtext help&gt;&lt;/gtext&gt;</tt> for "    "more information.",    0, 1    });   }
Roxen.git/server/modules/graphics/graphic_text.pike:723:    " document.images[ri].src = hi.src;\n"    " setTimeout(\"top.window.status = '\"+txt+\"'\", 100);\n"    "}\n"    "</script>");      }         string magic_image(string url, int xs, int ys, string sn,    string image_1, string image_2, string alt, -  string mess,object id,string input,string extra_args,string lp) +  string mess,object id,string input,string extra_args,string lp, string img_extra_args)   {    if(!id->supports->images) return (lp?lp:"")+alt+(lp?"</a>":"");    if(!id->supports->netscape_javascript)    return (!input)? -  ("<a "+extra_args+"href=\""+url+"\"><img src=\""+image_1+"\" name="+sn+" border=0 "+ +  ("<a "+extra_args+"href=\""+url+"\"><img src=\""+image_1+"\" name="+sn+" border=0 "+img_extra_args+" "    "alt=\""+alt+"\"></a>"):    ("<input type=image "+extra_args+" src=\""+image_1+"\" name="+input+">");       return    ("<script>\n"    " "+sn+"l = new Image("+xs+", "+ys+");"+sn+"l.src = \""+image_1+"\";\n"    " "+sn+"h = new Image("+xs+", "+ys+");"+sn+"h.src = \""+image_2+"\";\n"    "</script>"+    ("<a "+extra_args+"href=\""+url+"\" "+    (input?"onClick='document.forms[0].submit();' ":"")    +"onMouseover=\"i('"+sn+"',"+sn+"h,'"+(mess||url)+"'); return true;\"\n" -  "onMouseout=\"top.window.status='';document.images['"+sn+"'].src = "+sn+"l.src;\"><img " +  "onMouseout=\"top.window.status='';document.images['"+sn+"'].src = "+sn+"l.src;\"><img "+img_extra_args+" "    "width="+xs+" height="+ys+" src=\""+image_1+"\" name="+sn+    " border=0 alt=\""+alt+"\" ></a>"));   }         string extra_args(mapping in)   {    string s="";    foreach(indices(in), string i)    {
Roxen.git/server/modules/graphics/graphic_text.pike:946:       string na = arg->name, al=arg->align;    m_delete(arg, "name"); m_delete(arg, "align");       // Now the 'arg' mapping is modified enough..    gt=contents;    rest="";       switch(t)    { + #if old_rxml_compat    case "gh1": case "gh2": case "gh3": case "gh4":    case "gh5": case "gh6": case "gh7": -  + #endif    case "gh": pre="<p>"; post="<br>"; defalign="top"; break;    case "gtext":    pre=""; post=""; defalign="bottom";    break;    case "anfang":    gt=contents[0..0]; rest=contents[1..];    pre="<br clear=left>"; post=""; defalign="left";    break;    }   
Roxen.git/server/modules/graphics/graphic_text.pike:1023:    if(!defines->magic_java)    res = magic_javascript_header(id);    defines->magic_java="yes";    if(!size) size = ([ ]);    return replace(res +    magic_image(url||"", size->xsize, size->ysize, "i"+(defines->mi++),    query_internal_location()+num+gif,    query_internal_location()+num2+gif,    (arg->alt?arg->alt:replace(gt, "\"","'")),    (magic=="magic"?0:magic), -  id,input?na||"submit":0,ea,lp), +  id,input?na||"submit":0,ea,lp, +  " align="+(al || defalign)),    "</script><script>","");    }    if(input)    return (pre+"<input type=image name=\""+na+"\" border=0 alt=\""+    (arg->alt?arg->alt:replace(gt,"\"","'"))+    "\" src="+query_internal_location()+num+gif    +" align="+(al || defalign)+ea+    (size?(" width="+size->xsize+" height="+size->ysize):"")+">"+    rest+post);   
Roxen.git/server/modules/graphics/graphic_text.pike:1151:    }    }    return tags;   }         mapping query_container_callers()   {    return ([ "anfang":tag_graphicstext,    "gtext-url":tag_gtext_url, "gh":tag_graphicstext, + #if old_rxml_compat    "gh1":tag_graphicstext, "gh2":tag_graphicstext,    "gh3":tag_graphicstext, "gh4":tag_graphicstext,    "gh5":tag_graphicstext, "gh6":tag_graphicstext, -  + #endif    "gtext":tag_graphicstext, ]);   }