how to integrate php adblocker code in my forum

Started by mayheptad, June 30, 2018, 06:10:38 AM

Previous topic - Next topic

mayheptad

hello
at propeller ads company
here is an instruction giving on how to place their php ads code into a wordpres webiste


Integrating PHP Anti-Adblock ad channel code into WordPress site manually
Upload the PHP file __AntiAdBlock.php containing your onclick ads code with anti-adblock support to your active WordPress theme directory /wp-content/themes/ACTIVE_THEME
Login to your Wordpress dashboard, go to Appearance and select Editor
Choose Theme Header (header.php) from the files list
Insert this line right below <head> tag

<?php echo include_once (dirname(__FILE__) . '/__AntiAdBlock.php'); ?>

done.

please how do i do this in smf forum

Kindred

oh, ick....   I hate when they give you an "unknown" php file to include...
Also, that code is wrong....   they should not start php, open an echo and then do the include...    That is just ugly coding and I'm not sure it would even work right.  It does not give confidence in the actual code inside their file


however...  if you must. - You can do it several ways.
The best way would be to use the ad manage nod...  but I don't know if it handles php or includes.

second, you could use a portal mod and add a php block

third, you could manually put the code into your template (index.template.php)
just this part
include_once (dirname(__FILE__) . '/__AntiAdBlock.php');




but before you do.... I'd take a very close look at that php file and what it does.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mayheptad

hi kindred
please i have send you the code in the php file as pm mesage
please help me confirm if it is save or not


and secondly which directory in my server am i to upload the php file ??
before  i insert the include_once (dirname(__FILE__) . '/__AntiAdBlock.php'); in to the (index.template.php)

mayheptad


Kindred

Sorry, it's the weekend, I am not near a computer for most of it, so I can't comment on code.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mayheptad


Aleksi "Lex" Kilpinen

I wouldn't really feel comfortable with a setup like that, what is the file for? If it is only to catch ad blockers (as the name suggests) I'd just ditch it.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: