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.156 1998/11/18 04:54:15 per Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.157 1998/11/19 10:22:28 per Exp $";   constant thread_safe=1;      #include <module.h>   #include <stat.h>   inherit "module";   inherit "roxenlib";      #ifndef VAR_MORE   #define VAR_MORE 0   #endif /* VAR_MORE */
Roxen.git/server/modules/graphics/graphic_text.pike:1132:   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)   {    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 "+    "alt=\""+alt+"\"></a>"): -  ("<input type=image "+extra_args+" src=\""+image_1+"\" name="+input+">"); +  ("<input border=0 type=image "+extra_args+" src=\""+image_1+"\" name=\""+input+"\">");    -  +  if(input)    return -  +  "<input border=0 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>\n"+    ("<a "+extra_args+"href=\""+url+"\" "+    (input?"onClick='document.forms[0].submit();' ":"") -  +"onMouseover=\"i('"+sn+"',"+sn+"h,'"+(mess||url)+"'); return true;\"\n" +  +" onMouseover=\"i('"+sn+"',"+sn+"h,'"+(mess||url)+"'); return true;\"\n"    "onMouseout=\"top.window.status='';document.images['"+sn+"'].src = "+sn+"l.src;\"><img "    "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:1208:    return query_location()+num+"/";    else    return (string)num;   }      string tag_graphicstext(string t, mapping arg, string contents,    object id, object foo, mapping defines)   {    if((contents-" ")=="")    return ""; +  +  if(id->prestate->noimages) +  { +  contents = replace(contents, "&ss;", ""); +  if(arg->submit) +  return "<input type=submit name='"+arg->name+"' value='"+contents+"'>"; +  return contents; +  }   //Allow <accessed> and others inside <gtext>.    if(arg->nowhitespace)    {    sscanf(contents,"%*[ \n\r\t]%s",contents);    sscanf(reverse(contents),"%*[ \n\r\t]%s",contents);    contents=reverse(contents);    } -  if(t=="gtext" && arg->help) +  if(arg->help) +  { +  if(t == "gtext")    return doc(); -  else if(arg->help) +     return "This tag calls &lt;gtext&gt; with different default values."; -  +  }    if(arg->background)    arg->background = fix_relative(arg->background,id);    if(arg->texture)    arg->texture = fix_relative(arg->texture,id);    if(arg->magic_texture)    arg->magic_texture=fix_relative(arg->magic_texture,id);    if(arg->magic_background)    arg->magic_background=fix_relative(arg->magic_background,id);    if(arg->magicbg)    arg->magicbg = fix_relative(arg->magicbg,id);