* [gentoo-commits] gentoo-projects commit in forums/htdocs/includes: functions.php page_tail.php
@ 2011-11-27 14:42 Tom Knight (tomk)
0 siblings, 0 replies; only message in thread
From: Tom Knight (tomk) @ 2011-11-27 14:42 UTC (permalink / raw
To: gentoo-commits
tomk 11/11/27 14:42:56
Modified: functions.php page_tail.php
Log:
Added configurable piwik code
Revision Changes Path
1.32 forums/htdocs/includes/functions.php
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/includes/functions.php?rev=1.32&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/includes/functions.php?rev=1.32&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/includes/functions.php?r1=1.31&r2=1.32
Index: functions.php
===================================================================
RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/includes/functions.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- functions.php 5 Oct 2010 14:30:36 -0000 1.31
+++ functions.php 27 Nov 2011 14:42:56 -0000 1.32
@@ -7,7 +7,7 @@
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
- * $Id: functions.php,v 1.31 2010/10/05 14:30:36 tomk Exp $
+ * $Id: functions.php,v 1.32 2011/11/27 14:42:56 tomk Exp $
*
*
***************************************************************************/
@@ -979,7 +979,7 @@
}
else
{
- echo "<html>\n<body>\n" . $msg_title . "\n<br /><br />\n" . $msg_text . "</body>\n</html>";
+ echo "<html>\n<body>\n" . $msg_title . "\n<br /><br />\n" . $msg_text . "\n" . get_piwik_code() . "</body>\n</html>";
}
exit;
@@ -1188,6 +1188,32 @@
phpbb_syslog($message);
}
+// 2011-11-27 tomk - Added configurable piwik code
+function get_piwik_code() {
+ global $board_config;
+
+ $piwik_code = "";
+
+ if (isset($board_config['enable_piwik']) && !empty($board_config['enable_piwik'] == '1')) {
+ $piwik_code = <<<EOD
+<!-- Piwik -->
+<script type="text/javascript">
+var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.gentoo.org/" : "http://piwik.gentoo.org/");
+document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+</script><script type="text/javascript">
+try {
+var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
+piwikTracker.trackPageView();
+piwikTracker.enableLinkTracking();
+} catch( err ) {}
+</script><noscript><p><img src="http://piwik.gentoo.org/piwik.php?idsite=3" style="border:0" alt="" /></p></noscript>
+<!-- End Piwik Tracking Code -->
+EOD;
+ }
+
+ return $piwik_code;
+}
+
// 2005-04-18 tomk
// Check users post distribution
/*
1.10 forums/htdocs/includes/page_tail.php
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/includes/page_tail.php?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/includes/page_tail.php?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/includes/page_tail.php?r1=1.9&r2=1.10
Index: page_tail.php
===================================================================
RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/includes/page_tail.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- page_tail.php 9 Sep 2010 20:14:10 -0000 1.9
+++ page_tail.php 27 Nov 2011 14:42:56 -0000 1.10
@@ -6,7 +6,7 @@
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
- * $Id: page_tail.php,v 1.9 2010/09/09 20:14:10 tomk Exp $
+ * $Id: page_tail.php,v 1.10 2011/11/27 14:42:56 tomk Exp $
*
*
***************************************************************************/
@@ -43,7 +43,8 @@
'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''),
'ADMIN_LINK' => $admin_link,
'LINKS' => $lang['Links'],
- 'YEAR' => date("Y"))
+ 'YEAR' => date("Y"),
+ 'PIWIK_CODE' => get_piwik_code())
);
$template->pparse('overall_footer');
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-27 14:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-27 14:42 [gentoo-commits] gentoo-projects commit in forums/htdocs/includes: functions.php page_tail.php Tom Knight (tomk)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox