Top 'block' for banners

I'm moving over from SMF and trying to recreate the forum before importing over.

On SMF I used a portal to display banners using the include php code which would include the code from a specified php file containing details of the banner.

I need a solution for this on xenforo, I have tried xenPorta but I can seem to get the include php code to work in the block - I have asked for and await help.

I'm open to other suggestions/addons/code; as long as I'm able to choose which pages the 'block' is displayed on and the banner will randomly reload on refresh.

Many thanks in advance.


Well-known member
I have randomly rotating banners in various places, there are a couple of ways to do this. Like you it was all a bit hard at the start but once you get "into" the XF way of working it's easy - just different and so something new to learn!!

You can run your own PHP code by creating your own plugin, there's come good help here: if you read it all. It's a bit of a mind f**k to start with but basically just follow the instructions and it works, or feel free to ask here again or PM me.

Alternatively, you can stay away from custom PHP and plugins and just run randomly rotating banners within template code itself, Jake has a good tutorial on this: