r40987 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40986‎ | r40987 | r40988 >
Date:15:32, 18 September 2008
Author:dale
Status:old
Tags:
Comment:
added analytics
Modified paths:
  • /trunk/extensions/MetavidWiki/MV_LocalSettings.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Stream.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/MV_LocalSettings.php
@@ -11,4 +11,15 @@
1212 $mvExternalImages = true;
1313 $mvExternalImgServerPath = 'http://metavid.ucsc.edu/wiki/index.php';
1414
 15+//for sunlight network annalysis we include google analytics
 16+$mvExtraHeader = <<<'EOD'
 17+<script type="text/javascript">
 18+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
 19+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
 20+</script>
 21+<script type="text/javascript">
 22+var pageTracker = _gat._getTracker("UA-4281471-1");
 23+pageTracker._trackPageview();
 24+</script>
 25+EOD;
1526 ?>
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -235,7 +235,7 @@
236236 * enables linkback and autocomplete for search
237237 */
238238 function mvfAutoAllPageHeader(){
239 - global $mvgScriptPath, $wgJsMimeType, $wgOut;
 239+ global $mvgScriptPath, $wgJsMimeType, $wgOut, $mvExtraHeader;
240240 $mvgScriptPath = htmlspecialchars( $mvgScriptPath );
241241 $wgJsMimeType = htmlspecialchars( $wgJsMimeType) ;
242242 /* (moved to on_dom ready) but here as well*/
@@ -247,6 +247,8 @@
248248 $wgOut->addScript("<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_allpages.js\"></script>");
249249 $wgOut->addScript("<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_search.js\"></script>");
250250
 251+ $wgOut->addScript($mvExtraHeader);
 252+
251253 $mvCssUrl = $mvgScriptPath . '/skins/mv_custom.css';
252254 $wgOut->addLink(array(
253255 'rel' => 'stylesheet',
Index: trunk/extensions/MetavidWiki/includes/MV_Stream.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 /*
54 * MV_Stream.php Created on Apr 24, 2007
65 *