Premium banner rotation plugin

Hello. I would like to commission someone to make a basic plugin that will make it possible to rotate premium member banners on the site so a different premium member banner will show up each time the page is loaded. The same idea like how the premium member sidebar and featured members sidebar work, just a more simple version. I am willing to share this plugin freely with the community. Please let me know if you're able to help me out and at what price.

Thank you.
 

Mark

Administrator
Staff member
I swear this already exists, let me poke around the forum and my dev sites and see if I can find it for you.
 
Getting tons of errors after uploading through the admin.

Warning: include(plugins/install.php/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/install.php/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(): Failed opening 'plugins/install.php/languages/english.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/languages/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/languages/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(): Failed opening 'plugins/languages/languages/english.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/delete.php/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/delete.php/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(): Failed opening 'plugins/delete.php/languages/english.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/info.php/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/info.php/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(): Failed opening 'plugins/info.php/languages/english.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/skin_global.php/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/skin_global.php/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(): Failed opening 'plugins/skin_global.php/languages/english.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/premium_rotation.html/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/premium_rotation.html/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(): Failed opening 'plugins/premium_rotation.html/languages/english.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/top10cha/public_html/index.php on line 157
 
I removed the plugin and still getting some of these errors.

Warning: include(plugins/languages/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(plugins/languages/languages/english.php): failed to open stream: No such file or directory in /home/top10cha/public_html/index.php on line 157

Warning: include(): Failed opening 'plugins/languages/languages/english.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/top10cha/public_html/index.php on line 157
 

Mark

Administrator
Staff member
ahh forgot it needs to be in a parent folder, remove any stray files in your /plugins/ directory manually via FTP that will remove those remaining errors.

I'm posting the updated file now, re-download anytime and reinstall.
 
Is there a minimum number of premium banners that have to be set up for this to work? It's not showing anything on the page where I placed the tag, but I only have one premium member banner uploaded right now so I'm not sure if that could be why or not.
 

Mark

Administrator
Staff member
no, I only have 1 premium member on my dev site and it works just fine.
 
I can't get it to display them.

I just remembered that I'm using class="premium-img" to only display premium banners and not regular ones. Could that have something to do with it?
 

Mark

Administrator
Staff member
this should be seperate, if you have members that have uploaded premium banners this will work. If they have no banners, then you shoudl see the alt tag.

{$premium_rotate_row} add that tag to wrapper somewhere, then view source and you will see whats happening. Your premium member banner code will show between:

<div class="premium_rotation">

</div>
 
Ok, I see what is happening. I have premium members who haven't uploaded a banner and they are being included in the rotation. Is there a way to make it so it only rotates through the premium members who have actually uploaded their banners?
 

Mark

Administrator
Staff member
yes, try this and let me know how it goes

open plugins/PremiumBanners/skin_global.php

find:
Code:
$result = $DB->query("SELECT * FROM {$CONF['sql_prefix']}_sites WHERE premium_flag = 1 ORDER BY RAND()", __FILE__, __LINE__);
replace with:
Code:
$result = $DB->query("SELECT * FROM {$CONF['sql_prefix']}_sites WHERE premium_flag = 1 AND premium_banner_url != '' ORDER BY RAND()", __FILE__, __LINE__);
 
Top