Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -202,6 +202,12 @@ |
203 | 203 | $wgUseTeX = false; |
204 | 204 | $wgTexvc = "./math/texvc"; # Location of the texvc binary |
205 | 205 | |
| 206 | +# Support for inline hieroglyphs, see http://aoineko.free.fr/ The |
| 207 | +# WikiHiero php files must be present in the same directory as the |
| 208 | +# rest of the mediawiki code, and WikiHiero must have been configured |
| 209 | +# with the correct image locations. |
| 210 | +$wgUseWikiHiero = false; |
| 211 | + |
206 | 212 | # Profiling / debugging |
207 | 213 | $wgProfiling = false; # Enable for more detailed by-function times in debug log |
208 | 214 | $wgProfileLimit = 0.0; # Only record profiling info for pages that took longer than this |
Index: trunk/phase3/includes/Parser.php |
— | — | @@ -2,6 +2,10 @@ |
3 | 3 | |
4 | 4 | include_once('Tokenizer.php'); |
5 | 5 | |
| 6 | +if( $GLOBALS['wgUseWikiHiero'] ){ |
| 7 | + include_once('wikihiero.php'); |
| 8 | +} |
| 9 | + |
6 | 10 | # PHP Parser |
7 | 11 | # |
8 | 12 | # Processes wiki markup |
— | — | @@ -147,6 +151,16 @@ |
148 | 152 | } |
149 | 153 | } |
150 | 154 | |
| 155 | + if( $GLOBALS['wgUseWikiHiero'] ){ |
| 156 | + $text = Parser::extractTags("hiero", $text, $hiero_content, $uniq_prefix); |
| 157 | + foreach( $hiero_content as $marker => $content ){ |
| 158 | + if( $render ){ |
| 159 | + $hiero_content[$marker] = WikiHiero( $content, WH_MODE_HTML); |
| 160 | + } else { |
| 161 | + $hiero_content[$marker] = "<hiero>$content</hiero>"; |
| 162 | + } |
| 163 | + } |
| 164 | + } |
151 | 165 | |
152 | 166 | if( $this->mOptions->getUseTeX() ){ |
153 | 167 | $text = Parser::extractTags("math", $text, $math_content, $uniq_prefix); |
— | — | @@ -168,7 +182,7 @@ |
169 | 183 | } |
170 | 184 | } |
171 | 185 | |
172 | | - $state = array( $nowiki_content, $math_content, $pre_content ); |
| 186 | + $state = array( $nowiki_content, $hiero_content, $math_content, $pre_content ); |
173 | 187 | |
174 | 188 | return $text; |
175 | 189 | } |
— | — | @@ -1077,7 +1091,6 @@ |
1078 | 1092 | { |
1079 | 1093 | global $wgVariableIDs; |
1080 | 1094 | $this->mVariables = array(); |
1081 | | - |
1082 | 1095 | foreach ( $wgVariableIDs as $id ) { |
1083 | 1096 | $mw =& MagicWord::get( $id ); |
1084 | 1097 | $mw->addToArray( $this->mVariables, $this->getVariableValue( $id ) ); |