{"id":8316,"date":"2006-07-14T01:46:00","date_gmt":"2006-07-14T05:46:00","guid":{"rendered":"https:\/\/nuxx.net\/blog\/2006\/07\/14\/mediawiki-adsense\/"},"modified":"2026-07-01T11:34:36","modified_gmt":"2026-07-01T15:34:36","slug":"mediawiki-adsense","status":"publish","type":"post","link":"https:\/\/nuxx.net\/blog\/2006\/07\/14\/mediawiki-adsense\/","title":{"rendered":"MediaWiki &#038; AdSense"},"content":{"rendered":"<p>I know I should be in bed, but I just made a change to my MediaWiki install which is very important. See, it&#8217;s my understanding that Google doesn&#8217;t like it very much if you are displaying AdSense ads on non-content pages.<\/p>\n<p>Since MediaWiki has lots of these which I regularly use, I don&#8217;t want to upset Google by inadvertently serving myself a bunch of ads which are on these non-content pages.<\/p>\n<p>The solution? Easy. Just don&#8217;t show ads on pages for users who are logged in. Since I&#8217;m using MediaWiki as a CMS, I&#8217;m the only person who will ever be logged in. So, to solve my problem, I wrapped the includes for the ad files in this:<\/p>\n<blockquote><p><code>&lt;?php if($this-&gt;data['loggedin']!=1) { ?&gt;<br \/>\n...<br \/>\n&lt;?php } ?&gt;<\/code><\/p><\/blockquote>\n<p>I know this is really basic, but I imagine others may want to know about it, so I&#8217;m documenting it here.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I know I should be in bed, but I just made a change to my MediaWiki install which is very important. See, it&#8217;s my understanding that Google doesn&#8217;t like it very much if you are displaying AdSense ads on non-content pages. Since MediaWiki has lots of these which I regularly use, I don&#8217;t want to\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,34,4],"tags":[],"class_list":["post-8316","post","type-post","status-publish","format-standard","hentry","category-computers","category-moved-from-livejournal","category-nuxxnet"],"_links":{"self":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/8316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/comments?post=8316"}],"version-history":[{"count":1,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/8316\/revisions"}],"predecessor-version":[{"id":13313,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/8316\/revisions\/13313"}],"wp:attachment":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/media?parent=8316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/categories?post=8316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/tags?post=8316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}