Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.i18n.php |
— | — | @@ -62,11 +62,12 @@ |
63 | 63 | // Preferences |
64 | 64 | 'prefs-swl' => 'Semantic watchlist', |
65 | 65 | 'prefs-swlgroup' => 'Groups to watch', |
66 | | - 'prefs-swlnotification' => 'Notification options', |
| 66 | + 'prefs-swlglobal' => 'General options', |
| 67 | + 'swl-prefs-emailnofity' => 'E-mail me on changes to properties I am watching', |
| 68 | + 'swl-prefs-watchlisttoplink' => 'Show a link to the Semantic Watchlist on the top of the page', |
67 | 69 | 'swl-prefs-category-label' => "'''$1''': {{PLURAL:$2|property|properties}} $3 from category ''$4''", |
68 | 70 | 'swl-prefs-namespace-label' => "'''$1''': {{PLURAL:$2|property|properties}} $3 from namespace ''$4''", |
69 | 71 | 'swl-prefs-concept-label' => "'''$1''': {{PLURAL:$2|property|properties}} $3 from concept ''$4''", |
70 | | - 'swl-prefs-emailnofity' => 'E-mail me on changes to properties I am watching', |
71 | 72 | |
72 | 73 | // API |
73 | 74 | 'swl-err-userid-xor-groupids' => 'Either the userid or the groupids parameter needs to be specified, but not both.', |
Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.settings.php |
— | — | @@ -44,4 +44,11 @@ |
45 | 45 | $egSWLMaxMails = 1; |
46 | 46 | |
47 | 47 | # The default value for the user preference to send email notifications. |
48 | | -$wgDefaultUserOptions['swl_email'] = false; |
| 48 | +$wgDefaultUserOptions['swl_email'] = true; |
| 49 | + |
| 50 | +# The default value for the user preference to display a top link to the semantic watchlist. |
| 51 | +$wgDefaultUserOptions['swl_watchlisttoplink'] = true; |
| 52 | + |
| 53 | +# Enable displaying a top link to the semantic watchlist? |
| 54 | +$egSWLEnableTopLink = true; |
| 55 | + |
Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.hooks.php |
— | — | @@ -116,11 +116,19 @@ |
117 | 117 | $preferences['swl_email'] = array( |
118 | 118 | 'type' => 'toggle', |
119 | 119 | 'label-message' => 'swl-prefs-emailnofity', |
120 | | - 'section' => 'swl/swlnotification', |
121 | | - 'default' => $GLOBALS['egSWLEnableEmailNotify'] |
| 120 | + 'section' => 'swl/swlglobal', |
122 | 121 | ); |
123 | 122 | } |
124 | 123 | |
| 124 | + // Only show the top link preference when it's enabled. |
| 125 | + if ( $GLOBALS['egSWLEnableTopLink'] ) { |
| 126 | + $preferences['swl_watchlisttoplink'] = array( |
| 127 | + 'type' => 'toggle', |
| 128 | + 'label-message' => 'swl-prefs-watchlisttoplink', |
| 129 | + 'section' => 'swl/swlglobal', |
| 130 | + ); |
| 131 | + } |
| 132 | + |
125 | 133 | foreach ( $groups as /* SWLGroup */ $group ) { |
126 | 134 | if ( count( $group->getProperties() ) == 0 ) { |
127 | 135 | continue; |