Forum Moderators: coopster
-----------------------------------
$output = "
adsense code here
";
return $output;
-----------------------------------
Is it possible to get adsense to show by doing it this way? The reason why it has to be between the outputs is because this is how a mediawiki extension is created. So, ideally, I would want this to work:
$output = "
<script type=\"text/javascript\"><!--
google_ad_client = \"pub-7753904216505631\";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = \"728x90_as\";
google_ad_type = \"text_image\";
google_ad_channel =\"\";
google_color_border = \"F7DBBC\";
google_color_bg = \"F7DBBC\";
google_color_link = \"60442D\";
google_color_url = \"60442D\";
google_color_text = \"60442D\";
//--></script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script>
";
return $output;
And this isn't working....no output...but I don't get errors. Can someone help?
<?php
$wgExtensionFunctions[] = "wfassExtension";
function wfassExtension() {
global $wgParser;
$wgParser->setHook( "adsensesearch", "renderass" );
}
function renderass( $input, $argv ) {
$output = '
--adsense code--
';
return $output;
}
?>
The above code I mentioned does not display the ads though.