1 |
tomk 11/11/30 10:33:44 |
2 |
|
3 |
Modified: functions.php |
4 |
Log: |
5 |
Make piwik site id configurable |
6 |
|
7 |
Revision Changes Path |
8 |
1.33 forums/htdocs/includes/functions.php |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/includes/functions.php?rev=1.33&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/includes/functions.php?rev=1.33&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/includes/functions.php?r1=1.32&r2=1.33 |
13 |
|
14 |
Index: functions.php |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/includes/functions.php,v |
17 |
retrieving revision 1.32 |
18 |
retrieving revision 1.33 |
19 |
diff -u -r1.32 -r1.33 |
20 |
--- functions.php 27 Nov 2011 14:42:56 -0000 1.32 |
21 |
+++ functions.php 30 Nov 2011 10:33:44 -0000 1.33 |
22 |
@@ -7,7 +7,7 @@ |
23 |
* copyright : (C) 2001 The phpBB Group |
24 |
* email : support@×××××.com |
25 |
* |
26 |
- * $Id: functions.php,v 1.32 2011/11/27 14:42:56 tomk Exp $ |
27 |
+ * $Id: functions.php,v 1.33 2011/11/30 10:33:44 tomk Exp $ |
28 |
* |
29 |
* |
30 |
***************************************************************************/ |
31 |
@@ -1194,7 +1194,7 @@ |
32 |
|
33 |
$piwik_code = ""; |
34 |
|
35 |
- if (isset($board_config['enable_piwik']) && !empty($board_config['enable_piwik'] == '1')) { |
36 |
+ if (isset($board_config['enable_piwik']) && $board_config['enable_piwik'] == '1' && intval($board_config['piwik_site_id']) > 0) { |
37 |
$piwik_code = <<<EOD |
38 |
<!-- Piwik --> |
39 |
<script type="text/javascript"> |
40 |
@@ -1202,11 +1202,11 @@ |
41 |
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); |
42 |
</script><script type="text/javascript"> |
43 |
try { |
44 |
-var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3); |
45 |
+var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", $board_config['piwik_site_id']); |
46 |
piwikTracker.trackPageView(); |
47 |
piwikTracker.enableLinkTracking(); |
48 |
} catch( err ) {} |
49 |
-</script><noscript><p><img src="http://piwik.gentoo.org/piwik.php?idsite=3" style="border:0" alt="" /></p></noscript> |
50 |
+</script><noscript><p><img src="http://piwik.gentoo.org/piwik.php?idsite=" . $board_config['piwik_site_id'] style="border:0" alt="" /></p></noscript> |
51 |
<!-- End Piwik Tracking Code --> |
52 |
EOD; |
53 |
} |