• Report Links
    We do not store any files or images on our server. XenPaste only index and link to content provided by other non-affiliated sites. If your copyrighted material has been posted on XenPaste or if hyperlinks to your copyrighted material are returned through our search engine and you want this material removed, you must contact the owners of such sites where the files and images are stored.

Random Ads Code

XMAN

Well-known member
Joined
Jul 12, 2021
Messages
20,153
Reaction score
107
Points
63
Compatible XF Versions2.0 , 2.1 , 2.2
Write your ad code where it says banner.

It will randomly show an ad every time you refresh the page where you inserted the ad. It is the adaptation of the codes in Xenforo 1.x version for Xenforo 2.x.

Code:

Code:
<xf:comment>DEFINE AND RANDOMIZE YOUR BANNERS</xf:comment>
<xf:set var="$banners.1">banner 1</xf:set>
<xf:set var="$banners.2">banner 2</xf:set>
<xf:set var="$banners.3">banner 3</xf:set>
{$banners.{{ ($xf.time % 3) + 1 }}|raw}

Continue reading...
 
Top