NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

#1 05-28-2006 00:10:46

Maxx
Member

Banner changing with template?

Would there be a way for the banner to change when the template changes?
Like a PHP code or something?
If so that would be awesome.

Thanks Wac!

Offline

#2 05-29-2006 02:51:10

Waccoon
Administrator

Re: Banner changing with template?

See here:  Banner depends on template

NOTE:  only works for Wax Poteto.

Offline

#3 05-29-2006 13:46:19

Maxx
Member

Re: Banner changing with template?

I have Wax Poteto, with whatever is the newest version.
But I couldn't get any of the codes to work.

Offline

#4 05-29-2006 20:31:22

Waccoon
Administrator

Re: Banner changing with template?

You need to paste the code from that thread into your banner (from the banner editor menu).  Make sure the "<?php" and "?>" tags don't get clipped.  Then, you need to upload banner images into your template folder with the same names as the templates (they are case sensitive, too).  If you want to use JPEG files instead of GIFs, change the code so ".gif" is ".jpg" instead.

Are you getting garbage in the banner, or just nothing at all?

It's possible that a banner ad or filter on your server is preventing you from doing this.  If so, you need to edit the banner.php file directly and upload it to the server via FTP.  But, make sure you CHMOD the file to 664 after uploading it, or you won't be able to edit it again from the BBS menu.

Offline

#5 05-30-2006 21:25:13

Maxx
Member

Re: Banner changing with template?

Yes. I got the whole code.

This is what shows up everytime.

This is what the site said back wrote:

Parse error: syntax error, unexpected ')' in /home/.downhill/max555/kh-san.com/oekakis/soekaki/banner.php on line 2

Last edited by Maxx (05-30-2006 21:25:44)

Offline

#6 06-01-2006 06:36:27

Waccoon
Administrator

Re: Banner changing with template?

Sorry, there was an extra parenthases in the code.

Try this:

Code:

<?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

#7 06-02-2006 23:15:57

Maxx
Member

Re: Banner changing with template?

Thanks for all your help Wacoon!
I really apreciate it!

Offline

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB