Index: trunk/wiki2xml/php/mediawiki_converter.php |
— | — | @@ -1,6 +1,8 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -require_once ( "filter_named_entities.php" ) ; # PHP4 and early PHP5 bug workaround |
| 4 | +# PHP4 and early PHP5 bug workaround: |
| 5 | +require_once ( "filter_named_entities.php" ) ; |
| 6 | + |
5 | 7 | require_once ( "global_functions.php" ) ; |
6 | 8 | require_once ( "wiki2xml.php" ) ; |
7 | 9 | require_once ( "content_provider.php" ) ; |
— | — | @@ -260,4 +262,4 @@ |
261 | 263 | } |
262 | 264 | |
263 | 265 | |
264 | | -?> |
\ No newline at end of file |
| 266 | +?> |
Index: trunk/wiki2xml/php/sample_local.php |
— | — | @@ -1,14 +1,18 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * You can create your own local.php file, similar to this one, to configure your local installation. |
6 | | - * If you do not create a local.php file, the scripts will run with default settings |
| 5 | + * You can create your own local.php file, similar to this one, to configure |
| 6 | + * your local installation. |
| 7 | + * If you do not create a local.php file, the scripts will run with |
| 8 | + * default settings. |
7 | 9 | */ |
8 | 10 | |
9 | 11 | $xmlg["site_base_url"] = "127.0.0.1/phase3" ; |
10 | 12 | $xmlg["use_special_export"] = 1 ; |
11 | | -$xmlg["temp_dir"] = "C:/windows/temp" ; # Directory for temporary files |
12 | 13 | |
| 14 | +# Directory for temporary files: |
| 15 | +$xmlg["temp_dir"] = "C:/windows/temp" ; |
| 16 | + |
13 | 17 | $xmlg["docbook"] = array ( |
14 | 18 | "command_pdf" => "C:/docbook/bat/docbook_pdf.bat %1" , |
15 | 19 | "command_html" => "C:/docbook/bat/docbook_html.bat %1" , |
— | — | @@ -20,17 +24,26 @@ |
21 | 25 | # On Windows, set |
22 | 26 | # $xmlg['is_windows'] = true ; |
23 | 27 | |
24 | | -### Uncomment the following to use Special:Export and (potentially) automatic authors list; a little slower, though |
| 28 | +### Uncomment the following to use Special:Export and (potentially) automatic |
| 29 | +### authors list; a little slower, though: |
25 | 30 | #$xmlg["use_special_export"] = 1 ; |
26 | 31 | |
| 32 | + |
27 | 33 | ### Uncomment and localize the following to offer ODT export |
28 | | -#$xmlg["zip_odt_path"] = "E:\\Program Files\\7-Zip" ; # Path to the zip/unzip programs; can be omitted if in default execuatable path |
29 | | -#$xmlg["zip_odt"] = '7z.exe a -r -tzip $1 $2*' ; # Command to zip directory $1 to file $2; NOTE THE '*' AFTER '$2' FOR WINDOWS ONLY! |
30 | | -#$xmlg["unzip_odt"] = '7z.exe x $1 -o$2' ; # Command to unzip file $1 to directory $2 |
31 | 34 | |
| 35 | +# Path to the zip/unzip programs; can be omitted if in path: |
| 36 | +#$xmlg["zip_odt_path"] = "E:\\Program Files\\7-Zip" ; |
32 | 37 | |
| 38 | +# Command to zip directory $1 to file $2; |
| 39 | +# NOTE THE '*' AFTER '$2' FOR WINDOWS ONLY! |
| 40 | +#$xmlg["zip_odt"] = '7z.exe a -r -tzip $1 $2*' ; |
33 | 41 | |
34 | | -# If you want to do text-file browsing, run "xmldump2files.php" once (see settings there), then set this: |
| 42 | +# Command to unzip file $1 to directory $2: |
| 43 | +#$xmlg["unzip_odt"] = '7z.exe x $1 -o$2' ; |
| 44 | + |
| 45 | + |
| 46 | +# If you want to do text-file browsing, run "xmldump2files.php" once |
| 47 | +# (see settings there), then set this: |
35 | 48 | $base_text_dir = "C:/dewiki-20060327-pages-articles" ; |
36 | 49 | |
37 | 50 | ?> |
Index: trunk/wiki2xml/php/extension.php |
— | — | @@ -1,10 +1,11 @@ |
2 | 2 | <?php |
3 | 3 | /* |
4 | | -To enable this extension, put all files in this directory into a "wiki2xml" subdirectory of your MediaWiki extensions directory |
| 4 | +To enable this extension, put all files in this directory into a "wiki2xml" |
| 5 | +subdirectory of your MediaWiki extensions directory. |
5 | 6 | Also, add |
6 | 7 | require_once ( "extensions/wiki2xml/extension.php" ) ; |
7 | 8 | to your LocalSettings.php |
8 | | -The extension can then be accessed as [[Special:Wiki2XML]] |
| 9 | +The extension will then be accessed as [[Special:Wiki2XML]]. |
9 | 10 | */ |
10 | 11 | |
11 | 12 | if( !defined( 'MEDIAWIKI' ) ) die(); |
— | — | @@ -31,8 +32,8 @@ |
32 | 33 | #_____________________________________________________________________________ |
33 | 34 | |
34 | 35 | /** |
35 | | -* The special page |
36 | | -*/ |
| 36 | + * The special page |
| 37 | + */ |
37 | 38 | function wfWiki2XMLExtension() { # Checked for HTML and MySQL insertion attacks |
38 | 39 | global $IP, $wgMessageCache; |
39 | 40 | # wfTasksAddCache(); |