Index: branches/wmf/1.19wmf1/extensions/ClickTracking/ClickTracking.php |
— | — | @@ -31,6 +31,9 @@ |
32 | 32 | // Whether to log clicks to the database. If this is enabled and a log file is configured, events will be logged to both |
33 | 33 | $wgClickTrackingDatabase = true; |
34 | 34 | |
| 35 | +// If true, apply clicktracking to the links in the sidebar |
| 36 | +$wgClickTrackSidebar = false; |
| 37 | + |
35 | 38 | /* Setup */ |
36 | 39 | |
37 | 40 | $wgExtensionCredits['other'][] = array( |
Index: branches/wmf/1.19wmf1/extensions/ClickTracking/ClickTracking.hooks.php |
— | — | @@ -69,10 +69,10 @@ |
70 | 70 | * @return Boolean: always true |
71 | 71 | */ |
72 | 72 | public static function beforePageDisplay( $out, $skin ) { |
73 | | - global $wgClickTrackThrottle; |
| 73 | + global $wgClickTrackSidebar, $wgClickTrackThrottle; |
74 | 74 | $out->addModules( 'ext.UserBuckets' ); |
75 | 75 | |
76 | | - if ( $wgClickTrackThrottle >= 0 && rand() % $wgClickTrackThrottle == 0 ) { |
| 76 | + if ( $wgClickTrackSidebar && $wgClickTrackThrottle >= 0 && rand() % $wgClickTrackThrottle == 0 ) { |
77 | 77 | $out->addModules( 'ext.clickTracking' ); |
78 | 78 | } |
79 | 79 | return true; |
Property changes on: branches/wmf/1.19wmf1/extensions/ClickTracking |
___________________________________________________________________ |
Added: svn:mergeinfo |
80 | 80 | Merged /branches/new-installer/phase3/extensions/ClickTracking:r43664-66004 |
81 | 81 | Merged /branches/JSTesting/extensions/ClickTracking:r100352-107913 |
82 | 82 | Merged /branches/REL1_15/phase3/extensions/ClickTracking:r51646 |
83 | 83 | Merged /branches/wmf/1.18wmf1/extensions/ClickTracking:r97508 |
84 | 84 | Merged /branches/REL1_17/phase3/extensions/ClickTracking:r81445,81448 |
85 | 85 | Merged /trunk/extensions/ClickTracking:r111043,111199,111218,111484,111575,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111814,111947,112074,112254 |
86 | 86 | Merged /branches/sqlite/extensions/ClickTracking:r58211-58321 |
87 | 87 | Merged /trunk/phase3/extensions/ClickTracking:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251 |
Index: branches/wmf/1.19wmf1/extensions/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -29,6 +29,9 @@ |
30 | 30 | 'modules' => array( |
31 | 31 | 'ext.wikiEditor.toolbar', |
32 | 32 | ), |
| 33 | + 'configurations' => array( |
| 34 | + 'wgWikiEditorToolbarClickTracking', |
| 35 | + ), |
33 | 36 | ), |
34 | 37 | 'dialogs' => array( |
35 | 38 | 'preferences' => array( |
Index: branches/wmf/1.19wmf1/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js |
— | — | @@ -238,7 +238,7 @@ |
239 | 239 | doAction : function( context, action, source ) { |
240 | 240 | // Verify that this has been called from a source that's within the toolbar |
241 | 241 | // 'trackAction' defined in click tracking |
242 | | - if ( $.trackAction !== undefined && source.closest( '.wikiEditor-ui-toolbar' ).size() ) { |
| 242 | + if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined && source.closest( '.wikiEditor-ui-toolbar' ).size() ) { |
243 | 243 | // Build a unique id for this action by tracking the parent rel attributes up to the toolbar level |
244 | 244 | var rels = []; |
245 | 245 | var step = source; |
— | — | @@ -461,7 +461,7 @@ |
462 | 462 | { expires: 30, path: '/' } |
463 | 463 | ); |
464 | 464 | // Click tracking |
465 | | - if ( $.trackAction !== undefined){ |
| 465 | + if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) { |
466 | 466 | $.trackAction(section + '.' + $(this).attr('rel')); |
467 | 467 | } |
468 | 468 | context.fn.restoreCursorAndScrollTop(); |
— | — | @@ -640,7 +640,7 @@ |
641 | 641 | } ); |
642 | 642 | } |
643 | 643 | // Click tracking |
644 | | - if ( $.trackAction !== undefined ) { |
| 644 | + if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) { |
645 | 645 | $.trackAction( $section.attr('rel') + '.' + ( show ? 'show': 'hide' ) ); |
646 | 646 | } |
647 | 647 | // Save the currently visible section |
Index: branches/wmf/1.19wmf1/extensions/WikiEditor/WikiEditor.php |
— | — | @@ -46,6 +46,10 @@ |
47 | 47 | |
48 | 48 | ); |
49 | 49 | |
| 50 | +// If set to true and the ClickTracking extension is installed, track clicks |
| 51 | +// on the toolbar buttons |
| 52 | +$wgWikiEditorToolbarClickTracking = false; |
| 53 | + |
50 | 54 | /* Setup */ |
51 | 55 | |
52 | 56 | $wgExtensionCredits['other'][] = array( |
Property changes on: branches/wmf/1.19wmf1/extensions/WikiEditor |
___________________________________________________________________ |
Added: svn:mergeinfo |
53 | 57 | Merged /branches/new-installer/phase3/extensions/WikiEditor:r43664-66004 |
54 | 58 | Merged /branches/JSTesting/extensions/WikiEditor:r100352-107913 |
55 | 59 | Merged /branches/REL1_15/phase3/extensions/WikiEditor:r51646 |
56 | 60 | Merged /branches/wmf/1.18wmf1/extensions/WikiEditor:r97508 |
57 | 61 | Merged /branches/REL1_17/phase3/extensions/WikiEditor:r81445,81448 |
58 | 62 | Merged /trunk/extensions/WikiEditor:r111043,111199,111218,111484,111575,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111814,111947,112074,112255 |
59 | 63 | Merged /branches/sqlite/extensions/WikiEditor:r58211-58321 |
60 | 64 | Merged /trunk/phase3/extensions/WikiEditor:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251 |