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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - string cvs_version="$Id: graphic_text.pike,v 1.20 1996/12/10 05:39:32 per Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.21 1996/12/10 13:19:40 neotron Exp $";   #include <module.h>   inherit "module";   inherit "roxenlib";         array register_module()   {    return ({ MODULE_LOCATION | MODULE_PARSER,    "Graphics text",    "Makes a few new tags, which render text to gifs "
Roxen.git/server/modules/graphics/graphic_text.pike:535:   }         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)   {    if(!id->supports->images) return alt;    if(!id->supports->javascript)    return (!input)? -  ("<a "+extra_args+"href=\""+url+"\"><img src="+image_1+" name="+ +  ("<a "+extra_args+"href=\""+url+"\"><img _parsed=1 src="+image_1+" name="+    sn+" border=0 alt=\""+alt+"\" ></a>\n"):    ("<input type=image "+extra_args+" src="+image_1+" name="+input+">");       return    ("<script>\n"    "<!-- \n"    "if(version == \"3\")\n"    "{\n"    " "+sn+" = new Image("+xs+", "+ys+");\n"    " "+sn+".src = \""+image_1+"\";\n"    " "+sn+"2 = new Image("+xs+", "+ys+");\n"    " "+sn+"2.src = \""+image_2+"\";\n"    "}\n"    "// -->\n"    "</script>\n"+    ("<a "+extra_args+"href=\""+url+"\" "+(input?"onClick='document.forms[0].submit();' ":"")    +"onMouseover=\"img_act('"+sn+"','"    +(mess||url)+"');return true;\"\n"    "\n" -  "onMouseout=\"img_inact('"+sn+"')\"><img \n" +  "onMouseout=\"img_inact('"+sn+"')\"><img _parsed=1 \n"    " src="+image_1+" name="+sn+" border=0 alt=\""+alt+"\" ></a>\n"));   }         string extra_args(mapping in)   {    string s="";    foreach(indices(in), string i)    {    switch(i)
Roxen.git/server/modules/graphics/graphic_text.pike:691:    array res = ({});    string pre = query_location()+num+"/";       if(lp) res+=({ lp });       gt=replace(gt, "\n", " ");       foreach(gt/" "-({""}), word)    {    array size = write_text(num,word,1,0); -  res += ({ "<img border=0 alt=\""+replace(word,"\"","'") +  res += ({ "<img _parsed=1 border=0 alt=\""+replace(word,"\"","'")    +"\" src=\'"+pre+quote(word)+"\' width="+    size[0]+" height="+size[1]+" "+moreargs+">\n"    });    }    if(lp) res+=({ "</a>" });    return res*"";    }       switch(t)    {
Roxen.git/server/modules/graphics/graphic_text.pike:740:    query_location()+num2+"/"+quote(gt),    replace(gt, "\"","'"),(magic=="magic"?0:magic),    id,input?(arg->name||"submit"):0,ea);    }    if(input && id->supports->images)    return (pre+"<input type=image name=\""+arg->name+"\" border=0 alt=\""+    replace(gt,"\"","'")+"\" src="+query_location()+num+"/"+quote(gt)    +" align="+(arg->align?arg->align:defalign)+    " width="+size[0]+" height="+size[1]+">"+rest+post);    return (pre+(lp?lp:"")+ -  "<img border=0 alt=\""+replace(gt,"\"","'")+"\" src="+ +  "<img _parsed=1 border=0 alt=\""+replace(gt,"\"","'")+"\" src="+    query_location()+num+"/"+quote(gt)    +" align="+(arg->align?arg->align:defalign)+    " width="+size[0]+" height="+size[1]+">"+rest+(lp?"</a>":"")+post);   }      string tag_body(string t, mapping args, object id, object file,    mapping defines)   {    int bg, text, link, alink, vlink, background;   //if(args->clink) { defines->clink = args->clink;