Index: trunk/extensions/Livelets/Livelets.i18n.php |
— | — | @@ -20,11 +20,7 @@ |
21 | 21 | * @author Raymond |
22 | 22 | */ |
23 | 23 | $messages['qqq'] = array( |
24 | | - 'livelets-desc' => "{{desc}} |
25 | | - |
26 | | -Further description on http://www.mediawiki.org/wiki/Extension:Livelets |
27 | | - |
28 | | -According to that page, the functionality of this extension is not limited to the Main Page but can be used in all pages. ''Therefore, the phrase \"the main page content\" '''should be translated as \"the main content of the page\",''' not as \"the content of the main page\".''", |
| 24 | + 'livelets-desc' => "{{desc}} Further description on https://www.mediawiki.org/wiki/Extension:Livelets. According to that page, the functionality of this extension is not limited to the Main Page but can be used in all pages. ''Therefore, the phrase \"the main page content\" '''should be translated as \"the main content of the page\",''' not as \"the content of the main page\".''", |
29 | 25 | ); |
30 | 26 | |
31 | 27 | /** Asturian (Asturianu) |
Index: trunk/extensions/Livelets/Livelets.php |
— | — | @@ -14,11 +14,8 @@ |
15 | 15 | die( 'This is not a valid entry point to MediaWiki.' ); |
16 | 16 | } |
17 | 17 | |
18 | | -define( 'LIVELETS_VERSION', '1.1.0, 2012-01-18' ); |
| 18 | +define( 'LIVELETS_VERSION', '1.1.0, 2012-01-19' ); |
19 | 19 | |
20 | | -# the parser-function name for doing live-transclusions |
21 | | -$wgLiveletsMagic = 'live'; |
22 | | - |
23 | 20 | # Settings for the event-driven live method |
24 | 21 | $wgLiveletsUseSWF = false; # Set this to true to use SWF to make livelets fully event-driven (no polling for change) |
25 | 22 | $wgLiveletsSwfBg = '#ffffff'; # The background colour of the embedded SWF |
— | — | @@ -32,6 +29,7 @@ |
33 | 30 | 'url' => 'https://www.mediawiki.org/wiki/Extension:Livelets', |
34 | 31 | 'version' => LIVELETS_VERSION |
35 | 32 | ); |
| 33 | + |
36 | 34 | $dir = dirname( __FILE__ ); |
37 | 35 | $wgExtensionMessagesFiles['Livelets'] = "$dir/Livelets.i18n.php"; |
38 | 36 | $wgExtensionMessagesFiles['LiveletsMagic'] = "$dir/Livelets.i18n.magic.php"; |
— | — | @@ -65,10 +63,10 @@ |
66 | 64 | |
67 | 65 | # Called at extension setup time |
68 | 66 | function setup() { |
69 | | - global $wgOut, $wgParser, $wgLiveletsMagic, $wgLiveletsUseSwf; |
| 67 | + global $wgOut, $wgParser, $wgLiveletsUseSwf; |
70 | 68 | |
71 | 69 | # Activate the parser-function |
72 | | - $wgParser->setFunctionHook( $wgLiveletsMagic, array( $this, 'renderContainer' ) ); |
| 70 | + $wgParser->setFunctionHook( 'live', array( $this, 'renderContainer' ) ); |
73 | 71 | |
74 | 72 | # Embed the SWF if enabled (SWF must be requested from Livelets.pl) |
75 | 73 | if ( $wgLiveletsUseSwf ) { |
— | — | @@ -100,12 +98,10 @@ |
101 | 99 | |
102 | 100 | # This early hook called from the Ajax bypass whereby the parser has yet to process wikitext |
103 | 101 | function onArticleAfterFetchContent( &$article, &$content ) { |
104 | | - global $wgLiveletsMagic; |
105 | | - |
106 | 102 | # Replace the wikitext with just the content of the requested livelet |
107 | 103 | foreach( $this->examineBraces( $content ) as $brace ) { |
108 | | - if ( $brace['NAME'] == "#$wgLiveletsMagic:" && --$this->request_id < 0 ) { |
109 | | - $len = strlen( $wgLiveletsMagic ); |
| 104 | + if ( $brace['NAME'] == "#live:" && --$this->request_id < 0 ) { |
| 105 | + $len = strlen( 'live' ); |
110 | 106 | $content = substr( $content, $brace['OFFSET'] + $len + 4, $brace['LENGTH'] - $len - 6 ); |
111 | 107 | break; |
112 | 108 | } |