function getCustomGoogleChannels($type, $use_chikita_sky) { global $wgTitle, $wgLang, $IP, $wgUser; $channels = array(); $comments = array(); $ad = array(); $ad['adunitintro'] = '0206790666'; $ad['horizontal_search'] = '9965311755'; $ad['rad_bottom'] = '0403699914'; $ad['ad_section'] = '7604775144'; $ad['rad_left'] = '3496690692'; $ad['rad_left_custom'] = '3371204857'; $ad['rad_video'] = '8650928363'; $ad['skyscraper'] = '5907135026'; $ad['vertical_search'] = '8241181057'; $ad['embedded_ads'] = '5613791162'; $ad['embedded_ads_top'] = '9198246414'; $ad['embedded_ads_mid'] = '1183596086'; $ad['embedded_ads_vid'] = '7812294912'; $ad['side_ads_vid'] = '5407720054'; $ad['adunit0'] = '2748203808'; $ad['adunit1'] = '4065666674'; $ad['adunit2'] = '7690275023'; $ad['adunit2a'] = '9206048113'; $ad['adunit3'] = '9884951390'; $ad['adunit4'] = '7732285575'; $ad['adunit4b'] = '0969350919'; $ad['adunit4c'] = '8476920763'; $ad['adunit5'] = '7950773090'; $ad['adunit6'] = ''; $ad['adunitdocviewer'] = '8359699501'; $ad['adunitdocviewer3'] = '3068405775'; $ad['adunit7'] = '8714426702'; $ad['linkunit1'] = '2612765588'; $ad['linkunit2'] = '5047600031'; $ad['linkunit3'] = '5464626340'; $ad['adunittop'] = '7558104428'; $ad['adunitbottom'] = '9368624199'; $namespace = array(); $namespace[NS_MAIN] = '7122150828'; $namespace[NS_TALK] = '1042310409'; $namespace[NS_USER] = '2363423385'; $namespace[NS_USER_TALK] = '3096603178'; $namespace[NS_PROJECT] = '6343282066'; $namespace[NS_PROJECT_TALK] = '6343282066'; $namespace[NS_IMAGE] = '9759364975'; $namespace[NS_IMAGE_TALK] = '9759364975'; $namespace[NS_MEDIAWIKI] = '9174599168'; $namespace[NS_MEDIAWIKI_TALK] = '9174599168'; $namespace[NS_TEMPLATE] = '3822500466'; $namespace[NS_TEMPLATE_TALK] = '3822500466'; $namespace[NS_HELP] = '3948790425'; $namespace[NS_HELP_TALK] = '3948790425'; $namespace[NS_CATEGORY] = '2831745908'; $namespace[NS_CATEGORY_TALK] = '2831745908'; $namespace[NS_USER_KUDOS] = '3105174400'; $namespace[NS_USER_KUDOS_TALK] = '3105174400'; $channels[] = $ad[$type]; $comments[] = $type; if ($use_chikita_sky) { $channels[] = "7697985842"; $comments[] = "chikita sky"; } else { $channels[] = "7733764704"; $comments[] = "google sky"; } foreach (self::$mGlobalChannels as $c) { $channels[] = $c; } foreach (self::$mGlobalComments as $c) { $comments[] = $c; } // Video if ($wgTitle->getNamespace() == NS_SPECIAL && $wgTitle->getText() == "Video") { $channels[] = "9155858053"; $comments[] = "video"; } /* Elizabeth said this was not used and ok to comment as of 8/27/2012 $fas = FeaturedArticles::getFeaturedArticles(3); foreach ($fas as $fa) { if ($fa[0] == $wgTitle->getFullURL()) { $comments[] = 'FA'; $channels[] = '6235263906'; } }*/ // do the categories // Elizabeth said this is in used as of 8/27/2012 $tree = Categoryhelper::getCurrentParentCategoryTree(); $tree = Categoryhelper::flattenCategoryTree($tree); $tree = Categoryhelper::cleanUpCategoryTree($tree); $map = self::getCategoryChannelMap(); foreach ($tree as $cat) { if (isset($map[$cat])) { $channels[] = $map[$cat]; $comments[] = $cat; } } if ($wgTitle->getNamespace() == NS_SPECIAL) { $channels[] = "9363314463"; } else { $channels[] = $namespace[$wgTitle->getNamespace()]; } if ($wgTitle->getNamespace() == NS_MAIN) { $comments[] = "Main namespace"; } else { $comments[] = $wgLang->getNsText($wgTitle->getNamespace()); } // TEST CHANNELS //if ($wgTitle->getNamespace() == NS_MAIN && $id % 2 == 0) { if ($wgTitle->getNamespace() == NS_SPECIAL && $wgTitle->getText() == "Search") { $channels[] = '8241181057'; $comments[] = 'Search page'; } $result = array(implode("+", $channels), implode(", ", $comments)); return $result; }