Furry stuff, oekaki stuff, and other stuff.
You are not logged in.
I will create a banner for each layout, and upload it to http://pichu.mihopa.com/oekakis/normal/templates . Each banner will be named after the template with a .giuf extention. So far I've come up with the following:
<? if($OekakiU == '' || ($tresult==0)){ echo '<img src="http://www.pichu.mihopa.com/oekakis/normal/templates/'.$template.'.gif">'; } else { if (empty ($row['templatesel'])) $row['templatesel'] = $template; echo '<img src="http://www.pichu.mihopa.com/oekakis/normal/templates/'.$row['templatesel'].'.gif">'; } ?>
It works perfectly, and it displays it in the exact right possition that I want it to.
However, not all of templates have a banner 'assigned' to them, so I would much rather for the sript to echo nothing. I've tried the following:
<? if($OekakiU == '' || ($tresult==0)){ echo '<img src="http://www.pichu.mihopa.com/oekakis/normal/templates/'.$template.'.gif">'; } elseif { if (empty ($row['templatesel'])) $row['templatesel'] = $template; echo '<img src="http://www.pichu.mihopa.com/oekakis/normal/templates/'.$row['templatesel'].'.gif">'; } else { if (!file_exists ('http://www.pichu.mihopa.com/oekakis/normal/templates/'.$template.'.gif')) || if (!file_exists ('http://www.pichu.mihopa.com/oekakis/normal/templates/'.$row['templatesel'].'.gif')) echo ''; } ?>
but it doesn't seem to work. Any idea on how I can fix this up?
Thank you so much for you help
Offline
Try this:
<?php if (empty ($OekakiU) || $tresult == 0) { $b_template = "./templates/{$template}.gif"; } else { $b_template = "./templates/{$row['templatesel']}.gif"; } if (file_exists ($b_template)) { echo '<img src="'.$b_template.'" border="0" /><br />'."\n"; } ?>
Offline
I know this is probably a stupid question, but I would love to use this - where does the code go??
Offline
Go to Administration -> Edit Banner, and copy and paste the code above into the banner file.
Don't forget the special tags "<?php" and "?>", or else the code won't work. Copy and paste it exactly from the code block above.
Make sure you have an image for each template, and the case of the filenames is exactly the same as the template. There is a difference between "2draw" and "2Draw".
So, in your templates directory, you would upload:
2draw.gif
aoi.gif
blue-ness.gif
...
Offline