Index: branches/wmf/1.18wmf1/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( |
Index: branches/wmf/1.18wmf1/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.18wmf1/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 | // No dragging! |
— | — | @@ -638,7 +638,7 @@ |
639 | 639 | } ); |
640 | 640 | } |
641 | 641 | // Click tracking |
642 | | - if ( $.trackAction !== undefined ) { |
| 642 | + if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) { |
643 | 643 | $.trackAction( $section.attr('rel') + '.' + ( show ? 'show': 'hide' ) ); |
644 | 644 | } |
645 | 645 | // Save the currently visible section |
Property changes on: branches/wmf/1.18wmf1/extensions/WikiEditor |
___________________________________________________________________ |
Modified: svn:mergeinfo |
646 | 646 | Merged /trunk/extensions/WikiEditor:r112255 |
Index: branches/wmf/1.18wmf1/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; |
Index: branches/wmf/1.18wmf1/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( |
Property changes on: branches/wmf/1.18wmf1/extensions/ClickTracking |
___________________________________________________________________ |
Modified: svn:mergeinfo |
38 | 41 | Merged /trunk/extensions/ClickTracking:r112254 |