Resource icon

Xenforo 2 - Random Ads Code


Active member
HiddeNKinG submitted a new resource:

Xenforo 2 - Random Ads Code - random, ads

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.

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

Read more about this resource...
Top Bottom