MyBB Community Forums

Full Version: How to add php code in header/footer for ads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,
i wanted to know how to add php to the header for ads ( or footer )Huh
the code i should use is
<?php include_once("./adserver/viewbanner.php");?>
for the adbutterfly adserver.
my site is located at http://talkforstuff.com/
i wanted to put it where you can see the register image.
I have put that register image by the Board Messages mod of musicalmidget. but php won't work if i put php in the board messages.
So maybe you know a way?
i don't know if there's a footer.php file or such i have to edit?
Also is there a code to only show ad to specific groups ( like only to guests ) ?
Thank you!
- Shadows123.
It'd need to go in templates and you can't add PHP in templates without a plugin. Is the advert generated as an image??
hmm i don't understand what you mean generated as an image?
the image you see now is put there via the Board Messages plugin.
to get the ads from the adserver you need php code ( which i mentionned above )
maybe there is some mod already for this that i didn't see?
Well is the advert an image??
yeah.. lol
hey guys, i've found this, http://mods.mybboard.net/view/ad-randomizer-system i guess it's solved Smile.
- Shadows.
Try putting the link like this:

<img src="URL" />

I know you can put a PHP URL in IMG tags but not sure if it'll work in this case.
sadly i gues i can't use that, it messes my board up and puts 1000's of error msgs.. =(.
<= plugin
i'll ry what you say

----------
did what you say, i get the red cross img ( to say he doesn't find the img )..
Is there any mod to do this?
is it easy to code one that will just add this?
<?php include_once("./adserver/viewbanner.php");?>

i saw you can put vars in templates, can i make a var holding the php code, and show it up like that?
Thanks =).
- Shadows123.