Thread subject: Official Home of the PHPFusion CMS :: Working Banner Rotator

Posted by daimonbok1 on 24-08-2022 13:53
#1

I found this on my intothenebula site and rememberd getting help from either Falk, Chan or RobiNN to get it to work, now I'll share it with everyone. I have it running on my Ver 8.00.100 site, my 9.03 site haven't checked it on 9.10 as I removed that site and downgraded to 8. And I have tested it running 83 banners and it didn't crash.
Gene

Code
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| https://www.phpfusion.com/
+--------------------------------------------------------+
| Filename: footer_includes.php
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or >
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
//Add your custom include files for the footer here
$ads = [
 '<center><a href="your link goes here" target="_blank"><img class="auto-style2" height="height here" src="banner link here" width="width here" /></center></a>',
 '<center><a href="your link goes here" target="_blank"><img class="auto-style2" height="height here" src="banner link here" width="width here" /></center></a>',
 '<center><a href="your link goes here" target="_blank"><img class="auto-style2" height="height here" src="banner link here" width="width here" /></center></a>',
 '<center><a href="your link goes here" target="_blank"><img class="auto-style2" height="height here" src="banner link here" width="width here" /></center></a>',

];

echo $ads[array_rand($ads)];

Posted by VyperPrecisionCorporation on 15-10-2022 07:31
#2

I am very glad that a few people are sharing their work for PHP-Fusion 9. I am going to test this code on my PHP-Fusion 9.10.30 site and see if it works on it. I will post and let you know either way. I am also going to send you a Private Message.