Index: trunk/extensions/WikiTweet/WikiTweet.i18n.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | */ |
14 | 14 | $messages['en'] = array( |
15 | 15 | 'wikitweet-desc' => 'Create a Twitter-like feed into MediaWiki', |
16 | | - 'wikitweet-name' => 'MorphoTweets', // Do not translate, used as pagename |
| 16 | + 'wikitweet-name' => 'WikiTweet', // Do not translate, used as pagename |
17 | 17 | 'wikitweet-pleaselogin' => 'Please login to tweet.', |
18 | 18 | 'wikitweet-moretweets' => 'More tweets...', |
19 | 19 | 'wikitweet-infoajax' => 'uses the AJAX technology and refresh itself every 5 seconds without loading the page.', |
Index: trunk/extensions/WikiTweet/WikiTweet.config.php |
— | — | @@ -10,6 +10,7 @@ |
11 | 11 | 'refreshTime' => 15000, // Time to refresh in milliseconds |
12 | 12 | |
13 | 13 | // SMTP configuration : |
| 14 | + 'email'=> True, // True or False |
14 | 15 | 'SMTP' => array( |
15 | 16 | 'host' => "smtphost", //could also be an IP address |
16 | 17 | 'IDHost' => "idhost", |
— | — | @@ -47,5 +48,8 @@ |
48 | 49 | 'margin_left' => '0px', |
49 | 50 | ), |
50 | 51 | ), |
| 52 | + 'inherit' => array( |
| 53 | + 'main' => array('room1','room2','room3') |
| 54 | + ) |
51 | 55 | ); |
52 | 56 | ?> |
Index: trunk/extensions/WikiTweet/WikiTweet.functions.php |
— | — | @@ -13,6 +13,7 @@ |
14 | 14 | } |
15 | 15 | public static function send( $to, $from, $subject, $body, $replyto=null ) |
16 | 16 | { |
| 17 | + if(!$wgWikiTweet['email']){return false;} |
17 | 18 | $wgOutputEncoding = 'UTF-8'; |
18 | 19 | $wgEnotifImpersonal = false; |
19 | 20 | $wgErrorString = ''; |
Index: trunk/extensions/WikiTweet/WikiTweet.api.php |
— | — | @@ -115,6 +115,18 @@ |
116 | 116 | $type = $row1->type; |
117 | 117 | $sql_subscriptions .= " OR `$type`='$link'"; |
118 | 118 | } |
| 119 | + $roomssons = array(); |
| 120 | + foreach($wgWikiTweet['inherit'] as $roominherit=>$roominheritvalue) |
| 121 | + { |
| 122 | + if($roominherit == $room or in_array($roominherit,$roomssons)) |
| 123 | + { |
| 124 | + foreach($wgWikiTweet['inherit'][$roominherit] as $roomson) |
| 125 | + { |
| 126 | + $sql_subscriptions .= " OR `room`='$roomson'"; |
| 127 | + $roomssons[] = $roomson; |
| 128 | + } |
| 129 | + } |
| 130 | + } |
119 | 131 | |
120 | 132 | if($tag!=''){ |
121 | 133 | $res = $dbr->select( |
— | — | @@ -164,7 +176,7 @@ |
165 | 177 | } |
166 | 178 | if ( $show == 2 ) { |
167 | 179 | $background_color = "#C6DEFE"; |
168 | | - $private = "<img src='$wgScriptPath/Extensions/WikiTweet/images/lock-small.png' />"; |
| 180 | + $private = "<img src='$wgScriptPath/extensions/WikiTweet/images/lock-small.png' />"; |
169 | 181 | } |
170 | 182 | |
171 | 183 | $dateSrc = $date.' GMT'; |
— | — | @@ -177,7 +189,7 @@ |
178 | 190 | |
179 | 191 | $conversion_tab = array( |
180 | 192 | "/\>(\S*)/is" => "><a href='$wgScriptPath/index.php/$1'>$1</a>", |
181 | | - "/\@(\S*)/is" => "@<a href='$wgScriptPath/index.php/User:$1'>$1</a>", // TODO en anglais |
| 193 | + "/\@(\S*)/is" => "@<a href='$wgScriptPath/index.php/User:$1'>$1</a>", |
182 | 194 | "/\#(\S*)/is" => "<a class='handmouse tag' value='$1'>#$1</a>", |
183 | 195 | "/http(\S*)/is" => "<a href='http$1' target='_blank'>http$1</a>", |
184 | 196 | "/ www(\S*)/is" => " <a href='http://www$1' target='_blank'>www$1</a>", |
— | — | @@ -330,8 +342,7 @@ |
331 | 343 | } |
332 | 344 | |
333 | 345 | mysql_close(); |
334 | | - $o__response = new AjaxResponse($text); |
335 | | - return $o__response; |
| 346 | + return $text; |
336 | 347 | } |
337 | 348 | public static function fnSubscribeAjax($link, $user, $type){ |
338 | 349 | $o__text = ''; |