Page 1 of 1

css/plugin question

Posted: Wed Jan 25, 2006 11:23 pm
by michu
hello

well im trying to write a plugin for s9y, but ive got a problem. well i dont know css that well, but i belive the problem is there... ok here is the php code, or part of it (btw im using the joshua template)

----------------------------------------------------------
printf("<br> <table border=\"0\" bordercolor=\"0\" cellpadding=\"0\" cellspacing=\"0\">");

for ($viererSchlaufe=0; $viererSchlaufe<4; $viererSchlaufe++) {
$eins=getIpVal($ip,$viererSchlaufe);
printf("<tr>");
for ($i=0; $i<4; $i++) {
$foo=getBits($eins, $i);
if ($foo==true) printf("<td><img class=\"michu\" src=\"b.gif\" width=16 height=16/> </td>");
else printf("<td><IMG SRC=\"w.gif\" width=16 height=16></td>");
}
printf("</tr></div>");
}
----------------------------------------------------------

well if i run this php script, everything looks fine, but when i use it as plugin, i cannot see any image!

any help would be great! thanks in advance

regards
michu

Posted: Thu Jan 26, 2006 2:36 am
by judebert
I bet the problem is the relative directory. When Serendipity runs the plugins, it's usually operating out of the s9y base dir. What happens when you run your script from there? Could you try the plugin with a full path, instead of the relative filename?

css/plugin question

Posted: Thu Jan 26, 2006 8:36 am
by michu
bingo! you are my hero! thanks it works

Posted: Thu Jan 26, 2006 7:54 pm
by judebert
There's no need to fear, SuperJude is here!

When problems in this blog appear,
You need a software engineer.
We want our favorite volunteer.
The cry goes up both far and near for
SuperJude,
SuperJude,
SuperJude,
SuperJude.

Sorry. The Underdog theme has been running around my head for a week now. :lol: