Including AdSense On Select MediaWiki Pages...

0 replies
Alright here is my question....

PHP Code:
<?php
          
if(!strstr($_SERVER['REQUEST_URI'], "Special:") &&
               !
strstr($_SERVER['REQUEST_URI'], "User:") &&
               !
strstr($_SERVER['REQUEST_URI'], "User_talk:") &&
               !
strstr($_SERVER['REQUEST_URI'], "Image:") &&
               !
strstr($_SERVER['REQUEST_URI'], "action=submit") &&
               !
strstr($_SERVER['REQUEST_URI'], "action=edit") &&
               !
strstr($_SERVER['REQUEST_URI'], "Secure:") &&
               !
strstr($_SERVER['REQUEST_URI'], "Template:")) {
            include(
"adsense/adsense_unit1.php");
          }
Right now, I use this code on a wiki to display AdSense on all pages but a few....

What I want to do is also add an argument so that AdSense ONLY displays on pages that I choose. So, it would be like....
In addition to everything above, only display on pages where in the actual text of the page it says "Thanks for viewing, please share this page with others!"

Thank you so much for any help!
#adsense #including #mediawiki #select

Trending Topics