Banners and adblock

kalle801

Member
Hello.

I just have a question about my Banner show options.

Actually the Banner code it this:
<figure><a href="{$url}" onclick="out(this,'{$username}');" rel="nofollow"><img src="{$banner_url}"><br></a></figure>
___________________________________________________________

But what i want is, to change this: {$banner_url} to maybe {$img_url}
Why i want to change this? <- This prevents Adblock from Blocking my users Banners.

How can o do this?
So that it really works.

Greetings, and Thanks in Advance.
 

Basti

Administrator
Staff member
How shall that prevent it? The source is still the same, a img url. How you know that it would work with that tag when you dont know how to change it?

I really doubt it, but would be easy to change
Make a plugin with the file rankings_compile_stats.php

and in it,
Code:
$TMPL['img_url'] = $TMPL['banner_url'];
You have some really nasty adblocker by the way...lol
 

kalle801

Member
Hm okay, i did what u write, but get an error:

Code:
Warning: include(): open_basedir restriction in effect. File(plugins/rankings_compile_stats.php/languages/english.php) is not within the allowed path(s): (/var/customers/webs/kalle801/TOPLIST/:/tmp/:/var/customers/tmp/kalle801/::/usr/share/php/:/usr/share/php5/:/usr/share/php/PEAR/) in /var/customers/webs/kalle801/TOPLIST/index.php on line 152 Call Stack: 0.0008 832960 1. {main}() /var/customers/webs/kalle801/TOPLIST/index.php:0 Warning: include(plugins/rankings_compile_stats.php/languages/english.php): failed to open stream: Operation not permitted in /var/customers/webs/kalle801/TOPLIST/index.php on line 152 Call Stack: 0.0008 832960 1. {main}() /var/customers/webs/kalle801/TOPLIST/index.php:0 Warning: include(): open_basedir restriction in effect. File(plugins/rankings_compile_stats.php/languages/english.php) is not within the allowed path(s): (/var/customers/webs/kalle801/TOPLIST/:/tmp/:/var/customers/tmp/kalle801/::/usr/share/php/:/usr/share/php5/:/usr/share/php/PEAR/) in /var/customers/webs/kalle801/TOPLIST/index.php on line 152 Call Stack: 0.0008 832960 1. {main}() /var/customers/webs/kalle801/TOPLIST/index.php:0 Warning: include(plugins/rankings_compile_stats.php/languages/english.php): failed to open stream: Operation not permitted in /var/customers/webs/kalle801/TOPLIST/index.php on line 152 Call Stack: 0.0008 832960 1. {main}() /var/customers/webs/kalle801/TOPLIST/index.php:0 Warning: include(): Failed opening 'plugins/rankings_compile_stats.php/languages/english.php' for inclusion (include_path='.:/usr/share/php5/:/usr/share/php/PEAR/:/usr/share/php/') in /var/customers/webs/kalle801/TOPLIST/index.php on line 152 Call Stack: 0.0008 832960 1. {main}() /var/customers/webs/kalle801/TOPLIST/index.php:0 Warning: file_exists(): open_basedir restriction in effect. File(plugins/rankings_compile_stats.php/languages/english.php) is not within the allowed path(s): (/var/customers/webs/kalle801/TOPLIST/:/tmp/:/var/customers/tmp/kalle801/::/usr/share/php/:/usr/share/php5/:/usr/share/php/PEAR/) in /var/customers/webs/kalle801/TOPLIST/index.php on line 154 Call Stack: 0.0008 832960 1. {main}() /var/customers/webs/kalle801/TOPLIST/index.php:0 0.0112 1796928 2. file_exists() /var/customers/webs/kalle801/TOPLIST/index.php:154
 
VisioList
 

Basti

Administrator
Staff member
Read up on how to make a plugin
NameOfPlugin/rankings_compile_stats.php
NameOfPlugin/index.htm ( blank file )
NameOfPlugin/info.php ( copy any others info.php and change the values, the var "install" need to be 0 )
NameOfPlugin/languages/english.php ( required, even in no content it )
NameOfPlugin/languages/index.htm ( blank file )
 

kalle801

Member
And an other important question:
How can i change that, the uploaded banners will be stored in an other named folder, so not in the banners folder?
 

Basti

Administrator
Staff member
Sorry not possible, its predefined in the core code in sources/user_cp/banner.php
Feel free to change it, but after each update you need to change it again.
 

Basti

Administrator
Staff member
Adblock plus, really popular. Supprised they block normal jpg etc by default
 

kalle801

Member
no they blocked this cause the banner folder is called "banners" <- Thats on his Blacklist in (Germay).

Thats why i need to change the default name to "img".
 

Basti

Administrator
Staff member
Oh, thats interesting. Ill talk to Mark about it, while i dont like renaming the banner folder ( also involves updating all member banner path in database ) it might be a good step to take.
Kinda sucky that they block that ( confirmed it just now also )
 

Mark

Administrator
Staff member
You can rename the banners directory, we have not made any changes in the core to address this
 

Mark

Administrator
Staff member
Just throwing this out there.... I like to empower the user as a general rule.

If a user decided to install an adblocker in their browser so they don't see banners, perhaps we should respect that decision and not show them a page full of banners.

and no, this ad blocker does not ONLY target visiolist as stated above... its a generic rule to block all banners. Again, by the users choice.

For now the core will remain as is with regards to this issue, if you want to change your banner path feel free to do so :)
 
Top