summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING340
-rw-r--r--README9
-rw-r--r--conf/.htaccess3
-rw-r--r--conf/acl.auth.dist11
-rw-r--r--conf/acronyms.conf137
-rw-r--r--conf/custom.conf6
-rw-r--r--conf/dokuwiki.php86
-rw-r--r--conf/interwiki.conf121
-rw-r--r--conf/smileys.conf28
-rw-r--r--conf/users.auth.dist6
-rw-r--r--conf/wordblock.conf786
-rw-r--r--data/.htaccess2
-rw-r--r--doku.php161
-rw-r--r--feed.css65
-rw-r--r--feed.php121
-rw-r--r--images/blank.gifbin0 -> 42 bytes
-rw-r--r--images/bold.pngbin0 -> 738 bytes
-rw-r--r--images/bullet.gifbin0 -> 50 bytes
-rw-r--r--images/button-cc.gifbin0 -> 1231 bytes
-rw-r--r--images/button-css.pngbin0 -> 299 bytes
-rw-r--r--images/button-donate.gifbin0 -> 200 bytes
-rw-r--r--images/button-dw.pngbin0 -> 271 bytes
-rw-r--r--images/button-php.gifbin0 -> 269 bytes
-rw-r--r--images/button-rss.pngbin0 -> 280 bytes
-rw-r--r--images/button-xhtml.pngbin0 -> 321 bytes
-rw-r--r--images/code.pngbin0 -> 573 bytes
-rw-r--r--images/empty.pngbin0 -> 516 bytes
-rw-r--r--images/error.pngbin0 -> 655 bytes
-rw-r--r--images/extlink.pngbin0 -> 849 bytes
-rw-r--r--images/favicon.icobin0 -> 17166 bytes
-rw-r--r--images/fonth1.pngbin0 -> 594 bytes
-rw-r--r--images/fonth2.pngbin0 -> 712 bytes
-rw-r--r--images/fonth3.pngbin0 -> 681 bytes
-rw-r--r--images/fonth4.pngbin0 -> 688 bytes
-rw-r--r--images/fonth5.pngbin0 -> 672 bytes
-rw-r--r--images/image.pngbin0 -> 996 bytes
-rw-r--r--images/info.pngbin0 -> 718 bytes
-rw-r--r--images/interwiki.pngbin0 -> 473 bytes
-rw-r--r--images/italic.pngbin0 -> 676 bytes
-rw-r--r--images/larger.pngbin0 -> 332 bytes
-rw-r--r--images/link.pngbin0 -> 798 bytes
-rw-r--r--images/link_icon.gifbin0 -> 942 bytes
-rw-r--r--images/list.pngbin0 -> 582 bytes
-rw-r--r--images/list_ul.pngbin0 -> 560 bytes
-rw-r--r--images/mail_icon.gifbin0 -> 918 bytes
-rw-r--r--images/rule.pngbin0 -> 574 bytes
-rw-r--r--images/sig.pngbin0 -> 679 bytes
-rw-r--r--images/smaller.pngbin0 -> 309 bytes
-rw-r--r--images/thumbup.gifbin0 -> 167 bytes
-rw-r--r--images/tocdot2.gifbin0 -> 810 bytes
-rw-r--r--images/underline.pngbin0 -> 743 bytes
-rw-r--r--images/windows.gifbin0 -> 223 bytes
-rw-r--r--inc/DifferenceEngine.php1057
-rw-r--r--inc/auth.php290
-rw-r--r--inc/auth_ldap.php137
-rw-r--r--inc/auth_mysql.php98
-rw-r--r--inc/auth_plain.php100
-rw-r--r--inc/common.php831
-rw-r--r--inc/feedcreator.class.php1548
-rw-r--r--inc/format.php475
-rw-r--r--inc/geshi.php2413
-rw-r--r--inc/geshi/actionscript.php199
-rw-r--r--inc/geshi/ada.php136
-rw-r--r--inc/geshi/apache.php174
-rw-r--r--inc/geshi/asm.php200
-rw-r--r--inc/geshi/asp.php153
-rw-r--r--inc/geshi/bash.php130
-rw-r--r--inc/geshi/c.php144
-rw-r--r--inc/geshi/c_mac.php176
-rw-r--r--inc/geshi/caddcl.php127
-rw-r--r--inc/geshi/cadlisp.php187
-rw-r--r--inc/geshi/cpp.php174
-rw-r--r--inc/geshi/csharp.php229
-rw-r--r--inc/geshi/css-gen.cfg0
-rw-r--r--inc/geshi/css.php177
-rw-r--r--inc/geshi/delphi.php159
-rw-r--r--inc/geshi/html4strict.php254
-rw-r--r--inc/geshi/java.php1402
-rw-r--r--inc/geshi/javascript.php146
-rw-r--r--inc/geshi/lisp.php131
-rw-r--r--inc/geshi/lua.php132
-rw-r--r--inc/geshi/nsis.php164
-rw-r--r--inc/geshi/objc.php241
-rw-r--r--inc/geshi/oobas.php132
-rw-r--r--inc/geshi/pascal.php145
-rw-r--r--inc/geshi/perl.php162
-rw-r--r--inc/geshi/php-brief.php162
-rw-r--r--inc/geshi/php.php346
-rw-r--r--inc/geshi/python.php143
-rw-r--r--inc/geshi/qbasic.php146
-rw-r--r--inc/geshi/smarty.php167
-rw-r--r--inc/geshi/sql.php136
-rw-r--r--inc/geshi/vb.php150
-rw-r--r--inc/geshi/vbnet.php200
-rw-r--r--inc/geshi/visualfoxpro.php444
-rw-r--r--inc/geshi/xml.php145
-rw-r--r--inc/html.php970
-rw-r--r--inc/io.php139
-rw-r--r--inc/magpie/extlib/Snoopy.class.inc899
-rw-r--r--inc/magpie/rss_cache.inc184
-rw-r--r--inc/magpie/rss_fetch.inc438
-rw-r--r--inc/magpie/rss_parse.inc547
-rw-r--r--inc/magpie/rss_utils.inc67
-rw-r--r--inc/parser.php763
-rw-r--r--inc/search.php301
-rw-r--r--includes/footer.html40
-rw-r--r--index.php3
-rw-r--r--interwiki/amazon.de.gifbin0 -> 882 bytes
-rw-r--r--interwiki/amazon.gifbin0 -> 882 bytes
-rw-r--r--interwiki/amazon.uk.gifbin0 -> 882 bytes
-rw-r--r--interwiki/bug.gifbin0 -> 166 bytes
-rw-r--r--interwiki/doku.gifbin0 -> 952 bytes
-rw-r--r--interwiki/google.gifbin0 -> 980 bytes
-rw-r--r--interwiki/meatball.gifbin0 -> 1100 bytes
-rw-r--r--interwiki/sb.gifbin0 -> 886 bytes
-rw-r--r--interwiki/wiki.gifbin0 -> 909 bytes
-rw-r--r--interwiki/wp.gifbin0 -> 680 bytes
-rw-r--r--interwiki/wpde.gifbin0 -> 680 bytes
-rw-r--r--interwiki/wpmeta.gifbin0 -> 680 bytes
-rw-r--r--lang/.htaccess3
-rw-r--r--lang/da/diff.txt4
-rw-r--r--lang/da/edit.txt2
-rw-r--r--lang/da/editrev.txt2
-rw-r--r--lang/da/lang.php56
-rw-r--r--lang/da/mailtext.txt15
-rw-r--r--lang/da/newpage.txt3
-rw-r--r--lang/da/norev.txt4
-rw-r--r--lang/da/preview.txt4
-rw-r--r--lang/da/read.txt2
-rw-r--r--lang/da/recent.txt5
-rw-r--r--lang/da/revisions.txt5
-rw-r--r--lang/da/searchpage.txt5
-rw-r--r--lang/da/showrev.txt2
-rw-r--r--lang/de/backlinks.txt5
-rw-r--r--lang/de/conflict.txt11
-rw-r--r--lang/de/denied.txt5
-rw-r--r--lang/de/diff.txt6
-rw-r--r--lang/de/edit.txt2
-rw-r--r--lang/de/editrev.txt2
-rw-r--r--lang/de/index.txt4
-rw-r--r--lang/de/lang.php102
-rw-r--r--lang/de/locked.txt5
-rw-r--r--lang/de/login.txt5
-rw-r--r--lang/de/mailtext.txt15
-rw-r--r--lang/de/newpage.txt7
-rw-r--r--lang/de/norev.txt5
-rw-r--r--lang/de/password.txt10
-rw-r--r--lang/de/preview.txt5
-rw-r--r--lang/de/read.txt2
-rw-r--r--lang/de/recent.txt5
-rw-r--r--lang/de/register.txt7
-rw-r--r--lang/de/revisions.txt5
-rw-r--r--lang/de/searchpage.txt9
-rw-r--r--lang/de/showrev.txt2
-rw-r--r--lang/de/wordblock.txt7
-rw-r--r--lang/en/backlinks.txt5
-rw-r--r--lang/en/conflict.txt9
-rw-r--r--lang/en/denied.txt4
-rw-r--r--lang/en/diff.txt5
-rw-r--r--lang/en/edit.txt5
-rw-r--r--lang/en/editrev.txt2
-rw-r--r--lang/en/index.txt4
-rw-r--r--lang/en/lang.php98
-rw-r--r--lang/en/locked.txt4
-rw-r--r--lang/en/login.txt5
-rw-r--r--lang/en/mailtext.txt16
-rw-r--r--lang/en/newpage.txt3
-rw-r--r--lang/en/norev.txt4
-rw-r--r--lang/en/password.txt10
-rw-r--r--lang/en/preview.txt4
-rw-r--r--lang/en/read.txt2
-rw-r--r--lang/en/recent.txt5
-rw-r--r--lang/en/register.txt6
-rw-r--r--lang/en/revisions.txt4
-rw-r--r--lang/en/searchpage.txt6
-rw-r--r--lang/en/showrev.txt2
-rw-r--r--lang/en/wordblock.txt6
-rw-r--r--lang/es/diff.txt5
-rw-r--r--lang/es/edit.txt5
-rw-r--r--lang/es/editrev.txt2
-rw-r--r--lang/es/index.txt4
-rw-r--r--lang/es/lang.php58
-rw-r--r--lang/es/mailtext.txt15
-rw-r--r--lang/es/newpage.txt3
-rw-r--r--lang/es/norev.txt4
-rw-r--r--lang/es/preview.txt4
-rw-r--r--lang/es/read.txt1
-rw-r--r--lang/es/recent.txt5
-rw-r--r--lang/es/revisions.txt4
-rw-r--r--lang/es/searchpage.txt6
-rw-r--r--lang/es/showrev.txt2
-rw-r--r--lang/es/wordblock.txt6
-rw-r--r--lang/eu/diff.txt5
-rw-r--r--lang/eu/edit.txt3
-rw-r--r--lang/eu/editrev.txt2
-rw-r--r--lang/eu/index.txt4
-rw-r--r--lang/eu/lang.php85
-rw-r--r--lang/eu/mailtext.txt15
-rw-r--r--lang/eu/newpage.txt3
-rw-r--r--lang/eu/norev.txt4
-rw-r--r--lang/eu/preview.txt4
-rw-r--r--lang/eu/read.txt1
-rw-r--r--lang/eu/recent.txt5
-rw-r--r--lang/eu/revisions.txt4
-rw-r--r--lang/eu/searchpage.txt9
-rw-r--r--lang/eu/showrev.txt2
-rw-r--r--lang/eu/wordblock.txt5
-rw-r--r--lang/fi/backlinks.txt3
-rw-r--r--lang/fi/conflict.txt6
-rw-r--r--lang/fi/denied.txt2
-rw-r--r--lang/fi/diff.txt2
-rw-r--r--lang/fi/edit.txt2
-rw-r--r--lang/fi/editrev.txt2
-rw-r--r--lang/fi/index.txt3
-rw-r--r--lang/fi/lang.php99
-rw-r--r--lang/fi/locked.txt3
-rw-r--r--lang/fi/login.txt3
-rw-r--r--lang/fi/mailtext.txt16
-rw-r--r--lang/fi/newpage.txt3
-rw-r--r--lang/fi/norev.txt2
-rw-r--r--lang/fi/password.txt10
-rw-r--r--lang/fi/preview.txt2
-rw-r--r--lang/fi/read.txt1
-rw-r--r--lang/fi/recent.txt3
-rw-r--r--lang/fi/register.txt4
-rw-r--r--lang/fi/revisions.txt3
-rw-r--r--lang/fi/searchpage.txt4
-rw-r--r--lang/fi/showrev.txt2
-rw-r--r--lang/fi/wordblock.txt3
-rw-r--r--lang/fr/backlinks.txt4
-rw-r--r--lang/fr/conflict.txt9
-rw-r--r--lang/fr/denied.txt3
-rw-r--r--lang/fr/diff.txt5
-rw-r--r--lang/fr/edit.txt6
-rw-r--r--lang/fr/editrev.txt3
-rw-r--r--lang/fr/index.txt5
-rw-r--r--lang/fr/lang.php96
-rw-r--r--lang/fr/locked.txt4
-rw-r--r--lang/fr/login.txt4
-rw-r--r--lang/fr/mailtext.txt16
-rw-r--r--lang/fr/newpage.txt4
-rw-r--r--lang/fr/norev.txt5
-rw-r--r--lang/fr/password.txt10
-rw-r--r--lang/fr/preview.txt5
-rw-r--r--lang/fr/read.txt3
-rw-r--r--lang/fr/recent.txt5
-rw-r--r--lang/fr/register.txt5
-rw-r--r--lang/fr/revisions.txt6
-rw-r--r--lang/fr/searchpage.txt6
-rw-r--r--lang/fr/showrev.txt3
-rw-r--r--lang/fr/wordblock.txt6
-rw-r--r--lang/nl/backlinks.txt4
-rw-r--r--lang/nl/conflict.txt5
-rw-r--r--lang/nl/denied.txt3
-rw-r--r--lang/nl/diff.txt3
-rw-r--r--lang/nl/edit.txt1
-rw-r--r--lang/nl/editrev.txt2
-rw-r--r--lang/nl/index.txt4
-rw-r--r--lang/nl/lang.php99
-rw-r--r--lang/nl/locked.txt5
-rw-r--r--lang/nl/login.txt4
-rw-r--r--lang/nl/mailtext.txt16
-rw-r--r--lang/nl/newpage.txt3
-rw-r--r--lang/nl/norev.txt4
-rw-r--r--lang/nl/password.txt10
-rw-r--r--lang/nl/preview.txt4
-rw-r--r--lang/nl/read.txt2
-rw-r--r--lang/nl/recent.txt3
-rw-r--r--lang/nl/register.txt5
-rw-r--r--lang/nl/revisions.txt4
-rw-r--r--lang/nl/searchpage.txt5
-rw-r--r--lang/nl/showrev.txt2
-rw-r--r--lang/nl/wordblock.txt6
-rw-r--r--lang/no/backlinks.txt3
-rw-r--r--lang/no/conflict.txt6
-rw-r--r--lang/no/denied.txt4
-rw-r--r--lang/no/diff.txt4
-rw-r--r--lang/no/edit.txt2
-rw-r--r--lang/no/editrev.txt2
-rw-r--r--lang/no/index.txt4
-rw-r--r--lang/no/lang.php100
-rw-r--r--lang/no/locked.txt3
-rw-r--r--lang/no/login.txt4
-rw-r--r--lang/no/mailtext.txt16
-rw-r--r--lang/no/newpage.txt3
-rw-r--r--lang/no/norev.txt4
-rw-r--r--lang/no/password.txt10
-rw-r--r--lang/no/preview.txt4
-rw-r--r--lang/no/read.txt2
-rw-r--r--lang/no/recent.txt5
-rw-r--r--lang/no/register.txt4
-rw-r--r--lang/no/revisions.txt4
-rw-r--r--lang/no/searchpage.txt5
-rw-r--r--lang/no/showrev.txt2
-rw-r--r--lang/no/wordblock.txt4
-rw-r--r--lang/pl/backlinks.txt5
-rw-r--r--lang/pl/conflict.txt9
-rw-r--r--lang/pl/denied.txt5
-rw-r--r--lang/pl/diff.txt4
-rw-r--r--lang/pl/edit.txt5
-rw-r--r--lang/pl/editrev.txt3
-rw-r--r--lang/pl/index.txt4
-rw-r--r--lang/pl/lang.php98
-rw-r--r--lang/pl/locked.txt5
-rw-r--r--lang/pl/login.txt5
-rw-r--r--lang/pl/mailtext.txt18
-rw-r--r--lang/pl/newpage.txt5
-rw-r--r--lang/pl/norev.txt5
-rw-r--r--lang/pl/password.txt11
-rw-r--r--lang/pl/preview.txt5
-rw-r--r--lang/pl/read.txt3
-rw-r--r--lang/pl/recent.txt4
-rw-r--r--lang/pl/register.txt6
-rw-r--r--lang/pl/revisions.txt5
-rw-r--r--lang/pl/searchpage.txt9
-rw-r--r--lang/pl/showrev.txt2
-rw-r--r--lang/pl/wordblock.txt5
-rw-r--r--lang/pt/backlinks.txt7
-rw-r--r--lang/pt/conflict.txt12
-rw-r--r--lang/pt/denied.txt5
-rw-r--r--lang/pt/diff.txt5
-rw-r--r--lang/pt/edit.txt8
-rw-r--r--lang/pt/editrev.txt5
-rw-r--r--lang/pt/index.txt6
-rw-r--r--lang/pt/lang.php99
-rw-r--r--lang/pt/locked.txt6
-rw-r--r--lang/pt/login.txt8
-rw-r--r--lang/pt/mailtext.txt18
-rw-r--r--lang/pt/newpage.txt7
-rw-r--r--lang/pt/norev.txt7
-rw-r--r--lang/pt/password.txt12
-rw-r--r--lang/pt/preview.txt8
-rw-r--r--lang/pt/read.txt5
-rw-r--r--lang/pt/recent.txt5
-rw-r--r--lang/pt/register.txt8
-rw-r--r--lang/pt/revisions.txt11
-rw-r--r--lang/pt/searchpage.txt7
-rw-r--r--lang/pt/showrev.txt3
-rw-r--r--lang/pt/wordblock.txt7
-rw-r--r--lang/ru/backlinks.txt5
-rw-r--r--lang/ru/conflict.txt9
-rw-r--r--lang/ru/diff.txt5
-rw-r--r--lang/ru/edit.txt7
-rw-r--r--lang/ru/editrev.txt3
-rw-r--r--lang/ru/index.txt4
-rw-r--r--lang/ru/lang.php83
-rw-r--r--lang/ru/locked.txt5
-rw-r--r--lang/ru/mailtext.txt16
-rw-r--r--lang/ru/newpage.txt4
-rw-r--r--lang/ru/norev.txt5
-rw-r--r--lang/ru/preview.txt4
-rw-r--r--lang/ru/read.txt3
-rw-r--r--lang/ru/recent.txt5
-rw-r--r--lang/ru/revisions.txt4
-rw-r--r--lang/ru/searchpage.txt7
-rw-r--r--lang/ru/showrev.txt2
-rw-r--r--lang/ru/wordblock.txt7
-rw-r--r--lang/sv/backlinks.txt4
-rw-r--r--lang/sv/conflict.txt7
-rw-r--r--lang/sv/denied.txt4
-rw-r--r--lang/sv/diff.txt4
-rw-r--r--lang/sv/edit.txt2
-rw-r--r--lang/sv/editrev.txt3
-rw-r--r--lang/sv/index.txt4
-rw-r--r--lang/sv/lang.php98
-rw-r--r--lang/sv/locked.txt3
-rw-r--r--lang/sv/login.txt4
-rw-r--r--lang/sv/mailtext.txt16
-rw-r--r--lang/sv/newpage.txt3
-rw-r--r--lang/sv/norev.txt5
-rw-r--r--lang/sv/password.txt10
-rw-r--r--lang/sv/preview.txt4
-rw-r--r--lang/sv/read.txt3
-rw-r--r--lang/sv/recent.txt5
-rw-r--r--lang/sv/register.txt4
-rw-r--r--lang/sv/revisions.txt4
-rw-r--r--lang/sv/searchpage.txt5
-rw-r--r--lang/sv/showrev.txt2
-rw-r--r--lang/sv/wordblock.txt4
-rw-r--r--lang/tw/backlinks.txt5
-rw-r--r--lang/tw/conflict.txt7
-rw-r--r--lang/tw/denied.txt4
-rw-r--r--lang/tw/diff.txt4
-rw-r--r--lang/tw/edit.txt2
-rw-r--r--lang/tw/editrev.txt2
-rw-r--r--lang/tw/index.txt4
-rw-r--r--lang/tw/lang.old.php99
-rw-r--r--lang/tw/lang.php109
-rw-r--r--lang/tw/locked.txt3
-rw-r--r--lang/tw/login.txt6
-rw-r--r--lang/tw/mailtext.txt15
-rw-r--r--lang/tw/newpage.txt3
-rw-r--r--lang/tw/norev.txt4
-rw-r--r--lang/tw/password.txt9
-rw-r--r--lang/tw/preview.txt4
-rw-r--r--lang/tw/read.txt3
-rw-r--r--lang/tw/recent.txt5
-rw-r--r--lang/tw/register.txt6
-rw-r--r--lang/tw/revisions.txt3
-rw-r--r--lang/tw/searchpage.txt5
-rw-r--r--lang/tw/showrev.txt2
-rw-r--r--lang/tw/wordblock.txt5
-rw-r--r--media.php167
-rw-r--r--media/.htaccess9
-rw-r--r--pngbehavior.htc53
-rw-r--r--print.css211
-rw-r--r--script.js368
-rw-r--r--smileys/delete.gifbin0 -> 1421 bytes
-rw-r--r--smileys/fixme.gifbin0 -> 1435 bytes
-rw-r--r--smileys/icon_arrow.gifbin0 -> 170 bytes
-rw-r--r--smileys/icon_biggrin.gifbin0 -> 172 bytes
-rw-r--r--smileys/icon_confused.gifbin0 -> 171 bytes
-rw-r--r--smileys/icon_cool.gifbin0 -> 172 bytes
-rw-r--r--smileys/icon_cry.gifbin0 -> 498 bytes
-rw-r--r--smileys/icon_doubt.gifbin0 -> 990 bytes
-rw-r--r--smileys/icon_doubt2.gifbin0 -> 992 bytes
-rw-r--r--smileys/icon_eek.gifbin0 -> 170 bytes
-rw-r--r--smileys/icon_evil.gifbin0 -> 236 bytes
-rw-r--r--smileys/icon_exclaim.gifbin0 -> 236 bytes
-rw-r--r--smileys/icon_frown.gifbin0 -> 171 bytes
-rw-r--r--smileys/icon_fun.gifbin0 -> 590 bytes
-rw-r--r--smileys/icon_idea.gifbin0 -> 176 bytes
-rw-r--r--smileys/icon_kaddi.gifbin0 -> 991 bytes
-rw-r--r--smileys/icon_lol.gifbin0 -> 336 bytes
-rw-r--r--smileys/icon_mrgreen.gifbin0 -> 349 bytes
-rw-r--r--smileys/icon_neutral.gifbin0 -> 171 bytes
-rw-r--r--smileys/icon_question.gifbin0 -> 248 bytes
-rw-r--r--smileys/icon_razz.gifbin0 -> 176 bytes
-rw-r--r--smileys/icon_redface.gifbin0 -> 650 bytes
-rw-r--r--smileys/icon_rolleyes.gifbin0 -> 485 bytes
-rw-r--r--smileys/icon_sad.gifbin0 -> 171 bytes
-rw-r--r--smileys/icon_silenced.gifbin0 -> 231 bytes
-rw-r--r--smileys/icon_smile.gifbin0 -> 174 bytes
-rw-r--r--smileys/icon_smile2.gifbin0 -> 174 bytes
-rw-r--r--smileys/icon_surprised.gifbin0 -> 174 bytes
-rw-r--r--smileys/icon_twisted.gifbin0 -> 238 bytes
-rw-r--r--smileys/icon_wink.gifbin0 -> 170 bytes
-rw-r--r--style.css666
438 files changed, 24736 insertions, 0 deletions
diff --git a/COPYING b/COPYING
new file mode 100644
index 000000000..d60c31a97
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/README b/README
new file mode 100644
index 000000000..e9e4948d2
--- /dev/null
+++ b/README
@@ -0,0 +1,9 @@
+All documentation for DokuWiki is available online
+at http://www.splitbrain.org/dokuwiki/wiki:dokuwiki
+
+For Installation Instructions see
+http://www.splitbrain.org/dokuwiki/wiki:install
+
+DokuWiki - 2004 (c) by Andreas Gohr <andi@splitbrain.org>
+See COPYING for license info
+
diff --git a/conf/.htaccess b/conf/.htaccess
new file mode 100644
index 000000000..763ebf2ee
--- /dev/null
+++ b/conf/.htaccess
@@ -0,0 +1,3 @@
+## no access to the conf directory
+order allow,deny
+deny from all
diff --git a/conf/acl.auth.dist b/conf/acl.auth.dist
new file mode 100644
index 000000000..f99936b54
--- /dev/null
+++ b/conf/acl.auth.dist
@@ -0,0 +1,11 @@
+# Access Control
+#
+# none 0
+# read 1
+# edit 2
+# create 4
+# upload 8
+# grant 255 #not used yet
+
+* @admin 255
+* @ALL 4
diff --git a/conf/acronyms.conf b/conf/acronyms.conf
new file mode 100644
index 000000000..480be0f6a
--- /dev/null
+++ b/conf/acronyms.conf
@@ -0,0 +1,137 @@
+# Acronyms.
+
+AFAICS As far as I can see
+AFAIK As far as I know
+ACL Access Control List
+AIM AOL (America Online) Instant Messenger
+AOL America Online
+API Application Programming Interface
+ASAP As soon as possible
+ASCII American Standard Code for Information Interchange
+ASP Active Server Pages
+BTW By the way
+CGI Common Gateway Interface
+CMS Content Management System
+CSS Cascading Style Sheets
+CVS Concurrent Versions System
+DBA Database Administrator
+DHTML Dynamic HyperText Markup Language
+DMCA Digital Millenium Copyright Act
+DNS Domain Name Server
+DOM Document Object Model
+DTD Document Type Definition
+EOF End of file
+EOL End of line
+EOM End of message
+EOT End of text
+ESMTP Extended Simple Mail Transfer Protocol
+FAQ Frequently Asked Questions
+FDL GNU Free Documentation License
+FTP File Transfer Protocol
+FOSS Free & Open-Source Software
+FLOSS Free/Libre and Open Source Software
+FUD Fear, Uncertainty, and Doubt
+GB Gigabyte
+GHz Gigahertz
+GIF Graphics Interchange Format
+GPL GNU General Public License
+GUI Graphical User Interface
+HTML HyperText Markup Language
+HTTP Hyper Text Transfer Protocol
+IANAL I am not a lawyer (but)
+ICANN Internet Corporation for Assigned Names and Numbers
+ICQ I seek you (Instant Messenger)
+IE5 Internet Explorer 5
+IE6 Internet Explorer 6
+IE Internet Explorer
+IIRC If I remember correctly
+IIS Internet Information Services
+IMAP Internet Message Access Protocol
+IMHO In my humble opinion
+IMO In my opinion
+IOW In other words
+IRC Internet Relay Chat
+IRL In real life
+ISO International Organization for Standardization
+ISP Internet Service Provider
+JDK Java Development Kit
+JPEG Joint Photographics Experts Group
+JPG Joint Photographics Experts Group
+JS JavaScript
+KISS Keep it simple stupid
+LGPL GNU Lesser General Public License
+LOL Laughing out loud
+MathML Mathematical Markup Language
+MB Megabyte
+MHz Megahertz
+MIME Multipurpose Internet Mail Extension
+MIT Massachusetts Institute of Technology
+MML Mathematical Markup Language
+MP3 Motion Picture Experts Group Layer 3
+MPEG Motion Picture Experts Group
+MSDN Microsoft Developer Network
+MS Microsoft
+NS4.7 Netscape 4.7
+NS4 Netscape 4
+NS6 Netscape 6
+NS7 Netscape 7
+OMG Oh my God
+OPML Outline Processor Markup Language
+OS Operating System
+OSS Open Source Software
+OTOH On the other hand
+P2P Peer to Peer
+PDA Personal Digital Assistant
+PDF Portable Document Format
+Perl Practical Extraction and Report Language
+PERL Practical Extraction and Report Language
+PHP Hypertext Preprocessor
+PICS Platform for Internet Content Selection
+PIN Personal Identification Number
+PITA Pain in the Ass
+PNG Portable Network Graphics
+POP3 Post Office Protocol 3
+POP Post Office Protocol
+QoS Quality of Service
+RAID Redundant Array of Inexpensive Disks
+RDF Rich Data File
+ROTFL Rolling on the floor laughing
+RPC Remote Procedure Call
+RSS Rich Site Summary
+RTFM Read The Fine Manual
+RTF Rich Text File
+SCSI Small Computer System Interface
+SDK Software Development Kit
+SGML Standard General Markup Language
+SMIL Synchronized Multimedia Integration Language
+SMTP Simple Mail Transfer Protocol
+SOAP Simple Object Access Protocol
+spec specification
+SQL Structured Query Language
+SSH Secure Shell
+SSI Server Side Includes
+SSL Secure Sockets Layer
+SVG Scalable Vector Graphics
+TIA Thanks in advance
+TIFF Tagged Image File Format
+TLD Top Level Domain
+TOC Table of Contents
+URI Uniform Resource Identifier
+URL Uniform Resource Locator
+URN Uniform Resource Name
+VBA Visual Basic for Applications
+VB Visual Basic
+W3C World Wide Web Consortium
+WAN Wide Area Network
+WAP Wireless Access Protocol
+WML Wireless Markup Language
+WTF? What the f***
+WWW World Wide Web
+WYSIWYG What You See Is What You Get
+XHTML Extensible HyperText Markup Language
+XML Extensible Markup Language
+XSD XML (Extensible Markup Language) Schema Definition
+XSL Extensible Stylesheet Language
+XSLT Extensible Stylesheet Language Transformations
+XUL XML User Interface Language
+YMMV Your mileage may vary
diff --git a/conf/custom.conf b/conf/custom.conf
new file mode 100644
index 000000000..b3fe48834
--- /dev/null
+++ b/conf/custom.conf
@@ -0,0 +1,6 @@
+# This file contains custom text replacements configured by you.
+#
+# Some examples:
+
+#/foo/i 'bar'
+#/(\b)GUI(\b)/ '\1<acronym title="Graphical User Interface">GUI</acronym>\1'
diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php
new file mode 100644
index 000000000..1b3d64dbb
--- /dev/null
+++ b/conf/dokuwiki.php
@@ -0,0 +1,86 @@
+<?
+/**
+ * This is DokuWiki's Main Configuration file
+ * This is a piece of PHP code so PHP syntax applies!
+ *
+ * For help with the configuration see http://www.splitbrain.org/dokuwiki/wiki:config
+ */
+
+
+/* Datastorage and Permissions */
+
+$conf['umask'] = 0111; //set the umask for new files
+$conf['dmask'] = 0000; //directory mask accordingly
+$conf['lang'] = 'en'; //your language
+$conf['datadir'] = './data'; //where to store the data
+$conf['olddir'] = './attic'; //where to store old revisions
+$conf['mediadir'] = './media'; //where to store media files
+$conf['mediaweb'] = 'media'; //access to media from the web
+$conf['changelog'] = './changes.log'; //change log
+$conf['uploadtypes'] = 'gif|jpe?g|png|zip|pdf|tar(\.gz)?|tgz'; //regexp of allowed filetypes to upload
+
+/* Display Options */
+
+$conf['start'] = 'start'; //name of start page
+$conf['title'] = 'DokuWiki'; //what to show in the title
+$conf['fullpath'] = 0; //show full path of the document or relative to datadir only? 0|1
+$conf['recent'] = 20; //how many entries to show in recent
+$conf['breadcrumbs'] = 10; //how many recent visited pages to show
+$conf['typography'] = 1; //convert quotes, dashes and stuff to typographic equivalents? 0|1
+$conf['htmlok'] = 0; //may raw HTML be embedded? This may break layout and XHTML validity 0|1
+$conf['phpok'] = 0; //may PHP code be embedded? Never do this on the internet! 0|1
+$conf['dformat'] = 'Y/m/d H:i'; //dateformat accepted by PHPs date() function
+$conf['signature'] = ' --- //[[@MAIL@|@NAME@]] @DATE@//'; //signature see wiki:config for details
+$conf['maxtoclevel'] = 3; //Up to which level include into AutoTOC (max. 5)
+$conf['maxseclevel'] = 3; //Up to which level create editable sections (max. 5)
+$conf['camelcase'] = 0; //Use CamelCase for linking? (I don't like it) 0|1
+$conf['localnames'] = 0; //Allow non-ASCII chars in pagenames (0|1)
+ //You need a correct locale for this!
+
+/* Antispam Features */
+
+$conf['usewordblock']= 1; //block spam based on words? 0|1
+$conf['mailguard'] = 'hex'; //obfuscate email addresses against spam harvesters?
+ //valid entries are:
+ // 'visible' - replace @ with [at], . with [dot] and - with [dash]
+ // 'hex' - use hex entities to encode the mail address
+ // 'none' - do not obfuscate addresses
+
+/* Authentication Options */
+$conf['useacl'] = 0; //Use Access Control Lists to restrict access?
+$conf['openregister']= 1; //Should users to be allowed to register?
+$conf['authtype'] = 'plain'; //which authentication DB should be used (currently plain only)
+$conf['defaultgroup']= 'user'; //Default groups new Users are added to
+
+//LDAP auth specific stuff (see wiki:auth_ldap)
+$conf['auth']['ldap']['server'] = 'localhost';
+$conf['auth']['ldap']['usertree'] = 'ou=people, dc=my, dc=home';
+$conf['auth']['ldap']['grouptree'] = 'ou=group, dc=my, dc=home';
+$conf['auth']['ldap']['userfilter'] = '(&(uid=%u)(objectClass=posixAccount))';
+
+/* Advanced Options */
+$conf['userewrite'] = 0; //this makes nice URLs but you need to enable it in .htaccess first 0|1
+$conf['useslash'] = 0; //use slash instead of colon? only when rewrite is on
+$conf['canonical'] = 0; //Should all URLs use full canonical http://... style?
+$conf['autoplural'] = 0; //try (non)plural form of nonexisting files?
+$conf['usegzip'] = 1; //gzip old revisions?
+$conf['cachetime'] = 60*60*24; //maximum age for cachefile in seconds (defaults to a day)
+$conf['purgeonadd'] = 1; //purge cache when a new file is added (needed for up to date links)
+$conf['locktime'] = 15*60; //maximum age for lockfiles (defaults to 15 minutes)
+$conf['notify'] = ''; //send change info to this email (leave blank for nobody)
+$conf['mailfrom'] = ''; //use this email when sending mails
+
+
+//Set target to use when creating links - leave empty for same window
+$conf['target']['wiki'] = '';
+$conf['target']['interwiki'] = '_blank';
+$conf['target']['extern'] = '_blank';
+$conf['target']['media'] = '';
+$conf['target']['windows'] = '';
+
+//this includes a local config file if exist which make upgrading more easy - just don't touch this
+@include("conf/local.php");
+
+//a small bugfix for some browsers/proxies just don't touch this either
+$lang = array();
+?>
diff --git a/conf/interwiki.conf b/conf/interwiki.conf
new file mode 100644
index 000000000..dfdf3ef7c
--- /dev/null
+++ b/conf/interwiki.conf
@@ -0,0 +1,121 @@
+# Each URL may contain one of the placeholders {URL} or {NAME}
+# {URL} is replaced by the URL encoded representation of the wikiname
+# this is the right thing to do in most cases
+# {NAME} this is replaced by the wikiname as given in the document
+# no further encoding is done
+# If no placeholder is defined the urlencoded name is appended to the URL
+
+# You can add more InterWiki shortcuts here.
+
+wp http://en.wikipedia.org/wiki/
+wpde http://de.wikipedia.org/wiki/
+wpmeta http://meta.wikipedia.org/wiki/
+schoki http://www.schokilade.de/doku.php?id=
+doku http://wiki.splitbrain.org/
+freecache http://freecache.org/{NAME}
+rfc http://www.cs.ccu.edu.tw/~chm91u/rfc2html.php?loc=remote&amp;number=
+sb http://www.splitbrain.org/go/
+amazon http://www.amazon.com/exec/obidos/ASIN/
+amazon.de http://www.amazon.de/exec/obidos/ASIN/{URL}/ballermannsyndic/
+amazon.uk http://www.amazon.co.uk/exec/obidos/ASIN/
+google.de http://www.google.de/search?q=
+man http://man.splitbrain.org/index.php/man/
+phpfn http://www.php.net/manual/en/function.{NAME}.php
+go http://www.google.com/search?q={URL}&amp;btnI=lucky
+bug http://bugs.splitbrain.org/index.php?do=details&amp;id=
+
+# Standards from http://usemod.com/intermap.txt follow
+
+AbbeNormal http://www.ourpla.net/cgi-bin/pikie.cgi?
+AcadWiki http://xarch.tu-graz.ac.at/autocad/wiki/
+Acronym http://www.acronymfinder.com/af-query.asp?String=exact&amp;Acronym=
+Advogato http://www.advogato.org/
+AIWiki http://www.ifi.unizh.ch/ailab/aiwiki/aiw.cgi?
+ALife http://news.alife.org/wiki/index.php?
+AndStuff http://andstuff.org/wiki.php?
+Annotation http://bayle.stanford.edu/crit/nph-med.cgi/
+AnnotationWiki http://www.seedwiki.com/page.cfm?wikiid=368&amp;doc=
+AwarenessWiki http://taoriver.net/aware/
+BenefitsWiki http://www.benefitslink.com/cgi-bin/wiki.cgi?
+BridgesWiki http://c2.com/w2/bridges/
+C2find http://c2.com/cgi/wiki?FindPage&amp;value=
+Cache http://www.google.com/search?q=cache:
+CLiki http://ww.telent.net/cliki/
+CmWiki http://www.ourpla.net/cgi-bin/wiki.pl?
+CreationMatters http://www.ourpla.net/cgi-bin/wiki.pl?
+DejaNews http://www.deja.com/=dnc/getdoc.xp?AN=
+DeWikiPedia http://www.wikipedia.de/wiki.cgi?
+Dictionary http://www.dict.org/bin/Dict?Database=*&amp;Form=Dict1&amp;Strategy=*&amp;Query=
+DiveIntoOsx http://diveintoosx.org/
+DocBook http://docbook.org/wiki/moin.cgi/
+DolphinWiki http://www.object-arts.com/wiki/html/Dolphin/
+EfnetCeeWiki http://purl.net/wiki/c/
+EfnetCppWiki http://purl.net/wiki/cpp/
+EfnetPythonWiki http://purl.net/wiki/python/
+EfnetXmlWiki http://purl.net/wiki/xml/
+EljWiki http://elj.sourceforge.net/phpwiki/index.php/
+EmacsWiki http://www.emacswiki.org/cgi-bin/wiki.pl?
+FinalEmpire http://final-empire.sourceforge.net/cgi-bin/wiki.pl?
+Foldoc http://www.foldoc.org/foldoc/foldoc.cgi?
+FoxWiki http://fox.wikis.com/wc.dll?Wiki~
+FreeBSDman http://www.FreeBSD.org/cgi/man.cgi?apropos=1&amp;query=
+Google http://www.google.com/search?q=
+GoogleGroups http://groups.google.com/groups?q=
+GreenCheese http://www.greencheese.org/
+HammondWiki http://www.dairiki.org/HammondWiki/index.php3?
+Haribeau http://wiki.haribeau.de/cgi-bin/wiki.pl?
+IAWiki http://www.IAwiki.net/
+IMDB http://us.imdb.com/Title?
+JargonFile http://sunir.org/apps/meta.pl?wiki=JargonFile&amp;redirect=
+JiniWiki http://www.cdegroot.com/cgi-bin/jini?
+JspWiki http://www.ecyrd.com/JSPWiki/Wiki.jsp?page=
+KmWiki http://www.voght.com/cgi-bin/pywiki?
+KnowHow http://www2.iro.umontreal.ca/~paquetse/cgi-bin/wiki.cgi?
+LanifexWiki http://opt.lanifex.com/cgi-bin/wiki.pl?
+LegoWiki http://www.object-arts.com/wiki/html/Lego-Robotics/
+LinuxWiki http://www.linuxwiki.de/
+LugKR http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?
+MathSongsWiki http://SeedWiki.com/page.cfm?wikiid=237&amp;doc=
+MbTest http://www.usemod.com/cgi-bin/mbtest.pl?
+MeatBall http://www.usemod.com/cgi-bin/mb.pl?
+MetaWiki http://sunir.org/apps/meta.pl?
+MetaWikiPedia http://meta.wikipedia.com/wiki/
+MoinMoin http://purl.net/wiki/moin/
+MuWeb http://www.dunstable.com/scripts/MuWebWeb?
+NetVillage http://www.netbros.com/?
+OpenWiki http://openwiki.com/?
+OrgPatterns http://www.bell-labs.com/cgi-user/OrgPatterns/OrgPatterns?
+PangalacticOrg http://www.pangalactic.org/Wiki/
+PersonalTelco http://www.personaltelco.net/index.cgi/
+PhpWiki http://phpwiki.sourceforge.net/phpwiki/index.php?
+Pikie http://pikie.darktech.org/cgi/pikie?
+PPR http://c2.com/cgi/wiki?
+PurlNet http://purl.oclc.org/NET/
+PythonInfo http://www.python.org/cgi-bin/moinmoin/
+PythonWiki http://www.pythonwiki.de/
+PyWiki http://www.voght.com/cgi-bin/pywiki?
+SeaPig http://www.seapig.org/
+SeattleWireless http://seattlewireless.net/?
+SenseisLibrary http://senseis.xmp.net/?
+Shakti http://cgi.algonet.se/htbin/cgiwrap/pgd/ShaktiWiki/
+SourceForge http://sourceforge.net/{NAME}
+Squeak http://minnow.cc.gatech.edu/squeak/
+StrikiWiki http://ch.twi.tudelft.nl/~mostert/striki/teststriki.pl?
+SVGWiki http://www.protocol7.com/svg-wiki/default.asp?
+Tavi http://tavi.sourceforge.net/index.php?
+TmNet http://www.technomanifestos.net/?
+TMwiki http://www.EasyTopicMaps.com/?page=
+TWiki http://twiki.org/cgi-bin/view/{NAME}
+TwistedWiki http://purl.net/wiki/twisted/
+Unreal http://wiki.beyondunreal.com/wiki/
+UseMod http://www.usemod.com/cgi-bin/wiki.pl?
+VisualWorks http://wiki.cs.uiuc.edu/VisualWorks/
+WebDevWikiNL http://www.promo-it.nl/WebDevWiki/index.php?page=
+WebSeitzWiki http://webseitz.fluxent.com/wiki/
+Why http://clublet.com/c/c/why?
+Wiki http://c2.com/cgi/wiki?
+WikiPedia http://www.wikipedia.com/wiki/
+WikiWorld http://WikiWorld.com/wiki/index.php/
+YpsiEyeball http://sknkwrks.dyndns.org:1957/writewiki/wiki.pl?
+ZWiki http://www.zwiki.org/
+
diff --git a/conf/smileys.conf b/conf/smileys.conf
new file mode 100644
index 000000000..42a9c2f89
--- /dev/null
+++ b/conf/smileys.conf
@@ -0,0 +1,28 @@
+# Smileys configured here will be replaced by the
+# configured images in the smiley directory
+
+8-) icon_cool.gif
+8-O icon_eek.gif
+8-o icon_eek.gif
+:-( icon_sad.gif
+:-) icon_smile.gif
+=) icon_smile2.gif
+:-/ icon_doubt.gif
+:-\ icon_doubt2.gif
+:-? icon_confused.gif
+:-D icon_biggrin.gif
+:-P icon_razz.gif
+:-o icon_surprised.gif
+:-O icon_surprised.gif
+:-x icon_silenced.gif
+:-X icon_silenced.gif
+:-| icon_neutral.gif
+;-) icon_wink.gif
+^_^ icon_fun.gif
+:?: icon_question.gif
+:!: icon_exclaim.gif
+LOL icon_lol.gif
+FIXME fixme.gif
+DELETEME delete.gif
+
+#;&lt;P icon_kaddi.gif
diff --git a/conf/users.auth.dist b/conf/users.auth.dist
new file mode 100644
index 000000000..f30decd02
--- /dev/null
+++ b/conf/users.auth.dist
@@ -0,0 +1,6 @@
+# Userfile
+#
+# Format:
+#
+# user:MD5password:Real Name:email:groups,comma,seperated
+
diff --git a/conf/wordblock.conf b/conf/wordblock.conf
new file mode 100644
index 000000000..76b13c132
--- /dev/null
+++ b/conf/wordblock.conf
@@ -0,0 +1,786 @@
+https?://[^/]*s-e-x
+https?://[^/]*-sex
+https?://[^/]*zoofilia
+https?://[^/]*xqit
+https?://[^/]*ganzaoji
+https?://[^/]*aotubang
+https?://[^/]*aotebang
+https?://[^/]*sonnerie
+https?://[^/]*viagra
+https?://[^/]*sexyongpin
+https?://[^/]*grusskarte
+https?://[^/]*geburtstagskarten
+https?://[^/]*animalsex
+https?://[^/]*sex-with
+https?://[^/]*dogsex
+https?://[^/]*adultchat
+https?://[^/]*adultlive
+https?://[^/]*adultsex
+https?://[^/]*camsex
+https?://[^/]*sexcam
+https?://[^/]*livesex
+https?://[^/]*sexchat
+https?://[^/]*chatsex
+https?://[^/]*onlinesex
+https?://[^/]*adultporn
+https?://[^/]*adultvideo
+https?://[^/]*adultweb
+https?://[^/]*hardcoresex
+https?://[^/]*hardcoreporn
+https?://[^/]*teenporn
+https?://[^/]*xxxporn
+https?://[^/]*lesbiansex
+https?://[^/]*livegirl
+https?://[^/]*livenude
+https?://[^/]*livesex
+https?://[^/]*livevideo
+https?://[^/]*camgirl
+https?://[^/]*spycam
+https?://[^/]*voyeursex
+https?://[^/]*nigritude
+https?://[^/]*casino-online
+https?://[^/]*online-casino
+https?://[^/]*kontaktlinsen
+https?://[^/]*cheapest-phone
+https?://[^/]*laser-eye
+https?://[^/]*eye-laser
+https?://[^/]*fuelcellmarket
+https?://[^/]*lasikclinic
+https?://[^/]*cragrats-
+https?://[^/]*cragratstraining
+https?://[^/]*parishilton
+https?://[^/]*paris-hilton
+https?://[^/]*paris-tape
+https?://[^/]*janet-jackson
+https?://[^/]*sibel-kekilli
+https?://[^/]*2large
+https?://[^/]*oa274
+https?://[^/]*-horoskop
+https?://[^/]*latex-
+https?://[^/]*fuel-dispenser
+https?://[^/]*fueling-dispenser
+https?://[^/]*515315\.
+https?://[^/]*huojia
+https?://[^/]*1211234\.
+https?://[^/]*jinxinghj
+https?://[^/]*telematicsone
+https?://[^/]*telematiksone
+https?://[^/]*a-mortgage
+https?://[^/]*1stop-
+https?://[^/]*diamondabrasives
+https?://[^/]*reuterbrook
+https?://[^/]*sex-plugin
+https?://[^/]*sex-zone
+https?://[^/]*lazy-stars
+https?://[^/]*eblja
+https?://[^/]*ynkm-trip\.com
+https?://[^/]*euyn\.com
+https?://[^/]*e-fanyi\.com
+https?://[^/]*huangshan\.com
+https?://[^/]*hssight\.com
+https?://[^/]*changyuansh\.com
+https?://[^/]*ynsw\.com
+https?://[^/]*datianmachine\.com
+https?://[^/]*ad-ope\.com
+https?://[^/]*ama-son\.com
+https?://[^/]*microzovd\.com
+https?://[^/]*-pics\.com
+https?://[^/]*smut\.com
+https?://[^/]*bulk-pics\.com
+https?://[^/]*\.4t\.com
+https?://[^/]*haugeprint\.co\.uk
+https?://[^/]*logical-planet\.co\.uk
+https?://[^/]*-luxuries\.co\.uk
+https?://[^/]*playbest\.de
+https?://[^/]*ja-ac\.com
+https?://[^/]*attapulgite\.org
+https?://[^/]*international-pharma\.com
+https?://[^/]*51crab\.com
+https?://[^/]*touchcn\.net
+https?://[^/]*click\.com\.es
+https?://[^/]*cmd365\.com
+https?://[^/]*0086371\.com
+https?://[^/]*sensmagnets\.com
+https?://[^/]*cnliandong\.com
+https?://[^/]*szsuun\.com
+https?://[^/]*blueattain\.com
+https?://[^/]*color4day\.com
+https?://[^/]*rorta\.com
+https?://[^/]*worldinternational\.co\.uk
+https?://[^/]*abiao\.name
+https?://[^/]*0030\.net
+https?://[^/]*aaff\.net
+https?://[^/]*aagg\.net
+https?://[^/]*atb\.name
+https?://[^/]*attapulgite\.com
+https?://[^/]*yucaibooks\.com
+https?://[^/]*bjicp\.net
+https?://[^/]*[0-9]+epson\.com
+https?://[^/]*newboyu\.com
+https?://[^/]*[0-9]+books\.com
+https?://[^/]*digital-projector\.net
+https?://[^/]*ponytest\.com
+https?://[^/]*[0-9]+flower\.com
+https?://[^/]*11126\.com
+https?://[^/]*nbflashlights\.com
+https?://[^/]*-bidet\.com
+https?://[^/]*google163\.net
+https?://[^/]*geciwu\.com
+https?://[^/]*enjoyguilin\.com
+https?://[^/]*burningcar\.net
+https?://[^/]*life-insurance-company\.biz
+https?://[^/]*casino-site\.biz
+https?://[^/]*csetouch\.com
+https?://[^/]*lvhang\.com
+https?://[^/]*cnttec\.com
+https?://[^/]*sinosyn\.com
+https?://[^/]*8555\.net
+https?://[^/]*black-eyes\.net
+https?://[^/]*86ieta\.com
+https?://[^/]*bjyiwang\.com
+https?://[^/]*reputek\.com
+https?://[^/]*autumncom\.com
+https?://[^/]*sun-sand-sea\.com
+https?://[^/]*jiatugz\.com
+https?://[^/]*chenguang-cn\.com
+https?://[^/]*shangguanhong\.com
+https?://[^/]*payono\.com
+https?://[^/]*anttm\.com
+https?://[^/]*sharella\.com
+https?://[^/]*8959\.com
+https?://[^/]*yesmeaning\.com
+https?://[^/]*bj-dzjp\.com
+https?://[^/]*cn-fireplace\.com
+https?://[^/]*si-bay\.com
+https?://[^/]*overseas-edu\.com
+https?://[^/]*iron-world\.com
+https?://[^/]*cnyunge\.com
+https?://[^/]*cnwinch\.com
+https?://[^/]*rongpeng\.com
+https?://[^/]*pasco-stationery\.com
+https?://[^/]*accessories-car\.com
+https?://[^/]*chinese-suppliers\.com
+https?://[^/]*chinalifting\.com
+https?://[^/]*blogletters\.com
+https?://[^/]*shop\.tc
+https?://[^/]*uvinewine\.co\.uk
+https?://[^/]*couponmountain\.com
+https?://[^/]*hukuki\.net
+https?://[^/]*gift800\.net
+https?://[^/]*mmyou\.com
+https?://[^/]*chinamimi\.net
+https?://[^/]*7csun\.com
+https?://[^/]*fimdainternet\.com\.br
+https?://[^/]*allwoodoxford\.com
+https?://[^/]*cornishholidaysuk\.com
+https?://[^/]*169xp.com
+https?://[^/]*silberhochzeit\.de\.nr
+https?://[^/]*-diaeten\.de\.vu
+https?://[^/]*-testen\.de\.ms
+https?://[^/]*malvorlagen\.de\.ms
+https?://[^/]*-kochrezepte\.de\.vu
+https?://[^/]*abnehmen\.freeweb-hosting\.com
+https?://[^/]*hintergrundbilder\.us\.ms
+https?://[^/]*waycn\.com
+https?://[^/]*dealcn\.com
+https?://[^/]*artsdeal\.com
+https?://[^/]*stonedeal\.com
+https?://[^/]*decorationsexport\.com
+https?://[^/]*nikeproduct\.com
+https?://[^/]*shoesbuynow\.com
+https?://[^/]*seekcn\.net
+https?://[^/]*tupianwu\.com
+https?://[^/]*ling8\.com
+https?://[^/]*ok8\.org
+https?://[^/]*dirhot\.com
+https?://[^/]*kan365\.com
+https?://[^/]*yuding\.org
+https?://[^/]*sex-fu\.com
+https?://[^/]*geneostar\.com
+https?://[^/]*princess-mononoke\.com
+https?://[^/]*girlza\.com
+https?://[^/]*a--e\.com
+https?://[^/]*445566\.com
+https?://[^/]*card-lottery\.org
+https?://[^/]*nikeshoesshop\.com
+https?://[^/]*nikesupplier\.com
+https?://[^/]*top-point\.net
+https?://[^/]*ukex\.net
+https?://[^/]*yedian\.com
+https?://[^/]*contake\.com
+https?://[^/]*ulcer\.by\.ru
+https?://[^/]*ulcer\.ws
+https?://[^/]*loverussianwife\.com
+https?://[^/]*gt-lite\.com
+https?://[^/]*flowerwish\.com
+https?://[^/]*sec-battery\.co\.uk
+https?://[^/]*-hire\.co\.uk
+https?://[^/]*tcom-control\.co\.uk
+https?://[^/]*parkersexecutivecar\.co\.uk
+https?://[^/]*beaumont-bar\.co\.uk
+https?://[^/]*owaceilings\.co\.uk
+https?://[^/]*jgc-network\.co\.uk
+https?://[^/]*execsoft-software\.co\.uk
+https?://[^/]*bodet-clocks\.co\.uk
+https?://[^/]*buzz-hotels\.co\.uk
+https?://[^/]*longcrossgroup\.co\.uk
+https?://[^/]*reuterbrook\.co\.uk
+https?://[^/]*pantandsocks\.co\.uk
+https?://[^/]*bjrealcolor\.com
+https?://[^/]*efuchina\.com
+https?://[^/]*21cnmanager\.com
+https?://[^/]*xunte\.com
+https?://[^/]*aclas\.com
+https?://[^/]*radi-instrument\.com
+https?://[^/]*wbzj\.com
+https?://[^/]*marketingbetter\.com
+https?://[^/]*51\.net
+https?://[^/]*topcel-battery\.com
+https?://[^/]*23mr\.com
+https?://[^/]*bennettchina\.com
+https?://[^/]*luckyarn\.com
+https?://[^/]*shgoto\.com
+https?://[^/]*battery-oem\.com
+https?://[^/]*shgoto\.com
+https?://[^/]*kingview\.com
+https?://[^/]*hlhologram\.com
+https?://[^/]*haiz\.com
+https?://[^/]*jiasongmachine\.com
+https?://[^/]*fiporter\.com
+https?://[^/]*brightking\.com
+https?://[^/]*lily-bearing\.com
+https?://[^/]*waysvalves\.com
+https?://[^/]*hy-chem\.net
+https?://[^/]*58447575\.com
+https?://[^/]*v2tech\.com
+https?://[^/]*pumpvalveworld\.com
+https?://[^/]*flashfun\.com
+https?://[^/]*eastdb\.com
+https?://[^/]*[0-9]+fang\.com
+https?://[^/]*\.omnia\.co\.uk
+https?://[^/]*shopper-jobs\.us
+https?://[^/]*-outlet\.de
+https?://[^/]*-spiele\.de
+https?://[^/]*-kaufen\.de
+https?://[^/]*-partner\.nl
+https?://[^/]*-partner\.de
+https?://[^/]*-partner\.se
+https?://[^/]*bjedin\.com
+https?://[^/]*vivaful\.com
+https?://[^/]*googlead\.com
+https?://[^/]*21cnbj\.com
+https?://[^/]*packmc\.com
+https?://[^/]*dnsvhost\.com
+https?://[^/]*2kdata\.com
+https?://[^/]*raiddata\.com
+https?://[^/]*nactech\.com
+https?://[^/]*markemiah\.com
+https?://[^/]*jobbnu\.com
+https?://[^/]*ifamen\.com
+https?://[^/]*hrbyly\.com
+https?://[^/]*firmasiden\.com
+https?://[^/]*bpzj\.com
+https?://[^/]*bnuteacher\.com
+https?://[^/]*datasoon\.com
+https?://[^/]*butianshi\.com
+https?://[^/]*iqwork\.com
+https?://[^/]*uswebdata\.com
+https?://[^/]*bnuol\.com
+https?://[^/]*hddata\.com
+https?://[^/]*by-and-by\.com
+https?://[^/]*egyway\.com
+https?://[^/]*xxx\.biz
+https?://[^/]*-reservations\.biz
+https?://[^/]*bucuo\.net
+https?://[^/]*-china\.com
+https?://[^/]*cqhyjx\.com
+https?://[^/]*qjfy\.com
+https?://[^/]*guilintour\.net
+https?://[^/]*56114\.net
+https?://[^/]*360e\.net
+https?://[^/]*chinajack\.com
+https?://[^/]*17178\.com
+https?://[^/]*jiefo\.com
+https?://[^/]*web136\.net
+https?://[^/]*hyey\.com
+https?://[^/]*china-crestron\.com
+https?://[^/]*fif-relay\.com
+https?://[^/]*power-steering-pump\.com
+https?://[^/]*xiaogang\.com
+https?://[^/]*happysport\.com
+https?://[^/]*cn006\.com
+https?://[^/]*web136\.net
+https?://[^/]*ittea\.net
+https?://[^/]*mysunmun\.com
+https?://[^/]*luck-star\.com
+https?://[^/]*hailuo\.net
+https?://[^/]*jnjlnet\.com
+https?://[^/]*.sx98\.com
+https?://[^/]*21cnbj\.com
+https?://[^/]*cnsepm\.com
+https?://[^/]*pdjt\.com
+https?://[^/]*hjbt\.com
+https?://[^/]*jsags\.com
+https?://[^/]*bzsf\.com
+https?://[^/]*cn-mzc\.com
+https?://[^/]*yi-tong\.com
+https?://[^/]*runtudyes\.com
+https?://[^/]*cghyjx\.com
+https?://[^/]*hegao\.com
+https?://[^/]*star-machinery\.net
+https?://[^/]*jitianmachine\.com
+https?://[^/]*fultrust\.com
+https?://[^/]*wx-e\.com
+https?://[^/]*nahoku\.com
+https?://[^/]*blogeasy\.com
+https?://[^/]*paidsurveysforall\.com
+https?://[^/]*isourceindia\.com
+https?://[^/]*thuriam\.com
+https?://[^/]*swellongtools\.com
+https?://[^/]*tlup\.com
+https?://[^/]*szhicom\.net
+https?://[^/]*inflatables-china\.com
+https?://[^/]*yourgoogle\.com
+https?://[^/]*transcosmo\.com
+https?://[^/]*ty9run\.com
+https?://[^/]*ad-www\.com
+https?://[^/]*10000s\.com
+https?://[^/]*allwally.com
+https?://[^/]*togoogle\.net
+https?://[^/]*jiayinte\.com
+https?://[^/]*pkuyy\.com
+https?://[^/]*ebani\.com
+https?://[^/]*52wenxue\.com
+https?://[^/]*casino-online-on-line\.com
+https?://[^/]*eczz\.com
+https?://[^/]*211\.157\.35\.153
+https?://[^/]*musica\.org\.es
+https?://[^/]*y365\.com
+https?://[^/]*99919\.com
+https?://[^/]*-cam\.us
+https?://[^/]*-cam-chat\.com
+https?://[^/]*-chat-room\.us
+https?://[^/]*-chat-live\.com
+https?://[^/]*-chat-room\.com
+https?://[^/]*-cams\.com
+https?://[^/]*-amateur\.com
+https?://[^/]*-webcams\.com
+https?://[^/]*-show\.com
+https?://[^/]*-cam\.com
+https?://[^/]*-chat\.com
+https?://[^/]*xyzdown\.com
+https?://[^/]*boxget\.net
+https?://[^/]*swan-storage\.com
+https?://[^/]*china57\.com
+https?://[^/]*touch168\.com
+https?://[^/]*fly-sky\.com
+https?://[^/]*ancientmoods\.com
+https?://[^/]*zhanao\.com
+https?://[^/]*easthome\.com
+https?://[^/]*putixin\.com
+https?://[^/]*d-secure\.com
+https?://[^/]*dadaposter\.com
+https?://[^/]*gongsizhuce\.com
+https?://[^/]*huifu\.com
+https?://[^/]*cnnttm\.com
+https?://[^/]*soonlink\.net
+https?://[^/]*cnbjflower\.com
+https?://[^/]*huojia315\.com
+https?://[^/]*sexeach\.com
+https?://[^/]*branson-china\.com
+https?://[^/]*lycos\.co\.uk/elo575
+https?://[^/]*lycos\.es/migmigmig
+https?://[^/]*lycos\.nl/pierre141
+https?://[^/]*easyspace\.com/hkl
+https?://[^/]*lj5\.net
+https?://[^/]*beijingxinfa\.com
+https?://[^/]*88888\.net
+https?://[^/]*xzyrack\.com
+https?://[^/]*sinrui\.com
+https?://[^/]*bjjingtu\.com
+https?://[^/]*dfrog\.be
+https?://[^/]*-frauentag\.de\.sr
+https?://[^/]*zonemu\.com
+https?://[^/]*hot3smut\.com
+https?://[^/]*bulk-pics\.com
+https?://[^/]*strong-free-smut\.com
+https?://[^/]*horny-photo-pics\.com
+https?://[^/]*sex-plugins\.com
+https?://[^/]*sex-plugin\.com
+https?://[^/]*3sex-zone\.com
+https?://[^/]*lazy-stars\.com
+https?://[^/]*eblja\.com
+https?://[^/]*sexy-eblja\.com
+https?://[^/]*microzovd\.com
+https?://[^/]*ama-son\.com
+https?://[^/]*ad-ope\.com
+https?://[^/]*lariska-porn\.com
+https?://[^/]*brone-sex\.com
+https?://[^/]*-topliste\.com
+https?://[^/]*tintenpatronen\.tv
+https?://[^/]*strapse\.tv
+https?://[^/]*4t\.com
+https?://[^/]*zhongzhibiotech\.com
+https?://[^/]*creator-cg\.com
+https?://[^/]*sfcomm\.com
+https?://[^/]*telogis\.com
+https?://[^/]*dnsasp\.com
+https?://[^/]*100free\.com
+https?://[^/]*sixmarklhc\.org
+https?://[^/]*-casino-chips\.com
+https?://[^/]*pv365\.com
+https?://[^/]*365pv\.com
+https?://[^/]*pump365\.com
+https?://[^/]*valve365\.com
+https?://[^/]*bengfawang\.com
+https?://[^/]*magnus-automation\.com
+https?://[^/]*thaistudy\.net
+https?://[^/]*think-t\.com
+https?://[^/]*newstyle-w\.com
+https?://[^/]*writerlw\.com
+https?://[^/]*ly-yufeng\.com
+https?://[^/]*lnhbsb\.com
+https?://[^/]*dfhb\.com
+https?://[^/]*xinpushihua\.com
+https?://[^/]*casters-net\.com
+https?://[^/]*amwaypower\.com
+https?://[^/]*vita-biotech\.com
+https?://[^/]*google123\.net
+https?://[^/]*900house\.com
+https?://[^/]*globalfbc\.com
+https?://[^/]*xiloo\.com
+https?://[^/]*xagoogle\.com
+https?://[^/]*518815\.com
+https?://[^/]*dvdcn\.net
+https?://[^/]*xiaji\.net
+https?://[^/]*guilinhotel\.info
+https?://[^/]*nanting\.com
+https?://[^/]*news123\.org
+https?://[^/]*midiwu\.com
+https?://[^/]*huola\.com
+https?://[^/]*bjhsdx\.com
+https?://[^/]*51zhengxing\.net
+https?://[^/]*dongdao\.net
+https?://[^/]*0090\.net
+https?://[^/]*kredit-magazin\.com
+https?://[^/]*dprktime\.com
+https?://[^/]*lookupcars\.co\.uk
+https?://[^/]*china2house\.com
+https?://[^/]*buch5\.com
+https?://[^/]*-watch-china\.org
+https?://[^/]*dacash\.com
+https?://[^/]*omeida\.com
+https?://[^/]*ck100\.com
+https?://[^/]*huihualin\.com
+https?://[^/]*chindata\.com
+https?://[^/]*tonzh\.com
+https?://[^/]*51zhengxing\.net
+https?://[^/]*raise-win\.com
+https?://[^/]*approachina\.com
+https?://[^/]*bjacca\.com
+https?://[^/]*tmrr\.com
+https?://[^/]*1annonce\.com
+https?://[^/]*sunstar\.ws
+https?://[^/]*cock\.ws
+https?://[^/]*adp6\.co\.uk
+https?://[^/]*0020\.net
+https?://[^/]*5778\.com
+https?://[^/]*gatewaytotheorient\.com
+https?://[^/]*domesticgear\.com
+https?://[^/]*aajj\.net
+https?://[^/]*aauu\.net
+https?://[^/]*kykdz\.com
+https?://[^/]*china-crawfish\.com
+https?://[^/]*in-net\.ws
+https?://[^/]*yahoo\.com/a1likostar
+https?://[^/]*yahoo\.com/a0cany_2004
+https?://[^/]*yahoo\.com/a00poleroid
+https?://[^/]*yahoo\.com/a00asaz
+https?://[^/]*yahoo\.com/a0_00leksa
+https?://[^/]*yahoo\.com/stoons_cartoon
+https?://[^/]*yahoo\.com/skystarpilot
+https?://[^/]*yahoo\.com/klirinc
+https?://[^/]*yahoo\.com/fhkdfohjdfhk
+https?://[^/]*yahoo\.com/freekeramika
+https?://[^/]*yahoo\.com/aikishot
+https?://[^/]*les-mas-de-provence\.com
+https?://[^/]*mp3prof\.com
+https?://[^/]*fullhentaimovies\.net
+https?://[^/]*-hentai\.net
+https?://[^/]*tartkartong\.com
+https?://[^/]*-cartoon\.com
+https?://[^/]*macdostu\.com
+https?://[^/]*disney-toons\.com
+https?://[^/]*cn4e\.com
+https?://[^/]*hzsaite\.com
+https?://[^/]*shjiajiao\.com
+https?://[^/]*myetang\.com
+https?://[^/]*locloso\.com
+https?://[^/]*bzzt\.net
+https?://[^/]*zoosex\.net
+https?://[^/]*fuck\.org
+https?://[^/]*knasweb\.se
+https?://[^/]*marnkad\.nu
+https?://[^/]*84g\.com
+https?://[^/]*4acn\.com
+https?://[^/]*in-sexstory\.com
+https?://[^/]*pics69\.com
+https?://[^/]*rp-story\.com
+https?://[^/]*-preisvergleich\.de
+https?://[^/]*price-comparison\.com
+https?://[^/]*cupfart\.net
+https?://[^/]*categoryshop\.com
+https?://[^/]*rake-back\.com
+https?://[^/]*clubducati\.com
+https?://[^/]*virgoans\.co\.uk
+https?://[^/]*grandads\.co\.uk
+https?://[^/]*5p\.org\.uk
+https?://[^/]*4mg\.com
+https?://[^/]*noisybrain\.tv
+https?://[^/]*3xx\.org
+https?://[^/]*baby-sleep\.us
+https?://[^/]*eq-1\.usrecipes
+https?://[^/]*online-web-detective\.com
+https?://[^/]*pop-the-question\.us
+https?://[^/]*gooddy-images\.com
+https?://[^/]*catering\.better-living\.us
+https?://[^/]*ultrawiredsex\.com
+https?://[^/]*apache-stuff\.com
+https?://[^/]*css-stuff\.com
+https?://[^/]*pythoninfo\.com
+https?://[^/]*thehun\.net
+https?://[^/]*ushummingbirds
+https?://[^/]*usfederal-firearms-license
+https?://[^/]*black-sex-teen\.com
+https?://[^/]*wislearn\.tv
+https?://[^/]*popkalaset\.nu
+https?://[^/]*tgpoverdose\.com
+https?://[^/]*porrposten\.com
+https?://[^/]*helena\.lindskog\.ws
+https?://[^/]*vscorp\.com
+https?://[^/]*realestatecds\.com
+https?://[^/]*letscompareit\.com
+https?://[^/]*archive4mail\.com
+https?://[^/]*funeral-planning\.us
+https?://[^/]*spytek\.tv
+https?://[^/]*annonsplatsen\.nu
+https?://[^/]*internet-world\.nu
+https?://[^/]*de-lete\.tv
+https?://[^/]*puttel\.com
+https?://[^/]*vastra\.nu
+https?://[^/]*quality\.nu
+https?://[^/]*nudotnetguy
+https?://[^/]*save-money\.ws
+https?://[^/]*brig\.nu
+https?://[^/]*helena\.lindskog\.ws
+https?://[^/]*pics-of\.com
+https?://[^/]*pics-of\.org
+https?://[^/]*pictures-free\.org
+https?://[^/]*wic\.nu
+https?://[^/]*xvil\.tv
+https?://[^/]*vetskapskoltema\.nu
+https?://[^/]*mauraders\.nu
+https?://[^/]*usstop-your-divorce
+https?://[^/]*etrafik\.com
+https?://[^/]*everythingonweb\.net
+https?://[^/]*a-z-how-to\.us
+https?://[^/]*day0\.comcatch-a-cheat
+https?://[^/]*states\.hostrocket\.com
+https?://[^/]*sew-roman-shades\.com
+https?://[^/]*medica-center\.com
+https?://[^/]*google8\.net
+https?://[^/]*websitedesigningpromotion\.com
+https?://[^/]*bahraichfun\.com
+https?://[^/]*thewebbrains\.com
+https?://[^/]*overseaspharmacy\.com
+https?://[^/]*biztravels\.com
+https?://[^/]*ceramic-mugs\.com
+https?://[^/]*governmentgrants-us\.com
+https?://[^/]*justsweatshirts\.com
+https?://[^/]*tmlawoffices\.com
+https?://[^/]*gccgle\.com
+https?://[^/]*lingeriesex\.org
+https?://[^/]*monolove\.org
+https?://[^/]*sweetadultpics\.com
+https?://[^/]*pansat2300\.com
+https?://[^/]*dvbcardgroup\.com
+https?://[^/]*bsdseek\.com
+https?://[^/]*flashworm\.com
+https?://[^/]*kkktv\.com
+https?://[^/]*qqbug\.com
+https?://[^/]*drusearch\.com
+https?://[^/]*gopages\.net
+https?://[^/]*pornxxxsearch\.com
+https?://[^/]*divaporn\.com
+https?://[^/]*virginsplanet\.com
+https?://[^/]*porn\.com
+https?://[^/]*porn\.biz
+https?://[^/]*porn\.us
+https?://[^/]*realyoungboy\.com
+https?://[^/]*olderlady\.net
+https?://[^/]*dominatrix-domination\.com
+https?://[^/]*mailorder-steroids\.com
+https?://[^/]*contactlensesprice\.com
+https?://[^/]*merkey\.net
+https?://[^/]*countrycheck\.com
+https?://[^/]*xmyyz\.com
+https?://[^/]*lct3000\.com
+https?://[^/]*wuyue\.cn
+https?://[^/]*curtainnet\.com
+https?://[^/]*fabric-fur
+https?://[^/]*insect-china\.com
+https?://[^/]*adanov\.com
+https?://[^/]*mdpub\.com
+https?://[^/]*swing-in-golf\.com
+https?://[^/]*golf-slice\.com
+https?://[^/]*help-tip\.com
+https?://[^/]*sanya-window\.net
+https?://[^/]*go\.nease\.net
+https?://[^/]*timescooter\.com
+https?://[^/]*sbt-scooter\.com
+https?://[^/]*dlctc\.com
+https?://[^/]*com\.cn
+https?://[^/]*sh\.cn
+https?://[^/]*frhpcn\.com
+https?://[^/]*zzwz\.net
+https?://[^/]*ktawebdesign\.com
+https?://[^/]*freewebpage\.org
+https?://[^/]*webtechin\.com
+https?://[^/]*tpmschina\.com
+https?://[^/]*sandwiki\.com
+https?://[^/]*vonagediscount\.com
+https?://[^/]*qinbo\.com
+https?://[^/]*online-poker\.com
+https?://[^/]*tveasy\.co\.uk
+https?://[^/]*easyinkz\.co\.uk
+https?://[^/]*diet-program\.com
+https?://[^/]*debt-relief\.com
+https?://[^/]*gargin\.com
+https?://[^/]*doorhangers\.com
+https?://[^/]*outer-court\.com
+https?://[^/]*hostgold\.com\.br
+https?://[^/]*yolanda3\.dynalias\.org
+https?://[^/]*71space\.com
+https?://[^/]*71space\.net
+https?://[^/]*greensalmon\.co\.uk
+https?://[^/]*creditcards\.com
+https?://[^/]*ink-cartridges\.com
+https?://[^/]*internet-dial-up\.com
+https?://[^/]*1stop-mens-magazines\.com
+https?://[^/]*1stop-penguins\.com
+https?://[^/]*1stop
+https?://[^/]*casinowatchdogs\.com
+https?://[^/]*gamblingmethods\.com
+https?://[^/]*bslh\.net
+https?://[^/]*trainque\.com
+https?://[^/]*infoweb\.co\.nz
+https?://[^/]*newmediadesigns\.co\.uk
+https?://[^/]*neue\.co\.uk
+https?://[^/]*aarrss\.com
+https?://[^/]*wowfactor\.co\.uk
+https?://[^/]*123mortgagecentre\.co\.uk
+https?://[^/]*yorkshireradiatorcovers\.co\.uk
+https?://[^/]*manways\.co\.uk
+https?://[^/]*jacksontextiles\.co\.uk
+https?://[^/]*sicl\.co\.uk
+https?://[^/]*tsbooker\.co\.uk
+https?://[^/]*abmdot\.com
+https?://[^/]*summitconsultants\.co\.uk
+https?://[^/]*pollutionprevention\.co\.uk
+https?://[^/]*willowtechnology\.com
+https?://[^/]*crashjobs\.com
+https?://[^/]*googlefans\.cn
+https?://[^/]*hsbaoli\.net
+https?://[^/]*cnnttm\.com
+https?://[^/]*webrank\.cn
+https?://[^/]*xrio\.com
+https?://[^/]*in-quito\.com
+https?://[^/]*onlyher\.net
+https?://[^/]*honourable\.net
+https?://[^/]*inkhouse\.com\.au
+https?://[^/]*mlapower\.com\.au
+https?://[^/]*messagesonhold\.com\.au
+https?://[^/]*eurogem\.com\.au
+https?://[^/]*printerking\.com\.au
+https?://[^/]*babyoliverboutique\.com
+https?://[^/]*tuttibella\.com
+https?://[^/]*ccc-cn\.org
+https?://[^/]*hostmerit\.com
+https?://[^/]*lj8\.net
+https?://[^/]*myrice\.com
+https?://[^/]*webcam\.ws
+https?://[^/]*mba8\.com
+https?://[^/]*d9d\.net
+https?://[^/]*vipwww\.com
+https?://[^/]*agreatserver\.com
+https?://[^/]*angelfire\.com
+https?://[^/]*hostrocket\.com
+https?://[^/]*51asa\.com
+https?://[^/]*finetisp\.com
+https?://[^/]*finet\.net\.cn
+https?://[^/]*knowsky\.com
+https?://[^/]*pikou\.com
+https?://[^/]*searcher\.cn
+https?://[^/]*sooyi\.com
+https?://[^/]*hion\.cn
+https?://[^/]*idchinese\.com
+https?://[^/]*garment-china\.com
+https?://[^/]*huakeclean\.com
+https?://[^/]*chinafuturesound\.com
+https?://[^/]*nice-beauty\.com
+https?://[^/]*well-neng\.com
+https?://[^/]*shengdagaoke\.com
+https?://[^/]*china-maowang\.com
+https?://[^/]*coverer\.com
+https?://[^/]*witze\.eu\.com
+https?://[^/]*99986\.com
+https?://[^/]*148-law\.com
+https?://[^/]*zt148\.com
+https?://[^/]*bj-sd\.com
+https?://[^/]*cstarcom\.com
+https?://[^/]*fashuo300\.com
+https?://[^/]*rampoint\.com
+https?://[^/]*kangxin\.com
+https?://[^/]*bjkhp\.com
+https?://[^/]*sanyastar\.com
+https?://[^/]*hisensors\.com
+https?://[^/]*chinahr\.com
+https?://[^/]*bjzufang\.com
+https?://[^/]*ccxx\.net
+https?://[^/]*dstmedia\.com
+https?://[^/]*gyhx\.com
+https?://[^/]*bbell\.com
+https?://[^/]*cambridge-group\.org
+https?://[^/]*glory-vision\.com
+https?://[^/]*bjerwai\.com
+https?://[^/]*melucky\.com
+https?://[^/]*peak-e\.com
+https?://[^/]*gotooa\.com
+https?://[^/]*211\.157\.35\.153
+https?://[^/]*cfeenet\.com
+https?://[^/]*tsinghua\.edu\.cn
+https?://[^/]*longsuncard\.com
+https?://[^/]*ychzn\.com
+https?://[^/]*sxcoal\.com
+https?://[^/]*join-2008\.com
+https?://[^/]*multivision\.com\.hk
+https?://[^/]*creativewatch\.cn
+https?://[^/]*googlepromotion\.com
+https?://[^/]*gogoogle\.net
+https?://[^/]*watch-china\.org
+https?://[^/]*usedpchub\.com
+https?://[^/]*sonnerie\.net
+https?://[^/]*tonportable\.com
+https?://[^/]*buup114\.net
+https?://[^/]*aotubangshi\.com
+https?://[^/]*dlctc\.com
+https?://[^/]*hion\.cn
+https?://[^/]*now8\.org
+https?://[^/]*searcher\.cn
+https?://[^/]*51asa\.com
+https?://[^/]*chinafuturesound\.com
+https?://[^/]*catsky\.com
+https?://[^/]*dhxy\.net
+https?://[^/]*diylabel\.com
+https?://[^/]*zappmedia\.de
+https?://[^/]*cashmerebiz\.com
diff --git a/data/.htaccess b/data/.htaccess
new file mode 100644
index 000000000..9c96d3742
--- /dev/null
+++ b/data/.htaccess
@@ -0,0 +1,2 @@
+order allow,deny
+deny from all
diff --git a/doku.php b/doku.php
new file mode 100644
index 000000000..4cda1b304
--- /dev/null
+++ b/doku.php
@@ -0,0 +1,161 @@
+<?php
+ define('DOKUWIKIVERSION','2004-01-12');
+
+ ini_set('short_open_tag',"1");
+ require_once("conf/dokuwiki.php");
+ require_once("inc/common.php");
+ require_once("inc/html.php");
+ require_once("inc/parser.php");
+ require_once("lang/en/lang.php");
+ require_once("lang/".$conf['lang']."/lang.php");
+ setCorrectLocale();
+ require_once("inc/auth.php");
+
+ //import variables
+ $QUERY = trim($_REQUEST['id']);
+ $ID = cleanID($_REQUEST['id']);
+ $REV = $_REQUEST['rev'];
+ $ACT = $_REQUEST['do'];
+ $IDX = $_REQUEST['idx'];
+ $DATE = $_REQUEST['date'];
+ $RANGE = $_REQUEST['lines'];
+ $HIGH = $_REQUEST['s'];
+ if(empty($HIGH)) $HIGH = getGoogleQuery();
+
+ $TEXT = cleanText($_POST['wikitext']);
+ $PRE = cleanText($_POST['prefix']);
+ $SUF = cleanText($_POST['suffix']);
+ $SUM = $_REQUEST['summary'];
+
+ //we accept the do param as HTTP header, too:
+ if(!empty($_SERVER['HTTP_X_DOKUWIKI_DO'])){
+ $ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO']));
+ }
+
+ if(!empty($IDX)) $ACT='index';
+ //set defaults
+ if(empty($ID)) $ID = $conf['start'];
+ if(empty($ACT)) $ACT = 'show';
+
+ header('Content-Type: text/html; charset='.$lang['encoding']);
+
+ if($ACT == 'debug'){
+ html_debug();
+ exit;
+ }
+
+ //already logged in?
+ if($_SERVER['REMOTE_USER'] && $ACT=='login') $ACT='show';
+ //handle logout
+ if($ACT=='logout'){
+ auth_logoff();
+ $ACT='login';
+ }
+
+ //handle register
+ if($ACT=='register' && register()){
+ $ACT='login';
+ }
+
+ //do saving after spam- and conflictcheck
+ if($ACT == $lang['btn_save'] && auth_quickaclcheck($ID)){
+ if(checkwordblock()){
+ //spam detected
+ $ACT = 'wordblock';
+ }elseif($DATE != 0 && @filemtime(wikiFN($ID)) > $DATE ){
+ //newer version available -> ask what to do
+ $ACT = 'conflict';
+ }else{
+ //save it
+ saveWikiText($ID,con($PRE,$TEXT,$SUF,1),$SUM); //use pretty mode for con
+ //unlock it
+ unlock($id);
+ //show it
+ header("Location: ".wl($ID, '','doku.php',true));
+ exit();
+ }
+ }
+
+ //make infos about current page available
+ $INFO = pageinfo();
+
+ //Editing: check if locked by anyone - if not lock for my self
+ if(($ACT == 'edit' || $ACT == $lang['btn_preview'])){# && $INFO['editable']){
+ $lockedby = checklock($ID);
+ if($lockedby){
+ $ACT = 'locked';
+ }else{
+ lock($ID);
+ }
+ }else{
+ //try to unlock
+ unlock($ID);
+ }
+
+
+ //display some infos
+ if($ACT == 'check'){
+ check();
+ $ACT = 'show';
+ }
+
+ //check which permission is needed
+ if(in_array($ACT,array('preview','wordblock','conflict','lockedby'))){
+ if($INFO['exists']){
+ $permneed = AUTH_EDIT;
+ }else{
+ $permneed = AUTH_CREATE;
+ }
+ }elseif(in_array($ACT,array('revisions','show','edit'))){
+ $permneed = AUTH_READ;
+ }else{
+ $permneed = AUTH_NONE;
+ }
+
+ //start output
+ if(substr($ACT,0,6) != 'export') html_header();
+ if(html_acl($permneed)){
+ if($ACT == 'edit'){
+ html_edit();
+ }elseif($ACT == $lang['btn_preview']){
+ html_edit($TEXT);
+ html_show($TEXT);
+ }elseif($ACT == 'wordblock'){
+ html_edit($TEXT,'wordblock');
+ }elseif($ACT == 'search' && !empty($QUERY)){
+ html_search();
+ }elseif($ACT == 'revisions'){
+ html_revisions();
+ }elseif($ACT == 'diff'){
+ html_diff();
+ }elseif($ACT == 'recent'){
+ html_recent();
+ }elseif($ACT == 'index'){
+ html_index($IDX);
+ }elseif($ACT == 'backlink'){
+ html_backlinks();
+ }elseif($ACT == 'conflict'){
+ html_conflict(con($PRE,$TEXT,$SUF),$SUM);
+ html_diff(con($PRE,$TEXT,$SUF),false);
+ }elseif($ACT == 'locked'){
+ html_locked($lockedby);
+ }elseif($ACT == 'login'){
+ html_login();
+ }elseif($ACT == 'register' && $conf['openregister']){
+ html_register();
+ }elseif($ACT == 'export_html'){
+ html_head();
+ print "<body>\n";
+ print parsedWiki($ID,$REV,false);
+ print "</body>\n</html>\n";
+ }elseif($ACT == 'export_raw'){
+ header("Content-Type: text/plain");
+ print rawWiki($ID,$REV);
+ }else{
+ $ACT='show';
+ html_show();
+ }
+ }
+ if(substr($ACT,0,6) != 'export') html_footer();
+
+?>
diff --git a/feed.css b/feed.css
new file mode 100644
index 000000000..1c53a5e88
--- /dev/null
+++ b/feed.css
@@ -0,0 +1,65 @@
+rss channel, feed, RDF {
+ font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
+ background-color: White;
+ color: Black;
+ margin: 0;
+ padding: 0;
+}
+
+
+link, description, language, managingEditor, copyright, lastBuildDate, date,
+pubDate, generator, webMaster, ttl, docs, tagline, author, copyright,
+generator, content, created, issued, modified, subject, id, format, creator,
+category {
+ display: none;
+}
+
+item link, entry id {
+ display: block;
+ background: transparent url(images/link_icon.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+ color:#436976;
+ text-decoration:underline;
+}
+
+channel title, feed title {
+ display: block;
+ font-size:200%;
+ font-weight:bolder;
+ color:#436976;
+ text-decoration:none;
+ border-bottom: 20px solid #dee7ec;
+}
+
+:root:before, :root:before {
+ content: "This data file is meant to be read in a XML feed reader. See document source."
+}
+
+item, entry {
+ display: block;
+ margin: 1em 180px 1em 1em;
+ border-bottom: 1px solid #8cacbb;
+ padding-bottom: 1em;
+}
+
+item title, entry title {
+ display: block;
+ background: transparent none;
+ border: 0px solid #ffffff;
+ padding: 0;
+ color: #222;
+ font-size: 1.4em;
+ font-weight: bold;
+}
+
+item pubDate, entry modified, item date {
+ display: inline;
+ color: #AAA;
+ font: 1em trebuchet ms, arial, helvetica, sans-serif;
+}
+
+item description, entry summary {
+ display: block;
+ clear: both;
+ padding-top: 0.5em;
+}
diff --git a/feed.php b/feed.php
new file mode 100644
index 000000000..66d694f53
--- /dev/null
+++ b/feed.php
@@ -0,0 +1,121 @@
+<?php
+ ini_set('short_open_tag',"1");
+ require_once("inc/common.php");
+ require_once("inc/parser.php");
+ require_once("inc/feedcreator.class.php");
+ require_once("inc/auth.php");
+
+ //set auth header for login
+ if($_REQUEST['login'] && !isset($_SERVER['PHP_AUTH_USER'])){
+ header('WWW-Authenticate: Basic realm="'.$conf['title'].'"');
+ header('HTTP/1.0 401 Unauthorized');
+ auth_logoff();
+ }
+
+
+ $num = $_REQUEST['num'];
+ $type = $_REQUEST['type'];
+ $mode = $_REQUEST['mode'];
+ $ns = $_REQUEST['ns'];
+
+ switch ($type){
+ case 'rss':
+ $type = 'RSS0.9';
+ break;
+ case 'rss2':
+ $type = 'RSS2.0';
+ break;
+ case 'atom':
+ $type = 'ATOM0.3';
+ break;
+ default:
+ $type = 'RSS1.0';
+ }
+
+ //some defaults for the feed
+ $CACHEGROUP = 'feed';
+ $conf['typography'] = false;
+ $conf['canonical'] = true;
+ $parser['toc'] = false;
+
+ $rss = new UniversalFeedCreator();
+ $rss = new DokuWikiFeedCreator();
+ $rss->title = $conf['title'];
+ $rss->link = wl();
+ $rss->syndicationURL = getBaseURL().'/feed.php';
+ $rss->cssStyleSheet = getBaseURL().'/feed.css';
+
+ if($mode == 'list'){
+ rssListNamespace($rss,$ns);
+ }else{
+ rssRecentChanges($rss,$num);
+ }
+
+ header('Content-Type: application/xml; charset='.$lang['encoding']);
+ print $rss->createFeed($type,$lang['encoding']);
+
+
+
+/* some functions */
+
+function rssRecentChanges(&$rss,$num){
+
+ $recents = getRecents($num);
+ foreach(array_keys($recents) as $id){
+ $desc = cleanDesc(parsedWiki($id));
+ if(!empty($recents[$id]['sum'])){
+ $desc = '['.strip_tags($recents[$id]['sum']).'] '.$desc;
+ }
+ $item = new FeedItem();
+ $item->title = $id;
+ $item->link = wl($id,'rev='.$recents[$id]['date']);
+ $item->description = $desc;
+ $item->date = date('r',$recents[$id]['date']);
+ if(strpos($id,':')!==false){
+ $item->category = substr($id,0,strrpos($id,':'));
+ }
+ if($recents[$id]['user']){
+ $item->author = $recents[$id]['user'].'@';
+ }else{
+ $item->author = 'anonymous@';
+ }
+ $item->author .= $recents[$id]['ip'];
+
+ $rss->addItem($item);
+ }
+}
+
+function rssListNamespace(&$rss,$ns){
+ require_once("inc/search.php");
+ global $conf;
+
+ $ns=':'.cleanID($ns);
+ $ns=str_replace(':','/',$ns);
+
+ $data = array();
+ sort($data);
+ search($data,$conf['datadir'],'search_list','',$ns);
+ foreach($data as $row){
+ $id = $row['id'];
+ $date = filemtime(wikiFN($id));
+ $desc = cleanDesc(parsedWiki($id));
+ $item = new FeedItem();
+ $item->title = $id;
+ $item->link = wl($id,'rev='.$date);
+ $item->description = $desc;
+ $item->date = date('r',$date);
+ $rss->addItem($item);
+ }
+}
+
+function cleanDesc($desc){
+ //remove TOC
+ $desc = strip_tags($desc);
+ $desc = preg_replace('/[\n\r\t]/',' ',$desc);
+ $desc = preg_replace('/ /',' ',$desc);
+ $desc = substr($desc,0,250);
+ $desc = $desc.'...';
+ return $desc;
+}
+
+?>
diff --git a/images/blank.gif b/images/blank.gif
new file mode 100644
index 000000000..9935f8210
--- /dev/null
+++ b/images/blank.gif
Binary files differ
diff --git a/images/bold.png b/images/bold.png
new file mode 100644
index 000000000..d12c5710e
--- /dev/null
+++ b/images/bold.png
Binary files differ
diff --git a/images/bullet.gif b/images/bullet.gif
new file mode 100644
index 000000000..b43de48a4
--- /dev/null
+++ b/images/bullet.gif
Binary files differ
diff --git a/images/button-cc.gif b/images/button-cc.gif
new file mode 100644
index 000000000..5861d637f
--- /dev/null
+++ b/images/button-cc.gif
Binary files differ
diff --git a/images/button-css.png b/images/button-css.png
new file mode 100644
index 000000000..706325e1c
--- /dev/null
+++ b/images/button-css.png
Binary files differ
diff --git a/images/button-donate.gif b/images/button-donate.gif
new file mode 100644
index 000000000..ec682c6b1
--- /dev/null
+++ b/images/button-donate.gif
Binary files differ
diff --git a/images/button-dw.png b/images/button-dw.png
new file mode 100644
index 000000000..2a71bd04c
--- /dev/null
+++ b/images/button-dw.png
Binary files differ
diff --git a/images/button-php.gif b/images/button-php.gif
new file mode 100644
index 000000000..28f329aaa
--- /dev/null
+++ b/images/button-php.gif
Binary files differ
diff --git a/images/button-rss.png b/images/button-rss.png
new file mode 100644
index 000000000..b036f7152
--- /dev/null
+++ b/images/button-rss.png
Binary files differ
diff --git a/images/button-xhtml.png b/images/button-xhtml.png
new file mode 100644
index 000000000..ec686442c
--- /dev/null
+++ b/images/button-xhtml.png
Binary files differ
diff --git a/images/code.png b/images/code.png
new file mode 100644
index 000000000..8f74d8101
--- /dev/null
+++ b/images/code.png
Binary files differ
diff --git a/images/empty.png b/images/empty.png
new file mode 100644
index 000000000..e606cfd07
--- /dev/null
+++ b/images/empty.png
Binary files differ
diff --git a/images/error.png b/images/error.png
new file mode 100644
index 000000000..ad2ca6ee2
--- /dev/null
+++ b/images/error.png
Binary files differ
diff --git a/images/extlink.png b/images/extlink.png
new file mode 100644
index 000000000..22971725c
--- /dev/null
+++ b/images/extlink.png
Binary files differ
diff --git a/images/favicon.ico b/images/favicon.ico
new file mode 100644
index 000000000..131f7a114
--- /dev/null
+++ b/images/favicon.ico
Binary files differ
diff --git a/images/fonth1.png b/images/fonth1.png
new file mode 100644
index 000000000..13d52b979
--- /dev/null
+++ b/images/fonth1.png
Binary files differ
diff --git a/images/fonth2.png b/images/fonth2.png
new file mode 100644
index 000000000..8e39a14de
--- /dev/null
+++ b/images/fonth2.png
Binary files differ
diff --git a/images/fonth3.png b/images/fonth3.png
new file mode 100644
index 000000000..80fd308e7
--- /dev/null
+++ b/images/fonth3.png
Binary files differ
diff --git a/images/fonth4.png b/images/fonth4.png
new file mode 100644
index 000000000..e3a333535
--- /dev/null
+++ b/images/fonth4.png
Binary files differ
diff --git a/images/fonth5.png b/images/fonth5.png
new file mode 100644
index 000000000..e9fc8bb56
--- /dev/null
+++ b/images/fonth5.png
Binary files differ
diff --git a/images/image.png b/images/image.png
new file mode 100644
index 000000000..f64493125
--- /dev/null
+++ b/images/image.png
Binary files differ
diff --git a/images/info.png b/images/info.png
new file mode 100644
index 000000000..ee5f3f5ad
--- /dev/null
+++ b/images/info.png
Binary files differ
diff --git a/images/interwiki.png b/images/interwiki.png
new file mode 100644
index 000000000..b7f95234a
--- /dev/null
+++ b/images/interwiki.png
Binary files differ
diff --git a/images/italic.png b/images/italic.png
new file mode 100644
index 000000000..f4ecd0ddf
--- /dev/null
+++ b/images/italic.png
Binary files differ
diff --git a/images/larger.png b/images/larger.png
new file mode 100644
index 000000000..48c10b6e6
--- /dev/null
+++ b/images/larger.png
Binary files differ
diff --git a/images/link.png b/images/link.png
new file mode 100644
index 000000000..41fddbb28
--- /dev/null
+++ b/images/link.png
Binary files differ
diff --git a/images/link_icon.gif b/images/link_icon.gif
new file mode 100644
index 000000000..815ccb1b1
--- /dev/null
+++ b/images/link_icon.gif
Binary files differ
diff --git a/images/list.png b/images/list.png
new file mode 100644
index 000000000..ffae5cfbf
--- /dev/null
+++ b/images/list.png
Binary files differ
diff --git a/images/list_ul.png b/images/list_ul.png
new file mode 100644
index 000000000..b86bcef7d
--- /dev/null
+++ b/images/list_ul.png
Binary files differ
diff --git a/images/mail_icon.gif b/images/mail_icon.gif
new file mode 100644
index 000000000..50a87a9a0
--- /dev/null
+++ b/images/mail_icon.gif
Binary files differ
diff --git a/images/rule.png b/images/rule.png
new file mode 100644
index 000000000..a432b206e
--- /dev/null
+++ b/images/rule.png
Binary files differ
diff --git a/images/sig.png b/images/sig.png
new file mode 100644
index 000000000..2917048f6
--- /dev/null
+++ b/images/sig.png
Binary files differ
diff --git a/images/smaller.png b/images/smaller.png
new file mode 100644
index 000000000..5eefd3de0
--- /dev/null
+++ b/images/smaller.png
Binary files differ
diff --git a/images/thumbup.gif b/images/thumbup.gif
new file mode 100644
index 000000000..c96d73c71
--- /dev/null
+++ b/images/thumbup.gif
Binary files differ
diff --git a/images/tocdot2.gif b/images/tocdot2.gif
new file mode 100644
index 000000000..3d39c2e73
--- /dev/null
+++ b/images/tocdot2.gif
Binary files differ
diff --git a/images/underline.png b/images/underline.png
new file mode 100644
index 000000000..db07038fd
--- /dev/null
+++ b/images/underline.png
Binary files differ
diff --git a/images/windows.gif b/images/windows.gif
new file mode 100644
index 000000000..4f12acce1
--- /dev/null
+++ b/images/windows.gif
Binary files differ
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php
new file mode 100644
index 000000000..a4af4b193
--- /dev/null
+++ b/inc/DifferenceEngine.php
@@ -0,0 +1,1057 @@
+<?php
+
+// A PHP diff engine for phpwiki. (Taken from phpwiki-1.3.3)
+//
+// Copyright (C) 2000, 2001 Geoffrey T. Dairiki <dairiki@dairiki.org>
+// You may copy this code freely under the conditions of the GPL.
+//
+
+define('USE_ASSERTS', function_exists('assert'));
+
+class _DiffOp {
+ var $type;
+ var $orig;
+ var $closing;
+
+ function reverse() {
+ trigger_error("pure virtual", E_USER_ERROR);
+ }
+
+ function norig() {
+ return $this->orig ? sizeof($this->orig) : 0;
+ }
+
+ function nclosing() {
+ return $this->closing ? sizeof($this->closing) : 0;
+ }
+}
+
+class _DiffOp_Copy extends _DiffOp {
+ var $type = 'copy';
+
+ function _DiffOp_Copy ($orig, $closing = false) {
+ if (!is_array($closing))
+ $closing = $orig;
+ $this->orig = $orig;
+ $this->closing = $closing;
+ }
+
+ function reverse() {
+ return new _DiffOp_Copy($this->closing, $this->orig);
+ }
+}
+
+class _DiffOp_Delete extends _DiffOp {
+ var $type = 'delete';
+
+ function _DiffOp_Delete ($lines) {
+ $this->orig = $lines;
+ $this->closing = false;
+ }
+
+ function reverse() {
+ return new _DiffOp_Add($this->orig);
+ }
+}
+
+class _DiffOp_Add extends _DiffOp {
+ var $type = 'add';
+
+ function _DiffOp_Add ($lines) {
+ $this->closing = $lines;
+ $this->orig = false;
+ }
+
+ function reverse() {
+ return new _DiffOp_Delete($this->closing);
+ }
+}
+
+class _DiffOp_Change extends _DiffOp {
+ var $type = 'change';
+
+ function _DiffOp_Change ($orig, $closing) {
+ $this->orig = $orig;
+ $this->closing = $closing;
+ }
+
+ function reverse() {
+ return new _DiffOp_Change($this->closing, $this->orig);
+ }
+}
+
+
+/**
+ * Class used internally by Diff to actually compute the diffs.
+ *
+ * The algorithm used here is mostly lifted from the perl module
+ * Algorithm::Diff (version 1.06) by Ned Konz, which is available at:
+ * http://www.perl.com/CPAN/authors/id/N/NE/NEDKONZ/Algorithm-Diff-1.06.zip
+ *
+ * More ideas are taken from:
+ * http://www.ics.uci.edu/~eppstein/161/960229.html
+ *
+ * Some ideas are (and a bit of code) are from from analyze.c, from GNU
+ * diffutils-2.7, which can be found at:
+ * ftp://gnudist.gnu.org/pub/gnu/diffutils/diffutils-2.7.tar.gz
+ *
+ * closingly, some ideas (subdivision by NCHUNKS > 2, and some optimizations)
+ * are my own.
+ *
+ * @author Geoffrey T. Dairiki
+ * @access private
+ */
+class _DiffEngine
+{
+ function diff ($from_lines, $to_lines) {
+ $n_from = sizeof($from_lines);
+ $n_to = sizeof($to_lines);
+
+ $this->xchanged = $this->ychanged = array();
+ $this->xv = $this->yv = array();
+ $this->xind = $this->yind = array();
+ unset($this->seq);
+ unset($this->in_seq);
+ unset($this->lcs);
+
+ // Skip leading common lines.
+ for ($skip = 0; $skip < $n_from && $skip < $n_to; $skip++) {
+ if ($from_lines[$skip] != $to_lines[$skip])
+ break;
+ $this->xchanged[$skip] = $this->ychanged[$skip] = false;
+ }
+ // Skip trailing common lines.
+ $xi = $n_from; $yi = $n_to;
+ for ($endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++) {
+ if ($from_lines[$xi] != $to_lines[$yi])
+ break;
+ $this->xchanged[$xi] = $this->ychanged[$yi] = false;
+ }
+
+ // Ignore lines which do not exist in both files.
+ for ($xi = $skip; $xi < $n_from - $endskip; $xi++)
+ $xhash[$from_lines[$xi]] = 1;
+ for ($yi = $skip; $yi < $n_to - $endskip; $yi++) {
+ $line = $to_lines[$yi];
+ if ( ($this->ychanged[$yi] = empty($xhash[$line])) )
+ continue;
+ $yhash[$line] = 1;
+ $this->yv[] = $line;
+ $this->yind[] = $yi;
+ }
+ for ($xi = $skip; $xi < $n_from - $endskip; $xi++) {
+ $line = $from_lines[$xi];
+ if ( ($this->xchanged[$xi] = empty($yhash[$line])) )
+ continue;
+ $this->xv[] = $line;
+ $this->xind[] = $xi;
+ }
+
+ // Find the LCS.
+ $this->_compareseq(0, sizeof($this->xv), 0, sizeof($this->yv));
+
+ // Merge edits when possible
+ $this->_shift_boundaries($from_lines, $this->xchanged, $this->ychanged);
+ $this->_shift_boundaries($to_lines, $this->ychanged, $this->xchanged);
+
+ // Compute the edit operations.
+ $edits = array();
+ $xi = $yi = 0;
+ while ($xi < $n_from || $yi < $n_to) {
+ USE_ASSERTS && assert($yi < $n_to || $this->xchanged[$xi]);
+ USE_ASSERTS && assert($xi < $n_from || $this->ychanged[$yi]);
+
+ // Skip matching "snake".
+ $copy = array();
+ while ( $xi < $n_from && $yi < $n_to
+ && !$this->xchanged[$xi] && !$this->ychanged[$yi]) {
+ $copy[] = $from_lines[$xi++];
+ ++$yi;
+ }
+ if ($copy)
+ $edits[] = new _DiffOp_Copy($copy);
+
+ // Find deletes & adds.
+ $delete = array();
+ while ($xi < $n_from && $this->xchanged[$xi])
+ $delete[] = $from_lines[$xi++];
+
+ $add = array();
+ while ($yi < $n_to && $this->ychanged[$yi])
+ $add[] = $to_lines[$yi++];
+
+ if ($delete && $add)
+ $edits[] = new _DiffOp_Change($delete, $add);
+ elseif ($delete)
+ $edits[] = new _DiffOp_Delete($delete);
+ elseif ($add)
+ $edits[] = new _DiffOp_Add($add);
+ }
+ return $edits;
+ }
+
+
+ /* Divide the Largest Common Subsequence (LCS) of the sequences
+ * [XOFF, XLIM) and [YOFF, YLIM) into NCHUNKS approximately equally
+ * sized segments.
+ *
+ * Returns (LCS, PTS). LCS is the length of the LCS. PTS is an
+ * array of NCHUNKS+1 (X, Y) indexes giving the diving points between
+ * sub sequences. The first sub-sequence is contained in [X0, X1),
+ * [Y0, Y1), the second in [X1, X2), [Y1, Y2) and so on. Note
+ * that (X0, Y0) == (XOFF, YOFF) and
+ * (X[NCHUNKS], Y[NCHUNKS]) == (XLIM, YLIM).
+ *
+ * This function assumes that the first lines of the specified portions
+ * of the two files do not match, and likewise that the last lines do not
+ * match. The caller must trim matching lines from the beginning and end
+ * of the portions it is going to specify.
+ */
+ function _diag ($xoff, $xlim, $yoff, $ylim, $nchunks) {
+ $flip = false;
+
+ if ($xlim - $xoff > $ylim - $yoff) {
+ // Things seems faster (I'm not sure I understand why)
+ // when the shortest sequence in X.
+ $flip = true;
+ list ($xoff, $xlim, $yoff, $ylim)
+ = array( $yoff, $ylim, $xoff, $xlim);
+ }
+
+ if ($flip)
+ for ($i = $ylim - 1; $i >= $yoff; $i--)
+ $ymatches[$this->xv[$i]][] = $i;
+ else
+ for ($i = $ylim - 1; $i >= $yoff; $i--)
+ $ymatches[$this->yv[$i]][] = $i;
+
+ $this->lcs = 0;
+ $this->seq[0]= $yoff - 1;
+ $this->in_seq = array();
+ $ymids[0] = array();
+
+ $numer = $xlim - $xoff + $nchunks - 1;
+ $x = $xoff;
+ for ($chunk = 0; $chunk < $nchunks; $chunk++) {
+ if ($chunk > 0)
+ for ($i = 0; $i <= $this->lcs; $i++)
+ $ymids[$i][$chunk-1] = $this->seq[$i];
+
+ $x1 = $xoff + (int)(($numer + ($xlim-$xoff)*$chunk) / $nchunks);
+ for ( ; $x < $x1; $x++) {
+ $line = $flip ? $this->yv[$x] : $this->xv[$x];
+ if (empty($ymatches[$line]))
+ continue;
+ $matches = $ymatches[$line];
+ reset($matches);
+ while (list ($junk, $y) = each($matches))
+ if (empty($this->in_seq[$y])) {
+ $k = $this->_lcs_pos($y);
+ USE_ASSERTS && assert($k > 0);
+ $ymids[$k] = $ymids[$k-1];
+ break;
+ }
+ while (list ($junk, $y) = each($matches)) {
+ if ($y > $this->seq[$k-1]) {
+ USE_ASSERTS && assert($y < $this->seq[$k]);
+ // Optimization: this is a common case:
+ // next match is just replacing previous match.
+ $this->in_seq[$this->seq[$k]] = false;
+ $this->seq[$k] = $y;
+ $this->in_seq[$y] = 1;
+ }
+ else if (empty($this->in_seq[$y])) {
+ $k = $this->_lcs_pos($y);
+ USE_ASSERTS && assert($k > 0);
+ $ymids[$k] = $ymids[$k-1];
+ }
+ }
+ }
+ }
+
+ $seps[] = $flip ? array($yoff, $xoff) : array($xoff, $yoff);
+ $ymid = $ymids[$this->lcs];
+ for ($n = 0; $n < $nchunks - 1; $n++) {
+ $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $n) / $nchunks);
+ $y1 = $ymid[$n] + 1;
+ $seps[] = $flip ? array($y1, $x1) : array($x1, $y1);
+ }
+ $seps[] = $flip ? array($ylim, $xlim) : array($xlim, $ylim);
+
+ return array($this->lcs, $seps);
+ }
+
+ function _lcs_pos ($ypos) {
+ $end = $this->lcs;
+ if ($end == 0 || $ypos > $this->seq[$end]) {
+ $this->seq[++$this->lcs] = $ypos;
+ $this->in_seq[$ypos] = 1;
+ return $this->lcs;
+ }
+
+ $beg = 1;
+ while ($beg < $end) {
+ $mid = (int)(($beg + $end) / 2);
+ if ( $ypos > $this->seq[$mid] )
+ $beg = $mid + 1;
+ else
+ $end = $mid;
+ }
+
+ USE_ASSERTS && assert($ypos != $this->seq[$end]);
+
+ $this->in_seq[$this->seq[$end]] = false;
+ $this->seq[$end] = $ypos;
+ $this->in_seq[$ypos] = 1;
+ return $end;
+ }
+
+ /* Find LCS of two sequences.
+ *
+ * The results are recorded in the vectors $this->{x,y}changed[], by
+ * storing a 1 in the element for each line that is an insertion
+ * or deletion (ie. is not in the LCS).
+ *
+ * The subsequence of file 0 is [XOFF, XLIM) and likewise for file 1.
+ *
+ * Note that XLIM, YLIM are exclusive bounds.
+ * All line numbers are origin-0 and discarded lines are not counted.
+ */
+ function _compareseq ($xoff, $xlim, $yoff, $ylim) {
+ // Slide down the bottom initial diagonal.
+ while ($xoff < $xlim && $yoff < $ylim
+ && $this->xv[$xoff] == $this->yv[$yoff]) {
+ ++$xoff;
+ ++$yoff;
+ }
+
+ // Slide up the top initial diagonal.
+ while ($xlim > $xoff && $ylim > $yoff
+ && $this->xv[$xlim - 1] == $this->yv[$ylim - 1]) {
+ --$xlim;
+ --$ylim;
+ }
+
+ if ($xoff == $xlim || $yoff == $ylim)
+ $lcs = 0;
+ else {
+ // This is ad hoc but seems to work well.
+ //$nchunks = sqrt(min($xlim - $xoff, $ylim - $yoff) / 2.5);
+ //$nchunks = max(2,min(8,(int)$nchunks));
+ $nchunks = min(7, $xlim - $xoff, $ylim - $yoff) + 1;
+ list ($lcs, $seps)
+ = $this->_diag($xoff,$xlim,$yoff, $ylim,$nchunks);
+ }
+
+ if ($lcs == 0) {
+ // X and Y sequences have no common subsequence:
+ // mark all changed.
+ while ($yoff < $ylim)
+ $this->ychanged[$this->yind[$yoff++]] = 1;
+ while ($xoff < $xlim)
+ $this->xchanged[$this->xind[$xoff++]] = 1;
+ }
+ else {
+ // Use the partitions to split this problem into subproblems.
+ reset($seps);
+ $pt1 = $seps[0];
+ while ($pt2 = next($seps)) {
+ $this->_compareseq ($pt1[0], $pt2[0], $pt1[1], $pt2[1]);
+ $pt1 = $pt2;
+ }
+ }
+ }
+
+ /* Adjust inserts/deletes of identical lines to join changes
+ * as much as possible.
+ *
+ * We do something when a run of changed lines include a
+ * line at one end and has an excluded, identical line at the other.
+ * We are free to choose which identical line is included.
+ * `compareseq' usually chooses the one at the beginning,
+ * but usually it is cleaner to consider the following identical line
+ * to be the "change".
+ *
+ * This is extracted verbatim from analyze.c (GNU diffutils-2.7).
+ */
+ function _shift_boundaries ($lines, &$changed, $other_changed) {
+ $i = 0;
+ $j = 0;
+
+ USE_ASSERTS && assert('sizeof($lines) == sizeof($changed)');
+ $len = sizeof($lines);
+ $other_len = sizeof($other_changed);
+
+ while (1) {
+ /*
+ * Scan forwards to find beginning of another run of changes.
+ * Also keep track of the corresponding point in the other file.
+ *
+ * Throughout this code, $i and $j are adjusted together so that
+ * the first $i elements of $changed and the first $j elements
+ * of $other_changed both contain the same number of zeros
+ * (unchanged lines).
+ * Furthermore, $j is always kept so that $j == $other_len or
+ * $other_changed[$j] == false.
+ */
+ while ($j < $other_len && $other_changed[$j])
+ $j++;
+
+ while ($i < $len && ! $changed[$i]) {
+ USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]');
+ $i++; $j++;
+ while ($j < $other_len && $other_changed[$j])
+ $j++;
+ }
+
+ if ($i == $len)
+ break;
+
+ $start = $i;
+
+ // Find the end of this run of changes.
+ while (++$i < $len && $changed[$i])
+ continue;
+
+ do {
+ /*
+ * Record the length of this run of changes, so that
+ * we can later determine whether the run has grown.
+ */
+ $runlength = $i - $start;
+
+ /*
+ * Move the changed region back, so long as the
+ * previous unchanged line matches the last changed one.
+ * This merges with previous changed regions.
+ */
+ while ($start > 0 && $lines[$start - 1] == $lines[$i - 1]) {
+ $changed[--$start] = 1;
+ $changed[--$i] = false;
+ while ($start > 0 && $changed[$start - 1])
+ $start--;
+ USE_ASSERTS && assert('$j > 0');
+ while ($other_changed[--$j])
+ continue;
+ USE_ASSERTS && assert('$j >= 0 && !$other_changed[$j]');
+ }
+
+ /*
+ * Set CORRESPONDING to the end of the changed run, at the last
+ * point where it corresponds to a changed run in the other file.
+ * CORRESPONDING == LEN means no such point has been found.
+ */
+ $corresponding = $j < $other_len ? $i : $len;
+
+ /*
+ * Move the changed region forward, so long as the
+ * first changed line matches the following unchanged one.
+ * This merges with following changed regions.
+ * Do this second, so that if there are no merges,
+ * the changed region is moved forward as far as possible.
+ */
+ while ($i < $len && $lines[$start] == $lines[$i]) {
+ $changed[$start++] = false;
+ $changed[$i++] = 1;
+ while ($i < $len && $changed[$i])
+ $i++;
+
+ USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]');
+ $j++;
+ if ($j < $other_len && $other_changed[$j]) {
+ $corresponding = $i;
+ while ($j < $other_len && $other_changed[$j])
+ $j++;
+ }
+ }
+ } while ($runlength != $i - $start);
+
+ /*
+ * If possible, move the fully-merged run of changes
+ * back to a corresponding run in the other file.
+ */
+ while ($corresponding < $i) {
+ $changed[--$start] = 1;
+ $changed[--$i] = 0;
+ USE_ASSERTS && assert('$j > 0');
+ while ($other_changed[--$j])
+ continue;
+ USE_ASSERTS && assert('$j >= 0 && !$other_changed[$j]');
+ }
+ }
+ }
+}
+
+/**
+ * Class representing a 'diff' between two sequences of strings.
+ */
+class Diff
+{
+ var $edits;
+
+ /**
+ * Constructor.
+ * Computes diff between sequences of strings.
+ *
+ * @param $from_lines array An array of strings.
+ * (Typically these are lines from a file.)
+ * @param $to_lines array An array of strings.
+ */
+ function Diff($from_lines, $to_lines) {
+ $eng = new _DiffEngine;
+ $this->edits = $eng->diff($from_lines, $to_lines);
+ //$this->_check($from_lines, $to_lines);
+ }
+
+ /**
+ * Compute reversed Diff.
+ *
+ * SYNOPSIS:
+ *
+ * $diff = new Diff($lines1, $lines2);
+ * $rev = $diff->reverse();
+ * @return object A Diff object representing the inverse of the
+ * original diff.
+ */
+ function reverse () {
+ $rev = $this;
+ $rev->edits = array();
+ foreach ($this->edits as $edit) {
+ $rev->edits[] = $edit->reverse();
+ }
+ return $rev;
+ }
+
+ /**
+ * Check for empty diff.
+ *
+ * @return bool True iff two sequences were identical.
+ */
+ function isEmpty () {
+ foreach ($this->edits as $edit) {
+ if ($edit->type != 'copy')
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Compute the length of the Longest Common Subsequence (LCS).
+ *
+ * This is mostly for diagnostic purposed.
+ *
+ * @return int The length of the LCS.
+ */
+ function lcs () {
+ $lcs = 0;
+ foreach ($this->edits as $edit) {
+ if ($edit->type == 'copy')
+ $lcs += sizeof($edit->orig);
+ }
+ return $lcs;
+ }
+
+ /**
+ * Get the original set of lines.
+ *
+ * This reconstructs the $from_lines parameter passed to the
+ * constructor.
+ *
+ * @return array The original sequence of strings.
+ */
+ function orig() {
+ $lines = array();
+
+ foreach ($this->edits as $edit) {
+ if ($edit->orig)
+ array_splice($lines, sizeof($lines), 0, $edit->orig);
+ }
+ return $lines;
+ }
+
+ /**
+ * Get the closing set of lines.
+ *
+ * This reconstructs the $to_lines parameter passed to the
+ * constructor.
+ *
+ * @return array The sequence of strings.
+ */
+ function closing() {
+ $lines = array();
+
+ foreach ($this->edits as $edit) {
+ if ($edit->closing)
+ array_splice($lines, sizeof($lines), 0, $edit->closing);
+ }
+ return $lines;
+ }
+
+ /**
+ * Check a Diff for validity.
+ *
+ * This is here only for debugging purposes.
+ */
+ function _check ($from_lines, $to_lines) {
+ if (serialize($from_lines) != serialize($this->orig()))
+ trigger_error("Reconstructed original doesn't match", E_USER_ERROR);
+ if (serialize($to_lines) != serialize($this->closing()))
+ trigger_error("Reconstructed closing doesn't match", E_USER_ERROR);
+
+ $rev = $this->reverse();
+ if (serialize($to_lines) != serialize($rev->orig()))
+ trigger_error("Reversed original doesn't match", E_USER_ERROR);
+ if (serialize($from_lines) != serialize($rev->closing()))
+ trigger_error("Reversed closing doesn't match", E_USER_ERROR);
+
+
+ $prevtype = 'none';
+ foreach ($this->edits as $edit) {
+ if ( $prevtype == $edit->type )
+ trigger_error("Edit sequence is non-optimal", E_USER_ERROR);
+ $prevtype = $edit->type;
+ }
+
+ $lcs = $this->lcs();
+ trigger_error("Diff okay: LCS = $lcs", E_USER_NOTICE);
+ }
+}
+
+/**
+ * FIXME: bad name.
+ */
+class MappedDiff
+extends Diff
+{
+ /**
+ * Constructor.
+ *
+ * Computes diff between sequences of strings.
+ *
+ * This can be used to compute things like
+ * case-insensitve diffs, or diffs which ignore
+ * changes in white-space.
+ *
+ * @param $from_lines array An array of strings.
+ * (Typically these are lines from a file.)
+ *
+ * @param $to_lines array An array of strings.
+ *
+ * @param $mapped_from_lines array This array should
+ * have the same size number of elements as $from_lines.
+ * The elements in $mapped_from_lines and
+ * $mapped_to_lines are what is actually compared
+ * when computing the diff.
+ *
+ * @param $mapped_to_lines array This array should
+ * have the same number of elements as $to_lines.
+ */
+ function MappedDiff($from_lines, $to_lines,
+ $mapped_from_lines, $mapped_to_lines) {
+
+ assert(sizeof($from_lines) == sizeof($mapped_from_lines));
+ assert(sizeof($to_lines) == sizeof($mapped_to_lines));
+
+ $this->Diff($mapped_from_lines, $mapped_to_lines);
+
+ $xi = $yi = 0;
+ for ($i = 0; $i < sizeof($this->edits); $i++) {
+ $orig = &$this->edits[$i]->orig;
+ if (is_array($orig)) {
+ $orig = array_slice($from_lines, $xi, sizeof($orig));
+ $xi += sizeof($orig);
+ }
+
+ $closing = &$this->edits[$i]->closing;
+ if (is_array($closing)) {
+ $closing = array_slice($to_lines, $yi, sizeof($closing));
+ $yi += sizeof($closing);
+ }
+ }
+ }
+}
+
+/**
+ * A class to format Diffs
+ *
+ * This class formats the diff in classic diff format.
+ * It is intended that this class be customized via inheritance,
+ * to obtain fancier outputs.
+ */
+class DiffFormatter
+{
+ /**
+ * Number of leading context "lines" to preserve.
+ *
+ * This should be left at zero for this class, but subclasses
+ * may want to set this to other values.
+ */
+ var $leading_context_lines = 0;
+
+ /**
+ * Number of trailing context "lines" to preserve.
+ *
+ * This should be left at zero for this class, but subclasses
+ * may want to set this to other values.
+ */
+ var $trailing_context_lines = 0;
+
+ /**
+ * Format a diff.
+ *
+ * @param $diff object A Diff object.
+ * @return string The formatted output.
+ */
+ function format($diff) {
+
+ $xi = $yi = 1;
+ $block = false;
+ $context = array();
+
+ $nlead = $this->leading_context_lines;
+ $ntrail = $this->trailing_context_lines;
+
+ $this->_start_diff();
+
+ foreach ($diff->edits as $edit) {
+ if ($edit->type == 'copy') {
+ if (is_array($block)) {
+ if (sizeof($edit->orig) <= $nlead + $ntrail) {
+ $block[] = $edit;
+ }
+ else{
+ if ($ntrail) {
+ $context = array_slice($edit->orig, 0, $ntrail);
+ $block[] = new _DiffOp_Copy($context);
+ }
+ $this->_block($x0, $ntrail + $xi - $x0,
+ $y0, $ntrail + $yi - $y0,
+ $block);
+ $block = false;
+ }
+ }
+ $context = $edit->orig;
+ }
+ else {
+ if (! is_array($block)) {
+ $context = array_slice($context, sizeof($context) - $nlead);
+ $x0 = $xi - sizeof($context);
+ $y0 = $yi - sizeof($context);
+ $block = array();
+ if ($context)
+ $block[] = new _DiffOp_Copy($context);
+ }
+ $block[] = $edit;
+ }
+
+ if ($edit->orig)
+ $xi += sizeof($edit->orig);
+ if ($edit->closing)
+ $yi += sizeof($edit->closing);
+ }
+
+ if (is_array($block))
+ $this->_block($x0, $xi - $x0,
+ $y0, $yi - $y0,
+ $block);
+
+ return $this->_end_diff();
+ }
+
+ function _block($xbeg, $xlen, $ybeg, $ylen, &$edits) {
+ $this->_start_block($this->_block_header($xbeg, $xlen, $ybeg, $ylen));
+ foreach ($edits as $edit) {
+ if ($edit->type == 'copy')
+ $this->_context($edit->orig);
+ elseif ($edit->type == 'add')
+ $this->_added($edit->closing);
+ elseif ($edit->type == 'delete')
+ $this->_deleted($edit->orig);
+ elseif ($edit->type == 'change')
+ $this->_changed($edit->orig, $edit->closing);
+ else
+ trigger_error("Unknown edit type", E_USER_ERROR);
+ }
+ $this->_end_block();
+ }
+
+ function _start_diff() {
+ ob_start();
+ }
+
+ function _end_diff() {
+ $val = ob_get_contents();
+ ob_end_clean();
+ return $val;
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen) {
+ if ($xlen > 1)
+ $xbeg .= "," . ($xbeg + $xlen - 1);
+ if ($ylen > 1)
+ $ybeg .= "," . ($ybeg + $ylen - 1);
+
+ return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg;
+ }
+
+ function _start_block($header) {
+ echo $header;
+ }
+
+ function _end_block() {
+ }
+
+ function _lines($lines, $prefix = ' ') {
+ foreach ($lines as $line)
+ echo "$prefix $line\n";
+ }
+
+ function _context($lines) {
+ $this->_lines($lines);
+ }
+
+ function _added($lines) {
+ $this->_lines($lines, ">");
+ }
+ function _deleted($lines) {
+ $this->_lines($lines, "<");
+ }
+
+ function _changed($orig, $closing) {
+ $this->_deleted($orig);
+ echo "---\n";
+ $this->_added($closing);
+ }
+}
+
+
+/**
+ * Additions by Axel Boldt follow, partly taken from diff.php, phpwiki-1.3.3
+ *
+ */
+
+define('NBSP', "\xA0"); // iso-8859-x non-breaking space.
+
+class _HWLDF_WordAccumulator {
+ function _HWLDF_WordAccumulator () {
+ $this->_lines = array();
+ $this->_line = '';
+ $this->_group = '';
+ $this->_tag = '';
+ }
+
+ function _flushGroup ($new_tag) {
+ if ($this->_group !== '') {
+ if ($this->_tag == 'mark')
+ $this->_line .= '<span class="diffchange">'.$this->_group.'</span>';
+ else
+ $this->_line .= $this->_group;
+ }
+ $this->_group = '';
+ $this->_tag = $new_tag;
+ }
+
+ function _flushLine ($new_tag) {
+ $this->_flushGroup($new_tag);
+ if ($this->_line != '')
+ $this->_lines[] = $this->_line;
+ $this->_line = '';
+ }
+
+ function addWords ($words, $tag = '') {
+ if ($tag != $this->_tag)
+ $this->_flushGroup($tag);
+
+ foreach ($words as $word) {
+ // new-line should only come as first char of word.
+ if ($word == '')
+ continue;
+ if ($word[0] == "\n") {
+ $this->_group .= NBSP;
+ $this->_flushLine($tag);
+ $word = substr($word, 1);
+ }
+ assert(!strstr($word, "\n"));
+ $this->_group .= $word;
+ }
+ }
+
+ function getLines() {
+ $this->_flushLine('~done');
+ return $this->_lines;
+ }
+}
+
+class WordLevelDiff extends MappedDiff
+{
+ function WordLevelDiff ($orig_lines, $closing_lines) {
+ list ($orig_words, $orig_stripped) = $this->_split($orig_lines);
+ list ($closing_words, $closing_stripped) = $this->_split($closing_lines);
+
+
+ $this->MappedDiff($orig_words, $closing_words,
+ $orig_stripped, $closing_stripped);
+ }
+
+ function _split($lines) {
+ // FIXME: fix POSIX char class.
+# if (!preg_match_all('/ ( [^\S\n]+ | [[:alnum:]]+ | . ) (?: (?!< \n) [^\S\n])? /xs',
+ if (!preg_match_all('/ ( [^\S\n]+ | [0-9_A-Za-z\x80-\xff]+ | . ) (?: (?!< \n) [^\S\n])? /xs',
+ implode("\n", $lines),
+ $m)) {
+ return array(array(''), array(''));
+ }
+ return array($m[0], $m[1]);
+ }
+
+ function orig () {
+ $orig = new _HWLDF_WordAccumulator;
+
+ foreach ($this->edits as $edit) {
+ if ($edit->type == 'copy')
+ $orig->addWords($edit->orig);
+ elseif ($edit->orig)
+ $orig->addWords($edit->orig, 'mark');
+ }
+ return $orig->getLines();
+ }
+
+ function closing () {
+ $closing = new _HWLDF_WordAccumulator;
+
+ foreach ($this->edits as $edit) {
+ if ($edit->type == 'copy')
+ $closing->addWords($edit->closing);
+ elseif ($edit->closing)
+ $closing->addWords($edit->closing, 'mark');
+ }
+ return $closing->getLines();
+ }
+}
+
+/**
+ * "Unified" diff formatter.
+ *
+ * This class formats the diff in classic "unified diff" format.
+ */
+class UnifiedDiffFormatter extends DiffFormatter
+{
+ function UnifiedDiffFormatter($context_lines = 4) {
+ $this->leading_context_lines = $context_lines;
+ $this->trailing_context_lines = $context_lines;
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen) {
+ if ($xlen != 1)
+ $xbeg .= "," . $xlen;
+ if ($ylen != 1)
+ $ybeg .= "," . $ylen;
+ return "@@ -$xbeg +$ybeg @@\n";
+ }
+
+ function _added($lines) {
+ $this->_lines($lines, "+");
+ }
+ function _deleted($lines) {
+ $this->_lines($lines, "-");
+ }
+ function _changed($orig, $final) {
+ $this->_deleted($orig);
+ $this->_added($final);
+ }
+}
+
+/**
+ * Wikipedia Table style diff formatter.
+ *
+ */
+class TableDiffFormatter extends DiffFormatter
+{
+ function TableDiffFormatter() {
+ $this->leading_context_lines = 2;
+ $this->trailing_context_lines = 2;
+ }
+
+ function _pre($text){
+ $text = htmlspecialchars($text);
+ $text = str_replace(' ',' &nbsp;',$text);
+ return $text;
+ }
+
+ function _block_header( $xbeg, $xlen, $ybeg, $ylen ) {
+ global $lang;
+ $l1 = $lang['line'].' '.$xbeg;
+ $l2 = $lang['line'].' '.$ybeg;
+ $r = '<tr><td class="diff-blockheader" colspan="2">'.$l1.":</td>\n" .
+ '<td class="diff-blockheader" colspan="2">'.$l2.":</td></tr>\n";
+ return $r;
+ }
+
+ function _start_block( $header ) {
+ print( $header );
+ }
+
+ function _end_block() {
+ }
+
+ function _lines( $lines, $prefix=' ', $color="white" ) {
+ }
+
+ function addedLine( $line ) {
+ $line = str_replace(' ','&nbsp; ',$line);
+ return '<td>+</td><td class="diff-addedline">' .
+ $line.'</td>';
+ }
+
+ function deletedLine( $line ) {
+ $line = str_replace(' ','&nbsp; ',$line);
+ return '<td>-</td><td class="diff-deletedline">' .
+ $line.'</td>';
+ }
+
+ function emptyLine() {
+ $line = str_replace(' ','&nbsp; ',$line);
+ return '<td colspan="2">&nbsp;</td>';
+ }
+
+ function contextLine( $line ) {
+ $line = str_replace(' ','&nbsp; ',$line);
+ return '<td> </td><td class="diff-context">'.$line.'</td>';
+ }
+
+ function _added($lines) {
+ foreach ($lines as $line) {
+ print( '<tr>' . $this->emptyLine() .
+ $this->addedLine( $line ) . "</tr>\n" );
+ }
+ }
+
+ function _deleted($lines) {
+ foreach ($lines as $line) {
+ print( '<tr>' . $this->deletedLine( $line ) .
+ $this->emptyLine() . "</tr>\n" );
+ }
+ }
+
+ function _context( $lines ) {
+ foreach ($lines as $line) {
+ print( '<tr>' . $this->contextLine( $line ) .
+ $this->contextLine( $line ) . "</tr>\n" );
+ }
+ }
+
+ function _changed( $orig, $closing ) {
+ $diff = new WordLevelDiff( $orig, $closing );
+ $del = $diff->orig();
+ $add = $diff->closing();
+
+ while ( $line = array_shift( $del ) ) {
+ $aline = array_shift( $add );
+ print( '<tr>' . $this->deletedLine( $line ) .
+ $this->addedLine( $aline ) . "</tr>\n" );
+ }
+ $this->_added( $add ); # If any leftovers
+ }
+}
+
+?>
diff --git a/inc/auth.php b/inc/auth.php
new file mode 100644
index 000000000..825ecb9d2
--- /dev/null
+++ b/inc/auth.php
@@ -0,0 +1,290 @@
+<?
+require_once("inc/common.php");
+require_once("inc/io.php");
+# load the the auth functions
+require_once('inc/auth_'.$conf['authtype'].'.php');
+
+# some ACL level defines
+define('AUTH_NONE',0);
+define('AUTH_READ',1);
+define('AUTH_EDIT',2);
+define('AUTH_CREATE',4);
+define('AUTH_UPLOAD',8);
+define('AUTH_GRANT',255);
+
+if($conf['useacl']){
+ auth_login($_REQUEST['u'],$_REQUEST['p']);
+ # load ACL into a global array
+ $AUTH_ACL = file('conf/acl.auth');
+}
+
+/**
+ * This tries to login the user based on the sent auth credentials
+ *
+ * The authentication works like this: if a username was given
+ * a new login is assumed and user/password are checked - if they
+ * are correct a random authtoken is created which is stored in
+ * the session _and_ in a cookie.
+ * The user stays logged in as long as the session and the cookie
+ * match. This still isn't the securest method but requires an
+ * attacker to steal an existing session _and_ the authtoken
+ * cookie. The actual password is only transfered once per login.
+ *
+ * On a successful login $_SERVER[REMOTE_USER] and $USERINFO
+ * are set.
+*/
+function auth_login($user,$pass){
+ global $USERINFO;
+ global $conf;
+ global $lang;
+ $cookie = $_COOKIE['AUTHTOKEN'];
+ $session = $_SESSION[$conf['title']]['authtoken'];
+
+ if(isset($user)){
+ if (auth_checkPass($user,$pass)){
+ //make username available as REMOTE_USER
+ $_SERVER['REMOTE_USER'] = $user;
+ //set global user info
+ $USERINFO = auth_getUserData($user);
+ //set authtoken
+ $token = md5(uniqid(rand(), true));
+ $_SESSION[$conf['title']]['user'] = $user;
+ $_SESSION[$conf['title']]['authtoken'] = $token;
+ setcookie('AUTHTOKEN', $token);
+ }else{
+ //invalid credentials - log off
+ msg($lang['badlogin'],-1);
+ auth_logoff();
+ }
+ }elseif(isset($cookie) && isset($session)){
+ if($cookie == $session){
+ //make username available as REMOTE_USER
+ $_SERVER['REMOTE_USER'] = $_SESSION[$conf['title']]['user'];
+ //set global user info
+ $USERINFO = auth_getUserData($_SERVER['REMOTE_USER']);
+ }else{
+ //bad token
+ auth_logoff();
+ }
+ }else{
+ //just to be sure
+ auth_logoff();
+ }
+}
+
+/**
+ * This clears all authenticationdata and thus log the user
+ * off
+ */
+function auth_logoff(){
+ global $conf;
+ global $USERINFO;
+ unset($_SESSION[$conf['title']]['authtoken']);
+ unset($_SESSION[$conf['title']]['user']);
+ unset($_SERVER['REMOTE_USER']);
+ $USERINFO=null;
+}
+
+/**
+ * Convinience function for auth_aclcheck
+ */
+function auth_quickaclcheck($id){
+ global $conf;
+ global $USERINFO;
+ # if no ACL is used always return upload rights
+ if(!$conf['useacl']) return AUTH_UPLOAD;
+ return auth_aclcheck($id,$_SERVER['REMOTE_USER'],$USERINFO['grps']);
+}
+
+/**
+ * Returns the maximum rights a user has for
+ * the given ID or its namespace
+ */
+function auth_aclcheck($id,$user,$groups){
+ global $conf;
+ global $AUTH_ACL;
+
+ # if no ACL is used always return upload rights
+ if(!$conf['useacl']) return AUTH_UPLOAD;
+
+ $ns = getNS($id);
+ $perm = -1;
+
+ if($user){
+ //prepend groups with @
+ for($i=0; $i<count($groups); $i++){
+ $groups[$i] = '@'.$groups[$i];
+ }
+ //add ALL group
+ $groups[] = '@ALL';
+ //add User
+ $groups[] = $user;
+ //build regexp
+ $regexp = join('|',$groups);
+ }else{
+ $regexp = '@ALL';
+ }
+
+ //check exact match first
+ $matches = preg_grep('/^'.$id.'\s+('.$regexp.')\s+/',$AUTH_ACL);
+ if(count($matches)){
+ foreach($matches as $match){
+ $match = preg_replace('/#.*$/','',$match); //ignore comments
+ $acl = preg_split('/\s+/',$match);
+ if($acl[2] > $perm){
+ $perm = $acl[2];
+ }
+ }
+ if($perm > -1){
+ //we had a match - return it
+ return $perm;
+ }
+ }
+
+ //still here? do the namespace checks
+ if($ns){
+ $path = $ns.':\*';
+ }else{
+ $path = '\*'; //root document
+ }
+
+ do{
+ $matches = preg_grep('/^'.$path.'\s+('.$regexp.')\s+/',$AUTH_ACL);
+ if(count($matches)){
+ foreach($matches as $match){
+ $match = preg_replace('/#.*$/','',$match); //ignore comments
+ $acl = preg_split('/\s+/',$match);
+ if($acl[2] > $perm){
+ $perm = $acl[2];
+ }
+ }
+ //we had a match - return it
+ return $perm;
+ }
+
+ //get next higher namespace
+ $ns = getNS($ns);
+
+ if($path != '\*'){
+ $path = $ns.':\*';
+ if($path == ':\*') $path = '\*';
+ }else{
+ //we did this already
+ //looks like there is something wrong with the ACL
+ //break here
+ return $perm;
+ }
+ }while(1); //this should never loop endless
+}
+
+/**
+ * Create a pronouncable password
+ *
+ * @see: http://www.phpbuilder.com/annotate/message.php3?id=1014451
+ */
+function auth_pwgen(){
+ $pw = '';
+ $c = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones
+ $v = 'aeiou'; //vowels
+ $a = $c.$v; //both
+
+ //use two syllables...
+ for($i=0;$i < 2; $i++){
+ $pw .= $c[rand(0, strlen($c)-1)];
+ $pw .= $v[rand(0, strlen($v)-1)];
+ $pw .= $a[rand(0, strlen($a)-1)];
+ }
+ //... and add a nice number
+ $pw .= rand(10,99);
+
+ return $pw;
+}
+
+/**
+ * Sends a password to the given user
+ *
+ * returns true on success
+ */
+function auth_sendPassword($user,$password){
+ global $conf;
+ global $lang;
+ $users = auth_loadUserData();
+ $hdrs = '';
+
+ if(!$users[$user]['mail']) return false;
+
+ $text = rawLocale('password');
+ $text = str_replace('@DOKUWIKIURL@',getBaseURL(true),$text);
+ $text = str_replace('@FULLNAME@',$users[$user]['name'],$text);
+ $text = str_replace('@LOGIN@',$user,$text);
+ $text = str_replace('@PASSWORD@',$password,$text);
+ $text = str_replace('@TITLE@',$conf['title'],$text);
+
+ if (!empty($conf['mailfrom'])) {
+ $hdrs = 'From: '.$conf['mailfrom']."\n";
+ }
+ return @mail($users[$user]['mail'],$lang['regpwmail'],$text,$hdrs);
+}
+
+/**
+ * The new user registration - we get our info directly from
+ * $_POST
+ *
+ * It returns true on success and false on any error
+ */
+function register(){
+ global $lang;
+ global $conf;
+
+ if(!$_POST['save']) return false;
+ if(!$conf['openregister']) return false;
+
+ //clean username
+ $_POST['login'] = preg_replace('/.*:/','',$_POST['login']);
+ $_POST['login'] = cleanID($_POST['login']);
+ //clean fullname and email
+ $_POST['fullname'] = trim(str_replace(':','',$_POST['fullname']));
+ $_POST['email'] = trim(str_replace(':','',$_POST['email']));
+
+ if( empty($_POST['login']) ||
+ empty($_POST['fullname']) ||
+ empty($_POST['email']) ){
+ msg($lang['regmissing'],-1);
+ return false;
+ }
+
+ //check mail
+ if(!isvalidemail($_POST['email'])){
+ msg($lang['regbadmail'],-1);
+ return false;
+ }
+
+ //okay try to create the user
+ $pass = auth_createUser($_POST['login'],$_POST['fullname'],$_POST['email']);
+ if(empty($pass)){
+ msg($lang['reguexists'],-1);
+ return false;
+ }
+
+ //send him the password
+ if (auth_sendPassword($_POST['login'],$pass)){
+ msg($lang['regsuccess'],1);
+ return true;
+ }else{
+ msg($lang['regmailfail'],-1);
+ return false;
+ }
+}
+
+/**
+ * Uses a regular expresion to check if a given mail address is valid
+ *
+ * @see http://www.webmasterworld.com/forum88/135.htm
+ *
+ * May not be completly RFC conform!
+ */
+function isvalidemail($email){
+ return eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$", $email);
+}
+
+?>
diff --git a/inc/auth_ldap.php b/inc/auth_ldap.php
new file mode 100644
index 000000000..2872e710f
--- /dev/null
+++ b/inc/auth_ldap.php
@@ -0,0 +1,137 @@
+<?php
+/**
+ * This is used to authenticate against an LDAP server
+ *
+ * tested with openldap 2.x on Debian only
+ *
+ * PHPs LDAP extension is needed
+ */
+
+/**
+ * connects to the ldap server and holds the connection
+ * in global scope for multiple use
+ */
+function auth_ldap_connect(){
+ global $LDAP_CONNECTION;
+ global $conf;
+ $cnf = $conf['auth']['ldap'];
+
+ if(!$LDAP_CONNECTION){
+ $LDAP_CONNECTION = @ldap_connect($cnf['server']);
+ if(!$LDAP_CONNECTION){
+ msg("LDAP: couldn't connect to LDAP server",-1);
+ return false;
+ }
+ if($cnf['version']){
+ if(!@ldap_set_option($LDAP_CONNECTION,
+ LDAP_OPT_PROTOCOL_VERSION,
+ $cnf['version'])){
+ msg('Setting LDAP Protocol version '.$cnf['version'].' failed',-1);
+ }
+ }
+ }
+ return $LDAP_CONNECTION;
+}
+
+/**
+ * required auth function
+ *
+ * Checks if the given user exists and the given
+ * plaintext password is correct
+ *
+ * It does so by trying to connect to the LDAP server
+ */
+function auth_checkPass($user,$pass){
+ global $conf;
+ $cnf = $conf['auth']['ldap'];
+
+ //connect to LDAP Server
+ $conn = auth_ldap_connect();
+ if(!$conn) return false;
+
+ //get dn for given user
+ $info = auth_getUserData($user);
+ $dn = $info['dn'];
+ if(!$dn) return false;
+
+ //try to bind with dn
+ if(@ldap_bind($conn,$dn,$pass)){
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Required auth function
+ *
+ * Returns info about the given user needs to contain
+ * at least these fields:
+ *
+ * name string full name of the user
+ * mail string email addres of the user
+ * grps array list of groups the user is in
+ *
+ * This LDAP specific function returns the following
+ * addional fields
+ *
+ * dn string distinguished name (DN)
+ * uid string Posix User ID
+ */
+function auth_getUserData($user){
+ global $conf;
+ $cnf = $conf['auth']['ldap'];
+
+ //connect to LDAP Server
+ $conn = auth_ldap_connect();
+ if(!$conn) return false;
+
+ //anonymous bind to lookup userdata
+ if(!@ldap_bind($conn)){
+ msg("LDAP: can not bind anonymously",-1);
+ return false;
+ }
+
+ //get info for given user
+ $filter = str_replace('%u',$user,$cnf['userfilter']);
+ $base = str_replace('%u',$user,$cnf['usertree']);
+ $sr = ldap_search($conn, $base, $filter);;
+ $result = ldap_get_entries($conn, $sr);
+ if($result['count'] != 1){
+ return false; //user not found
+ }
+
+ //general user info
+ $info['dn'] = $result[0]['dn'];
+ $info['mail']= $result[0]['mail'][0];
+ $info['name']= $result[0]['cn'][0];
+ $info['uid'] = $result[0]['uid'][0];
+
+ //primary group id
+ $gid = $result[0]['gidnumber'][0];
+
+ //get groups for given user
+ $filter = "(&(objectClass=posixGroup)(|(gidNumber=$gid)(memberUID=".$info['uid'].")))";
+ $sr = @ldap_search($conn, $cnf['grouptree'], $filter);
+ if(!$sr){
+ msg("LDAP: Reading group memberships failed",-1);
+ return false;
+ }
+ $result = ldap_get_entries($conn, $sr);
+ foreach($result as $grp){
+ if(!empty($grp['cn'][0]))
+ $info['grps'][] = $grp['cn'][0];
+ }
+ return $info;
+}
+
+/**
+ * Required auth function
+ *
+ * Not implemented
+ */
+function auth_createUser($user,$name,$mail){
+ msg("Sorry. Creating users is not supported by the LDAP backend",-1);
+ return null;
+}
+
+?>
diff --git a/inc/auth_mysql.php b/inc/auth_mysql.php
new file mode 100644
index 000000000..213c4a852
--- /dev/null
+++ b/inc/auth_mysql.php
@@ -0,0 +1,98 @@
+<?php
+/**
+ * This is used to authenticate against an MySQL server
+ *
+ * PHPs MySQL extension is needed
+ */
+
+/**
+ * Executes SQL statements and returns the results as list
+ * of hashes. Returns false on error. Returns auto_increment
+ * IDs on INSERT statements.
+ */
+function auth_mysql_runsql($sql_string) {
+ global $conf;
+ $cnf = $conf['auth']['mysql'];
+
+ $link = @mysql_connect ($cnf['server'], $cnf['user'], $cnf['password']);
+ if(!$link){
+ msg('MySQL: Connection to database failed!',-1);
+ return false;
+ }
+ $result = @mysql_db_query($cnf['database'],$sql_string,$link);
+ if(!$result){
+ msg('MySQL: '.mysql_error($link));
+ return false;
+ }
+
+ //mysql_db_query returns 1 on a insert statement -> no need to ask for results
+ if ($result != 1) {
+ for($i=0; $i< mysql_num_rows($result); $i++) {
+ $temparray = mysql_fetch_assoc($result);
+ $resultarray[]=$temparray;
+ }
+ mysql_free_result ($result);
+ }
+ if (mysql_insert_id($link)) {
+ $resultarray = mysql_insert_id($link); //give back ID on insert
+ }
+ mysql_close ($link);
+ return $resultarray;
+}
+
+/**
+ * required auth function
+ *
+ * Checks if a user with the given password exists
+ */
+function auth_checkPass($user,$pass){
+ global $conf;
+ $cnf = $conf['auth']['mysql'];
+
+ $sql = str_replace('%u',addslashes($user),$cnf['passcheck']);
+ $sql = str_replace('%p',addslashes($pass),$sql);
+ $result = auth_mysql_runsql($sql);
+ return(count($result));
+}
+
+/**
+ * Required auth function
+ *
+ * Returns info about the given user needs to contain
+ * at least these fields:
+ *
+ * name string full name of the user
+ * mail string email addres of the user
+ * grps array list of groups the user is in
+ *
+ */
+function auth_getUserData($user){
+ global $conf;
+ $cnf = $conf['auth']['mysql'];
+
+ $sql = str_replace('%u',addslashes($user),$cnf['userinfo']);
+ $result = auth_mysql_runsql($sql);
+ if(!count($result)) return false;
+ $info = $result[0];
+
+ $sql = str_replace('%u',addslashes($user),$cnf['groups']);
+ $result = auth_mysql_runsql($sql);
+ if(!count($result)) return false;
+ foreach($result as $row){
+ $info['grps'][] = $row['group'];
+ }
+
+ return $info;
+}
+
+/**
+ * Required auth function
+ *
+ * Not implemented
+ */
+function auth_createUser($user,$name,$mail){
+ msg("Sorry. Creating users is not supported by the MySQL backend, yet",-1);
+ return null;
+}
+
+?>
diff --git a/inc/auth_plain.php b/inc/auth_plain.php
new file mode 100644
index 000000000..2b45b94ca
--- /dev/null
+++ b/inc/auth_plain.php
@@ -0,0 +1,100 @@
+<?php
+
+/**
+ * If you want to authenticate against something
+ * else then the builtin flatfile auth system
+ * you have to reimplement the "required auth
+ * functions"
+ */
+
+
+/**
+ * required auth function
+ *
+ * Checks if the given user exists and the given
+ * plaintext password is correct
+ */
+function auth_checkPass($user,$pass){
+ $users = auth_loadUserData();
+ $pass = md5($pass); //encode pass
+
+ if($users[$user]['pass'] == $pass){
+ return true;
+ }else{
+ return false;
+ }
+}
+
+/**
+ * Required auth function
+ *
+ * Returns info about the given user needs to contain
+ * at least these fields:
+ *
+ * name string full name of the user
+ * mail string email addres of the user
+ * grps array list of groups the user is in
+ */
+function auth_getUserData($user){
+ $users = auth_loadUserData();
+ return $users[$user];
+}
+
+/**
+ * Required auth function
+ *
+ * Creates a new user.
+ *
+ * Returns false if the user already exists, null when an error
+ * occured and the cleartext password of the new user if
+ * everything went well.
+ *
+ * The new user HAS TO be added to the default group by this
+ * function!
+ */
+function auth_createUser($user,$name,$mail){
+ global $conf;
+
+ $users = auth_loadUserData();
+ if(isset($users[$user])) return false;
+
+ $pass = auth_pwgen();
+ $userline = join(':',array($user,
+ md5($pass),
+ $name,
+ $mail,
+ $conf['defaultgroup']));
+ $userline .= "\n";
+ $fh = fopen('conf/users.auth','a');
+ if($fh){
+ fwrite($fh,$userline);
+ fclose($fh);
+ return $pass;
+ }
+ msg('The users.auth file is not writable. Please inform the Wiki-Admin',-1);
+ return null;
+}
+
+/**
+ * used by the plaintext auth functions
+ * loads the user file into a datastructure
+ */
+function auth_loadUserData(){
+ $data = array();
+ $lines = file('conf/users.auth');
+ foreach($lines as $line){
+ $line = preg_replace('/#.*$/','',$line); //ignore comments
+ $line = trim($line);
+ if(empty($line)) continue;
+
+ $row = split(":",$line,5);
+ $groups = split(",",$row[4]);
+ $data[$row[0]]['pass'] = $row[1];
+ $data[$row[0]]['name'] = urldecode($row[2]);
+ $data[$row[0]]['mail'] = $row[3];
+ $data[$row[0]]['grps'] = $groups;
+ }
+ return $data;
+}
+
+?>
diff --git a/inc/common.php b/inc/common.php
new file mode 100644
index 000000000..c64d08898
--- /dev/null
+++ b/inc/common.php
@@ -0,0 +1,831 @@
+<?
+require_once("conf/dokuwiki.php");
+require_once("inc/io.php");
+
+//set up error reporting to sane values
+error_reporting(E_ALL ^ E_NOTICE);
+
+//make session rewrites XHTML compliant
+ini_set('arg_separator.output', '&amp;');
+
+//init session
+session_name("DokuWiki");
+session_start();
+
+//kill magic quotes
+if (get_magic_quotes_gpc()) {
+ if (!empty($_GET)) remove_magic_quotes($_GET);
+ if (!empty($_POST)) remove_magic_quotes($_POST);
+ if (!empty($_COOKIE)) remove_magic_quotes($_COOKIE);
+ if (!empty($_REQUEST)) remove_magic_quotes($_REQUEST);
+ if (!empty($_SESSION)) remove_magic_quotes($_SESSION);
+ ini_set('magic_quotes_gpc', 0);
+}
+set_magic_quotes_runtime(0);
+ini_set('magic_quotes_sybase',0);
+
+function remove_magic_quotes(&$array) {
+ foreach (array_keys($array) as $key) {
+ if (is_array($array[$key])) {
+ remove_magic_quotes($array[$key]);
+ }else {
+ $array[$key] = stripslashes($array[$key]);
+ }
+ }
+}
+
+//disable gzip if not available
+if($conf['usegzip'] && !function_exists('gzopen')){
+ $conf['usegzip'] = 0;
+}
+
+/* ---------------------------------------------------------------------------------- */
+
+/**
+ * This returns the full absolute URL to the directory where
+ * DokuWiki is installed in (includes a trailing slash)
+ */
+function getBaseURL($abs=false){
+ global $conf;
+ //if canonical url enabled always return absolute
+ if($conf['canonical']) $abs = true;
+
+ //relative URLs are easy
+ if(!$abs){
+ $dir = dirname($_SERVER['PHP_SELF']).'/';
+ $dir = preg_replace('#//#','/',$dir);
+ $dir = preg_replace('#\/$#','/',$dir); #bugfix for weird WIN behaviour
+ return $dir;
+ }
+
+ $port = ':'.$_SERVER['SERVER_PORT'];
+ //remove port from hostheader as sent by IE
+ $host = preg_replace('/:.*$/','',$_SERVER['HTTP_HOST']);
+
+ // see if HTTPS is enabled - apache leaves this empty when not available,
+ // IIS sets it to 'off', 'false' and 'disabled' are just guessing
+ if (preg_match('/^(|off|false|disabled)$/i',$_SERVER['HTTPS'])){
+ $proto = 'http://';
+ if ($_SERVER['SERVER_PORT'] == '80') {
+ $port='';
+ }
+ }else{
+ $proto = 'https://';
+ if ($_SERVER['SERVER_PORT'] == '443') {
+ $port='';
+ }
+ }
+ $dir = (dirname($_SERVER['PHP_SELF'])).'/';
+ $dir = preg_replace('#//#','/',$dir);
+ $dir = preg_replace('#\/$#','/',$dir); #bugfix for weird WIN behaviour
+
+ return $proto.$host.$port.$dir;
+}
+
+/**
+ * Returns info about the current document as associative
+ * array.
+ */
+function pageinfo(){
+ global $ID;
+ global $REV;
+ global $USERINFO;
+ global $conf;
+
+ if($_SERVER['REMOTE_USER']){
+ $info['user'] = $_SERVER['REMOTE_USER'];
+ $info['userinfo'] = $USERINFO;
+ $info['perm'] = auth_quickaclcheck($ID);
+ }else{
+ $info['user'] = '';
+ $info['perm'] = auth_aclcheck($ID,'',null);
+ }
+
+ $info['namespace'] = getNS($ID);
+ $info['locked'] = checklock($ID);
+ $info['filepath'] = realpath(wikiFN($ID,$REV));
+ $info['exists'] = @file_exists($info['filepath']);
+ if($REV && !$info['exists']){
+ //check if current revision was meant
+ $cur = wikiFN($ID);
+ if(@file_exists($cur) && (@filemtime($cur) == $REV)){
+ $info['filepath'] = realpath($cur);
+ $info['exists'] = true;
+ $REV = '';
+ }
+ }
+ if($info['exists']){
+ $info['writable'] = (is_writable($info['filepath']) &&
+ ($info['perm'] >= AUTH_EDIT));
+ }else{
+ $info['writable'] = ($info['perm'] >= AUTH_CREATE);
+ }
+ $info['editable'] = ($info['writable'] && empty($info['lock']));
+ $info['lastmod'] = @filemtime($info['filepath']);
+
+ return $info;
+}
+
+/**
+ * adds a message to the global message array
+ *
+ * Levels can be:
+ *
+ * -1 error
+ * 0 info
+ * 1 success
+ */
+function msg($message,$lvl=0){
+ global $MSG;
+ $errors[-1] = 'error';
+ $errors[0] = 'info';
+ $errors[1] = 'success';
+
+ if(!isset($MSG)) $MSG = array();
+ $MSG[]=array('lvl' => $errors[$lvl], 'msg' => $message);
+}
+
+/**
+ * This builds the breadcrumbstrail and returns it as array
+ */
+function breadcrumbs(){
+ global $ID;
+ global $ACT;
+ global $conf;
+ $crumbs = $_SESSION[$conf['title']]['bc'];
+
+ //first visit?
+ if (!is_array($crumbs)){
+ $crumbs = array();
+ }
+ //we only save on show and existing wiki documents
+ if($ACT != 'show' || !@file_exists(wikiFN($ID))){
+ $_SESSION[$conf['title']]['bc'] = $crumbs;
+ return $crumbs;
+ }
+ //remove ID from array
+ $pos = array_search($ID,$crumbs);
+ if($pos !== false && $pos !== null){
+ array_splice($crumbs,$pos,1);
+ }
+
+ //add to array
+ $crumbs[] =$ID;
+ //reduce size
+ while(count($crumbs) > $conf['breadcrumbs']){
+ array_shift($crumbs);
+ }
+ //save to session
+ $_SESSION[$conf['title']]['bc'] = $crumbs;
+ return $crumbs;
+}
+
+/**
+ * This is run on a ID before it is outputted somewhere
+ * currently used to replace the colon with something else
+ * on Windows systems and to have proper URL encoding
+ */
+function idfilter($id){
+ global $conf;
+ if ($conf['useslash'] && $conf['userewrite']){
+ $id = strtr($id,':','/');
+ }elseif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' &&
+ $conf['userewrite']) {
+ $id = strtr($id,':',';');
+ }
+ $id = urlencode($id);
+ $id = str_replace('%3A',':',$id); //keep as colon
+ $id = str_replace('%2F','/',$id); //keep as slash
+ return $id;
+}
+
+/**
+ * This builds a link to a wikipage (using getBaseURL)
+ */
+function wl($id='',$more='',$script='doku.php',$canonical=false){
+ global $conf;
+ $more = str_replace(',','&amp;',$more);
+
+ $id = idfilter($id);
+ $xlink = getBaseURL($canonical);
+
+ if(!$conf['userewrite']){
+ $xlink .= $script;
+ $xlink .= '?id='.$id;
+ if($more) $xlink .= '&amp;'.$more;
+ }else{
+ $xlink .= $id;
+ if($more) $xlink .= '?'.$more;
+ }
+
+ return $xlink;
+}
+
+/**
+ * Just builds a link to a script
+ */
+function script($script='doku.php'){
+ $link = getBaseURL();
+ $link .= $script;
+ return $link;
+}
+
+/**
+ * Return namespacepart of a wiki ID
+ */
+function getNS($id){
+ if(strpos($id,':')!==false){
+ return substr($id,0,strrpos($id,':'));
+ }
+ return false;
+}
+
+/**
+ * Returns the id without the namespace
+ */
+function noNS($id){
+ return preg_replace('/.*:/','',$id);
+}
+
+/**
+ * Checks the wikitext against a list of blocked expressions
+ * returns true if the text contains any bad words
+ */
+function checkwordblock(){
+ global $TEXT;
+ global $conf;
+
+ if(!$conf['usewordblock']) return false;
+
+ $blocks = file('conf/wordblock.conf');
+ $re = array();
+ #build regexp from blocks
+ foreach($blocks as $block){
+ $block = preg_replace('/#.*$/','',$block);
+ $block = trim($block);
+ if(empty($block)) continue;
+ $re[] = $block;
+ }
+ if(preg_match('#('.join('|',$re).')#si',$TEXT)) return true;
+ return false;
+}
+
+/**
+ * Returns the IP of the client including X-Forwarded-For
+ * Proxy Headers
+ */
+function clientIP(){
+ $my = $_SERVER['REMOTE_ADDR'];
+ if($_SERVER['HTTP_X_FORWARDED_FOR']){
+ $my .= ' ('.$_SERVER['HTTP_X_FORWARDED_FOR'].')';
+ }
+ return $my;
+}
+
+/**
+ * Checks if a given page is currently locked by anyone for editing.
+ * removes stale lockfiles
+ */
+function checklock($id){
+ global $conf;
+ $lock = wikiFN($id).'.lock';
+
+ //no lockfile
+ if(!@file_exists($lock)) return false;
+
+ //lockfile expired
+ if((time() - filemtime($lock)) > $conf['locktime']){
+ unlink($lock);
+ return false;
+ }
+
+ //my own lock
+ $ip = io_readFile($lock);
+ if( ($ip == clientIP()) || ($ip == $_SERVER['REMOTE_USER']) ){
+ return false;
+ }
+
+ return $ip;
+}
+
+/**
+ * Locks a page for editing
+ */
+function lock($id){
+ $lock = wikiFN($id).'.lock';
+ if($_SERVER['REMOTE_USER']){
+ io_saveFile($lock,$_SERVER['REMOTE_USER']);
+ }else{
+ io_saveFile($lock,clientIP());
+ }
+}
+
+/**
+ * Unlocks a page if it was locked by the user
+ *
+ * return true if a lock was removed
+ */
+function unlock($id){
+ $lock = wikiFN($id).'.lock';
+ if(@file_exists($lock)){
+ $ip = io_readFile($lock);
+ if( ($ip == clientIP()) || ($ip == $_SERVER['REMOTE_USER']) ){
+ @unlink($lock);
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Cleans a given ID to only use allowed characters. Accented characters are
+ * converted to unaccented ones
+ */
+function cleanID($id){
+ global $conf;
+ global $lang;
+ $id = trim($id);
+ $id = strtolower($id);
+
+ //alternative namespace seperator
+ $id = strtr($id,';',':');
+ $id = strtr($id,'/',':');
+
+ if(!$conf['localnames']){
+ if($lang['encoding'] == 'iso-8859-15'){
+ // replace accented chars with unaccented ones
+ // this may look strange on your terminal - just don't touch
+ $id = strtr(
+ strtr($id,
+ '',
+ 'szszyaaaaaceeeeiiiinooooouuuyaaaaaceeeeiiiinooooouuuyy'),
+ array('' => 'th', '' => 'th', '' => 'dh', '' => 'dh', '' => 'ss',
+ '' => 'oe', '' => 'oe', '' => 'ae', '' => 'ae', '' => 'u',
+ '' => 'ue', '' => 'oe', '' => 'ae', '' => 'ue', '' => '',
+ '' => 'ae'));
+ }
+ $WORD = 'a-z';
+ }else{
+ $WORD = '\w';
+ }
+
+ //special chars left will be converted to _
+ $id = preg_replace('#[^'.$WORD.'0-9:\-\.]#','_',$id);
+ $id = preg_replace('#__#','_',$id);
+ $id = preg_replace('#:+#',':',$id);
+ $id = trim($id,':._-');
+ $id = preg_replace('#:[:\._\-]+#',':',$id);
+
+ return($id);
+}
+
+/**
+ * returns the full path to the datafile specified by ID and
+ * optional revision
+ */
+function wikiFN($id,$rev=''){
+ global $conf;
+ $id = cleanID($id);
+ $id = str_replace(':','/',$id);
+ if(empty($rev)){
+ return $conf['datadir'].'/'.$id.'.txt';
+ }else{
+ $fn = $conf['olddir'].'/'.$id.'.'.$rev.'.txt';
+ if(!$conf['usegzip'] || @file_exists($fn)){
+ //return plaintext if exists or gzip is disabled
+ return $fn;
+ }else{
+ return $fn.'.gz';
+ }
+ }
+}
+
+/**
+ * Returns the full filepath to a localized textfile if local
+ * version isn't found the english one is returned
+ */
+function localeFN($id){
+ global $conf;
+ $file = './lang/'.$conf['lang'].'/'.$id.'.txt';
+ if(!@file_exists($file)){
+ //fall back to english
+ $file = './lang/en/'.$id.'.txt';
+ }
+ return cleanText($file);
+}
+
+/**
+ * convert line ending to unix format
+ *
+ * @see: formText() for 2crlf conversion
+ */
+function cleanText($text){
+ $text = preg_replace("/(\015\012)|(\015)/","\012",$text);
+ return $text;
+}
+
+/**
+ * Prepares text for print in Webforms by encoding special chars.
+ * It also converts line endings to Windows format which is
+ * pseudo standard for webforms.
+ *
+ * @see: cleanText() for 2unix conversion
+ */
+function formText($text){
+ $text = preg_replace("/\012/","\015\012",$text);
+ return htmlspecialchars($text);
+}
+
+/**
+ * Returns the specified textfile in parsed format
+ */
+function parsedLocale($id){
+ //disable section editing
+ global $parser;
+ $se = $parser['secedit'];
+ $parser['secedit'] = false;
+ //fetch parsed locale
+ $html = io_cacheParse(localeFN($id));
+ //reset section editing
+ $parser['secedit'] = $se;
+ return $html;
+}
+
+/**
+ * Returns the specified textfile in parsed format
+ */
+function rawLocale($id){
+ return io_readFile(localeFN($id));
+}
+
+
+/**
+ * Returns the parsed Wikitext for the given id and revision. If $excuse
+ * is true an explanation is returned if the file wasn't found
+ */
+function parsedWiki($id,$rev='',$excuse=true){
+ $file = wikiFN($id,$rev);
+ $ret = '';
+
+ //ensure $id is in global $ID (needed for parsing)
+ global $ID;
+ $ID = $id;
+
+ if($rev){
+ if(@file_exists($file)){
+ $ret = parse(io_readFile($file));
+ }elseif($excuse){
+ $ret = parsedLocale('norev');
+ }
+ }else{
+ if(@file_exists($file)){
+ $ret = io_cacheParse($file);
+ }elseif($excuse){
+ $ret = parsedLocale('newpage');
+ }
+ }
+ return $ret;
+}
+
+/**
+ * Returns the raw WikiText
+ */
+function rawWiki($id,$rev=''){
+ return io_readFile(wikiFN($id,$rev));
+}
+
+/**
+ * Returns the raw Wiki Text in three slices. The range parameter
+ * Need to have the form "from-to" and gives the range of the section.
+ * The returned order is prefix, section and suffix.
+ */
+function rawWikiSlices($range,$id,$rev=''){
+ list($from,$to) = split('-',$range,2);
+ $text = io_readFile(wikiFN($id,$rev));
+ $text = split("\n",$text);
+ if(!$from) $from = 0;
+ if(!$to) $to = count($text);
+
+ $slices[0] = join("\n",array_slice($text,0,$from));
+ $slices[1] = join("\n",array_slice($text,$from,$to + 1 - $from));
+ $slices[2] = join("\n",array_slice($text,$to+1));
+
+ return $slices;
+}
+
+/**
+ * function to join the text slices with correct lineendings again.
+ * When the pretty parameter is set to true it adds additional empty
+ * lines between sections if needed (used on saving).
+ */
+function con($pre,$text,$suf,$pretty=false){
+
+ if($pretty){
+ if($pre && substr($pre,-1) != "\n") $pre .= "\n";
+ if($suf && substr($text,-1) != "\n") $text .= "\n";
+ }
+
+ if($pre) $pre .= "\n";
+ if($suf) $text .= "\n";
+ return $pre.$text.$suf;
+}
+
+/**
+ * little function to print the content of a var
+ */
+function dbg($msg,$hidden=false){
+ (!$hidden) ? print '<pre class="dbg">' : print "<!--\n";
+ print_r($msg);
+ (!$hidden) ? print '</pre>' : print "\n-->";
+}
+
+/**
+ * Add's an entry to the changelog
+ */
+function addLogEntry($id,$summary=""){
+ global $conf;
+ $id = cleanID($id);
+ $date = time();
+ $remote = $_SERVER['REMOTE_ADDR'];
+ $user = $_SERVER['REMOTE_USER'];
+
+ $logline = join("\t",array($date,$remote,$id,$user,$summary))."\n";
+
+ $fh = fopen($conf['changelog'],'a');
+ if($fh){
+ fwrite($fh,$logline);
+ fclose($fh);
+ }
+}
+
+/**
+ * returns an array of recently changed files using the
+ * changelog
+ */
+function getRecents($num=0,$incdel=false){
+ global $conf;
+ $recent = array();
+ if(!$num) $num = $conf['recent'];
+
+ $loglines = file($conf['changelog']);
+ rsort($loglines); //reverse sort on timestamp
+
+ foreach ($loglines as $line){
+ $line = rtrim($line); //remove newline
+ if(empty($line)) continue; //skip empty lines
+ $info = split("\t",$line); //split into parts
+ //add id if not in yet and file still exists and is allowed to read
+ if(!$recent[$info[2]] &&
+ (@file_exists(wikiFN($info[2])) || $incdel) &&
+ (auth_quickaclcheck($info[2]) >= AUTH_READ)
+ ){
+ $recent[$info[2]]['date'] = $info[0];
+ $recent[$info[2]]['ip'] = $info[1];
+ $recent[$info[2]]['user'] = $info[3];
+ $recent[$info[2]]['sum'] = $info[4];
+ $recent[$info[2]]['del'] = !@file_exists(wikiFN($info[2]));
+ }
+ if(count($recent) >= $num){
+ break; //finish if enough items found
+ }
+ }
+ return $recent;
+}
+
+/**
+ * Saves a wikitext by calling io_saveFile
+ */
+function saveWikiText($id,$text,$summary){
+ global $conf;
+ global $lang;
+ umask($conf['umask']);
+ // ignore if no changes were made
+ if($text == rawWiki($id,'')){
+ return;
+ }
+
+ $file = wikiFN($id);
+ $old = saveOldRevision($id);
+
+ if (empty($text)){
+ // remove empty files
+ @unlink($file);
+ $del = true;
+ $summary = $lang['deleted']; //autoset summary on deletion
+ }else{
+ // save file (datadir is created in io_saveFile)
+ io_saveFile($file,$text);
+ $del = false;
+ }
+
+ addLogEntry($id,$summary);
+ notify($id,$old,$summary);
+
+ //purge cache on add by updating the purgefile
+ if($conf['purgeonadd'] && (!$old || $del)){
+ io_saveFile($conf['datadir'].'/.cache/purgefile',time());
+ }
+}
+
+/**
+ * moves the current version to the attic and returns its
+ * revision date
+ */
+function saveOldRevision($id){
+ global $conf;
+ umask($conf['umask']);
+ $oldf = wikiFN($id);
+ if(!@file_exists($oldf)) return '';
+ $date = filemtime($oldf);
+ $newf = wikiFN($id,$date);
+ if(substr($newf,-3)=='.gz'){
+ io_saveFile($newf,rawWiki($id));
+ }else{
+ io_makeFileDir($newf);
+ copy($oldf, $newf);
+ }
+ return $date;
+}
+
+/**
+ * Sends a notify mail to the wikiadmin when a page was
+ * changed
+ */
+function notify($id,$rev="",$summary=""){
+ global $lang;
+ global $conf;
+ $hdrs ='';
+ if(empty($conf['notify'])) return; //notify enabled?
+
+ $text = rawLocale('mailtext');
+ $text = str_replace('@DATE@',date($conf['dformat']),$text);
+ $text = str_replace('@BROWSER@',$_SERVER['HTTP_USER_AGENT'],$text);
+ $text = str_replace('@IPADDRESS@',$_SERVER['REMOTE_ADDR'],$text);
+ $text = str_replace('@HOSTNAME@',gethostbyaddr($_SERVER['REMOTE_ADDR']),$text);
+ $text = str_replace('@NEWPAGE@',wl($id,'','',true),$text);
+ $text = str_replace('@DOKUWIKIURL@',getBaseURL(true),$text);
+ $text = str_replace('@SUMMARY@',$summary,$text);
+
+ if($rev){
+ $subject = $lang['mail_changed'].' '.$id;
+ $text = str_replace('@OLDPAGE@',wl($id,"rev=$rev",'',true),$text);
+ require_once("inc/DifferenceEngine.php");
+ $df = new Diff(split("\n",rawWiki($id,$rev)),
+ split("\n",rawWiki($id)));
+ $dformat = new UnifiedDiffFormatter();
+ $diff = $dformat->format($df);
+ }else{
+ $subject=$lang['mail_newpage'].' '.$id;
+ $text = str_replace('@OLDPAGE@','none',$text);
+ $diff = rawWiki($id);
+ }
+ $text = str_replace('@DIFF@',$diff,$text);
+
+ if (!empty($conf['mailfrom'])) {
+ $hdrs = 'From: '.$conf['mailfrom']."\n";
+ }
+ @mail($conf['notify'],$subject,$text,$hdrs);
+}
+
+function getRevisions($id){
+ $revd = dirname(wikiFN($id,'foo'));
+ $revs = array();
+ $clid = cleanID($id);
+ if(strrpos($clid,':')) $clid = substr($clid,strrpos($clid,':')+1); //remove path
+
+ if (is_dir($revd) && $dh = opendir($revd)) {
+ while (($file = readdir($dh)) !== false) {
+ if (is_dir($revd.'/'.$file)) continue;
+ if (preg_match('/^'.$clid.'\.(\d+)\.txt(\.gz)?$/',$file,$match)){
+ $revs[]=$match[1];
+ }
+ }
+ closedir($dh);
+ }
+ rsort($revs);
+ return $revs;
+}
+
+/**
+ * downloads a file from the net and saves it to the given location
+ */
+function download($url,$file){
+ $fp = @fopen($url,"rb");
+ if(!$fp) return false;
+
+ while(!feof($fp)){
+ $cont.= fread($fp,1024);
+ }
+ fclose($fp);
+
+ $fp2 = @fopen($file,"w");
+ if(!$fp2) return false;
+ fwrite($fp2,$cont);
+ fclose($fp2);
+ return true;
+}
+
+/**
+ * extracts the query from a google referer
+ */
+function getGoogleQuery(){
+ $url = parse_url($_SERVER['HTTP_REFERER']);
+
+ if(!preg_match("#google\.#i",$url['host'])) return '';
+ $query = array();
+ parse_str($url['query'],$query);
+
+ return $query['q'];
+}
+
+/**
+ * This function tries the locales given in the
+ * language file
+ */
+function setCorrectLocale(){
+ global $conf;
+ global $lang;
+
+ $enc = strtoupper($lang['encoding']);
+ foreach ($lang['locales'] as $loc){
+ //try locale
+ if(@setlocale(LC_ALL,$loc)) return;
+ //try loceale with encoding
+ if(@setlocale(LC_ALL,"$loc.$enc")) return;
+ }
+ //still here? try to set from environment
+ @setlocale(LC_ALL,"");
+}
+
+/**
+* Return the human readable size of a file
+*
+* @param int $size A file size
+* @param int $dec A number of decimal places
+* @author Martin Benjamin <b.martin@cybernet.ch>
+* @author Aidan Lister <aidan@php.net>
+* @version 1.0.0
+*/
+function filesize_h($size, $dec = 1)
+{
+ $sizes = array('B', 'KB', 'MB', 'GB');
+ $count = count($sizes);
+ $i = 0;
+
+ while ($size >= 1024 && ($i < $count - 1)) {
+ $size /= 1024;
+ $i++;
+ }
+
+ return round($size, $dec) . ' ' . $sizes[$i];
+}
+
+function check(){
+ global $conf;
+ global $INFO;
+
+ if(is_writable($conf['changelog'])){
+ msg('Changelog is writable',1);
+ }else{
+ msg('Changelog is not writable',-1);
+ }
+
+ if(is_writable($conf['datadir'])){
+ msg('Datadir is writable',1);
+ }else{
+ msg('Datadir is not writable',-1);
+ }
+
+ if(is_writable($conf['olddir'])){
+ msg('Attic is writable',1);
+ }else{
+ msg('Attic is not writable',-1);
+ }
+
+ if(is_writable($conf['mediadir'])){
+ msg('Mediadir is writable',1);
+ }else{
+ msg('Mediadir is not writable',-1);
+ }
+
+ if(is_writable('conf/users.auth')){
+ msg('conf/users.auth is writable',1);
+ }else{
+ msg('conf/users.auth is not writable',0);
+ }
+
+ msg('Your current permission for this page is '.$INFO['perm'],0);
+
+ if(is_writable($INFO['filepath'])){
+ msg('The current page is writable by the webserver',0);
+ }else{
+ msg('The current page is not writable by the webserver',0);
+ }
+
+ if($INFO['writable']){
+ msg('The current page is writable by you',0);
+ }else{
+ msg('The current page is not writable you',0);
+ }
+}
+?>
diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php
new file mode 100644
index 000000000..dbd1edc95
--- /dev/null
+++ b/inc/feedcreator.class.php
@@ -0,0 +1,1548 @@
+<?php
+/***************************************************************************
+
+FeedCreator class v1.7.1
+originally (c) Kai Blankenhorn
+www.bitfolge.de
+kaib@bitfolge.de
+v1.3 work by Scott Reynen (scott@randomchaos.com) and Kai Blankenhorn
+v1.5 OPML support by Dirk Clemens
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details: <http://www.gnu.org/licenses/gpl.txt>
+
+****************************************************************************
+
+
+Changelog:
+
+v1.7.1
+ fixed a syntax bug
+ fixed left over debug code
+
+v1.7
+ added HTML and JavaScript feeds (configurable via CSS) (thanks to Pascal Van Hecke)
+ added HTML descriptions for all feed formats (thanks to Pascal Van Hecke)
+ added a switch to select an external stylesheet (thanks to Pascal Van Hecke)
+ changed default content-type to application/xml
+ added character encoding setting
+ fixed numerous smaller bugs (thanks to Sren Fuhrmann of golem.de)
+ improved changing ATOM versions handling (thanks to August Trometer)
+ improved the UniversalFeedCreator's useCached method (thanks to Sren Fuhrmann of golem.de)
+ added charset output in HTTP headers (thanks to Sren Fuhrmann of golem.de)
+ added Slashdot namespace to RSS 1.0 (thanks to Sren Fuhrmann of golem.de)
+
+v1.6 05-10-04
+ added stylesheet to RSS 1.0 feeds
+ fixed generator comment (thanks Kevin L. Papendick and Tanguy Pruvot)
+ fixed RFC822 date bug (thanks Tanguy Pruvot)
+ added TimeZone customization for RFC8601 (thanks Tanguy Pruvot)
+ fixed Content-type could be empty (thanks Tanguy Pruvot)
+ fixed author/creator in RSS1.0 (thanks Tanguy Pruvot)
+
+v1.6 beta 02-28-04
+ added Atom 0.3 support (not all features, though)
+ improved OPML 1.0 support (hopefully - added more elements)
+ added support for arbitrary additional elements (use with caution)
+ code beautification :-)
+ considered beta due to some internal changes
+
+v1.5.1 01-27-04
+ fixed some RSS 1.0 glitches (thanks to Stphane Vanpoperynghe)
+ fixed some inconsistencies between documentation and code (thanks to Timothy Martin)
+
+v1.5 01-06-04
+ added support for OPML 1.0
+ added more documentation
+
+v1.4 11-11-03
+ optional feed saving and caching
+ improved documentation
+ minor improvements
+
+v1.3 10-02-03
+ renamed to FeedCreator, as it not only creates RSS anymore
+ added support for mbox
+ tentative support for echo/necho/atom/pie/???
+
+v1.2 07-20-03
+ intelligent auto-truncating of RSS 0.91 attributes
+ don't create some attributes when they're not set
+ documentation improved
+ fixed a real and a possible bug with date conversions
+ code cleanup
+
+v1.1 06-29-03
+ added images to feeds
+ now includes most RSS 0.91 attributes
+ added RSS 2.0 feeds
+
+v1.0 06-24-03
+ initial release
+
+
+
+***************************************************************************/
+
+/*** GENERAL USAGE *********************************************************
+
+include("feedcreator.class.php");
+
+$rss = new UniversalFeedCreator();
+$rss->useCached(); // use cached version if age<1 hour
+$rss->title = "PHP news";
+$rss->description = "daily news from the PHP scripting world";
+
+//optional
+$rss->descriptionTruncSize = 500;
+$rss->descriptionHtmlSyndicated = true;
+
+$rss->link = "http://www.dailyphp.net/news";
+$rss->syndicationURL = "http://www.dailyphp.net/".$_SERVER["PHP_SELF"];
+
+$image = new FeedImage();
+$image->title = "dailyphp.net logo";
+$image->url = "http://www.dailyphp.net/images/logo.gif";
+$image->link = "http://www.dailyphp.net";
+$image->description = "Feed provided by dailyphp.net. Click to visit.";
+
+//optional
+$image->descriptionTruncSize = 500;
+$image->descriptionHtmlSyndicated = true;
+
+$rss->image = $image;
+
+// get your news items from somewhere, e.g. your database:
+mysql_select_db($dbHost, $dbUser, $dbPass);
+$res = mysql_query("SELECT * FROM news ORDER BY newsdate DESC");
+while ($data = mysql_fetch_object($res)) {
+ $item = new FeedItem();
+ $item->title = $data->title;
+ $item->link = $data->url;
+ $item->description = $data->short;
+
+ //optional
+ item->descriptionTruncSize = 500;
+ item->descriptionHtmlSyndicated = true;
+
+ $item->date = $data->newsdate;
+ $item->source = "http://www.dailyphp.net";
+ $item->author = "John Doe";
+
+ $rss->addItem($item);
+}
+
+// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1 (deprecated),
+// MBOX, OPML, ATOM, ATOM0.3, HTML, JS
+echo $rss->saveFeed("RSS1.0", "news/feed.xml");
+
+
+***************************************************************************
+* A little setup *
+**************************************************************************/
+
+// your local timezone, set to "" to disable or for GMT
+define("TIME_ZONE","+01:00");
+
+
+
+
+/**
+ * Version string.
+ **/
+define("FEEDCREATOR_VERSION", "FeedCreator 1.7.1");
+
+
+
+/**
+ * A FeedItem is a part of a FeedCreator feed.
+ *
+ * @author Kai Blankenhorn <kaib@bitfolge.de>
+ * @since 1.3
+ */
+class FeedItem extends HtmlDescribable {
+ /**
+ * Mandatory attributes of an item.
+ */
+ var $title, $description, $link;
+
+ /**
+ * Optional attributes of an item.
+ */
+ var $author, $authorEmail, $image, $category, $comments, $guid, $source, $creator;
+
+ /**
+ * Publishing date of an item. May be in one of the following formats:
+ *
+ * RFC 822:
+ * "Mon, 20 Jan 03 18:05:41 +0400"
+ * "20 Jan 03 18:05:41 +0000"
+ *
+ * ISO 8601:
+ * "2003-01-20T18:05:41+04:00"
+ *
+ * Unix:
+ * 1043082341
+ */
+ var $date;
+
+ /**
+ * Any additional elements to include as an assiciated array. All $key => $value pairs
+ * will be included unencoded in the feed item in the form
+ * <$key>$value</$key>
+ * Again: No encoding will be used! This means you can invalidate or enhance the feed
+ * if $value contains markup. This may be abused to embed tags not implemented by
+ * the FeedCreator class used.
+ */
+ var $additionalElements = Array();
+
+ // on hold
+ // var $source;
+}
+
+
+
+/**
+ * An FeedImage may be added to a FeedCreator feed.
+ * @author Kai Blankenhorn <kaib@bitfolge.de>
+ * @since 1.3
+ */
+class FeedImage extends HtmlDescribable {
+ /**
+ * Mandatory attributes of an image.
+ */
+ var $title, $url, $link;
+
+ /**
+ * Optional attributes of an image.
+ */
+ var $width, $height, $description;
+}
+
+
+
+/**
+ * An HtmlDescribable is an item within a feed that can have a description that may
+ * include HTML markup.
+ */
+class HtmlDescribable {
+ /**
+ * Indicates whether the description field should be rendered in HTML.
+ */
+ var $descriptionHtmlSyndicated;
+
+ /**
+ * Indicates whether and to how many characters a description should be truncated.
+ */
+ var $descriptionTruncSize;
+
+ /**
+ * Returns a formatted description field, depending on descriptionHtmlSyndicated and
+ * $descriptionTruncSize properties
+ * @return string the formatted description
+ */
+ function getDescription() {
+ $descriptionField = new FeedHtmlField($this->description);
+ $descriptionField->syndicateHtml = $this->descriptionHtmlSyndicated;
+ $descriptionField->truncSize = $this->descriptionTruncSize;
+ return $descriptionField->output();
+ }
+
+}
+
+
+/**
+ * An FeedHtmlField describes and generates
+ * a feed, item or image html field (probably a description). Output is
+ * generated based on $truncSize, $syndicateHtml properties.
+ * @author Pascal Van Hecke <feedcreator.class.php@vanhecke.info>
+ * @version 1.6
+ */
+class FeedHtmlField {
+ /**
+ * Mandatory attributes of a FeedHtmlField.
+ */
+ var $rawFieldContent;
+
+ /**
+ * Optional attributes of a FeedHtmlField.
+ *
+ */
+ var $truncSize, $syndicateHtml;
+
+ /**
+ * Creates a new instance of FeedHtmlField.
+ * @param $string: if given, sets the rawFieldContent property
+ */
+ function FeedHtmlField($parFieldContent) {
+ if ($parFieldContent) {
+ $this->rawFieldContent = $parFieldContent;
+ }
+ }
+
+
+ /**
+ * Creates the right output, depending on $truncSize, $syndicateHtml properties.
+ * @return string the formatted field
+ */
+ function output() {
+ // when field available and syndicated in html we assume
+ // - valid html in $rawFieldContent and we enclose in CDATA tags
+ // - no truncation (truncating risks producing invalid html)
+ if (!$this->rawFieldContent) {
+ $result = "";
+ } elseif ($this->syndicateHtml) {
+ $result = "<![CDATA[".$this->rawFieldContent."]]>";
+ } else {
+ if ($this->truncSize and is_int($this->truncSize)) {
+ $result = FeedCreator::iTrunc(htmlspecialchars($this->rawFieldContent),$this->truncSize);
+ } else {
+ $result = htmlspecialchars($this->rawFieldContent);
+ }
+ }
+ return $result;
+ }
+
+}
+
+
+
+/**
+ * UniversalFeedCreator lets you choose during runtime which
+ * format to build.
+ * For general usage of a feed class, see the FeedCreator class
+ * below or the example above.
+ *
+ * @since 1.3
+ * @author Kai Blankenhorn <kaib@bitfolge.de>
+ */
+class UniversalFeedCreator extends FeedCreator {
+ var $_feed;
+
+ function _setFormat($format) {
+ switch (strtoupper($format)) {
+
+ case "2.0":
+ // fall through
+ case "RSS2.0":
+ $this->_feed = new RSSCreator20();
+ break;
+
+ case "1.0":
+ // fall through
+ case "RSS1.0":
+ $this->_feed = new RSSCreator10();
+ break;
+
+ case "0.91":
+ // fall through
+ case "RSS0.91":
+ $this->_feed = new RSSCreator091();
+ break;
+
+ case "PIE0.1":
+ $this->_feed = new PIECreator01();
+ break;
+
+ case "MBOX":
+ $this->_feed = new MBOXCreator();
+ break;
+
+ case "OPML":
+ $this->_feed = new OPMLCreator();
+ break;
+
+ case "ATOM":
+ // fall through: always the latest ATOM version
+
+ case "ATOM0.3":
+ $this->_feed = new AtomCreator03();
+ break;
+
+ case "HTML":
+ $this->_feed = new HTMLCreator();
+ break;
+
+ case "JS":
+ // fall through
+ case "JAVASCRIPT":
+ $this->_feed = new JSCreator();
+ break;
+
+ default:
+ $this->_feed = new RSSCreator091();
+ break;
+ }
+
+ $vars = get_object_vars($this);
+ foreach ($vars as $key => $value) {
+ // prevent overwriting of properties "contentType", "encoding"; do not copy "_feed" itself
+ if (!in_array($key, array("_feed", "contentType", "encoding"))) {
+ $this->_feed->{$key} = $this->{$key};
+ }
+ }
+ }
+
+ /**
+ * Creates a syndication feed based on the items previously added.
+ *
+ * @see FeedCreator::addItem()
+ * @param string format format the feed should comply to. Valid values are:
+ * "PIE0.1", "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3", "HTML", "JS"
+ * @return string the contents of the feed.
+ */
+ function createFeed($format = "RSS0.91") {
+ $this->_setFormat($format);
+ return $this->_feed->createFeed();
+ }
+
+
+
+ /**
+ * Saves this feed as a file on the local disk. After the file is saved, an HTTP redirect
+ * header may be sent to redirect the use to the newly created file.
+ * @since 1.4
+ *
+ * @param string format format the feed should comply to. Valid values are:
+ * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM", "ATOM0.3", "HTML", "JS"
+ * @param string filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param boolean displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response.
+ */
+ function saveFeed($format="RSS0.91", $filename="", $displayContents=true) {
+ $this->_setFormat($format);
+ $this->_feed->saveFeed($filename, $displayContents);
+ }
+
+
+ /**
+ * Turns on caching and checks if there is a recent version of this feed in the cache.
+ * If there is, an HTTP redirect header is sent.
+ * To effectively use caching, you should create the FeedCreator object and call this method
+ * before anything else, especially before you do the time consuming task to build the feed
+ * (web fetching, for example).
+ *
+ * @param string format format the feed should comply to. Valid values are:
+ * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3".
+ * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
+ */
+ function useCached($format="RSS0.91", $filename="", $timeout=3600) {
+ $this->_setFormat($format);
+ $this->_feed->useCached($filename, $timeout);
+ }
+
+}
+
+
+/**
+ * FeedCreator is the abstract base implementation for concrete
+ * implementations that implement a specific format of syndication.
+ *
+ * @abstract
+ * @author Kai Blankenhorn <kaib@bitfolge.de>
+ * @since 1.4
+ */
+class FeedCreator extends HtmlDescribable {
+
+ /**
+ * Mandatory attributes of a feed.
+ */
+ var $title, $description, $link;
+
+
+ /**
+ * Optional attributes of a feed.
+ */
+ var $syndicationURL, $image, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays;
+
+ /**
+ * The url of the external xsl stylesheet used to format the naked rss feed.
+ * Ignored in the output when empty.
+ */
+ var $xslStyleSheet = "";
+
+
+ /**
+ * @access private
+ */
+ var $items = Array();
+
+
+ /**
+ * This feed's MIME content type.
+ * @since 1.4
+ * @access private
+ */
+ var $contentType = "application/xml";
+
+
+ /**
+ * This feed's character encoding.
+ * @since 1.6.1
+ **/
+ var $encoding = "ISO-8859-1";
+
+
+ /**
+ * Any additional elements to include as an assiciated array. All $key => $value pairs
+ * will be included unencoded in the feed in the form
+ * <$key>$value</$key>
+ * Again: No encoding will be used! This means you can invalidate or enhance the feed
+ * if $value contains markup. This may be abused to embed tags not implemented by
+ * the FeedCreator class used.
+ */
+ var $additionalElements = Array();
+
+
+ /**
+ * Adds an FeedItem to the feed.
+ *
+ * @param object FeedItem $item The FeedItem to add to the feed.
+ * @access public
+ */
+ function addItem($item) {
+ $this->items[] = $item;
+ }
+
+
+ /**
+ * Truncates a string to a certain length at the most sensible point.
+ * First, if there's a '.' character near the end of the string, the string is truncated after this character.
+ * If there is no '.', the string is truncated after the last ' ' character.
+ * If the string is truncated, " ..." is appended.
+ * If the string is already shorter than $length, it is returned unchanged.
+ *
+ * @static
+ * @param string string A string to be truncated.
+ * @param int length the maximum length the string should be truncated to
+ * @return string the truncated string
+ */
+ function iTrunc($string, $length) {
+ if (strlen($string)<=$length) {
+ return $string;
+ }
+
+ $pos = strrpos($string,".");
+ if ($pos>=$length-4) {
+ $string = substr($string,0,$length-4);
+ $pos = strrpos($string,".");
+ }
+ if ($pos>=$length*0.4) {
+ return substr($string,0,$pos+1)." ...";
+ }
+
+ $pos = strrpos($string," ");
+ if ($pos>=$length-4) {
+ $string = substr($string,0,$length-4);
+ $pos = strrpos($string," ");
+ }
+ if ($pos>=$length*0.4) {
+ return substr($string,0,$pos)." ...";
+ }
+
+ return substr($string,0,$length-4)." ...";
+
+ }
+
+
+ /**
+ * Creates a comment indicating the generator of this feed.
+ * The format of this comment seems to be recognized by
+ * Syndic8.com.
+ */
+ function _createGeneratorComment() {
+ return "<!-- generator=\"".FEEDCREATOR_VERSION."\" -->\n";
+ }
+
+
+ /**
+ * Creates a string containing all additional elements specified in
+ * $additionalElements.
+ * @param elements array an associative array containing key => value pairs
+ * @param indentString string a string that will be inserted before every generated line
+ * @return string the XML tags corresponding to $additionalElements
+ */
+ function _createAdditionalElements($elements, $indentString="") {
+ $ae = "";
+ if (is_array($elements)) {
+ foreach($elements AS $key => $value) {
+ $ae.= $indentString."<$key>$value</$key>\n";
+ }
+ }
+ return $ae;
+ }
+
+ function _createStylesheetReferences() {
+ $xml = "";
+ if ($this->cssStyleSheet) $xml .= "<?xml-stylesheet href=\"".$this->cssStyleSheet."\" type=\"text/css\"?>\n";
+ if ($this->xslStyleSheet) $xml .= "<?xml-stylesheet href=\"".$this->xslStyleSheet."\" type=\"text/xsl\"?>\n";
+ return $xml;
+ }
+
+
+ /**
+ * Builds the feed's text.
+ * @abstract
+ * @return string the feed's complete text
+ */
+ function createFeed() {
+ }
+
+ /**
+ * Generate a filename for the feed cache file. The result will be $_SERVER["PHP_SELF"] with the extension changed to .xml.
+ * For example:
+ *
+ * echo $_SERVER["PHP_SELF"]."\n";
+ * echo FeedCreator::_generateFilename();
+ *
+ * would produce:
+ *
+ * /rss/latestnews.php
+ * latestnews.xml
+ *
+ * @return string the feed cache filename
+ * @since 1.4
+ * @access private
+ */
+ function _generateFilename() {
+ $fileInfo = pathinfo($_SERVER["PHP_SELF"]);
+ return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".xml";
+ }
+
+
+ /**
+ * @since 1.4
+ * @access private
+ */
+ function _redirect($filename) {
+ // attention, heavily-commented-out-area
+
+ // maybe use this in addition to file time checking
+ //Header("Expires: ".date("r",time()+$this->_timeout));
+
+ /* no caching at all, doesn't seem to work as good:
+ Header("Cache-Control: no-cache");
+ Header("Pragma: no-cache");
+ */
+
+ // HTTP redirect, some feed readers' simple HTTP implementations don't follow it
+ //Header("Location: ".$filename);
+
+ Header("Content-Type: ".$this->contentType."; charset=".$this->encoding."; filename=".basename($filename));
+ Header("Content-Disposition: inline; filename=".basename($filename));
+ readfile($filename, "r");
+ die();
+ }
+
+ /**
+ * Turns on caching and checks if there is a recent version of this feed in the cache.
+ * If there is, an HTTP redirect header is sent.
+ * To effectively use caching, you should create the FeedCreator object and call this method
+ * before anything else, especially before you do the time consuming task to build the feed
+ * (web fetching, for example).
+ * @since 1.4
+ * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
+ */
+ function useCached($filename="", $timeout=3600) {
+ $this->_timeout = $timeout;
+ if ($filename=="") {
+ $filename = $this->_generateFilename();
+ }
+ if (@file_exists($filename) AND (time()-filemtime($filename) < $timeout)) {
+ $this->_redirect($filename);
+ }
+ }
+
+
+ /**
+ * Saves this feed as a file on the local disk. After the file is saved, a redirect
+ * header may be sent to redirect the user to the newly created file.
+ * @since 1.4
+ *
+ * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param redirect boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file.
+ */
+ function saveFeed($filename="", $displayContents=true) {
+ if ($filename=="") {
+ $filename = $this->_generateFilename();
+ }
+ $feedFile = fopen($filename, "w+");
+ if ($feedFile) {
+ fputs($feedFile,$this->createFeed());
+ fclose($feedFile);
+ if ($displayContents) {
+ $this->_redirect($filename);
+ }
+ } else {
+ echo "<br /><b>Error creating feed file, please check write permissions.</b><br />";
+ }
+ }
+
+}
+
+
+/**
+ * FeedDate is an internal class that stores a date for a feed or feed item.
+ * Usually, you won't need to use this.
+ */
+class FeedDate {
+ var $unix;
+
+ /**
+ * Creates a new instance of FeedDate representing a given date.
+ * Accepts RFC 822, ISO 8601 date formats as well as unix time stamps.
+ * @param mixed $dateString optional the date this FeedDate will represent. If not specified, the current date and time is used.
+ */
+ function FeedDate($dateString="") {
+ if ($dateString=="") $dateString = date("r");
+
+ if (is_integer($dateString)) {
+ $this->unix = $dateString;
+ return;
+ }
+ if (preg_match("~(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s+)?(\\d{1,2})\\s+([a-zA-Z]{3})\\s+(\\d{4})\\s+(\\d{2}):(\\d{2}):(\\d{2})\\s+(.*)~",$dateString,$matches)) {
+ $months = Array("Jan"=>1,"Feb"=>2,"Mar"=>3,"Apr"=>4,"May"=>5,"Jun"=>6,"Jul"=>7,"Aug"=>8,"Sep"=>9,"Oct"=>10,"Nov"=>11,"Dec"=>12);
+ $this->unix = mktime($matches[4],$matches[5],$matches[6],$months[$matches[2]],$matches[1],$matches[3]);
+ if (substr($matches[7],0,1)=='+' OR substr($matches[7],0,1)=='-') {
+ $tzOffset = (substr($matches[7],0,3) * 60 + substr($matches[7],-2)) * 60;
+ } else {
+ if (strlen($matches[7])==1) {
+ $oneHour = 3600;
+ $ord = ord($matches[7]);
+ if ($ord < ord("M")) {
+ $tzOffset = (ord("A") - $ord - 1) * $oneHour;
+ } elseif ($ord >= ord("M") AND $matches[7]!="Z") {
+ $tzOffset = ($ord - ord("M")) * $oneHour;
+ } elseif ($matches[7]=="Z") {
+ $tzOffset = 0;
+ }
+ }
+ switch ($matches[7]) {
+ case "UT":
+ case "GMT": $tzOffset = 0;
+ }
+ }
+ $this->unix += $tzOffset;
+ return;
+ }
+ if (preg_match("~(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(.*)~",$dateString,$matches)) {
+ $this->unix = mktime($matches[4],$matches[5],$matches[6],$matches[2],$matches[3],$matches[1]);
+ if (substr($matches[7],0,1)=='+' OR substr($matches[7],0,1)=='-') {
+ $tzOffset = (substr($matches[7],0,3) * 60 + substr($matches[7],-2)) * 60;
+ } else {
+ if ($matches[7]=="Z") {
+ $tzOffset = 0;
+ }
+ }
+ $this->unix += $tzOffset;
+ return;
+ }
+ $this->unix = 0;
+ }
+
+ /**
+ * Gets the date stored in this FeedDate as an RFC 822 date.
+ *
+ * @return a date in RFC 822 format
+ */
+ function rfc822() {
+ //return gmdate("r",$this->unix);
+ $date = gmdate("D, d M Y H:i:s", $this->unix);
+ if (TIME_ZONE!="") $date .= " ".str_replace(":","",TIME_ZONE);
+ return $date;
+ }
+
+ /**
+ * Gets the date stored in this FeedDate as an ISO 8601 date.
+ *
+ * @return a date in ISO 8601 format
+ */
+ function iso8601() {
+ $date = gmdate("Y-m-d\TH:i:sO",$this->unix);
+ $date = substr($date,0,22) . ':' . substr($date,-2);
+ if (TIME_ZONE!="") $date = str_replace("+00:00",TIME_ZONE,$date);
+ return $date;
+ }
+
+ /**
+ * Gets the date stored in this FeedDate as unix time stamp.
+ *
+ * @return a date as a unix time stamp
+ */
+ function unix() {
+ return $this->unix;
+ }
+}
+
+
+/**
+ * RSSCreator10 is a FeedCreator that implements RDF Site Summary (RSS) 1.0.
+ *
+ * @see http://www.purl.org/rss/1.0/
+ * @since 1.3
+ * @author Kai Blankenhorn <kaib@bitfolge.de>
+ */
+class RSSCreator10 extends FeedCreator {
+
+ /**
+ * Builds the RSS feed's text. The feed will be compliant to RDF Site Summary (RSS) 1.0.
+ * The feed will contain all items previously added in the same order.
+ * @return string the feed's complete text
+ */
+ function createFeed() {
+ $feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
+ $feed.= $this->_createGeneratorComment();
+ if ($this->cssStyleSheet=="") {
+ $cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css";
+ }
+ $feed.= $this->_createStylesheetReferences();
+ $feed.= "<rdf:RDF\n";
+ $feed.= " xmlns=\"http://purl.org/rss/1.0/\"\n";
+ $feed.= " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
+ $feed.= " xmlns:slash=\"http://purl.org/rss/1.0/modules/slash/\"\n";
+ $feed.= " xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n";
+ $feed.= " <channel rdf:about=\"".$this->syndicationURL."\">\n";
+ $feed.= " <title>".htmlspecialchars($this->title)."</title>\n";
+ $feed.= " <description>".htmlspecialchars($this->description)."</description>\n";
+ $feed.= " <link>".$this->link."</link>\n";
+ if ($this->image!=null) {
+ $feed.= " <image rdf:resource=\"".$this->image->url."\" />\n";
+ }
+ $now = new FeedDate();
+ $feed.= " <dc:date>".htmlspecialchars($now->iso8601())."</dc:date>\n";
+ $feed.= " <items>\n";
+ $feed.= " <rdf:Seq>\n";
+ for ($i=0;$i<count($this->items);$i++) {
+ $feed.= " <rdf:li rdf:resource=\"".htmlspecialchars($this->items[$i]->link)."\"/>\n";
+ }
+ $feed.= " </rdf:Seq>\n";
+ $feed.= " </items>\n";
+ $feed.= " </channel>\n";
+ if ($this->image!=null) {
+ $feed.= " <image rdf:about=\"".$this->image->url."\">\n";
+ $feed.= " <title>".$this->image->title."</title>\n";
+ $feed.= " <link>".$this->image->link."</link>\n";
+ $feed.= " <url>".$this->image->url."</url>\n";
+ $feed.= " </image>\n";
+ }
+ $feed.= $this->_createAdditionalElements($this->additionalElements, " ");
+
+ for ($i=0;$i<count($this->items);$i++) {
+ $feed.= " <item rdf:about=\"".htmlspecialchars($this->items[$i]->link)."\">\n";
+ //$feed.= " <dc:type>Posting</dc:type>\n";
+ $feed.= " <dc:format>text/html</dc:format>\n";
+ if ($this->items[$i]->date!=null) {
+ $itemDate = new FeedDate($this->items[$i]->date);
+ $feed.= " <dc:date>".htmlspecialchars($itemDate->iso8601())."</dc:date>\n";
+ }
+ if ($this->items[$i]->source!="") {
+ $feed.= " <dc:source>".htmlspecialchars($this->items[$i]->source)."</dc:source>\n";
+ }
+ if ($this->items[$i]->author!="") {
+ $feed.= " <dc:creator>".htmlspecialchars($this->items[$i]->author)."</dc:creator>\n";
+ }
+ $feed.= " <title>".htmlspecialchars(strip_tags(strtr($this->items[$i]->title,"\n\r"," ")))."</title>\n";
+ $feed.= " <link>".htmlspecialchars($this->items[$i]->link)."</link>\n";
+ $feed.= " <description>".htmlspecialchars($this->items[$i]->description)."</description>\n";
+ $feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " ");
+ $feed.= " </item>\n";
+ }
+ $feed.= "</rdf:RDF>\n";
+ return $feed;
+ }
+}
+
+
+
+/**
+ * RSSCreator091 is a FeedCreator that implements RSS 0.91 Spec, revision 3.
+ *
+ * @see http://my.netscape.com/publish/formats/rss-spec-0.91.html
+ * @since 1.3
+ * @author Kai Blankenhorn <kaib@bitfolge.de>
+ */
+class RSSCreator091 extends FeedCreator {
+
+ /**
+ * Stores this RSS feed's version number.
+ * @access private
+ */
+ var $RSSVersion;
+
+ function RSSCreator091() {
+ $this->_setRSSVersion("0.91");
+ $this->contentType = "application/rss+xml";
+ }
+
+ /**
+ * Sets this RSS feed's version number.
+ * @access private
+ */
+ function _setRSSVersion($version) {
+ $this->RSSVersion = $version;
+ }
+
+ /**
+ * Builds the RSS feed's text. The feed will be compliant to RDF Site Summary (RSS) 1.0.
+ * The feed will contain all items previously added in the same order.
+ * @return string the feed's complete text
+ */
+ function createFeed() {
+ $feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
+ $feed.= $this->_createGeneratorComment();
+ $feed.= $this->_createStylesheetReferences();
+ $feed.= "<rss version=\"".$this->RSSVersion."\">\n";
+ $feed.= " <channel>\n";
+ $feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
+ $this->descriptionTruncSize = 500;
+ $feed.= " <description>".$this->getDescription()."</description>\n";
+ $feed.= " <link>".$this->link."</link>\n";
+ $now = new FeedDate();
+ $feed.= " <lastBuildDate>".htmlspecialchars($now->rfc822())."</lastBuildDate>\n";
+ $feed.= " <generator>".FEEDCREATOR_VERSION."</generator>\n";
+
+ if ($this->image!=null) {
+ $feed.= " <image>\n";
+ $feed.= " <url>".$this->image->url."</url>\n";
+ $feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->image->title),100)."</title>\n";
+ $feed.= " <link>".$this->image->link."</link>\n";
+ if ($this->image->width!="") {
+ $feed.= " <width>".$this->image->width."</width>\n";
+ }
+ if ($this->image->height!="") {
+ $feed.= " <height>".$this->image->height."</height>\n";
+ }
+ if ($this->image->description!="") {
+ $feed.= " <description>".$this->image->getDescription()."</description>\n";
+ }
+ $feed.= " </image>\n";
+ }
+ if ($this->language!="") {
+ $feed.= " <language>".$this->language."</language>\n";
+ }
+ if ($this->copyright!="") {
+ $feed.= " <copyright>".FeedCreator::iTrunc(htmlspecialchars($this->copyright),100)."</copyright>\n";
+ }
+ if ($this->editor!="") {
+ $feed.= " <managingEditor>".FeedCreator::iTrunc(htmlspecialchars($this->editor),100)."</managingEditor>\n";
+ }
+ if ($this->webmaster!="") {
+ $feed.= " <webMaster>".FeedCreator::iTrunc(htmlspecialchars($this->webmaster),100)."</webMaster>\n";
+ }
+ if ($this->pubDate!="") {
+ $pubDate = new FeedDate($this->pubDate);
+ $feed.= " <pubDate>".htmlspecialchars($pubDate->rfc822())."</pubDate>\n";
+ }
+ if ($this->category!="") {
+ $feed.= " <category>".htmlspecialchars($this->category)."</category>\n";
+ }
+ if ($this->docs!="") {
+ $feed.= " <docs>".FeedCreator::iTrunc(htmlspecialchars($this->docs),500)."</docs>\n";
+ }
+ if ($this->ttl!="") {
+ $feed.= " <ttl>".htmlspecialchars($this->ttl)."</ttl>\n";
+ }
+ if ($this->rating!="") {
+ $feed.= " <rating>".FeedCreator::iTrunc(htmlspecialchars($this->rating),500)."</rating>\n";
+ }
+ if ($this->skipHours!="") {
+ $feed.= " <skipHours>".htmlspecialchars($this->skipHours)."</skipHours>\n";
+ }
+ if ($this->skipDays!="") {
+ $feed.= " <skipDays>".htmlspecialchars($this->skipDays)."</skipDays>\n";
+ }
+ $feed.= $this->_createAdditionalElements($this->additionalElements, " ");
+
+ for ($i=0;$i<count($this->items);$i++) {
+ $feed.= " <item>\n";
+ $feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100)."</title>\n";
+ $feed.= " <link>".htmlspecialchars($this->items[$i]->link)."</link>\n";
+ $feed.= " <description>".$this->items[$i]->getDescription()."</description>\n";
+
+ if ($this->items[$i]->author!="") {
+ $feed.= " <author>".htmlspecialchars($this->items[$i]->author)."</author>\n";
+ }
+ /*
+ // on hold
+ if ($this->items[$i]->source!="") {
+ $feed.= " <source>".htmlspecialchars($this->items[$i]->source)."</source>\n";
+ }
+ */
+ if ($this->items[$i]->category!="") {
+ $feed.= " <category>".htmlspecialchars($this->items[$i]->category)."</category>\n";
+ }
+ if ($this->items[$i]->comments!="") {
+ $feed.= " <comments>".htmlspecialchars($this->items[$i]->comments)."</comments>\n";
+ }
+ if ($this->items[$i]->date!="") {
+ $itemDate = new FeedDate($this->items[$i]->date);
+ $feed.= " <pubDate>".htmlspecialchars($itemDate->rfc822())."</pubDate>\n";
+ }
+ if ($this->items[$i]->guid!="") {
+ $feed.= " <guid>".htmlspecialchars($this->items[$i]->guid)."</guid>\n";
+ }
+ $feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " ");
+ $feed.= " </item>\n";
+ }
+ $feed.= " </channel>\n";
+ $feed.= "</rss>\n";
+ return $feed;
+ }
+}
+
+
+
+/**
+ * RSSCreator20 is a FeedCreator that implements RDF Site Summary (RSS) 2.0.
+ *
+ * @see http://backend.userland.com/rss
+ * @since 1.3
+ * @author Kai Blankenhorn <kaib@bitfolge.de>
+ */
+class RSSCreator20 extends RSSCreator091 {
+
+ function RSSCreator20() {
+ parent::_setRSSVersion("2.0");
+ }
+
+}
+
+
+/**
+ * PIECreator01 is a FeedCreator that implements the emerging PIE specification,
+ * as in http://intertwingly.net/wiki/pie/Syntax.
+ *
+ * @deprecated
+ * @since 1.3
+ * @author Scott Reynen <scott@randomchaos.com> and Kai Blankenhorn <kaib@bitfolge.de>
+ */
+class PIECreator01 extends FeedCreator {
+
+ function PIECreator01() {
+ $this->encoding = "utf-8";
+ }
+
+ function createFeed() {
+ $feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
+ $feed.= $this->_createStylesheetReferences();
+ $feed.= "<feed version=\"0.1\" xmlns=\"http://example.com/newformat#\">\n";
+ $feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
+ $this->truncSize = 500;
+ $feed.= " <subtitle>".$this->getDescription()."</subtitle>\n";
+ $feed.= " <link>".$this->link."</link>\n";
+ for ($i=0;$i<count($this->items);$i++) {
+ $feed.= " <entry>\n";
+ $feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100)."</title>\n";
+ $feed.= " <link>".htmlspecialchars($this->items[$i]->link)."</link>\n";
+ $itemDate = new FeedDate($this->items[$i]->date);
+ $feed.= " <created>".htmlspecialchars($itemDate->iso8601())."</created>\n";
+ $feed.= " <issued>".htmlspecialchars($itemDate->iso8601())."</issued>\n";
+ $feed.= " <modified>".htmlspecialchars($itemDate->iso8601())."</modified>\n";
+ $feed.= " <id>".htmlspecialchars($this->items[$i]->guid)."</id>\n";
+ if ($this->items[$i]->author!="") {
+ $feed.= " <author>\n";
+ $feed.= " <name>".htmlspecialchars($this->items[$i]->author)."</name>\n";
+ if ($this->items[$i]->authorEmail!="") {
+ $feed.= " <email>".$this->items[$i]->authorEmail."</email>\n";
+ }
+ $feed.=" </author>\n";
+ }
+ $feed.= " <content type=\"text/html\" xml:lang=\"en-us\">\n";
+ $feed.= " <div xmlns=\"http://www.w3.org/1999/xhtml\">".$this->items[$i]->getDescription()."</div>\n";
+ $feed.= " </content>\n";
+ $feed.= " </entry>\n";
+ }
+ $feed.= "</feed>\n";
+ return $feed;
+ }
+}
+
+
+/**
+ * AtomCreator03 is a FeedCreator that implements the atom specification,
+ * as in http://www.intertwingly.net/wiki/pie/FrontPage.
+ * Please note that just by using AtomCreator03 you won't automatically
+ * produce valid atom files. For example, you have to specify either an editor
+ * for the feed or an author for every single feed item.
+ *
+ * Some elements have not been implemented yet. These are (incomplete list):
+ * author URL, item author's email and URL, item contents, alternate links,
+ * other link content types than text/html. Some of them may be created with
+ * AtomCreator03::additionalElements.
+ *
+ * @see FeedCreator#additionalElements
+ * @since 1.6
+ * @author Kai Blankenhorn <kaib@bitfolge.de>, Scott Reynen <scott@randomchaos.com>
+ */
+class AtomCreator03 extends FeedCreator {
+
+ function AtomCreator03() {
+ $this->contentType = "application/atom+xml";
+ $this->encoding = "utf-8";
+ }
+
+ function createFeed() {
+ $feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
+ $feed.= $this->_createGeneratorComment();
+ $feed.= $this->_createStylesheetReferences();
+ $feed.= "<feed version=\"0.3\" xmlns=\"http://purl.org/atom/ns#\"";
+ if ($this->language!="") {
+ $feed.= " xml:lang=\"".$this->language."\"";
+ }
+ $feed.= ">\n";
+ $feed.= " <title>".htmlspecialchars($this->title)."</title>\n";
+ $feed.= " <tagline>".htmlspecialchars($this->description)."</tagline>\n";
+ $feed.= " <link rel=\"alternate\" type=\"text/html\" href=\"".htmlspecialchars($this->link)."\"/>\n";
+ $feed.= " <id>".htmlspecialchars($this->link)."</id>\n";
+ $now = new FeedDate();
+ $feed.= " <modified>".htmlspecialchars($now->iso8601())."</modified>\n";
+ if ($this->editor!="") {
+ $feed.= " <author>\n";
+ $feed.= " <name>".$this->editor."</name>\n";
+ if ($this->editorEmail!="") {
+ $feed.= " <email>".$this->editorEmail."</email>\n";
+ }
+ $feed.= " </author>\n";
+ }
+ $feed.= " <generator>".FEEDCREATOR_VERSION."</generator>\n";
+ $feed.= $this->_createAdditionalElements($this->additionalElements, " ");
+ for ($i=0;$i<count($this->items);$i++) {
+ $feed.= " <entry>\n";
+ $feed.= " <title>".htmlspecialchars(strip_tags($this->items[$i]->title))."</title>\n";
+ $feed.= " <link rel=\"alternate\" type=\"text/html\" href=\"".htmlspecialchars($this->items[$i]->link)."\"/>\n";
+ if ($this->items[$i]->date=="") {
+ $this->items[$i]->date = time();
+ }
+ $itemDate = new FeedDate($this->items[$i]->date);
+ $feed.= " <created>".htmlspecialchars($itemDate->iso8601())."</created>\n";
+ $feed.= " <issued>".htmlspecialchars($itemDate->iso8601())."</issued>\n";
+ $feed.= " <modified>".htmlspecialchars($itemDate->iso8601())."</modified>\n";
+ $feed.= " <id>".htmlspecialchars($this->items[$i]->link)."</id>\n";
+ $feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " ");
+ if ($this->items[$i]->author!="") {
+ $feed.= " <author>\n";
+ $feed.= " <name>".htmlspecialchars($this->items[$i]->author)."</name>\n";
+ $feed.= " </author>\n";
+ }
+ if ($this->items[$i]->description!="") {
+ $feed.= " <summary>".htmlspecialchars($this->items[$i]->description)."</summary>\n";
+ }
+ $feed.= " </entry>\n";
+ }
+ $feed.= "</feed>\n";
+ return $feed;
+ }
+}
+
+
+/**
+ * MBOXCreator is a FeedCreator that implements the mbox format
+ * as described in http://www.qmail.org/man/man5/mbox.html
+ *
+ * @since 1.3
+ * @author Kai Blankenhorn <kaib@bitfolge.de>
+ */
+class MBOXCreator extends FeedCreator {
+
+ function MBOXCreator() {
+ $this->contentType = "text/plain";
+ $this->encoding = "ISO-8859-15";
+ }
+
+ function qp_enc($input = "", $line_max = 76) {
+ $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
+ $lines = preg_split("/(?:\r\n|\r|\n)/", $input);
+ $eol = "\r\n";
+ $escape = "=";
+ $output = "";
+ while( list(, $line) = each($lines) ) {
+ //$line = rtrim($line); // remove trailing white space -> no =20\r\n necessary
+ $linlen = strlen($line);
+ $newline = "";
+ for($i = 0; $i < $linlen; $i++) {
+ $c = substr($line, $i, 1);
+ $dec = ord($c);
+ if ( ($dec == 32) && ($i == ($linlen - 1)) ) { // convert space at eol only
+ $c = "=20";
+ } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required
+ $h2 = floor($dec/16); $h1 = floor($dec%16);
+ $c = $escape.$hex["$h2"].$hex["$h1"];
+ }
+ if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted
+ $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay
+ $newline = "";
+ }
+ $newline .= $c;
+ } // end of for
+ $output .= $newline.$eol;
+ }
+ return trim($output);
+ }
+
+
+ /**
+ * Builds the MBOX contents.
+ * @return string the feed's complete text
+ */
+ function createFeed() {
+ for ($i=0;$i<count($this->items);$i++) {
+ if ($this->items[$i]->author!="") {
+ $from = $this->items[$i]->author;
+ } else {
+ $from = $this->title;
+ }
+ $itemDate = new FeedDate($this->items[$i]->date);
+ $feed.= "From ".strtr(MBOXCreator::qp_enc($from)," ","_")." ".date("D M d H:i:s Y",$itemDate->unix())."\n";
+ $feed.= "Content-Type: text/plain;\n";
+ $feed.= " charset=\"".$this->encoding."\"\n";
+ $feed.= "Content-Transfer-Encoding: quoted-printable\n";
+ $feed.= "Content-Type: text/plain\n";
+ $feed.= "From: \"".MBOXCreator::qp_enc($from)."\"\n";
+ $feed.= "Date: ".$itemDate->rfc822()."\n";
+ $feed.= "Subject: ".MBOXCreator::qp_enc(FeedCreator::iTrunc($this->items[$i]->title,100))."\n";
+ $feed.= "\n";
+ $body = chunk_split(MBOXCreator::qp_enc($this->items[$i]->description));
+ $feed.= preg_replace("~\nFrom ([^\n]*)(\n?)~","\n>From $1$2\n",$body);
+ $feed.= "\n";
+ $feed.= "\n";
+ }
+ return $feed;
+ }
+
+ /**
+ * Generate a filename for the feed cache file. Overridden from FeedCreator to prevent XML data types.
+ * @return string the feed cache filename
+ * @since 1.4
+ * @access private
+ */
+ function _generateFilename() {
+ $fileInfo = pathinfo($_SERVER["PHP_SELF"]);
+ return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".mbox";
+ }
+}
+
+
+/**
+ * OPMLCreator is a FeedCreator that implements OPML 1.0.
+ *
+ * @see http://opml.scripting.com/spec
+ * @author Dirk Clemens, Kai Blankenhorn
+ * @since 1.5
+ */
+class OPMLCreator extends FeedCreator {
+
+ function OPMLCreator() {
+ $this->encoding = "utf-8";
+ }
+
+ function createFeed() {
+ $feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
+ $feed.= $this->_createGeneratorComment();
+ $feed.= $this->_createStylesheetReferences();
+ $feed.= "<opml xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n";
+ $feed.= " <head>\n";
+ $feed.= " <title>".htmlspecialchars($this->title)."</title>\n";
+ if ($this->pubDate!="") {
+ $date = new FeedDate($this->pubDate);
+ $feed.= " <dateCreated>".$date->rfc822()."</dateCreated>\n";
+ }
+ if ($this->lastBuildDate!="") {
+ $date = new FeedDate($this->lastBuildDate);
+ $feed.= " <dateModified>".$date->rfc822()."</dateModified>\n";
+ }
+ if ($this->editor!="") {
+ $feed.= " <ownerName>".$this->editor."</ownerName>\n";
+ }
+ if ($this->editorEmail!="") {
+ $feed.= " <ownerEmail>".$this->editorEmail."</ownerEmail>\n";
+ }
+ $feed.= " </head>\n";
+ $feed.= " <body>\n";
+ for ($i=0;$i<count($this->items);$i++) {
+ $feed.= " <outline type=\"rss\" ";
+ $title = htmlspecialchars(strip_tags(strtr($this->items[$i]->title,"\n\r"," ")));
+ $feed.= " title=\"".$title."\"";
+ $feed.= " text=\"".$title."\"";
+ //$feed.= " description=\"".htmlspecialchars($this->items[$i]->description)."\"";
+ $feed.= " url=\"".htmlspecialchars($this->items[$i]->link)."\"";
+ $feed.= "/>\n";
+ }
+ $feed.= " </body>\n";
+ $feed.= "</opml>\n";
+ return $feed;
+ }
+}
+
+
+
+/**
+ * HTMLCreator is a FeedCreator that writes an HTML feed file to a specific
+ * location, overriding the createFeed method of the parent FeedCreator.
+ * The HTML produced can be included over http by scripting languages, or serve
+ * as the source for an IFrame.
+ * All output by this class is embedded in <div></div> tags to enable formatting
+ * using CSS.
+ *
+ * @author Pascal Van Hecke
+ * @since 1.7
+ */
+class HTMLCreator extends FeedCreator {
+
+ var $contentType = "text/html";
+
+ /**
+ * Contains HTML to be output at the start of the feed's html representation.
+ */
+ var $header;
+
+ /**
+ * Contains HTML to be output at the end of the feed's html representation.
+ */
+ var $footer ;
+
+ /**
+ * Contains HTML to be output between entries. A separator is only used in
+ * case of multiple entries.
+ */
+ var $separator;
+
+ /**
+ * Used to prefix the stylenames to make sure they are unique
+ * and do not clash with stylenames on the users' page.
+ */
+ var $stylePrefix;
+
+ /**
+ * Determines whether the links open in a new window or not.
+ */
+ var $openInNewWindow = true;
+
+ var $imageAlign ="right";
+
+ /**
+ * In case of very simple output you may want to get rid of the style tags,
+ * hence this variable. There's no equivalent on item level, but of course you can
+ * add strings to it while iterating over the items ($this->stylelessOutput .= ...)
+ * and when it is non-empty, ONLY the styleless output is printed, the rest is ignored
+ * in the function createFeed().
+ */
+ var $stylelessOutput ="";
+
+ /**
+ * Writes the HTML.
+ * @return string the scripts's complete text
+ */
+ function createFeed() {
+ // if there is styleless output, use the content of this variable and ignore the rest
+ if ($this->stylelessOutput!="") {
+ return $this->stylelessOutput;
+ }
+
+ //if no stylePrefix is set, generate it yourself depending on the script name
+ if ($this->stylePrefix=="") {
+ $this->stylePrefix = str_replace(".", "_", $this->_generateFilename())."_";
+ }
+
+ //set an openInNewWindow_token_to be inserted or not
+ if ($this->openInNewWindow) {
+ $targetInsert = " target='_blank'";
+ }
+
+ // use this array to put the lines in and implode later with "document.write" javascript
+ $feedArray = array();
+ if ($this->image!=null) {
+ $imageStr = "<a href='".$this->image->link."'".$targetInsert.">".
+ "<img src='".$this->image->url."' border='0' alt='".
+ FeedCreator::iTrunc(htmlspecialchars($this->image->title),100).
+ "' align='".$this->imageAlign."' ";
+ if ($this->image->width) {
+ $imageStr .=" width='".$this->image->width. "' ";
+ }
+ if ($this->image->height) {
+ $imageStr .=" height='".$this->image->height."' ";
+ }
+ $imageStr .="/></a>";
+ $feedArray[] = $imageStr;
+ }
+
+ if ($this->title) {
+ $feedArray[] = "<div class='".$this->stylePrefix."title'><a href='".$this->link."' ".$targetInsert." class='".$this->stylePrefix."title'>".
+ FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</a></div>";
+ }
+ if ($this->getDescription()) {
+ $feedArray[] = "<div class='".$this->stylePrefix."description'>".
+ str_replace("]]>", "", str_replace("<![CDATA[", "", $this->getDescription())).
+ "</div>";
+ }
+
+ if ($this->header) {
+ $feedArray[] = "<div class='".$this->stylePrefix."header'>".$this->header."</div>";
+ }
+
+ for ($i=0;$i<count($this->items);$i++) {
+ if ($this->separator and $i > 0) {
+ $feedArray[] = "<div class='".$this->stylePrefix."separator'>".$this->separator."</div>";
+ }
+
+ if ($this->items[$i]->title) {
+ if ($this->items[$i]->link) {
+ $feedArray[] =
+ "<div class='".$this->stylePrefix."item_title'><a href='".$this->items[$i]->link."' class='".$this->stylePrefix.
+ "item_title'".$targetInsert.">".FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100).
+ "</a></div>";
+ } else {
+ $feedArray[] =
+ "<div class='".$this->stylePrefix."item_title'>".
+ FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100).
+ "</div>";
+ }
+ }
+ if ($this->items[$i]->getDescription()) {
+ $feedArray[] =
+ "<div class='".$this->stylePrefix."item_description'>".
+ str_replace("]]>", "", str_replace("<![CDATA[", "", $this->items[$i]->getDescription())).
+ "</div>";
+ }
+ }
+ if ($this->footer) {
+ $feedArray[] = "<div class='".$this->stylePrefix."footer'>".$this->footer."</div>";
+ }
+
+ $feed= "".join($feedArray, "\r\n");
+ return $feed;
+ }
+
+ /**
+ * Overrrides parent to produce .html extensions
+ *
+ * @return string the feed cache filename
+ * @since 1.4
+ * @access private
+ */
+ function _generateFilename() {
+ $fileInfo = pathinfo($_SERVER["PHP_SELF"]);
+ return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".html";
+ }
+}
+
+
+/**
+ * JSCreator is a class that writes a js file to a specific
+ * location, overriding the createFeed method of the parent HTMLCreator.
+ *
+ * @author Pascal Van Hecke
+ */
+class JSCreator extends HTMLCreator {
+ var $contentType = "text/javascript";
+
+ /**
+ * writes the javascript
+ * @return string the scripts's complete text
+ */
+ function createFeed()
+ {
+ $feed = parent::createFeed();
+ $feedArray = explode("\n",$feed);
+
+ $jsFeed = "";
+ foreach ($feedArray as $value) {
+ $jsFeed .= "document.write('".trim(addslashes($value))."');\n";
+ }
+ return $jsFeed;
+ }
+
+ /**
+ * Overrrides parent to produce .js extensions
+ *
+ * @return string the feed cache filename
+ * @since 1.4
+ * @access private
+ */
+ function _generateFilename() {
+ $fileInfo = pathinfo($_SERVER["PHP_SELF"]);
+ return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".js";
+ }
+
+}
+
+
+
+/*** TEST SCRIPT *********************************************************
+
+//include("feedcreator.class.php");
+
+$rss = new UniversalFeedCreator();
+$rss->useCached();
+$rss->title = "PHP news";
+$rss->description = "daily news from the PHP scripting world";
+
+//optional
+//$rss->descriptionTruncSize = 500;
+//$rss->descriptionHtmlSyndicated = true;
+//$rss->xslStyleSheet = "http://feedster.com/rss20.xsl";
+
+$rss->link = "http://www.dailyphp.net/news";
+$rss->feedURL = "http://www.dailyphp.net/".$PHP_SELF;
+
+$image = new FeedImage();
+$image->title = "dailyphp.net logo";
+$image->url = "http://www.dailyphp.net/images/logo.gif";
+$image->link = "http://www.dailyphp.net";
+$image->description = "Feed provided by dailyphp.net. Click to visit.";
+
+//optional
+$image->descriptionTruncSize = 500;
+$image->descriptionHtmlSyndicated = true;
+
+$rss->image = $image;
+
+// get your news items from somewhere, e.g. your database:
+//mysql_select_db($dbHost, $dbUser, $dbPass);
+//$res = mysql_query("SELECT * FROM news ORDER BY newsdate DESC");
+//while ($data = mysql_fetch_object($res)) {
+ $item = new FeedItem();
+ $item->title = "This is an the test title of an item";
+ $item->link = "http://localhost/item/";
+ $item->description = "<b>description in </b><br/>HTML";
+
+ //optional
+ //item->descriptionTruncSize = 500;
+ $item->descriptionHtmlSyndicated = true;
+
+ $item->date = time();
+ $item->source = "http://www.dailyphp.net";
+ $item->author = "John Doe";
+
+ $rss->addItem($item);
+//}
+
+// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1, MBOX, OPML, ATOM0.3, HTML, JS
+echo $rss->saveFeed("RSS0.91", "feed.xml");
+
+
+
+***************************************************************************/
+
+/**
+ * This class allows to override the hardcoded charset
+ *
+ * @author Andreas Gohr
+ */
+class DokuWikiFeedCreator extends UniversalFeedCreator{
+ function createFeed($format = "RSS0.91",$encoding='iso-8859-15') {
+ $this->_setFormat($format);
+ $this->_feed->encoding = $encoding;
+ return $this->_feed->createFeed();
+ }
+}
+
+
+?>
diff --git a/inc/format.php b/inc/format.php
new file mode 100644
index 000000000..806ea5010
--- /dev/null
+++ b/inc/format.php
@@ -0,0 +1,475 @@
+<?
+require_once("conf/dokuwiki.php");
+require_once("inc/common.php");
+
+
+/**
+ * Assembles all parts defined by the link formater below
+ * Returns HTML for the link
+ */
+function format_link_build($link){
+ //make sure the url is XHTML compliant
+ $link['url'] = str_replace('&','&amp;',$link['url']);
+ $link['url'] = str_replace('&amp;amp;','&amp;',$link['url']);
+
+ $ret = '';
+ $ret .= $link['pre'];
+ $ret .= '<a href="'.$link['url'].'"';
+ if($link['class']) $ret .= ' class="'.$link['class'].'"';
+ if($link['target']) $ret .= ' target="'.$link['target'].'"';
+ if($link['title']) $ret .= ' title="'.$link['title'].'"';
+ if($link['style']) $ret .= ' style="'.$link['style'].'"';
+ if($link['more']) $ret .= ' '.$link['more'];
+ $ret .= '>';
+ $ret .= $link['name'];
+ $ret .= '</a>';
+ $ret .= $link['suf'];
+ return $ret;
+}
+
+/**
+ * Link Formaters
+ *
+ * Each of these functions need to set
+ *
+ * $link['url'] URL to use in href=""
+ * $link['name'] HTML to enclose in <a> with proper special char encoding
+ * $link['class'] CSS class to set on link
+ * $link['target'] which target to use (blank) for current window
+ * $link['style'] Additonal style attribute set with style=""
+ * $link['title'] Title to set with title=""
+ * $link['pre'] HTML to prepend to link
+ * $link['suf'] HTML to append to link
+ * $link['more'] Additonal HTML to include into the anchortag
+ *
+ */
+
+function format_link_wiki($link){
+ global $conf;
+ global $ID; //we use this to get the current namespace
+ //obvious setup
+ $link['target'] = $conf['target']['wiki'];
+ $link['style'] = '';
+ $link['pre'] = '';
+ $link['suf'] = '';
+ $link['more'] = 'onclick="return svchk()" onkeypress="return svchk()"';
+
+ //if links starts with . add current namespace if any
+ if(strpos($link['url'],'.')===0){
+ $ns = substr($ID,0,strrpos($ID,':')); #get current ns
+ $link['url'] = $ns.':'.substr($link['url'],1);
+ }
+
+ //if link contains no namespace. add current namespace (if any)
+ if(strpos($ID,':')!==false && strpos($link['url'],':') === false){
+ $ns = substr($ID,0,strrpos($ID,':')); #get current ns
+ $link['url'] = $ns.':'.$link['url'];
+ }
+
+ //keep hashlink if exists
+ list($link['url'],$hash) = split('#',$link['url'],2);
+ $hash = cleanID($hash);
+
+ //use link without namespace as name
+ if(empty($link['name'])) $link['name'] = preg_replace('/.*:/','',$link['url']);
+ $link['name'] = htmlspecialchars($link['name']);
+
+ $link['url'] = cleanID($link['url']);
+ $link['title'] = $link['url'];
+
+ //set class depending on existance
+ $file = wikiFN($link['url']);
+ if(@file_exists($file)){
+ $link['class']="wikilink1";
+ }else{
+ if($conf['autoplural']){
+ //try plural/nonplural
+ if(substr($link['url'],-1) == 's'){
+ $try = substr($link['url'],0,-1);
+ }else{
+ $try = $link['url'].'s';
+ }
+ $file = wikiFN($try);
+ //check if the other form exists
+ if(@file_exists($file)){
+ $link['class']="wikilink1";
+ $link['url'] = $try;
+ }else{
+ $link['class']="wikilink2";
+ }
+ }else{
+ //no autoplural is wanted
+ $link['class']="wikilink2";
+ }
+ }
+
+ //construct the full link
+ $link['url'] = wl($link['url']);
+
+ //add hash if exists
+ if($hash) $link['url'] .= '#'.$hash;
+
+ return $link;
+}
+
+function format_link_externalurl($link){
+ global $conf;
+ //simple setup
+ $link['class'] = 'urlextern';
+ $link['target'] = $conf['target']['extern'];
+ $link['pre'] = '';
+ $link['suf'] = '';
+ $link['style'] = '';
+ $link['more'] = 'onclick="return svchk()" onkeypress="return svchk()"';
+ $link['url'] = $link['url']; //keep it
+ $link['title'] = htmlspecialchars($link['url']);
+ if(!$link['name']) $link['name'] = htmlspecialchars($link['url']);
+ //thats it :-)
+ return $link;
+}
+
+//this only works in IE :-(
+function format_link_windows($link){
+ global $conf;
+ global $lang;
+ //simple setup
+ $link['class'] = 'windows';
+ $link['target'] = $conf['target']['windows'];
+ $link['pre'] = '';
+ $link['suf'] = '';
+ $link['style'] = '';
+ //Display error on browsers other than IE
+ $link['more'] = 'onclick="if(document.all == null){alert(\''.htmlspecialchars($lang['nosmblinks'],ENT_QUOTES).'\');}" onkeypress="if(document.all == null){alert(\''.htmlspecialchars($lang['nosmblinks'],ENT_QUOTES).'\');}"';
+
+ if(!$link['name']) $link['name'] = htmlspecialchars($link['url']);
+ $link['title'] = htmlspecialchars($link['url']);
+ $link['url'] = str_replace('\\','/',$link['url']);
+ $link['url'] = 'file:///'.$link['url'];
+
+ return $link;
+}
+
+function format_link_email($link){
+ global $conf;
+ //simple setup
+ $link['class'] = 'mail';
+ $link['target'] = '';
+ $link['pre'] = '';
+ $link['suf'] = '';
+ $link['style'] = '';
+ $link['more'] = '';
+
+ $link['name'] = htmlspecialchars($link['name']);
+
+ //shields up
+ if($conf['mailguard']=='visible'){
+ //the mail name gets some visible encoding
+ $link['url'] = str_replace('@',' [at] ',$link['url']);
+ $link['url'] = str_replace('.',' [dot] ',$link['url']);
+ $link['url'] = str_replace('-',' [dash] ',$link['url']);
+ }elseif($conf['mailguard']=='hex'){
+ for ($x=0; $x < strlen($link['url']); $x++) {
+ $encode .= '&#x' . bin2hex($link['url'][$x]).';';
+ }
+ $link['url'] = $encode;
+ }
+
+ $link['title'] = $link['url'];
+ if(!$link['name']) $link['name'] = $link['url'];
+ $link['url'] = 'mailto:'.$link['url'];
+
+ return $link;
+}
+
+function format_link_interwiki($link){
+ global $conf;
+
+ //obvious ones
+ $link['class'] = 'interwiki';
+ $link['target'] = $conf['target']['interwiki'];
+ $link['pre'] = '';
+ $link['suf'] = '';
+ $link['more'] = 'onclick="return svchk()" onkeypress="return svchk()"';
+
+ //get interwiki short name
+ list($wiki,$link['url']) = split('>',$link['url'],2);
+ $wiki = strtolower(trim($wiki)); //always use lowercase
+ $link['url'] = trim($link['url']);
+ if(!$link['name']) $link['name'] = $link['url'];
+
+ //encode special chars
+ $link['name'] = htmlspecialchars($link['name']);
+
+ //set default to google
+ $url = 'http://www.google.com/search?q=';
+ $ico = 'google';
+
+ //load interwikilinks
+ //FIXME: loading this once may enhance speed a little bit
+ $iwlinks = file('conf/interwiki.conf');
+
+ //add special case 'this'
+ $iwlinks[] = 'this '.getBaseURL(true).'{NAME}';
+
+ //go through iwlinks and find URL for wiki
+ foreach ($iwlinks as $line){
+ $line = preg_replace('/#.*/','',$line); //skip comments
+ $line = trim($line);
+ list($iw,$iwurl) = preg_split('/\s+/',$line);
+ if(!$iw or !$iwurl) continue; //skip broken or empty lines
+ //check for match
+ if(strtolower($iw) == $wiki){
+ $ico = $wiki;
+ $url = $iwurl;
+ break;
+ }
+ }
+
+ //if ico exists set additonal style
+ if(@file_exists('interwiki/'.$ico.'.png')){
+ $link['style']='background: transparent url('.getBaseURL().'interwiki/'.$ico.'.png) 0px 1px no-repeat;';
+ }elseif(@file_exists('interwiki/'.$ico.'.gif')){
+ $link['style']='background: transparent url('.getBaseURL().'interwiki/'.$ico.'.gif) 0px 1px no-repeat;';
+ }
+
+ //do we stay at the same server? Use local target
+ if( strpos($url,getBaseURL(true)) === 0 ){
+ $link['target'] = $conf['target']['wiki'];
+ }
+
+ //replace placeholder
+ if(strstr($url,'{URL}') !== false){
+ $link['url'] = str_replace('{URL}',urlencode($link['url']),$url);
+ }elseif(strstr($url,'{NAME}') !== false){
+ $link['url'] = str_replace('{NAME}',$link['url'],$url);
+ }else{
+ $link['url'] = $url.urlencode($link['url']);
+ }
+
+ $link['title'] = htmlspecialchars($link['url']);
+
+ //done :-)
+ return $link;
+}
+
+
+function format_link_media($link){
+ global $conf;
+
+ $link['class'] = 'media';
+ $link['style'] = '';
+ $link['pre'] = '';
+ $link['suf'] = '';
+ $link['more'] = 'onclick="return svchk()" onkeypress="return svchk()"';
+ $class = 'media';
+
+ list($link['name'],$title) = split('\|',$link['name'],2);
+ $t = htmlspecialchars($title);
+
+ //set alignment from spaces
+ if(substr($link['name'],0,1)==' ' && substr($link['name'],-1,1)==' '){
+ $link['pre'] = "</p>\n<div align=\"center\">";
+ $link['suf'] = "</div>\n<p>";
+ }elseif(substr($link['name'],0,1)==' '){
+ #$a = ' align="right"';
+ $class = 'mediaright';
+ }elseif(substr($link['name'],-1,1)==' '){
+ #$a = ' align="left"';
+ $class = 'medialeft';
+ }else{
+ $a = ' align="middle"';
+ }
+ $link['name'] = trim($link['name']);
+
+ //split into src and parameters
+ list($src,$param) = split('\?',$link['name'],2);
+ //parse width and height
+ if(preg_match('#(\d*)(x(\d*))?#i',$param,$size)){
+ if($size[1]) $w = $size[1];
+ if($size[3]) $h = $size[3];
+ }
+
+ //check for nocache param
+ $nocache = preg_match('/nocache/i',$param);
+ //do image caching, resizing and src rewriting
+ $cache = $src;
+ $isimg = img_cache($cache,$src,$w,$h,$nocache);
+
+ //set link to src if none given
+ if(!$link['url']){
+ $link['url'] = $src;
+ $link['target'] = $conf['target']['media'];
+ }
+
+ //prepare name
+ if($isimg){
+ $link['name'] = '<img src="'.getBaseURL().$cache.'"';
+ if($w) $link['name'] .= ' width="'.$w.'"';
+ if($h) $link['name'] .= ' height="'.$h.'"';
+ if($t) $link['name'] .= ' title="'.$t.'"';
+ if($a) $link['name'] .= $a;
+ $link['name'] .= ' class="'.$class.'" border="0" alt="'.$t.'" />';
+ }else{
+ if($t){
+ $link['name'] = $t;
+ }else{
+ $link['name'] = basename($src);
+ }
+ }
+
+ return $link;
+}
+
+/**
+ * Builds an URL list from a RSS feed
+ */
+function format_rss($url){
+ global $lang;
+ define('MAGPIE_DIR', 'inc/magpie/');
+ require_once(MAGPIE_DIR.'/rss_fetch.inc');
+
+ //disable warning while fetching
+ $elvl = error_reporting(E_ERROR);
+ $rss = fetch_rss($url);
+ error_reporting($elvl);
+
+ $ret = '<ul class="rss">';
+ if($rss){
+ foreach ($rss->items as $item ) {
+ $link = array();
+ $link['url'] = $item['link'];
+ $link['name'] = $item['title'];
+ $link = format_link_externalurl($link);
+ $ret .= '<li>'.format_link_build($link).'</li>';
+ }
+ }else{
+ $link['url'] = $url;
+ $link = format_link_externalurl($link);
+ $ret .= '<li>';
+ $ret .= '<em>'.$lang['rssfailed'].'</em>';
+ $ret .= format_link_build($link);
+ $ret .= '</li>';
+ }
+ $ret .= '</ul>';
+ return $ret;
+}
+
+
+function img_cache(&$csrc,&$src,&$w,&$h,$nocache){
+ global $conf;
+
+ //container for various paths
+ $f['full']['web'] = $src;
+ $f['resz']['web'] = $src;
+ $f['full']['fs'] = $src;
+ $f['resz']['fs'] = $src;
+
+ //generate cachename
+ $md5 = md5($src);
+
+ //check if it is an image
+ if(preg_match('#\.(jpe?g|gif|png)$#i',$src,$match)){
+ $ext = strtolower($match[1]);
+ $isimg = true;
+ }
+
+ //check if it is external or a local mediafile
+ if(preg_match('#^([a-z0-9]+?)://#i',$src)){
+ $isurl = true;
+ }else{
+ $src = str_replace(':','/',$src);
+ $f['full']['web'] = $conf['mediaweb'].'/'.$src;
+ $f['resz']['web'] = $conf['mediaweb'].'/'.$src;
+ $f['full']['fs'] = $conf['mediadir'].'/'.$src;
+ $f['resz']['fs'] = $conf['mediadir'].'/'.$src;
+ }
+
+ //download external images if allowed
+ if($isurl && $isimg && !$nocache){
+ $cache = $conf['mediadir']."/.cache/$md5.$ext";
+ if (@file_exists($cache) || download($src,$cache)){
+ $f['full']['web'] = $conf['mediaweb']."/.cache/$md5.$ext";
+ $f['resz']['web'] = $conf['mediaweb']."/.cache/$md5.$ext";
+ $f['full']['fs'] = $conf['mediadir']."/.cache/$md5.$ext";
+ $f['resz']['fs'] = $conf['mediadir']."/.cache/$md5.$ext";
+ $isurl = false;
+ }
+ }
+
+ //for local images (cached or media) do resizing
+ if($isimg && (!$isurl) && $w){
+ $info = getImageSize($f['full']['fs']);
+ //if $h not given calcualte it with correct aspect ratio
+ if(!$h){
+ $h = round(($w * $info[1]) / $info[0]);
+ }
+ $cache = $conf['mediadir'].'/.cache/'.$md5.'.'.$w.'x'.$h.'.'.$ext;
+ //delete outdated cachefile
+ if(@file_exists($cache) && (filemtime($cache)<filemtime($f['full']['fs']))){
+ unlink($cache);
+ }
+ //check if a resized cachecopy exists else create one
+ if(@file_exists($cache) || img_resize($ext,$f['full']['fs'],$info[0],$info[1],$cache,$w,$h)){
+ $f['resz']['web'] = $conf['mediaweb'].'/.cache/'.$md5.'.'.$w.'x'.$h.'.'.$ext;
+ $f['resz']['fs'] = $conf['mediadir'].'/.cache/'.$md5.'.'.$w.'x'.$h.'.'.$ext;
+ }
+ }elseif($isimg && (!$isurl)){
+ //if no new size was given just return the img size
+ $info = getImageSize($f['full']['fs']);
+ $w = $info[0];
+ $h = $info[1];
+ }
+
+ //set srcs
+ $src = $f['full']['web'];
+ $csrc = $f['resz']['web'];
+ return $isimg;
+}
+
+function img_resize($ext,$from,$from_w,$from_h,$to,$to_w,$to_h){
+ // create cachedir
+ io_makeFileDir($to);
+
+ // create an image of the given filetype
+ if ($ext == 'jpg' || $ext == 'jpeg'){
+ if(!function_exists("imagecreatefromjpeg")) return false;
+ $image = @imagecreateFromjpeg($from);
+ }elseif($ext == 'png') {
+ if(!function_exists("imagecreatefrompng")) return false;
+ $image = @imagecreatefrompng($from);
+ }elseif($ext == 'gif') {
+ if(!function_exists("imagecreatefromgif")) return false;
+ $image = @imagecreatefromgif($from);
+ }
+ if(!$image) return false;
+
+ if(function_exists("imagecreatetruecolor")){
+ $newimg = @imagecreatetruecolor ($to_w, $to_h);
+ }
+ if(!$newimg) $newimg = @imagecreate($to_w, $to_h);
+ if(!$newimg) return false;
+
+ //try resampling first
+ if(function_exists("imagecopyresampled")){
+ if(!@imagecopyresampled($newimg, $image, 0, 0, 0, 0, $to_w, $to_h, $from_w, $from_h)) {
+ imagecopyresized($newimg, $image, 0, 0, 0, 0, $to_w, $to_h, $from_w, $from_h);
+ }
+ }else{
+ imagecopyresized($newimg, $image, 0, 0, 0, 0, $to_w, $to_h, $from_w, $from_h);
+ }
+
+ if ($ext == 'jpg' || $ext == 'jpeg'){
+ if(!function_exists("imagejpeg")) return false;
+ return imagejpeg($newimg, $to, 70);
+ }elseif($ext == 'png') {
+ if(!function_exists("imagepng")) return false;
+ return imagepng($newimg, $to);
+ }elseif($ext == 'gif') {
+ if(!function_exists("imagegif")) return false;
+ return imagegif($newimg, $to);
+ }
+
+ return false;
+}
+
+?>
diff --git a/inc/geshi.php b/inc/geshi.php
new file mode 100644
index 000000000..c1231fb59
--- /dev/null
+++ b/inc/geshi.php
@@ -0,0 +1,2413 @@
+<?php
+/*************************************************************************************
+ * geshi.php
+ * ---------
+ * Author: Nigel McNie (oracle.shinoda@gmail.com)
+ * Copyright: (c) 2004 Nigel McNie
+ * Release Version: 1.0.4
+ * CVS Revision Version: $Revision: 1.6 $
+ * Date Started: 2004/05/20
+ * Last Modified: $Date: 2004/11/27 00:57:58 $
+ *
+ * The GeSHi class for Generic Syntax Highlighting. Please refer to the documentation
+ * at http://qbnz.com/highlighter/documentation.php for more information about how to
+ * use this class.
+ *
+ * For changes, release notes, TODOs etc, see the relevant files in the docs/ directory
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+
+//
+// GeSHi Constants
+// You should use these constant names in your programs instead of
+// their values - you never know when a value may change in a future
+// version
+//
+
+// For the future (though this may never be realised)
+define('GESHI_OUTPUT_HTML', 0);
+
+// Shouldn't be used by your program
+define('GESHI_COMMENTS', 0);
+
+// Error detection - use these to analyse faults
+define('GESHI_ERROR_NO_INPUT', 1);
+define('GESHI_ERROR_NO_SUCH_LANG', 2);
+// Human error messages - added in 1.0.2
+$_GESHI_ERRORS = array(
+ GESHI_ERROR_NO_INPUT => 'No source code inputted',
+ GESHI_ERROR_NO_SUCH_LANG => 'GeSHi could not find the language {LANGUAGE} (using path {PATH})'
+);
+
+// Line numbers - use with enable_line_numbers()
+define('GESHI_NO_LINE_NUMBERS', 0);
+define('GESHI_NORMAL_LINE_NUMBERS', 1);
+define('GESHI_FANCY_LINE_NUMBERS', 2);
+
+// Strict mode - shouldn't be used by your scripts
+define('GESHI_NEVER', 0);
+define('GESHI_MAYBE', 1);
+define('GESHI_ALWAYS', 2);
+
+// Container HTML type - use these (added in 1.0.1)
+define('GESHI_HEADER_DIV', 1);
+define('GESHI_HEADER_PRE', 2);
+
+// Capatalisation constants - use these (added in 1.0.1)
+define('GESHI_CAPS_NO_CHANGE', 0);
+define('GESHI_CAPS_UPPER', 1);
+define('GESHI_CAPS_LOWER', 2);
+
+// Link style constants - use these (added in 1.0.2)
+define('GESHI_LINK', 0);
+define('GESHI_HOVER', 1);
+define('GESHI_ACTIVE', 2);
+define('GESHI_VISITED', 3);
+
+// Important string starter/finisher - use these (added in 1.0.2).
+// Note that if you change these, they should be as-is: i.e., don't
+// write them as if they had been run through htmlentities()
+define('GESHI_START_IMPORTANT', '<BEGIN GeSHi>');
+define('GESHI_END_IMPORTANT', '<END GeSHi>');
+
+// Advanced regexp handling - don't use these (added in 1.0.2)
+define('GESHI_SEARCH', 0);
+define('GESHI_REPLACE', 1);
+define('GESHI_MODIFIERS', 2);
+define('GESHI_BEFORE', 3);
+define('GESHI_AFTER', 4);
+
+// Begin Class GeSHi
+class GeSHi
+{
+ //
+ // Data Fields
+ //
+
+ // Basic fields
+ var $source = ''; // The source code to highlight
+ var $language = ''; // The language to use when highlighting
+ var $language_data = array(); // The data for the language used
+ var $language_path = 'geshi/'; // The path to the language files
+ var $error = false; // The error message associated with an error
+ var $strict_mode = false; // Whether highlighting is strict or not
+ var $use_classes = false; // Whether to use classes
+ var $header_type = GESHI_HEADER_PRE; // The type of header to use
+ var $lexic_permissions = array(); // Array of permissions for which lexics should be highlighted
+ // Added in 1.0.2 basic fields
+ var $time = 0; // The time it took to parse the code
+ var $header_content = ''; // The content of the header block
+ var $footer_content = ''; // The content of the footer block
+ var $header_content_style = ''; // The style of the header block
+ var $footer_content_style = ''; // The style of the footer block
+ var $link_styles = array(); // The styles for hyperlinks in the code
+ var $enable_important_blocks = true; // Whether important blocks should be recognised or not
+ var $important_styles = 'font-weight: bold; color: red;'; // Styles for important parts of the code
+ var $add_ids = false; // Whether css IDs should be added to the code
+ var $highlight_extra_lines = array(); // Lines that should be highlighted extra
+ var $highlight_extra_lines_style = 'color: #cc0; background-color: #ffc;';// Styles of extra-highlighted lines
+ var $line_numbers_start = 1; // Number at which line numbers should start at
+
+ // Style fields
+ var $overall_style = ''; // The overall style for this code block
+ // The style for the actual code
+ var $code_style = 'font-family: \'Courier New\', Courier, monospace; font-weight: normal;';
+ var $overall_class = ''; // The overall class for this code block
+ var $overall_id = ''; // The overall id for this code block
+ // Line number styles
+ var $line_style1 = 'font-family: \'Courier New\', Courier, monospace; color: black; font-weight: normal; font-style: normal;';
+ var $line_style2 = 'font-weight: bold;';
+ var $line_numbers = GESHI_NO_LINE_NUMBERS; // Flag for how line numbers are displayed
+ var $line_nth_row = 0; // The "nth" value for fancy line highlighting
+
+ // Misc
+ var $tab_width = 8; // A value for the size of tab stops.
+ var $max_tabs = 20; // Maximum number of spaces per tab
+ var $min_tabs = 0; // Minimum " " " " "
+ var $link_target = ''; // default target for keyword links
+ var $encoding = ''; // The encoding to use for htmlentities() calls
+
+ // Deprecated/unused
+ var $output_format = GESHI_OUTPUT_HTML;
+
+
+ /**
+ * constructor: GeSHi
+ * ------------------
+ * Creates a new GeSHi object, with source and language
+ */
+ function GeSHi ($source, $language, $path = 'geshi/')
+ {
+ $this->source = $source;
+ // Security, just in case :)
+ $language = preg_replace('#[^a-zA-Z0-9\-\_]#', '', $language);
+ $this->language = strtolower($language);
+ $this->language_path = ( substr($path, strlen($path) - 1, 1) == '/' ) ? $path : $path . '/';
+ $this->load_language();
+ }
+
+
+ //
+ // Error methods
+ //
+
+ /**
+ * method: error
+ * -------------
+ * Returns an error message associated with the last GeSHi operation,
+ * or false if no error has occured
+ */
+ function error()
+ {
+ global $_GESHI_ERRORS;
+ if ( $this->error != 0 )
+ {
+ $msg = $_GESHI_ERRORS[$this->error];
+ $debug_tpl_vars = array(
+ '{LANGUAGE}' => $this->language,
+ '{PATH}' => $this->language_path
+ );
+ foreach ( $debug_tpl_vars as $tpl => $var )
+ {
+ $msg = str_replace($tpl, $var, $msg);
+ }
+ return "<br /><strong>GeSHi Error:</strong> $msg (code $this->error)<br />";
+ }
+ return false;
+ }
+
+
+ //
+ // Getters
+ //
+
+ /**
+ * get_language_name()
+ * ---------------
+ * Gets a human-readable language name (thanks to Simon Patterson
+ * for the idea :))
+ */
+ function get_language_name()
+ {
+ if ( $this->error == GESHI_ERROR_NO_SUCH_LANG )
+ {
+ return $this->language_data['LANG_NAME'] . ' (Unknown Language)';
+ }
+ return $this->language_data['LANG_NAME'];
+ }
+
+
+ //
+ // Setters
+ //
+
+ /**
+ * method: set_source
+ * ------------------
+ * Sets the source code for this object
+ */
+ function set_source ( $source )
+ {
+ $this->source = $source;
+ }
+
+
+ /**
+ * method: set_language
+ * --------------------
+ * Sets the language for this object
+ */
+ function set_language ( $language )
+ {
+ $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language);
+ $this->language = strtolower($language);
+ // Load the language for parsing
+ $this->load_language();
+ }
+
+
+ /**
+ * method: set_language_path
+ * -------------------------
+ * Sets the path to the directory containing the language files. NOTE
+ * that this path is relative to the directory of the script that included
+ * geshi.php, NOT geshi.php itself.
+ */
+ function set_language_path ( $path )
+ {
+ $this->language_path = ( substr($path, strlen($path) - 1, 1) == '/' ) ? $path : $path . '/';
+ }
+
+
+ /**
+ * method: set_header_type
+ * -----------------------
+ * Sets the type of header to be used. If GESHI_HEADER_DIV is used,
+ * the code is surrounded in a <div>. This means more source code but
+ * more control over tab width and line-wrapping. GESHI_HEADER_PRE
+ * means that a <pre> is used - less source, but less control. Default
+ * is GESHI_HEADER_PRE
+ */
+ function set_header_type ( $type )
+ {
+ $this->header_type = $type;
+ }
+
+
+ /**
+ * method: set_overall_style
+ * -------------------------
+ * Sets the styles for the code that will be outputted
+ * when this object is parsed. The style should be a
+ * string of valid stylesheet declarations
+ */
+ function set_overall_style ( $style, $preserve_defaults = false )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->overall_style .= $style;
+ }
+ else
+ {
+ $this->overall_style = $style;
+ }
+ }
+
+
+ /**
+ * method: set_overall_class
+ * -------------------------
+ * Sets the overall classname for this block of code. This
+ * class can then be used in a stylesheet to style this object's
+ * output
+ */
+ function set_overall_class ( $class )
+ {
+ $this->overall_class = $class;
+ }
+
+
+ /**
+ * method: set_overall_id
+ * ----------------------
+ * Sets the overall id for this block of code. This id can then
+ * be used in a stylesheet to style this object's output
+ */
+ function set_overall_id ( $id )
+ {
+ $this->overall_id = $id;
+ }
+
+
+ /**
+ * method: enable_classes
+ * ----------------------
+ * Sets whether CSS classes should be used to highlight the source. Default
+ * is off, calling this method with no arguments will turn it on
+ */
+ function enable_classes ( $flag = true )
+ {
+ $this->use_classes = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: set_code_style
+ * ----------------------
+ * Sets the style for the actual code. This should be a string
+ * containing valid stylesheet declarations. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ *
+ * NOTE: Use this method to override any style changes you made to
+ * the line numbers if you are using line numbers, else the line of
+ * code will have the same style as the line number! Consult the
+ * GeSHi documentation for more information about this.
+ */
+ function set_code_style ( $style, $preserve_defaults )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->code_style .= $style;
+ }
+ else
+ {
+ $this->code_style = $style;
+ }
+ }
+
+
+ /**
+ * method: set_line_style
+ * ----------------------
+ * Sets the styles for the line numbers. This should be a string
+ * containing valid stylesheet declarations. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ */
+ function set_line_style ( $style1, $style2 = '', $preserve_defaults = false )
+ {
+ if ( is_bool($style2) )
+ {
+ $preserve_defaults = $style2;
+ $style2 = '';
+ }
+ if ( $preserve_defaults )
+ {
+ $this->line_style1 .= $style1;
+ $this->line_style2 .= $style2;
+ }
+ else
+ {
+ $this->line_style1 = $style1;
+ $this->line_style2 = $style2;
+ }
+ }
+
+
+ /**
+ * method: enable_line_numbers
+ * ---------------------------
+ * Sets whether line numbers should be displayed. GESHI_NO_LINE_NUMBERS = not displayed,
+ * GESHI_NORMAL_LINE_NUMBERS = displayed, GESHI_FANCY_LINE_NUMBERS = every nth line a
+ * different class. Default is for no line numbers to be used
+ */
+ function enable_line_numbers ( $flag, $nth_row = 5 )
+ {
+ $this->line_numbers = $flag;
+ $this->line_nth_row = $nth_row;
+ }
+
+
+ /**
+ * method: set_keyword_group_style
+ * -------------------------------
+ * Sets the style for a keyword group. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ */
+ function set_keyword_group_style ( $key, $style, $preserve_defaults = false )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->language_data['STYLES']['KEYWORDS'][$key] .= $style;
+ }
+ else
+ {
+ $this->language_data['STYLES']['KEYWORDS'][$key] = $style;
+ }
+ }
+
+
+ /**
+ * method: set_keyword_group_highlighting
+ * --------------------------------------
+ * Turns highlighting on/off for a keyword group
+ */
+ function set_keyword_group_highlighting ( $key, $flag = true )
+ {
+ $this->lexic_permissions['KEYWORDS'][$key] = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: set_comments_style
+ * --------------------------
+ * Sets the styles for comment groups. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ */
+ function set_comments_style ( $key, $style, $preserve_defaults = false )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->language_data['STYLES']['COMMENTS'][$key] .= $style;
+ }
+ else
+ {
+ $this->language_data['STYLES']['COMMENTS'][$key] = $style;
+ }
+ }
+
+
+ /**
+ * method: set_comments_highlighting
+ * ---------------------------------
+ * Turns highlighting on/off for comment groups
+ */
+ function set_comments_highlighting ( $key, $flag = true )
+ {
+ $this->lexic_permissions['COMMENTS'][$key] = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: set_escape_characters_style
+ * -----------------------------------
+ * Sets the styles for escaped characters. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ */
+ function set_escape_characters_style ( $style, $preserve_defaults = false )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->language_data['STYLES']['ESCAPE_CHAR'][0] .= $style;
+ }
+ else
+ {
+ $this->language_data['STYLES']['ESCAPE_CHAR'][0] = $style;
+ }
+ }
+
+
+ /**
+ * method: set_escape_characters_highlighting
+ * ------------------------------------------
+ * Turns highlighting on/off for escaped characters
+ */
+ function set_escape_characters_highlighting ( $flag = true )
+ {
+ $this->lexic_permissions['ESCAPE_CHAR'] = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: set_brackets_style
+ * --------------------------
+ * Sets the styles for brackets. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ *
+ * This method is DEPRECATED: use set_symbols_style instead.
+ * This method will be removed in 1.2.X
+ */
+ function set_brackets_style ( $style, $preserve_defaults = false )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->language_data['STYLES']['BRACKETS'][0] .= $style;
+ }
+ else
+ {
+ $this->language_data['STYLES']['BRACKETS'][0] = $style;
+ }
+ }
+
+
+ /**
+ * method: set_brackets_highlighting
+ * ---------------------------------
+ * Turns highlighting on/off for brackets
+ *
+ * This method is DEPRECATED: use set_symbols_highlighting instead.
+ * This method will be remove in 1.2.X
+ */
+ function set_brackets_highlighting ( $flag )
+ {
+ $this->lexic_permissions['BRACKETS'] = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: set_symbols_style
+ * --------------------------
+ * Sets the styles for symbols. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ */
+ function set_symbols_style ( $style, $preserve_defaults = false )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->language_data['STYLES']['SYMBOLS'][0] .= $style;
+ }
+ else
+ {
+ $this->language_data['STYLES']['SYMBOLS'][0] = $style;
+ }
+ // For backward compatibility
+ $this->set_brackets_style ( $style, $preserve_defaults );
+ }
+
+
+ /**
+ * method: set_symbols_highlighting
+ * ---------------------------------
+ * Turns highlighting on/off for symbols
+ */
+ function set_symbols_highlighting ( $flag )
+ {
+ $this->lexic_permissions['SYMBOLS'] = ( $flag ) ? true : false;
+ // For backward compatibility
+ $this->set_brackets_highlighting ( $flag );
+ }
+
+
+ /**
+ * method: set_strings_style
+ * -------------------------
+ * Sets the styles for strings. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ */
+ function set_strings_style ( $style, $preserve_defaults = false )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->language_data['STYLES']['STRINGS'][0] .= $style;
+ }
+ else
+ {
+ $this->language_data['STYLES']['STRINGS'][0] = $style;
+ }
+ }
+
+
+ /**
+ * method: set_strings_highlighting
+ * --------------------------------
+ * Turns highlighting on/off for strings
+ */
+ function set_strings_highlighting ( $flag )
+ {
+ $this->lexic_permissions['STRINGS'] = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: set_numbers_style
+ * -------------------------
+ * Sets the styles for numbers. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ */
+ function set_numbers_style ( $style, $preserve_defaults = false )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->language_data['STYLES']['NUMBERS'][0] .= $style;
+ }
+ else
+ {
+ $this->language_data['STYLES']['NUMBERS'][0] = $style;
+ }
+ }
+
+
+ /**
+ * method: set_numbers_highlighting
+ * --------------------------------
+ * Turns highlighting on/off for numbers
+ */
+ function set_numbers_highlighting ( $flag )
+ {
+ $this->lexic_permissions['NUMBERS'] = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: set_methods_style
+ * -------------------------
+ * Sets the styles for methods. $key is a number that references the
+ * appropriate "object splitter" - see the language file for the language
+ * you are highlighting to get this number. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ */
+ function set_methods_style ( $key, $style, $preserve_defaults = false )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->language_data['STYLES']['METHODS'][$key] .= $style;
+ }
+ else
+ {
+ $this->language_data['STYLES']['METHODS'][$key] = $style;
+ }
+ }
+
+
+ /**
+ * method: set_methods_highlighting
+ * --------------------------------
+ * Turns highlighting on/off for methods
+ */
+ function set_methods_highlighting ( $flag )
+ {
+ $this->lexic_permissions['METHODS'] = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: set_regexps_style
+ * -------------------------
+ * Sets the styles for regexps. If $preserve_defaults is
+ * true, then styles are merged with the default styles, with the
+ * user defined styles having priority
+ */
+ function set_regexps_style ( $key, $style, $preserve_defaults = false )
+ {
+ if ( $preserve_defaults )
+ {
+ $this->language_data['STYLES']['REGEXPS'][$key] .= $style;
+ }
+ else
+ {
+ $this->language_data['STYLES']['REGEXPS'][$key] = $style;
+ }
+ }
+
+
+ /**
+ * method: set_regexps_highlighting
+ * --------------------------------
+ * Turns highlighting on/off for regexps
+ */
+ function set_regexps_highlighting ( $key, $flag )
+ {
+ $this->lexic_permissions['REGEXPS'][$key] = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: set_case_sensitivity
+ * ----------------------------
+ * Sets whether a set of keywords are checked for in a case sensitive manner
+ */
+ function set_case_sensitivity ( $key, $case )
+ {
+ $this->language_data['CASE_SENSITIVE'][$key] = ( $case ) ? true : false;
+ }
+
+
+ /**
+ * method: set_case_keywords
+ * -------------------------
+ * Sets the case that keywords should use when found. Use the constants:
+ * GESHI_CAPS_NO_CHANGE: leave keywords as-is
+ * GESHI_CAPS_UPPER: convert all keywords to uppercase where found
+ * GESHI_CAPS_LOWER: convert all keywords to lowercase where found
+ * Method added in 1.0.1
+ */
+ function set_case_keywords ( $case )
+ {
+ $this->language_data['CASE_KEYWORDS'] = $case;
+ }
+
+
+ /**
+ * method: set_tab_width
+ * ---------------------
+ * Sets how many spaces a tab is substituted for
+ * This method will probably be re-engineered later to allow customisability
+ * in the maximum and minimum number of tabs without mutulating data fields.
+ */
+ function set_tab_width ( $width )
+ {
+ if ( $width > $this->max_tabs ) $width = $this->max_tabs;
+ if ( $width < $this->min_tabs ) $width = $this->min_tabs;
+ $this->tab_width = $width;
+ }
+
+
+ /**
+ * method: enable_strict_mode
+ * --------------------------
+ * Enables/disables strict highlighting. Default is off, calling this
+ * method without parameters will turn it on. See documentation
+ * for more details on strict mode and where to use it
+ */
+ function enable_strict_mode ( $mode = true )
+ {
+ $this->strict_mode = ( $mode ) ? true : false;
+ // Turn on strict mode no matter what if language should always
+ // be in strict mode
+ if ( $this->language_data['STRICT_MODE_APPLIES'] == GESHI_ALWAYS )
+ {
+ $this->strict_mode = true;
+ }
+ // Turn off strict mode no matter what if language should never
+ // be in strict mode
+ elseif ( $this->language_data['STRICT_MODE_APPLIES'] == GESHI_NEVER )
+ {
+ $this->strict_mode = false;
+ }
+ }
+
+
+ /**
+ * method: disable_highlighting
+ * ----------------------------
+ * Disables all highlighting
+ */
+ function disable_highlighting ()
+ {
+ foreach ( $this->language_data['KEYWORDS'] as $key => $words )
+ {
+ $this->lexic_permissions['KEYWORDS'][$key] = false;
+ }
+ foreach ( $this->language_data['COMMENT_SINGLE'] as $key => $comment )
+ {
+ $this->lexic_permissions['COMMENTS'][$key] = false;
+ }
+ // Multiline comments
+ $this->lexic_permissions['COMMENTS']['MULTI'] = false;
+ // Escape characters
+ $this->lexic_permissions['ESCAPE_CHAR'] = false;
+ // Brackets
+ $this->lexic_permissions['BRACKETS'] = false;
+ // Strings
+ $this->lexic_permissions['STRINGS'] = false;
+ // Numbers
+ $this->lexic_permissions['NUMBERS'] = false;
+ // Methods
+ $this->lexic_permissions['METHODS'] = false;
+ // Symbols
+ $this->lexic_permissions['SYMBOLS'] = false;
+ // Script
+ $this->lexic_permissions['SCRIPT'] = false;
+ // Regexps
+ foreach ( $this->language_data['REGEXPS'] as $key => $regexp )
+ {
+ $this->lexic_permissions['REGEXPS'][$key] = false;
+ }
+ // Context blocks
+ $this->enable_important_blocks = false;
+ }
+
+
+ /**
+ * method: enable_highlighting
+ * ---------------------------
+ * Enables all highlighting
+ */
+ function enable_highlighting ()
+ {
+ foreach ( $this->language_data['KEYWORDS'] as $key => $words )
+ {
+ $this->lexic_permissions['KEYWORDS'][$key] = true;
+ }
+ foreach ( $this->language_data['COMMENT_SINGLE'] as $key => $comment )
+ {
+ $this->lexic_permissions['COMMENTS'][$key] = true;
+ }
+ // Multiline comments
+ $this->lexic_permissions['COMMENTS']['MULTI'] = true;
+ // Escape characters
+ $this->lexic_permissions['ESCAPE_CHAR'] = true;
+ // Brackets
+ $this->lexic_permissions['BRACKETS'] = true;
+ // Strings
+ $this->lexic_permissions['STRINGS'] = true;
+ // Numbers
+ $this->lexic_permissions['NUMBERS'] = true;
+ // Methods
+ $this->lexic_permissions['METHODS'] = true;
+ // Symbols
+ $this->lexic_permissions['SYMBOLS'] = true;
+ // Script
+ $this->lexic_permissions['SCRIPT'] = true;
+ // Regexps
+ foreach ( $this->language_data['REGEXPS'] as $key => $regexp )
+ {
+ $this->lexic_permissions['REGEXPS'][$key] = true;
+ }
+ // Context blocks
+ $this->enable_important_blocks = true;
+ }
+
+
+ /**
+ * method: add_keyword
+ * -------------------
+ * Adds a keyword to a keyword group for highlighting
+ */
+ function add_keyword( $key, $word )
+ {
+ $this->language_data['KEYWORDS'][$key][] = $word;
+ }
+
+
+ /**
+ * method: remove_keyword
+ * ----------------------
+ * Removes a keyword from a keyword group
+ */
+ function remove_keyword ( $key, $word )
+ {
+ $this->language_data['KEYWORDS'][$key] = array_diff($this->language_data['KEYWORDS'][$key], array($word));
+ }
+
+
+ /**
+ * method: add_keyword_group
+ * -------------------------
+ * Creates a new keyword group
+ */
+ function add_keyword_group ( $key, $styles, $case_sensitive = true, $words = array() )
+ {
+ if ( !is_array($words) )
+ {
+ $words = array($words);
+ }
+ $this->language_data['KEYWORDS'][$key] = $words;
+ $this->lexic_permissions['KEYWORDS'][$key] = true;
+ $this->language_data['CASE_SENSITIVE'][$key] = $case_sensitive;
+ $this->language_data['STYLES']['KEYWORDS'][$key] = $styles;
+ }
+
+
+ /**
+ * method: remove_keyword_group
+ * ----------------------------
+ * Removes a keyword group
+ */
+ function remove_keyword_group ( $key )
+ {
+ unset($this->language_data['KEYWORDS'][$key]);
+ unset($this->lexic_permissions['KEYWORDS'][$key]);
+ unset($this->language_data['CASE_SENSITIVE'][$key]);
+ unset($this->language_data['STYLES']['KEYWORDS'][$key]);
+ }
+
+
+ /**
+ * method: set_header_content
+ * --------------------------
+ * Sets the content of the header block
+ */
+ function set_header_content ( $content )
+ {
+ $this->header_content = $content;
+ }
+
+
+ /**
+ * method: set_footer_content
+ * --------------------------
+ * Sets the content of the footer block
+ */
+ function set_footer_content ( $content )
+ {
+ $this->footer_content = $content;
+ }
+
+
+ /**
+ * method: set_header_content_style
+ * --------------------------------
+ * Sets the style for the header content
+ */
+ function set_header_content_style ( $style )
+ {
+ $this->header_content_style = $style;
+ }
+
+
+ /**
+ * method: set_footer_content_style
+ * --------------------------------
+ * Sets the style for the footer content
+ */
+ function set_footer_content_style ( $style )
+ {
+ $this->footer_content_style = $style;
+ }
+
+
+ /**
+ * method: set_url_for_keyword_group
+ * ---------------------------------
+ * Sets the base URL to be used for keywords
+ */
+ function set_url_for_keyword_group ( $group, $url )
+ {
+ $this->language_data['URLS'][$group] = $url;
+ }
+
+
+ /**
+ * method: set_link_styles
+ * -----------------------
+ * Sets styles for links in code
+ */
+ function set_link_styles ( $type, $styles )
+ {
+ $this->link_styles[$type] = $styles;
+ }
+
+
+ /**
+ * method: set_link_target
+ * -----------------------
+ * Sets the target for links in code
+ */
+ function set_link_target ( $target )
+ {
+ if ( empty( $target ) )
+ {
+ $this->link_target = '';
+ }
+ else
+ {
+ $this->link_target = ' target="' . $target . '" ';
+ }
+ }
+
+
+ /**
+ * method: set_important_styles
+ * ----------------------------
+ * Sets styles for important parts of the code
+ */
+ function set_important_styles ( $styles )
+ {
+ $this->important_styles = $styles;
+ }
+
+
+ /**
+ * method: enable_important_blocks
+ * -------------------------------
+ * Sets whether context-important blocks are highlighted
+ */
+ function enable_important_blocks ( $flag )
+ {
+ $this->enable_important_blocks = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: enable_ids
+ * ------------------
+ * Whether CSS IDs should be added to each line
+ */
+ function enable_ids ( $flag = true )
+ {
+ $this->add_ids = ( $flag ) ? true : false;
+ }
+
+
+ /**
+ * method: highlight_lines_extra
+ * -----------------------------
+ * Specifies which lines to highlight extra
+ */
+ function highlight_lines_extra ( $lines )
+ {
+ if ( is_array($lines) )
+ {
+ foreach ( $lines as $line )
+ {
+ $this->highlight_extra_lines[intval($line)] = intval($line);
+ }
+ }
+ else
+ {
+ $this->highlight_extra_lines[intval($lines)] = intval($lines);
+ }
+ }
+
+
+ /**
+ * method: set_highlight_lines_extra_style
+ * ---------------------------------------
+ * Sets the style for extra-highlighted lines
+ */
+ function set_highlight_lines_extra_style ( $styles )
+ {
+ $this->highlight_extra_lines_style = $styles;
+ }
+
+
+ /**
+ * method: start_line_numbers_at
+ * -----------------------------
+ * Sets what number line numbers should start at. Should
+ * be a positive integer, and will be converted to one.
+ */
+ function start_line_numbers_at ( $number )
+ {
+ $this->line_numbers_start = abs(intval($number));
+ }
+
+
+ /**
+ * method: set_encoding
+ * --------------------
+ * Sets the encoding used for htmlentities(), for international
+ * support.
+ */
+ function set_encoding ( $encoding )
+ {
+ $this->encoding = $encoding;
+ }
+
+
+ /**
+ * method: parse_code()
+ * --------------------
+ * Returns the code in $this->source, highlighted and surrounded by the
+ * nessecary HTML. This should only be called ONCE, cos it's SLOW!
+ * If you want to highlight the same source multiple times, you're better
+ * off doing a whole lot of str_replaces to replace the <span>s
+ */
+ function parse_code()
+ {
+ // Start the timer
+ $start_time = microtime();
+
+ // Firstly, if there is an error, we won't highlight
+ // FUTURE: maybe an option to try to force highlighting anyway?
+ if ( $this->error )
+ {
+ $result = $this->header();
+ if ( $this->header_type != GESHI_HEADER_PRE )
+ {
+ $result .= $this->indent(htmlentities($this->source, ENT_COMPAT, $this->encoding));
+ }
+ else
+ {
+ $result .= htmlentities($this->source, ENT_COMPAT, $this->encoding);
+ }
+ // Stop Timing
+ $this->set_time($start_time, microtime());
+ return $result . $this->footer();
+ }
+
+ // Add spaces for regular expression matching and line numbers
+ $code = ' ' . $this->source . ' ';
+ // Replace all newlines to a common form.
+ $code = str_replace("\r\n", "\n", $code);
+ $code = str_replace("\r", "\n", $code);
+
+ // Initialise various stuff
+ $length = strlen($code);
+ $STRING_OPEN = '';
+ $CLOSE_STRING = false;
+ $ESCAPE_CHAR_OPEN = false;
+ $COMMENT_MATCHED = false;
+ // Turn highlighting on if strict mode doesn't apply to this language
+ $HIGHLIGHTING_ON = ( !$this->strict_mode ) ? true : '';
+ // Whether to highlight inside a block of code
+ $HIGHLIGHT_INSIDE_STRICT = false;
+ $stuff_to_parse = '';
+ $result = '';
+
+ // "Important" selections are handled like multiline comments
+ if ( $this->enable_important_blocks )
+ {
+ $this->language_data['COMMENT_MULTI'][GESHI_START_IMPORTANT] = GESHI_END_IMPORTANT;
+ }
+
+
+ if ( $this->strict_mode )
+ {
+ // Break the source into bits. Each bit will be a portion of the code
+ // within script delimiters - for example, HTML between < and >
+ $parts = array(0 => array(0 => ''));
+ $k = 0;
+ for ( $i = 0; $i < $length; $i++ )
+ {
+ $char = substr($code, $i, 1);
+ if ( !$HIGHLIGHTING_ON )
+ {
+ foreach ( $this->language_data['SCRIPT_DELIMITERS'] as $key => $delimiters )
+ {
+ foreach ( $delimiters as $open => $close )
+ {
+ // Get the next little bit for this opening string
+ $check = substr($code, $i, strlen($open));
+ // If it matches...
+ if ( $check == $open )
+ {
+ // We start a new block with the highlightable
+ // code in it
+ $HIGHLIGHTING_ON = $open;
+ $i += strlen($open) - 1;
+ ++$k;
+ $char = $open;
+ $parts[$k][0] = $char;
+
+ // No point going around again...
+ break(2);
+ }
+ }
+ }
+ }
+ else
+ {
+ foreach ( $this->language_data['SCRIPT_DELIMITERS'] as $key => $delimiters )
+ {
+ foreach ( $delimiters as $open => $close )
+ {
+ if ( $open == $HIGHLIGHTING_ON )
+ {
+ // Found the closing tag
+ break(2);
+ }
+ }
+ }
+ // We check code from our current position BACKWARDS. This is so
+ // the ending string for highlighting can be included in the block
+ $check = substr($code, $i - strlen($close) + 1, strlen($close));
+ if ( $check == $close )
+ {
+ $HIGHLIGHTING_ON = '';
+ // Add the string to the rest of the string for this part
+ $parts[$k][1] = ( isset($parts[$k][1]) ) ? $parts[$k][1] . $char : $char;
+ ++$k;
+ $parts[$k][0] = '';
+ $char = '';
+ }
+ }
+ $parts[$k][1] = ( isset($parts[$k][1]) ) ? $parts[$k][1] . $char : $char;
+ }
+ $HIGHLIGHTING_ON = '';
+ }
+ else
+ {
+ // Not strict mode - simply dump the source into
+ // the array at index 1 (the first highlightable block)
+ $parts = array(
+ 1 => array(
+ 0 => '',
+ 1 => $code
+ )
+ );
+ }
+
+ // Now we go through each part. We know that even-indexed parts are
+ // code that shouldn't be highlighted, and odd-indexed parts should
+ // be highlighted
+ foreach ( $parts as $key => $data )
+ {
+ $part = $data[1];
+ // If this block should be highlighted...
+ if ( $key % 2 )
+ {
+ if ( $this->strict_mode )
+ {
+ // Find the class key for this block of code
+ foreach ( $this->language_data['SCRIPT_DELIMITERS'] as $script_key => $script_data )
+ {
+ foreach ( $script_data as $open => $close )
+ {
+ if ( $data[0] == $open )
+ {
+ break(2);
+ }
+ }
+ }
+
+ if ( $this->language_data['STYLES']['SCRIPT'][$script_key] != '' && $this->lexic_permissions['SCRIPT'] )
+ {
+ // Add a span element around the source to
+ // highlight the overall source block
+ if ( !$this->use_classes && $this->language_data['STYLES']['SCRIPT'][$script_key] != '' )
+ {
+ $attributes = ' style="' . $this->language_data['STYLES']['SCRIPT'][$script_key] . '"';
+ }
+ else
+ {
+ $attributes = ' class="sc' . $script_key . '"';
+ }
+ $result .= "<span$attributes>";
+ }
+ }
+
+ if ( !$this->strict_mode || $this->language_data['HIGHLIGHT_STRICT_BLOCK'][$script_key] )
+ {
+ // Now, highlight the code in this block. This code
+ // is really the engine of GeSHi (along with the method
+ // parse_non_string_part).
+ $length = strlen($part);
+ for ( $i = 0; $i < $length; $i++ )
+ {
+ // Get the next char
+ $char = substr($part, $i, 1);
+ // Is this char the newline and line numbers being used?
+ if ( ($this->line_numbers != GESHI_NO_LINE_NUMBERS || count($this->highlight_extra_lines) > 0) && $char == "\n" )
+ {
+ // If so, is there a string open? If there is, we should end it before
+ // the newline and begin it again (so when <li>s are put in the source
+ // remains XHTML compliant)
+ // NOTE TO SELF: This opens up possibility of config files specifying
+ // that languages can/cannot have multiline strings???
+ if ( $STRING_OPEN )
+ {
+ if ( !$this->use_classes )
+ {
+ $attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][0] . '"';
+ }
+ else
+ {
+ $attributes = ' class="st0"';
+ }
+ $char = '</span>' . $char . "<span$attributes>";
+ }
+ }
+ // Is this a match of a string delimiter?
+ elseif ( $char == $STRING_OPEN )
+ {
+ if ( ($this->lexic_permissions['ESCAPE_CHAR'] && $ESCAPE_CHAR_OPEN) || ($this->lexic_permissions['STRINGS'] && !$ESCAPE_CHAR_OPEN) )
+ {
+ $char .= '</span>';
+ }
+ if ( !$ESCAPE_CHAR_OPEN )
+ {
+ $STRING_OPEN = '';
+ $CLOSE_STRING = true;
+ }
+ $ESCAPE_CHAR_OPEN = false;
+ }
+ // Is this the start of a new string?
+ elseif ( in_array( $char, $this->language_data['QUOTEMARKS'] ) && ($STRING_OPEN == '') && $this->lexic_permissions['STRINGS'] )
+ {
+ $STRING_OPEN = $char;
+ if ( !$this->use_classes )
+ {
+ $attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][0] . '"';
+ }
+ else
+ {
+ $attributes = ' class="st0"';
+ }
+ $char = "<span$attributes>" . $char;
+
+ $result .= $this->parse_non_string_part( $stuff_to_parse );
+ $stuff_to_parse = '';
+ }
+ // Is this an escape char?
+ elseif ( ($char == $this->language_data['ESCAPE_CHAR']) && ($STRING_OPEN != '') )
+ {
+ if ( !$ESCAPE_CHAR_OPEN )
+ {
+ $ESCAPE_CHAR_OPEN = true;
+ if ( $this->lexic_permissions['ESCAPE_CHAR'] )
+ {
+ if ( !$this->use_classes )
+ {
+ $attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][0] . '"';
+ }
+ else
+ {
+ $attributes = ' class="es0"';
+ }
+ $char = "<span$attributes>" . $char;
+ }
+ }
+ else
+ {
+ $ESCAPE_CHAR_OPEN = false;
+ if ( $this->lexic_permissions['ESCAPE_CHAR'] )
+ {
+ $char .= '</span>';
+ }
+ }
+ }
+ elseif ( $ESCAPE_CHAR_OPEN )
+ {
+ if ( $this->lexic_permissions['ESCAPE_CHAR'] )
+ {
+ $char .= '</span>';
+ }
+ $ESCAPE_CHAR_OPEN = false;
+ $test_str = $char;
+ }
+ elseif ( $STRING_OPEN == '' )
+ {
+ // Is this a multiline comment?
+ foreach ( $this->language_data['COMMENT_MULTI'] as $open => $close )
+ {
+ $com_len = strlen($open);
+ $test_str = substr( $part, $i, $com_len );
+ $test_str_match = $test_str;
+ if ( $open == $test_str )
+ {
+ $COMMENT_MATCHED = true;
+ if ( $this->lexic_permissions['COMMENTS']['MULTI'] || $test_str == GESHI_START_IMPORTANT )
+ {
+ if ( $test_str != GESHI_START_IMPORTANT )
+ {
+ if ( !$this->use_classes )
+ {
+ $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS']['MULTI'] . '"';
+ }
+ else
+ {
+ $attributes = ' class="coMULTI"';
+ }
+ $test_str = "<span$attributes>" . htmlentities($test_str, ENT_COMPAT, $this->encoding);
+ }
+ else
+ {
+ if ( !$this->use_classes )
+ {
+ $attributes = ' style="' . $this->important_styles . '"';
+ }
+ else
+ {
+ $attributes = ' class="imp"';
+ }
+ // We don't include the start of the comment if it's an
+ // "important" part
+ $test_str = "<span$attributes>";
+ }
+ }
+ else
+ {
+ $test_str = htmlentities($test_str, ENT_COMPAT, $this->encoding);
+ }
+
+ $close_pos = strpos( $part, $close, $i + strlen($close) );
+
+ if ( $close_pos === false )
+ {
+ $close_pos = strlen($part);
+ }
+
+ // Short-cut through all the multiline code
+ $rest_of_comment = htmlentities(substr($part, $i + $com_len, $close_pos - $i), ENT_COMPAT, $this->encoding);
+ if ( ($this->lexic_permissions['COMMENTS']['MULTI'] || $test_str_match == GESHI_START_IMPORTANT) && ($this->line_numbers != GESHI_NO_LINE_NUMBERS || count($this->highlight_extra_lines) > 0) )
+ {
+ // strreplace to put close span and open span around multiline newlines
+ $test_str .= str_replace("\n", "</span>\n<span$attributes>", $rest_of_comment);
+ }
+ else
+ {
+ $test_str .= $rest_of_comment;
+ }
+
+ if ( $this->lexic_permissions['COMMENTS']['MULTI'] || $test_str_match == GESHI_START_IMPORTANT )
+ {
+ $test_str .= '</span>';
+ }
+ $i = $close_pos + $com_len - 1;
+ // parse the rest
+ $result .= $this->parse_non_string_part( $stuff_to_parse );
+ $stuff_to_parse = '';
+ break;
+ }
+ }
+ // If we haven't matched a multiline comment, try single-line comments
+ if ( !$COMMENT_MATCHED )
+ {
+ foreach ( $this->language_data['COMMENT_SINGLE'] as $comment_key => $comment_mark )
+ {
+ $com_len = strlen($comment_mark);
+ $test_str = substr( $part, $i, $com_len );
+ if ( $this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS] )
+ {
+ $match = ( $comment_mark == $test_str );
+ }
+ else
+ {
+ $match = ( strtolower($comment_mark) == strtolower($test_str) );
+ }
+ if ( $match )
+ {
+ $COMMENT_MATCHED = true;
+ if ( $this->lexic_permissions['COMMENTS'][$comment_key] )
+ {
+ if ( !$this->use_classes )
+ {
+ $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment_key] . '"';
+ }
+ else
+ {
+ $attributes = ' class="co' . $comment_key . '"';
+ }
+ $test_str = "<span$attributes>" . htmlentities($this->change_case($test_str), ENT_COMPAT, $this->encoding);
+ }
+ else
+ {
+ $test_str = htmlentities($test_str, ENT_COMPAT, $this->encoding);
+ }
+ $close_pos = strpos( $part, "\n", $i );
+ if ( $close_pos === false )
+ {
+ $close_pos = strlen($part);
+ }
+ $test_str .= htmlentities(substr($part, $i + $com_len, $close_pos - $i - $com_len), ENT_COMPAT, $this->encoding);
+ if ( $this->lexic_permissions['COMMENTS'][$comment_key] )
+ {
+ $test_str .= "</span>";
+ }
+ $test_str .= "\n";
+ $i = $close_pos;
+ // parse the rest
+ $result .= $this->parse_non_string_part( $stuff_to_parse );
+ $stuff_to_parse = '';
+ break;
+ }
+ }
+ }
+ }
+ // Otherwise, convert it to HTML form
+ elseif ( $STRING_OPEN != '' )
+ {
+ $char = htmlentities($char, ENT_COMPAT, $this->encoding);
+ }
+ // Where are we adding this char?
+ if ( !$COMMENT_MATCHED )
+ {
+ if ( ($STRING_OPEN == '') && !$CLOSE_STRING )
+ {
+ $stuff_to_parse .= $char;
+ }
+ else
+ {
+ $result .= $char;
+ $CLOSE_STRING = false;
+ }
+ }
+ else
+ {
+ $result .= $test_str;
+ $COMMENT_MATCHED = false;
+ }
+ }
+ // Parse the last bit
+ $result .= $this->parse_non_string_part( $stuff_to_parse );
+ $stuff_to_parse = '';
+ }
+ else
+ {
+ $result .= htmlentities($part, ENT_COMPAT, $this->encoding);
+ }
+ // Close the <span> that surrounds the block
+ if ( $this->strict_mode && $this->lexic_permissions['SCRIPT'] )
+ {
+ $result .= '</span>';
+ }
+ }
+ // Else not a block to highlight
+ else
+ {
+ $result .= htmlentities($part, ENT_COMPAT, $this->encoding);
+ }
+ }
+
+ // Parse the last stuff (redundant?)
+ $result .= $this->parse_non_string_part( $stuff_to_parse );
+
+ // Lop off the very first and last spaces
+ $result = substr($result, 1, strlen($result) - 1);
+
+ // Are we still in a string?
+ if ( $STRING_OPEN )
+ {
+ $result .= '</span>';
+ }
+
+ // We're finished: stop timing
+ $this->set_time($start_time, microtime());
+
+ return $this->finalise($result);
+ }
+
+ /**
+ * method: indent
+ * --------------
+ * Swaps out spaces and tabs for HTML indentation. Not needed if
+ * the code is in a pre block...
+ */
+ function indent ( $result )
+ {
+ $result = str_replace(' ', '&nbsp; ', $result);
+ $result = str_replace(' ', ' &nbsp;', $result);
+ $result = str_replace("\n ", "\n&nbsp;", $result);
+ $result = str_replace("\t", $this->get_tab_replacement(), $result);
+ if ( $this->line_numbers == GESHI_NO_LINE_NUMBERS )
+ {
+ $result = nl2br($result);
+ }
+ return $result;
+ }
+
+ /**
+ * method: change_case
+ * -------------------
+ * Changes the case of a keyword for those languages where a change is asked for
+ */
+ function change_case ( $instr )
+ {
+ if ( $this->language_data['CASE_KEYWORDS'] == GESHI_CAPS_UPPER )
+ {
+ return strtoupper($instr);
+ }
+ elseif ( $this->language_data['CASE_KEYWORDS'] == GESHI_CAPS_LOWER )
+ {
+ return strtolower($instr);
+ }
+ return $instr;
+ }
+
+
+ /**
+ * method: add_url_to_keyword
+ * --------------------------
+ * Adds a url to a keyword where needed.
+ * Added in 1.0.2
+ */
+ function add_url_to_keyword ( $keyword, $group, $start_or_end )
+ {
+ if ( isset($this->language_data['URLS'][$group]) && $this->language_data['URLS'][$group] != '' && substr($keyword, 0, 5) != '&lt;/' )
+ {
+ // There is a base group for this keyword
+
+ if ( $start_or_end == 'BEGIN' )
+ {
+ // HTML workaround... not good form (tm) but should work for 1.0.X
+ $keyword = ( substr($keyword, 0, 4) == '&lt;' ) ? substr($keyword, 4) : $keyword;
+ $keyword = ( substr($keyword, -4) == '&gt;' ) ? substr($keyword, 0, strlen($keyword) - 4) : $keyword;
+ if ( $keyword != '' )
+ {
+ $keyword = ( $this->language_data['CASE_SENSITIVE'][$group] ) ? $keyword : strtolower($keyword);
+ return '<|UR1|"' . str_replace(array('{FNAME}', '.'), array(htmlentities($keyword, ENT_COMPAT, $this->encoding), '<DOT>'), $this->language_data['URLS'][$group]) . '">';
+ }
+ return '';
+ }
+ else
+ {
+ return '</a>';
+ }
+ }
+ }
+
+
+ /**
+ * method: parse_non_string_part
+ * -----------------------------
+ * Takes a string that has no strings or comments in it, and highlights
+ * stuff like keywords, numbers and methods.
+ */
+ function parse_non_string_part ( &$stuff_to_parse )
+ {
+ $stuff_to_parse = ' ' . quotemeta(htmlentities($stuff_to_parse, ENT_COMPAT, $this->encoding));
+ // These vars will disappear in the future
+ $func = '$this->change_case';
+ $func2 = '$this->add_url_to_keyword';
+
+
+ //
+ // Regular expressions
+ //
+ foreach ( $this->language_data['REGEXPS'] as $key => $regexp )
+ {
+ if ( $this->lexic_permissions['REGEXPS'][$key] )
+ {
+ if ( is_array($regexp) )
+ {
+ $stuff_to_parse = preg_replace( "#" . $regexp[GESHI_SEARCH] . "#{$regexp[GESHI_MODIFIERS]}", "{$regexp[GESHI_BEFORE]}<|!REG3XP$key!>{$regexp[GESHI_REPLACE]}|>{$regexp[GESHI_AFTER]}", $stuff_to_parse);
+ }
+ else
+ {
+ $stuff_to_parse = preg_replace( "#(" . $regexp . ")#", "<|!REG3XP$key!>\\1|>", $stuff_to_parse);
+ }
+ }
+ }
+
+ //
+ // Highlight numbers. This regexp sucks... anyone with a regexp that WORKS
+ // here wins a cookie if they send it to me. At the moment there's two doing
+ // almost exactly the same thing, except the second one prevents a number
+ // being highlighted twice (eg <span...><span...>5</span></span>)
+ // Put /NUM!/ in for the styles, which gets replaced at the end.
+ //
+ if ( $this->lexic_permissions['NUMBERS'] && preg_match('#[0-9]#', $stuff_to_parse ) )
+ {
+ $stuff_to_parse = preg_replace('#([^a-zA-Z0-9\#])([0-9]+)([^a-zA-Z0-9])#', "\\1<|/NUM!/>\\2|>\\3", $stuff_to_parse);
+ $stuff_to_parse = preg_replace('#([^a-zA-Z0-9\#>])([0-9]+)([^a-zA-Z0-9])#', "\\1<|/NUM!/>\\2|>\\3", $stuff_to_parse);
+ }
+
+ // Highlight keywords
+ // if there is a couple of alpha symbols there *might* be a keyword
+ if ( preg_match('#[a-zA-Z]{2,}#', $stuff_to_parse) )
+ {
+ foreach ( $this->language_data['KEYWORDS'] as $k => $keywordset )
+ {
+ if ( $this->lexic_permissions['KEYWORDS'][$k] )
+ {
+ foreach ( $keywordset as $keyword )
+ {
+ $keyword = quotemeta($keyword);
+ //
+ // This replacement checks the word is on it's own (except if brackets etc
+ // are next to it), then highlights it. We don't put the color=" for the span
+ // in just yet - otherwise languages with the keywords "color" or "or" have
+ // a fit.
+ //
+ if ( false !== stristr($stuff_to_parse, $keyword ) )
+ {
+ $stuff_to_parse .= ' ';
+ // Might make a more unique string for putting the number in soon
+ // Basically, we don't put the styles in yet because then the styles themselves will
+ // get highlighted if the language has a CSS keyword in it (like CSS, for example ;))
+ $styles = "/$k/";
+ $keyword = quotemeta($keyword);
+ if ( $this->language_data['CASE_SENSITIVE'][$k] )
+ {
+ $stuff_to_parse = preg_replace("#([^a-zA-Z0-9\$_\|\.\#;>])($keyword)([^a-zA-Z0-9_<\|%\-&])#e", "'\\1' . $func2('\\2', '$k', 'BEGIN') . '<|$styles>' . $func('\\2') . '|>' . $func2('\\2', '$k', 'END') . '\\3'", $stuff_to_parse);
+ }
+ else
+ {
+ // Change the case of the word.
+ $stuff_to_parse = preg_replace("#([^a-zA-Z0-9\$_\|\.\#;>])($keyword)([^a-zA-Z0-9_<\|%\-&])#ie", "'\\1' . $func2('\\2', '$k', 'BEGIN') . '<|$styles>' . $func('\\2') . '|>' . $func2('\\2', '$k', 'END') . '\\3'", $stuff_to_parse);
+ }
+ $stuff_to_parse = substr($stuff_to_parse, 0, strlen($stuff_to_parse) - 1);
+ }
+ }
+ }
+ }
+ }
+
+ //
+ // Now that's all done, replace /[number]/ with the correct styles
+ //
+ foreach ( $this->language_data['KEYWORDS'] as $k => $kws )
+ {
+ if ( !$this->use_classes )
+ {
+ $attributes = ' style="' . $this->language_data['STYLES']['KEYWORDS'][$k] . '"';
+ }
+ else
+ {
+ $attributes = ' class="kw' . $k . '"';
+ }
+ $stuff_to_parse = str_replace("/$k/", $attributes, $stuff_to_parse);
+ }
+
+ // Put number styles in
+ if ( !$this->use_classes && $this->lexic_permissions['NUMBERS'] )
+ {
+ $attributes = ' style="' . $this->language_data['STYLES']['NUMBERS'][0] . '"';
+ }
+ else
+ {
+ $attributes = ' class="nu0"';
+ }
+ $stuff_to_parse = str_replace('/NUM!/', $attributes, $stuff_to_parse);
+
+ //
+ // Highlight methods and fields in objects
+ //
+ if ( $this->lexic_permissions['METHODS'] && $this->language_data['OOLANG'] )
+ {
+ foreach ( $this->language_data['OBJECT_SPLITTERS'] as $key => $splitter )
+ {
+ if ( false !== stristr($stuff_to_parse, $this->language_data['OBJECT_SPLITTERS'][$key]) )
+ {
+ if ( !$this->use_classes )
+ {
+ $attributes = ' style="' . $this->language_data['STYLES']['METHODS'][$key] . '"';
+ }
+ else
+ {
+ $attributes = ' class="me' . $key . '"';
+ }
+ $stuff_to_parse = preg_replace("#(" . quotemeta($this->language_data['OBJECT_SPLITTERS'][$key]) . "[\s]*)([a-zA-Z\*\(][a-zA-Z0-9_\*]*)#", "\\1<|$attributes>\\2|>", $stuff_to_parse);
+ }
+ }
+ }
+
+ //
+ // Highlight brackets. Yes, I've tried adding a semi-colon to this list.
+ // You try it, and see what happens ;)
+ // TODO: Fix lexic permissions not converting entities if shouldn't
+ // be highlighting regardless
+ //
+ if ( $this->lexic_permissions['BRACKETS'] )
+ {
+ $code_entities_match = array('[', ']', '(', ')', '{', '}');
+ if ( !$this->use_classes )
+ {
+ $code_entities_replace = array(
+ '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">&#91;|>',
+ '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">&#93;|>',
+ '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">&#40;|>',
+ '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">&#41;|>',
+ '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">&#123;|>',
+ '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">&#125;|>',
+ );
+ }
+ else
+ {
+ $code_entities_replace = array(
+ '<| class="br0">&#91;|>',
+ '<| class="br0">&#93;|>',
+ '<| class="br0">&#40;|>',
+ '<| class="br0">&#41;|>',
+ '<| class="br0">&#123;|>',
+ '<| class="br0">&#125;|>',
+ );
+ }
+ $stuff_to_parse = str_replace( $code_entities_match, $code_entities_replace, $stuff_to_parse );
+ }
+
+ //
+ // Add class/style for regexps
+ //
+ foreach ( $this->language_data['REGEXPS'] as $key => $regexp )
+ {
+ if ( $this->lexic_permissions['REGEXPS'][$key] )
+ {
+ if ( !$this->use_classes )
+ {
+ $attributes = ' style="' . $this->language_data['STYLES']['REGEXPS'][$key] . '"';
+ }
+ else
+ {
+ $attributes = ' class="re' . $key . '"';
+ }
+ $stuff_to_parse = str_replace("!REG3XP$key!", "$attributes", $stuff_to_parse);
+ }
+ }
+
+ // Replace <DOT> with . for urls
+ $stuff_to_parse = str_replace('<DOT>', '.', $stuff_to_parse);
+ // Replace <|UR1| with <a href= for urls also
+ if ( isset($this->link_styles[GESHI_LINK]) )
+ {
+ if ( $this->use_classes )
+ {
+ $stuff_to_parse = str_replace('<|UR1|', '<a' . $this->link_target . ' href=', $stuff_to_parse);
+ }
+ else
+ {
+ $stuff_to_parse = str_replace('<|UR1|', '<a' . $this->link_target . ' style="' . $this->link_styles[GESHI_LINK] . '" href=', $stuff_to_parse);
+ }
+ }
+ else
+ {
+ $stuff_to_parse = str_replace('<|UR1|', '<a' . $this->link_target . ' href=', $stuff_to_parse);
+ }
+
+ //
+ // NOW we add the span thingy ;)
+ //
+
+ $stuff_to_parse = str_replace('<|', '<span', $stuff_to_parse);
+ $stuff_to_parse = str_replace ( '|>', '</span>', $stuff_to_parse );
+
+ return substr(stripslashes($stuff_to_parse), 1);
+ }
+
+ /**
+ * method: set_time
+ * ----------------
+ * Sets the time taken to parse the code
+ */
+ function set_time ( $start_time, $end_time )
+ {
+ $start = explode(' ', $start_time);
+ $end = explode(' ', $end_time);
+ $this->time = $end[0] + $end[1] - $start[0] - $start[1];
+ }
+
+ /**
+ * method: get_time
+ * ----------------
+ * Gets the time taken to parse the code
+ */
+ function get_time ()
+ {
+ return $this->time;
+ }
+
+ /**
+ * method: load_language
+ * ---------------------
+ * Gets language information and stores it for later use
+ */
+ function load_language ()
+ {
+ $file_name = $this->language_path . $this->language . '.php';
+ if ( !is_readable($file_name))
+ {
+ $this->error = GESHI_ERROR_NO_SUCH_LANG;
+ return;
+ }
+ require($file_name);
+ // Perhaps some checking might be added here later to check that
+ // $language data is a valid thing but maybe not
+ $this->language_data = $language_data;
+ // Set strict mode if should be set
+ if ( $this->language_data['STRICT_MODE_APPLIES'] == GESHI_ALWAYS )
+ {
+ $this->strict_mode = true;
+ }
+ // Set permissions for all lexics to true
+ // so they'll be highlighted by default
+ $this->enable_highlighting();
+ // Set default class for CSS
+ $this->overall_class = $this->language;
+ }
+
+ /**
+ * method: get_tab_replacement
+ * ---------------------------
+ * Gets the replacement string for tabs in the source code. Useful for
+ * HTML highlighting, where tabs don't mean anything to a browser.
+ */
+ function get_tab_replacement ()
+ {
+ $i = 0;
+ $result = '';
+ while ( $i < $this->tab_width )
+ {
+ $i++;
+ if ( $i % 2 == 0 )
+ {
+ $result .= ' ';
+ }
+ else
+ {
+ $result .= '&nbsp;';
+ }
+ }
+ return $result;
+ }
+
+ /**
+ * method: finalise
+ * ----------------
+ * Takes the parsed code and various options, and creates the HTML
+ * surrounding it to make it look nice.
+ */
+ function finalise ( $parsed_code )
+ {
+ // Remove end parts of important declarations
+ // This is BUGGY!! My fault for bad code: fix coming in 1.2
+ if ( $this->enable_important_blocks && (strstr($parsed_code, htmlentities(GESHI_START_IMPORTANT, ENT_COMPAT, $this->encoding)) === false) )
+ {
+ $parsed_code = str_replace(htmlentities(GESHI_END_IMPORTANT, ENT_COMPAT, $this->encoding), '', $parsed_code);
+ }
+
+ // Add HTML whitespace stuff if we're using the <div> header
+ if ( $this->header_type == GESHI_HEADER_DIV )
+ {
+ $parsed_code = $this->indent($parsed_code);
+ }
+
+ // If we're using line numbers, we insert <li>s and appropriate
+ // markup to style them (otherwise we don't need to do anything)
+ if ( $this->line_numbers != GESHI_NO_LINE_NUMBERS )
+ {
+ // If we're using the <pre> header, we shouldn't add newlines because
+ // the <pre> will line-break them (and the <li>s already do this for us)
+ $ls = ( $this->header_type != GESHI_HEADER_PRE ) ? "\n" : '';
+ // Get code into lines
+ $code = explode("\n", $parsed_code);
+ // Set vars to defaults for following loop
+ $parsed_code = '';
+ $i = 0;
+ // Foreach line...
+ foreach ( $code as $line )
+ {
+ $line = ( $line ) ? $line : '&nbsp;';
+ // If this is a "special line"...
+ if ( $this->line_numbers == GESHI_FANCY_LINE_NUMBERS && $i % $this->line_nth_row == ($this->line_nth_row - 1) )
+ {
+ // Set the attributes to style the line
+ if ( $this->use_classes )
+ {
+ $attr = ' class="li2"';
+ $def_attr = ' class="de2"';
+ }
+ else
+ {
+ $attr = ' style="' . $this->line_style2 . '"';
+ // This style "covers up" the special styles set for special lines
+ // so that styles applied to special lines don't apply to the actual
+ // code on that line
+ $def_attr = ' style="' . $this->code_style . '"';
+ }
+ // Span or div?
+ $start = "<div$def_attr>";
+ $end = '</div>';
+ }
+ else
+ {
+ if ( $this->use_classes )
+ {
+ $def_attr = ' class="de1"';
+ }
+ else
+ {
+ $def_attr = ' style="' . $this->code_style . '"';
+ }
+ // Reset everything
+ $attr = '';
+ // Span or div?
+ $start = "<div$def_attr>";
+ $end = '</div>';
+ }
+
+ ++$i;
+ // Are we supposed to use ids? If so, add them
+ if ( $this->add_ids )
+ {
+ $attr .= " id=\"{$this->overall_id}-{$i}\"";
+ }
+ if ( $this->use_classes && in_array($i, $this->highlight_extra_lines) )
+ {
+ $attr .= " class=\"ln-xtra\"";
+ }
+ if ( !$this->use_classes && in_array($i, $this->highlight_extra_lines) )
+ {
+ $attr .= " style=\"{$this->highlight_extra_lines_style}\"";
+ }
+
+ // Add in the line surrounded by appropriate list HTML
+ $parsed_code .= "<li$attr>$start$line$end</li>$ls";
+ }
+ }
+ else
+ {
+ // No line numbers, but still need to handle highlighting lines extra.
+ // Have to use divs so the full width of the code is highlighted
+ $code = explode("\n", $parsed_code);
+ $parsed_code = '';
+ $i = 0;
+ foreach ( $code as $line )
+ {
+ // Make lines have at least one space in them if they're empty
+ $line = ( $line ) ? $line : '&nbsp;';
+ if ( in_array(++$i, $this->highlight_extra_lines) )
+ {
+ if ( $this->use_classes )
+ {
+ //$id = ( $this->overall_id != '' ) ? $this->overall_id . "-$i" : $this->overall_class . "-$i";
+ $parsed_code .= '<div class="ln-xtra">';
+ }
+ else
+ {
+ $parsed_code .= "<div style=\"{$this->highlight_extra_lines_style}\">";
+ }
+ $parsed_code .= $line . "</div>\n";
+ }
+ else
+ {
+ $parsed_code .= $line . "\n";
+ }
+ }
+ }
+
+ return $this->header() . chop($parsed_code) . $this->footer();
+ }
+
+
+ /**
+ * method: header
+ * --------------
+ * Creates the header for the code block (with correct attributes)
+ */
+ function header ()
+ {
+ // Get attributes needed
+ $attributes = $this->get_attributes();
+
+ if ( $this->use_classes )
+ {
+ $ol_attributes = '';
+ }
+ else
+ {
+ $ol_attributes = ' style="margin: 0;"';
+ }
+
+ if ( $this->line_numbers_start != 1 )
+ {
+ $ol_attributes .= ' start="' . $this->line_numbers_start . '"';
+ }
+
+ // Get the header HTML
+ $header = $this->format_header_content();
+
+ // Work out what to return and do it
+ if ( $this->line_numbers != GESHI_NO_LINE_NUMBERS )
+ {
+ if ( $this->header_type == GESHI_HEADER_PRE )
+ {
+ return "<pre$attributes>$header<ol$ol_attributes>";
+ }
+ elseif ( $this->header_type == GESHI_HEADER_DIV )
+ {
+ return "<div$attributes>$header<ol$ol_attributes>";
+ }
+ }
+ else
+ {
+ if ( $this->header_type == GESHI_HEADER_PRE )
+ {
+ return "<pre$attributes>$header";
+ }
+ elseif ( $this->header_type == GESHI_HEADER_DIV )
+ {
+ return "<div$attributes>$header";
+ }
+ }
+ }
+
+
+ /**
+ * method: format_header_content
+ * -----------------------------
+ * Returns the header content, formatted for output
+ */
+ function format_header_content ()
+ {
+ $header = $this->header_content;
+ if ( $header )
+ {
+ if ( $this->header_type == GESHI_HEADER_PRE )
+ {
+ $header = str_replace("\n", '', $header);
+ }
+ $header = $this->replace_keywords($header);
+
+ if ( $this->use_classes )
+ {
+ $attr = ' class="head"';
+ }
+ else
+ {
+ $attr = " style=\"{$this->header_content_style}\"";
+ }
+ return "<div$attr>$header</div>";
+ }
+ }
+
+
+ /**
+ * method: footer
+ * --------------
+ * Returns the footer for the code block. Ending newline removed in 1.0.2
+ */
+ function footer ()
+ {
+ $footer_content = $this->format_footer_content();
+
+ if ( $this->header_type == GESHI_HEADER_DIV )
+ {
+ if ( $this->line_numbers != GESHI_NO_LINE_NUMBERS )
+ {
+ return "</ol>$footer_content</div>";
+ }
+ return "$footer_content</div>";
+ }
+ else
+ {
+ if ( $this->line_numbers != GESHI_NO_LINE_NUMBERS )
+ {
+ return "</ol>$footer_content</pre>";
+ }
+ return "$footer_content</pre>";
+ }
+ }
+
+
+ /**
+ * method: format_footer_content
+ * -----------------------------
+ * Returns the footer content, formatted for output
+ */
+ function format_footer_content ()
+ {
+ $footer = $this->footer_content;
+ if ( $footer )
+ {
+ if ( $this->header_type == GESHI_HEADER_PRE )
+ {
+ $footer = str_replace("\n", '', $footer);;
+ }
+ $footer = $this->replace_keywords($footer);
+
+ if ( $this->use_classes )
+ {
+ $attr = ' class="foot"';
+ }
+ else
+ {
+ $attr = " style=\"{$this->footer_content_style}\">";
+ }
+ return "<div$attr>$footer</div>";
+ }
+ }
+
+
+ /**
+ * method: replace_keywords
+ * ----------------------
+ * Replaces certain keywords in the header and footer with
+ * certain configuration values
+ */
+ function replace_keywords ( $instr )
+ {
+ $keywords = $replacements = array();
+
+ $keywords[] = '<TIME>';
+ $replacements[] = number_format($this->get_time(), 3);
+
+ $keywords[] = '<LANGUAGE>';
+ $replacements[] = $this->language;
+
+ $keywords[] = '<VERSION>';
+ $replacements[] = '1.0.4';
+
+ return str_replace($keywords, $replacements, $instr);
+ }
+
+ /**
+ * method: get_attributes
+ * ----------------------
+ * Gets the CSS attributes for this code
+ */
+ function get_attributes ()
+ {
+ $attributes = '';
+
+ if ( $this->overall_class != '' && $this->use_classes )
+ {
+ $attributes .= " class=\"{$this->overall_class}\"";
+ }
+ if ( $this->overall_id != '' )
+ {
+ $attributes .= " id=\"{$this->overall_id}\"";
+ }
+ if ( $this->overall_style != '' && !$this->use_classes )
+ {
+ $attributes .= ' style="' . $this->overall_style . '"';
+ }
+ return $attributes;
+ }
+
+
+ /**
+ * method: get_stylesheet
+ * ----------------------
+ * Returns a stylesheet for the highlighted code. If $economy mode
+ * is true, we only return the stylesheet declarations that matter for
+ * this code block instead of the whole thing
+ */
+ function get_stylesheet ( $economy_mode = true )
+ {
+ // If there's an error, chances are that the language file
+ // won't have populated the language data file, so we can't
+ // risk getting a stylesheet...
+ if ( $this->error )
+ {
+ return '';
+ }
+ // First, work out what the selector should be. If there's an ID,
+ // that should be used, the same for a class. Otherwise, a selector
+ // of '' means that these styles will be applied anywhere
+ $selector = ( $this->overall_id != '' ) ? "#{$this->overall_id} " : '';
+ $selector = ( $selector == '' && $this->overall_class != '' ) ? ".{$this->overall_class} " : $selector;
+
+ // Header of the stylesheet
+ if ( !$economy_mode )
+ {
+ $stylesheet = "/**\n * GeSHi Dynamically Generated Stylesheet\n * --------------------------------------\n * Dynamically generated stylesheet for {$this->language}\n * CSS class: {$this->overall_class}, CSS id: {$this->overall_id}\n * GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter)\n */\n";
+ }
+ else
+ {
+ $stylesheet = '/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */' . "\n";
+ }
+
+ // Set the <ol> to have no effect at all if there are line numbers
+ // (<ol>s have margins that should be destroyed so all layout is
+ // controlled by the set_overall_style method, which works on the
+ // <pre> or <div> container). Additionally, set default styles for lines
+ if ( !$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS )
+ {
+ $stylesheet .= "$selector, {$selector}ol, {$selector}ol li {margin: 0;}\n";
+ $stylesheet .= "$selector.de1, $selector.de2 {{$this->code_style}}\n";
+ }
+
+ // Add overall styles
+ if ( !$economy_mode || $this->overall_style != '' )
+ {
+ $stylesheet .= "$selector {{$this->overall_style}}\n";
+ }
+
+ // Add styles for links
+ foreach ( $this->link_styles as $key => $style )
+ {
+ if ( !$economy_mode || $key == GESHI_LINK && $style != '' )
+ {
+ $stylesheet .= "{$selector}a:link {{$style}}\n";
+ }
+ if ( !$economy_mode || $key == GESHI_HOVER && $style != '' )
+ {
+ $stylesheet .= "{$selector}a:hover {{$style}}\n";
+ }
+ if ( !$economy_mode || $key == GESHI_ACTIVE && $style != '' )
+ {
+ $stylesheet .= "{$selector}a:active {{$style}}\n";
+ }
+ if ( !$economy_mode || $key == GESHI_VISITED && $style != '' )
+ {
+ $stylesheet .= "{$selector}a:visited {{$style}}\n";
+ }
+ }
+
+ // Header and footer
+ if ( !$economy_mode || $this->header_content_style != '' )
+ {
+ $stylesheet .= "$selector.head {{$this->header_content_style}}\n";
+ }
+ if ( !$economy_mode || $this->footer_content_style != '' )
+ {
+ $stylesheet .= "$selector.foot {{$this->footer_content_style}}\n";
+ }
+
+ // Styles for important stuff
+ if ( !$economy_mode || $this->important_styles != '' )
+ {
+ $stylesheet .= "$selector.imp {{$this->important_styles}}\n";
+ }
+
+
+ // Styles for lines being highlighted extra
+ if ( !$economy_mode || count($this->highlight_extra_lines) )
+ {
+ /*foreach ( $this->highlight_extra_lines as $line )
+ {
+ $id = ( $this->overall_id != '' ) ? $this->overall_id . "-$line" : $this->overall_class . "-$line";
+ $stylesheet .= "$selector#$id,";
+ }*/
+ $stylesheet .= "$selector.ln-xtra {{$this->highlight_extra_lines_style}}\n";
+ }
+
+
+ // Simple line number styles
+ if ( !$economy_mode || ($this->line_numbers != GESHI_NO_LINE_NUMBERS && $this->line_style1 != '') )
+ {
+ $stylesheet .= "{$selector}li {{$this->line_style1}}\n";
+ }
+
+ // If there is a style set for fancy line numbers, echo it out
+ if ( !$economy_mode || ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && $this->line_style2 != '') )
+ {
+ $stylesheet .= "{$selector}li.li2 {{$this->line_style2}}\n";
+ }
+
+
+ foreach ( $this->language_data['STYLES']['KEYWORDS'] as $group => $styles )
+ {
+ if ( !$economy_mode || !($economy_mode && (!$this->lexic_permissions['KEYWORDS'][$group] || $styles == '')) )
+ {
+ $stylesheet .= "$selector.kw$group {{$styles}}\n";
+ }
+ }
+ foreach ( $this->language_data['STYLES']['COMMENTS'] as $group => $styles )
+ {
+ if ( !$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && !$this->lexic_permissions['COMMENTS'][$group]) )
+ {
+ $stylesheet .= "$selector.co$group {{$styles}}\n";
+ }
+ }
+ foreach ( $this->language_data['STYLES']['ESCAPE_CHAR'] as $group => $styles )
+ {
+ if ( !$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && !$this->lexic_permissions['ESCAPE_CHAR']) )
+ {
+ $stylesheet .= "$selector.es$group {{$styles}}\n";
+ }
+ }
+ foreach ( $this->language_data['STYLES']['SYMBOLS'] as $group => $styles )
+ {
+ if ( !$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && !$this->lexic_permissions['BRACKETS']) )
+ {
+ $stylesheet .= "$selector.br$group {{$styles}}\n";
+ }
+ }
+ foreach ( $this->language_data['STYLES']['STRINGS'] as $group => $styles )
+ {
+ if ( !$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && !$this->lexic_permissions['STRINGS']) )
+ {
+ $stylesheet .= "$selector.st$group {{$styles}}\n";
+ }
+ }
+ foreach ( $this->language_data['STYLES']['NUMBERS'] as $group => $styles )
+ {
+ if ( !$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && !$this->lexic_permissions['NUMBERS']) )
+ {
+ $stylesheet .= "$selector.nu$group {{$styles}}\n";
+ }
+ }
+ foreach ( $this->language_data['STYLES']['METHODS'] as $group => $styles )
+ {
+ if ( !$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && !$this->lexic_permissions['METHODS']) )
+ {
+ $stylesheet .= "$selector.me$group {{$styles}}\n";
+ }
+ }
+ foreach ( $this->language_data['STYLES']['SCRIPT'] as $group => $styles )
+ {
+ if ( !$economy_mode || !($economy_mode && $styles == '') /*&& !($economy_mode && !$this->lexic_permissions['SCRIPT'])*/ )
+ {
+ $stylesheet .= "$selector.sc$group {{$styles}}\n";
+ }
+ }
+ foreach ( $this->language_data['STYLES']['REGEXPS'] as $group => $styles )
+ {
+ if ( !$economy_mode || !($economy_mode && $styles == '') && !($economy_mode && !$this->lexic_permissions['REGEXPS'][$group]) )
+ {
+ $stylesheet .= "$selector.re$group {{$styles}}\n";
+ }
+ }
+
+ return $stylesheet;
+ }
+
+} // End Class GeSHi
+
+
+if ( !function_exists('geshi_highlight') )
+{
+ /**
+ * function: geshi_highlight
+ * -------------------------
+ * Easy way to highlight stuff. Behaves just like highlight_string
+ */
+ function geshi_highlight ( $string, $language, $path, $return = false )
+ {
+ $geshi = new GeSHi($string, $language, $path);
+ $geshi->set_header_type(GESHI_HEADER_DIV);
+ if ( $return )
+ {
+ return str_replace('<div>', '<code>', str_replace('</div>', '</code>', $geshi->parse_code()));
+ }
+ echo str_replace('<div>', '<code>', str_replace('</div>', '</code>', $geshi->parse_code()));
+ if ( $geshi->error() )
+ {
+ return false;
+ }
+ return true;
+ }
+}
+
+?>
diff --git a/inc/geshi/actionscript.php b/inc/geshi/actionscript.php
new file mode 100644
index 000000000..26b299f94
--- /dev/null
+++ b/inc/geshi/actionscript.php
@@ -0,0 +1,199 @@
+<?php
+/*************************************************************************************
+ * actionscript.php
+ * ----------------
+ * Author: Steffen Krause (Steffen.krause@muse.de)
+ * Copyright: (c) 2004 Steffen Krause, Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/20
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * Actionscript language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Actionscript',
+ 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ '#include', 'for', 'foreach', 'if', 'elseif', 'else', 'while', 'do', 'dowhile',
+ 'endwhile', 'endif', 'switch', 'case', 'endswitch', 'return', 'break', 'continue', 'in'
+ ),
+ 2 => array(
+ 'null', 'false', 'true', 'var',
+ 'default', 'function', 'class',
+ 'new', '_global'
+ ),
+ 3 => array(
+ '#endinitclip', '#initclip', '__proto__', '_accProps', '_alpha', '_currentframe',
+ '_droptarget', '_focusrect', '_framesloaded', '_height', '_highquality', '_lockroot',
+ '_name', '_parent', '_quality', '_root', '_rotation', '_soundbuftime', '_target', '_totalframes',
+ '_url', '_visible', '_width', '_x', '_xmouse', '_xscale', '_y', '_ymouse', '_yscale', 'abs',
+ 'Accessibility', 'acos', 'activityLevel', 'add', 'addListener', 'addPage', 'addProperty',
+ 'addRequestHeader', 'align', 'allowDomain', 'allowInsecureDomain', 'and', 'appendChild',
+ 'apply', 'Arguments', 'Array', 'asfunction', 'asin', 'atan', 'atan2', 'attachAudio', 'attachMovie',
+ 'attachSound', 'attachVideo', 'attributes', 'autosize', 'avHardwareDisable', 'background',
+ 'backgroundColor', 'BACKSPACE', 'bandwidth', 'beginFill', 'beginGradientFill', 'blockIndent',
+ 'bold', 'Boolean', 'border', 'borderColor', 'bottomScroll', 'bufferLength', 'bufferTime',
+ 'builtInItems', 'bullet', 'Button', 'bytesLoaded', 'bytesTotal', 'call', 'callee', 'caller',
+ 'Camera', 'capabilities', 'CAPSLOCK', 'caption', 'catch', 'ceil', 'charAt', 'charCodeAt',
+ 'childNodes', 'chr', 'clear', 'clearInterval', 'cloneNode', 'close', 'Color', 'concat',
+ 'connect', 'condenseWhite', 'constructor', 'contentType', 'ContextMenu', 'ContextMenuItem',
+ 'CONTROL', 'copy', 'cos', 'createElement', 'createEmptyMovieClip', 'createTextField',
+ 'createTextNode', 'currentFps', 'curveTo', 'CustomActions', 'customItems', 'data', 'Date',
+ 'deblocking', 'delete', 'DELETEKEY', 'docTypeDecl', 'domain', 'DOWN',
+ 'duplicateMovieClip', 'duration', 'dynamic', 'E', 'embedFonts', 'enabled',
+ 'END', 'endFill', 'ENTER', 'eq', 'Error', 'ESCAPE(Konstante)', 'escape(Funktion)', 'eval',
+ 'exactSettings', 'exp', 'extends', 'finally', 'findText', 'firstChild', 'floor',
+ 'flush', 'focusEnabled', 'font', 'fps', 'fromCharCode', 'fscommand',
+ 'gain', 'ge', 'get', 'getAscii', 'getBeginIndex', 'getBounds', 'getBytesLoaded', 'getBytesTotal',
+ 'getCaretIndex', 'getCode', 'getCount', 'getDate', 'getDay', 'getDepth', 'getEndIndex', 'getFocus',
+ 'getFontList', 'getFullYear', 'getHours', 'getInstanceAtDepth', 'getLocal', 'getMilliseconds',
+ 'getMinutes', 'getMonth', 'getNewTextFormat', 'getNextHighestDepth', 'getPan', 'getProgress',
+ 'getProperty', 'getRGB', 'getSeconds', 'getSelected', 'getSelectedText', 'getSize', 'getStyle',
+ 'getStyleNames', 'getSWFVersion', 'getText', 'getTextExtent', 'getTextFormat', 'getTextSnapshot',
+ 'getTime', 'getTimer', 'getTimezoneOffset', 'getTransform', 'getURL', 'getUTCDate', 'getUTCDay',
+ 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds', 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds',
+ 'getVersion', 'getVolume', 'getYear', 'globalToLocal', 'goto', 'gotoAndPlay', 'gotoAndStop',
+ 'hasAccessibility', 'hasAudio', 'hasAudioEncoder', 'hasChildNodes', 'hasEmbeddedVideo', 'hasMP3',
+ 'hasPrinting', 'hasScreenBroadcast', 'hasScreenPlayback', 'hasStreamingAudio', 'hasStreamingVideo',
+ 'hasVideoEncoder', 'height', 'hide', 'hideBuiltInItems', 'hitArea', 'hitTest', 'hitTestTextNearPos',
+ 'HOME', 'hscroll', 'html', 'htmlText', 'ID3', 'ifFrameLoaded', 'ignoreWhite', 'implements',
+ 'import', 'indent', 'index', 'indexOf', 'Infinity', '-Infinity', 'INSERT', 'insertBefore', 'install',
+ 'instanceof', 'int', 'interface', 'isActive', 'isDebugger', 'isDown', 'isFinite', 'isNaN', 'isToggled',
+ 'italic', 'join', 'Key', 'language', 'lastChild', 'lastIndexOf', 'le', 'leading', 'LEFT', 'leftMargin',
+ 'length', 'level', 'lineStyle', 'lineTo', 'list', 'LN10', 'LN2', 'load', 'loadClip', 'loaded', 'loadMovie',
+ 'loadMovieNum', 'loadSound', 'loadVariables', 'loadVariablesNum', 'LoadVars', 'LocalConnection',
+ 'localFileReadDisable', 'localToGlobal', 'log', 'LOG10E', 'LOG2E', 'manufacturer', 'Math', 'max',
+ 'MAX_VALUE', 'maxChars', 'maxhscroll', 'maxscroll', 'mbchr', 'mblength', 'mbord', 'mbsubstring', 'menu',
+ 'message', 'Microphone', 'min', 'MIN_VALUE', 'MMExecute', 'motionLevel', 'motionTimeOut', 'Mouse',
+ 'mouseWheelEnabled', 'moveTo', 'Movieclip', 'MovieClipLoader', 'multiline', 'muted', 'name', 'names', 'NaN',
+ 'ne', 'NEGATIVE_INFINITY', 'NetConnection', 'NetStream', 'newline', 'nextFrame',
+ 'nextScene', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue', 'not', 'Number', 'Object',
+ 'on', 'onActivity', 'onChanged', 'onClipEvent', 'onClose', 'onConnect', 'onData', 'onDragOut',
+ 'onDragOver', 'onEnterFrame', 'onID3', 'onKeyDown', 'onKeyUp', 'onKillFocus', 'onLoad', 'onLoadComplete',
+ 'onLoadError', 'onLoadInit', 'onLoadProgress', 'onLoadStart', 'onMouseDown', 'onMouseMove', 'onMouseUp',
+ 'onMouseWheel', 'onPress', 'onRelease', 'onReleaseOutside', 'onResize', 'onRollOut', 'onRollOver',
+ 'onScroller', 'onSelect', 'onSetFocus', 'onSoundComplete', 'onStatus', 'onUnload', 'onUpdate', 'onXML',
+ 'or(logischesOR)', 'ord', 'os', 'parentNode', 'parseCSS', 'parseFloat', 'parseInt', 'parseXML', 'password',
+ 'pause', 'PGDN', 'PGUP', 'PI', 'pixelAspectRatio', 'play', 'playerType', 'pop', 'position',
+ 'POSITIVE_INFINITY', 'pow', 'prevFrame', 'previousSibling', 'prevScene', 'print', 'printAsBitmap',
+ 'printAsBitmapNum', 'PrintJob', 'printNum', 'private', 'prototype', 'public', 'push', 'quality',
+ 'random', 'rate', 'registerClass', 'removeListener', 'removeMovieClip', 'removeNode', 'removeTextField',
+ 'replaceSel', 'replaceText', 'resolutionX', 'resolutionY', 'restrict', 'reverse', 'RIGHT',
+ 'rightMargin', 'round', 'scaleMode', 'screenColor', 'screenDPI', 'screenResolutionX', 'screenResolutionY',
+ 'scroll', 'seek', 'selectable', 'Selection', 'send', 'sendAndLoad', 'separatorBefore', 'serverString',
+ 'set', 'setvariable', 'setBufferTime', 'setClipboard', 'setDate', 'setFocus', 'setFullYear', 'setGain',
+ 'setHours', 'setInterval', 'setMask', 'setMilliseconds', 'setMinutes', 'setMode', 'setMonth',
+ 'setMotionLevel', 'setNewTextFormat', 'setPan', 'setProperty', 'setQuality', 'setRate', 'setRGB',
+ 'setSeconds', 'setSelectColor', 'setSelected', 'setSelection', 'setSilenceLevel', 'setStyle',
+ 'setTextFormat', 'setTime', 'setTransform', 'setUseEchoSuppression', 'setUTCDate', 'setUTCFullYear',
+ 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setVolume',
+ 'setYear', 'SharedObject', 'SHIFT(Konstante)', 'shift(Methode)', 'show', 'showMenu', 'showSettings',
+ 'silenceLevel', 'silenceTimeout', 'sin', 'size', 'slice', 'smoothing', 'sort', 'sortOn', 'Sound', 'SPACE',
+ 'splice', 'split', 'sqrt', 'SQRT1_2', 'SQRT2', 'Stage', 'start', 'startDrag', 'static', 'status', 'stop',
+ 'stopAllSounds', 'stopDrag', 'String', 'StyleSheet(Klasse)', 'styleSheet(Eigenschaft)', 'substr',
+ 'substring', 'super', 'swapDepths', 'System', 'TAB', 'tabChildren', 'tabEnabled', 'tabIndex',
+ 'tabStops', 'tan', 'target', 'targetPath', 'tellTarget', 'text', 'textColor', 'TextField', 'TextFormat',
+ 'textHeight', 'TextSnapshot', 'textWidth', 'this', 'throw', 'time', 'toggleHighQuality', 'toLowerCase',
+ 'toString', 'toUpperCase', 'trace', 'trackAsMenu', 'try', 'type', 'typeof', 'undefined',
+ 'underline', 'unescape', 'uninstall', 'unloadClip', 'unloadMovie', 'unLoadMovieNum', 'unshift', 'unwatch',
+ 'UP', 'updateAfterEvent', 'updateProperties', 'url', 'useCodePage', 'useEchoSuppression', 'useHandCursor',
+ 'UTC', 'valueOf', 'variable', 'version', 'Video', 'visible', 'void', 'watch', 'width',
+ 'with', 'wordwrap', 'XML', 'xmlDecl', 'XMLNode', 'XMLSocket'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;',
+ 2 => 'color: #000000; font-weight: bold;',
+ 3 => 'color: #0066CC;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 2 => 'color: #808080; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(),
+ 'HIGHLIGHT_STRICT_BLOCK' => array()
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/ada.php b/inc/geshi/ada.php
new file mode 100644
index 000000000..23ba14704
--- /dev/null
+++ b/inc/geshi/ada.php
@@ -0,0 +1,136 @@
+<?php
+/*************************************************************************************
+ * ada.php
+ * -------
+ * Author: Tux (tux@inmail.cz)
+ * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.2
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/07/29
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * Ada language file for GeSHi.
+ * Words are from SciTe configuration file
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.2)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.1)
+ * - Removed apostrophe as string delimiter
+ * - Added URL support
+ * 2004/08/05 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Ada',
+ 'COMMENT_SINGLE' => array(1 => '--'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'begin', 'declare', 'do', 'else', 'elsif', 'exception', 'for', 'if',
+ 'is', 'loop', 'while', 'then', 'is', 'end', 'select', 'case', 'while', 'until',
+ 'goto', 'return'
+ ),
+ 2 => array(
+ 'abs', 'and', 'mod', 'not', 'or', 'rem', 'xor'
+ ),
+ 3 => array(
+ 'abort', 'abstract', 'accept', 'access', 'aliased', 'all', 'array', 'at', 'body',
+ 'constant', 'delay', 'delta', 'digits', 'entry', 'exit',
+ 'function', 'generic', 'in', 'limited', 'new', 'null', 'of', 'others', 'out', 'package', 'pragma',
+ 'private', 'procedure', 'protected', 'raise', 'range', 'record', 'renames', 'requeue', 'reverse',
+ 'separate', 'subtype', 'tagged', 'task', 'terminate', 'type', 'use', 'when', 'with'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #00007f;',
+ 2 => 'color: #0000ff;',
+ 3 => 'color: #46aa03; font-weight:bold;',
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #adadad; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #7f007f;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #202020;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?>
+
diff --git a/inc/geshi/apache.php b/inc/geshi/apache.php
new file mode 100644
index 000000000..d7447a1ac
--- /dev/null
+++ b/inc/geshi/apache.php
@@ -0,0 +1,174 @@
+<?php
+/*************************************************************************************
+ * apache.php
+ * ----------
+ * Author: Tux (tux@inmail.cz)
+ * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.2
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/29/07
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * Apache language file for GeSHi.
+ * Words are from SciTe configuration file
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.2)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.1)
+ * - Added support for URLs
+ * 2004/08/05 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/07/29)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Apache',
+ 'COMMENT_SINGLE' => array(1 => '#'),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ /*keywords*/
+ 1 => array(
+ 'accessconfig','accessfilename','action','addalt',
+ 'addaltbyencoding','addaltbytype','addcharset',
+ 'adddefaultcharset','adddescription',
+ 'addencoding','addhandler','addicon','addiconbyencoding',
+ 'addiconbytype','addlanguage','addmodule','addmoduleinfo',
+ 'addtype','agentlog','alias','aliasmatch',
+ 'allow','allowconnect','allowoverride','anonymous',
+ 'anonymous_authoritative','anonymous_logemail','anonymous_mustgiveemail',
+ 'anonymous_nouserid','anonymous_verifyemail','authauthoritative',
+ 'authdbauthoritative','authdbgroupfile','authdbmauthoritative',
+ 'authdbmgroupfile','authdbmgroupfile','authdbuserfile','authdbmuserfile',
+ 'authdigestfile','authgroupfile','authname','authtype',
+ 'authuserfile','bindaddress','browsermatch','browsermatchnocase',
+ 'bs2000account','cachedefaultexpire','cachedirlength','cachedirlevels',
+ 'cacheforcecompletion','cachegcinterval','cachelastmodifiedfactor','cachemaxexpire',
+ 'cachenegotiateddocs','cacheroot','cachesize','checkspelling',
+ 'clearmodulelist','contentdigest','cookieexpires','cookielog',
+ 'cookielog','cookietracking','coredumpdirectory','customlog',
+ 'defaulticon','defaultlanguage','defaulttype','define',
+ 'deny','directory','directorymatch','directoryindex',
+ 'documentroot','errordocument','errorlog','example',
+ 'expiresactive','expiresbytype','expiresdefault','extendedstatus',
+ 'fancyindexing','files','filesmatch','forcetype',
+ 'group','header','headername','hostnamelookups',
+ 'identitycheck','ifdefine','ifmodule','imapbase',
+ 'imapdefault','imapmenu','include','indexignore',
+ 'indexoptions','keepalive','keepalivetimeout','languagepriority',
+ 'limit','limitexcept','limitrequestbody','limitrequestfields',
+ 'limitrequestfieldsize','limitrequestline','listen','listenbacklog',
+ 'loadfile','loadmodule','location','locationmatch',
+ 'lockfile','logformat','loglevel','maxclients',
+ 'maxkeepaliverequests','maxrequestsperchild','maxspareservers','metadir',
+ 'metafiles','metasuffix','mimemagicfile','minspareservers',
+ 'mmapfile','namevirtualhost','nocache','options','order',
+ 'passenv','pidfile','port','proxyblock','proxydomain',
+ 'proxypass','proxypassreverse','proxyreceivebuffersize','proxyremote',
+ 'proxyrequests','proxyvia','qsc','readmename',
+ 'redirect','redirectmatch','redirectpermanent','redirecttemp',
+ 'refererignore','refererlog','removehandler','require',
+ 'resourceconfig','rewritebase','rewritecond','rewriteengine',
+ 'rewritelock','rewritelog','rewriteloglevel','rewritemap',
+ 'rewriteoptions','rewriterule','rlimitcpu','rlimitmem',
+ 'rlimitnproc','satisfy','scoreboardfile','script',
+ 'scriptalias','scriptaliasmatch','scriptinterpretersource','scriptlog',
+ 'scriptlogbuffer','scriptloglength','sendbuffersize',
+ 'serveradmin','serveralias','servername','serverpath',
+ 'serverroot','serversignature','servertokens','servertype',
+ 'setenv','setenvif','setenvifnocase','sethandler',
+ 'singlelisten','startservers','threadsperchild','timeout',
+ 'transferlog','typesconfig','unsetenv','usecanonicalname',
+ 'user','userdir','virtualhost','virtualdocumentroot',
+ 'virtualdocumentrootip','virtualscriptalias','virtualscriptaliasip',
+ 'xbithack','from','all'
+ ),
+ /*keyords 2*/
+ 2 => array(
+ 'on','off','standalone','inetd',
+ 'force-response-1.0','downgrade-1.0','nokeepalive',
+ 'ndexes','includes','followsymlinks','none',
+ 'x-compress','x-gzip'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #00007f;',
+ 2 => 'color: #0000ff;',
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #adadad; font-style: italic;',
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #7f007f;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => ''
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?>
+
diff --git a/inc/geshi/asm.php b/inc/geshi/asm.php
new file mode 100644
index 000000000..ea8d2c1d2
--- /dev/null
+++ b/inc/geshi/asm.php
@@ -0,0 +1,200 @@
+<?php
+/*************************************************************************************
+ * asm.php
+ * -------
+ * Author: Tux (tux@inmail.cz)
+ * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.2
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/07/27
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * x86 Assembler language file for GeSHi.
+ * Words are from SciTe configuration file (based on NASM syntax)
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.2)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.1)
+ * - Added support for URLs
+ * - Added binary and hexadecimal regexps
+ * 2004/08/05 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'assembler',
+ 'COMMENT_SINGLE' => array(1 => ';'),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '',
+ 'KEYWORDS' => array(
+ /*CPU*/
+ 1 => array(
+ 'aaa','aad','aam','aas','adc','add','and','call','cbw','clc','cld','cli','cmc','cmp',
+ 'cmps','cmpsb','cmpsw','cwd','daa','das','dec','div','esc','hlt','idiv','imul','in','inc',
+ 'int','into','iret','ja','jae','jb','jbe','jc','jcxz','je','jg','jge','jl','jle','jmp',
+ 'jna','jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz',
+ 'jo','jp','jpe','jpo','js','jz','lahf','lds','lea','les','lods','lodsb','lodsw','loop',
+ 'loope','loopew','loopne','loopnew','loopnz','loopnzw','loopw','loopz','loopzw','mov',
+ 'movs','movsb','movsw','mul','neg','nop','not','or','out','pop','popf','push','pushf',
+ 'rcl','rcr','ret','retf','retn','rol','ror','sahf','sal','sar','sbb','scas','scasb','scasw',
+ 'shl','shr','stc','std','sti','stos','stosb','stosw','sub','test','wait','xchg','xlat',
+ 'xlatb','xor','bound','enter','ins','insb','insw','leave','outs','outsb','outsw','popa','pusha','pushw',
+ 'arpl','lar','lsl','sgdt','sidt','sldt','smsw','str','verr','verw','clts','lgdt','lidt','lldt','lmsw','ltr',
+ 'bsf','bsr','bt','btc','btr','bts','cdq','cmpsd','cwde','insd','iretd','iretdf','iretf',
+ 'jecxz','lfs','lgs','lodsd','loopd','looped','loopned','loopnzd','loopzd','lss','movsd',
+ 'movsx','movzx','outsd','popad','popfd','pushad','pushd','pushfd','scasd','seta','setae',
+ 'setb','setbe','setc','sete','setg','setge','setl','setle','setna','setnae','setnb','setnbe',
+ 'setnc','setne','setng','setnge','setnl','setnle','setno','setnp','setns','setnz','seto','setp',
+ 'setpe','setpo','sets','setz','shld','shrd','stosd','bswap','cmpxchg','invd','invlpg','wbinvd','xadd','lock',
+ 'rep','repe','repne','repnz','repz'
+ ),
+ /*FPU*/
+ 2 => array(
+ 'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp',
+ 'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv',
+ 'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1',
+ 'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul',
+ 'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv',
+ 'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave',
+ 'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp',
+ 'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1',
+ 'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos',
+ 'fstenvd','fucom','fucomp','fucompp'
+ ),
+ /*registers*/
+ 3 => array(
+ 'ah','al','ax','bh','bl','bp','bx','ch','cl','cr0','cr2','cr3','cs','cx','dh','di','dl',
+ 'dr0','dr1','dr2','dr3','dr6','dr7','ds','dx','eax','ebp','ebx','ecx','edi','edx',
+ 'es','esi','esp','fs','gs','si','sp','ss','st','tr3','tr4','tr5','tr6','tr7'
+ ),
+ /*Directive*/
+ 4 => array(
+ '186','286','286c','286p','287','386','386c','386p','387','486','486p',
+ '8086','8087','alpha','break','code','const','continue','cref','data','data?',
+ 'dosseg','else','elseif','endif','endw','err','err1','err2','errb',
+ 'errdef','errdif','errdifi','erre','erridn','erridni','errnb','errndef',
+ 'errnz','exit','fardata','fardata?','if','lall','lfcond','list','listall',
+ 'listif','listmacro','listmacroall',' model','no87','nocref','nolist',
+ 'nolistif','nolistmacro','radix','repeat','sall','seq','sfcond','stack',
+ 'startup','tfcond','type','until','untilcxz','while','xall','xcref',
+ 'xlist','alias','align','assume','catstr','comm','comment','db','dd','df','dosseg','dq',
+ 'dt','dup','dw','echo','else','elseif','elseif1','elseif2','elseifb','elseifdef','elseifdif',
+ 'elseifdifi','elseife','elseifidn','elseifidni','elseifnb','elseifndef','end',
+ 'endif','endm','endp','ends','eq',' equ','even','exitm','extern','externdef','extrn','for',
+ 'forc','ge','goto','group','high','highword','if','if1','if2','ifb','ifdef','ifdif',
+ 'ifdifi','ife',' ifidn','ifidni','ifnb','ifndef','include','includelib','instr','invoke',
+ 'irp','irpc','label','le','length','lengthof','local','low','lowword','lroffset',
+ 'macro','mask','mod','msfloat','name','ne','offset','opattr','option','org','%out',
+ 'page','popcontext','proc','proto','ptr','public','purge','pushcontext','record',
+ 'repeat','rept','seg','segment','short','size','sizeof','sizestr','struc','struct',
+ 'substr','subtitle','subttl','textequ','this','title','type','typedef','union','while','width',
+ '.model', '.stack', '.code', '.data'
+
+ ),
+
+ /*Operands*/
+ 5 => array(
+ '@b','@f','addr','basic','byte','c','carry?','dword',
+ 'far','far16','fortran','fword','near','near16','overflow?','parity?','pascal','qword',
+ 'real4',' real8','real10','sbyte','sdword','sign?','stdcall','sword','syscall','tbyte',
+ 'vararg','word','zero?','flat','near32','far32',
+ 'abs','all','assumes','at','casemap','common','compact',
+ 'cpu','dotname','emulator','epilogue','error','export','expr16','expr32','farstack','flat',
+ 'forceframe','huge','language','large','listing','ljmp','loadds','m510','medium','memory',
+ 'nearstack','nodotname','noemulator','nokeyword','noljmp','nom510','none','nonunique',
+ 'nooldmacros','nooldstructs','noreadonly','noscoped','nosignextend','nothing',
+ 'notpublic','oldmacros','oldstructs','os_dos','para','private','prologue','radix',
+ 'readonly','req','scoped','setif2','smallstack','tiny','use16','use32','uses'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '[', ']', '(', ')'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ 5 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #00007f;',
+ 2 => 'color: #0000ff;',
+ 3 => 'color: #46aa03; font-weight:bold;',
+ 4 => 'color: #0000ff;',
+ 5 => 'color: #0000ff;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #adadad; font-style: italic;',
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #7f007f;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ 0 => 'color: #ff0000;',
+ 1 => 'color: #ff0000;'
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => ''
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ 0 => '[0-9a-fA-F][0-9a-fA-F]*[hH]',
+ 1 => '[01][01]*[bB]'
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?>
diff --git a/inc/geshi/asp.php b/inc/geshi/asp.php
new file mode 100644
index 000000000..5728a1bbd
--- /dev/null
+++ b/inc/geshi/asp.php
@@ -0,0 +1,153 @@
+<?php
+/*************************************************************************************
+ * asp.php
+ * --------
+ * Author: Amit Gupta (http://blog.igeek.info/)
+ * Copyright: (c) 2004 Amit Gupta (http://blog.igeek.info/), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.2
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/08/13
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * ASP language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.2)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.1)
+ * - Added support for URLs
+ * 2004/08/13 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ * * Include all the functions, keywords etc that I have missed
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'ASP',
+ 'COMMENT_SINGLE' => array(1 => "'", 2 => '//'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => 0,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'include', 'file', 'Dim', 'Option', 'Explicit', 'Implicit', 'Set', 'Select', 'ReDim', 'Preserve',
+ 'ByVal', 'ByRef', 'End', 'Private', 'Public', 'If', 'Then', 'Else', 'ElseIf', 'Case', 'With', 'NOT',
+ 'While', 'Wend', 'For', 'Loop', 'Do', 'Request', 'Response', 'Server', 'ADODB', 'Session', 'Application',
+ 'Each', 'In', 'Get', 'Next', 'INT', 'CINT', 'CBOOL', 'CDATE', 'CBYTE', 'CCUR', 'CDBL', 'CLNG', 'CSNG',
+ 'CSTR', 'Fix', 'Is', 'Sgn', 'String', 'Boolean', 'Currency', 'Me', 'Single', 'Long', 'Integer', 'Byte',
+ 'Variant', 'Double', 'To', 'Let', 'Xor', 'Resume', 'On', 'Error', 'Imp', 'GoTo', 'Call', 'Global'
+ ),
+ 2 => array(
+ 'Null', 'Nothing', 'And',
+ 'False', '&lt;%', '%&gt;',
+ '&lt;script language=', '&lt;/script&gt;',
+ 'True', 'var', 'Or', 'BOF', 'EOF',
+ 'Function', 'Class', 'New', 'Sub'
+ ),
+ 3 => array(
+ 'CreateObject', 'Write', 'Redirect', 'Cookies', 'BinaryRead', 'ClientCertificate', 'Form', 'QueryString',
+ 'ServerVariables', 'TotalBytes', 'AddHeader', 'AppendToLog', 'BinaryWrite', 'Buffer', 'CacheControl',
+ 'Charset', 'Clear', 'ContentType', 'End()', 'Expires', 'ExpiresAbsolute', 'Flush()', 'IsClientConnected',
+ 'PICS', 'Status', 'Connection', 'Recordset', 'Execute', 'Abandon', 'Lock', 'UnLock', 'Command', 'Fields',
+ 'Properties', 'Property', 'Send', 'Replace', 'InStr', 'TRIM', 'NOW', 'Day', 'Month', 'Hour', 'Minute', 'Second',
+ 'Year', 'MonthName', 'LCase', 'UCase', 'Abs', 'Array', 'As', 'LEN', 'MoveFirst', 'MoveLast', 'MovePrevious',
+ 'MoveNext', 'LBound', 'UBound', 'Transfer', 'Open', 'Close', 'MapPath', 'FileExists', 'OpenTextFile', 'ReadAll'
+ )
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #990099; font-weight: bold;',
+ 2 => 'color: #0000ff; font-weight: bold;',
+ 3 => 'color: #330066;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #008000;',
+ 2 => 'color: #ff6600;',
+ 'MULTI' => 'color: #008000;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #006600; font-weight:bold'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #cc0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #800000;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #9900cc;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #006600; font-weight: bold'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ 0 => '',
+ 1 => '',
+ 2 => '',
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
+ 'SCRIPT_DELIMITERS' => array(
+ 0 => array(
+ '<%' => '%>'
+ ),
+ 1 => array(
+ '<script language="vbscript" runat="server">' => '</script>'
+ ),
+ 2 => array(
+ '<script language="javascript" runat="server">' => '</script>'
+ )
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ 0 => true,
+ 1 => true,
+ 2 => true,
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/bash.php b/inc/geshi/bash.php
new file mode 100644
index 000000000..976ecd676
--- /dev/null
+++ b/inc/geshi/bash.php
@@ -0,0 +1,130 @@
+<?php
+/*************************************************************************************
+ * bash.php
+ * --------
+ * Author: Andreas Gohr (andi@splitbrain.org)
+ * Copyright: (c) 2004 Andreas Gohr, Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.2
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/08/20
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * BASH language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.2)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.1)
+ * - Added support for URLs
+ * 2004/08/20 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ * * Get symbols working
+ * * Highlight builtin vars
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Bash',
+ 'COMMENT_SINGLE' => array(1 => '#'),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'case', 'do', 'done', 'elif', 'else', 'esac', 'fi', 'for', 'function',
+ 'if', 'in', 'select', 'then', 'until', 'while', 'time'
+ ),
+ 3 => array(
+ 'source', 'alias', 'bg', 'bind', 'break', 'builtin', 'cd', 'command',
+ 'compgen', 'complete', 'continue', 'declare', 'typeset', 'dirs',
+ 'disown', 'echo', 'enable', 'eval', 'exec', 'exit', 'export', 'fc',
+ 'fg', 'getopts', 'hash', 'help', 'history', 'jobs', 'kill', 'let',
+ 'local', 'logout', 'popd', 'printf', 'pushd', 'pwd', 'read', 'readonly',
+ 'return', 'set', 'shift', 'shopt', 'suspend', 'test', 'times', 'trap',
+ 'type', 'ulimit', 'umask', 'unalias', 'unset', 'wait'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => true,
+ 3 => true,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;',
+ 3 => 'color: #000066;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ 0 => 'color: #0000ff;',
+ 1 => 'color: #0000ff;',
+ 2 => 'color: #0000ff;'
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 3 => ''
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}",
+ 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*",
+ 2 => "([a-zA-Z_][a-zA-Z0-9_]*)="
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?>
diff --git a/inc/geshi/c.php b/inc/geshi/c.php
new file mode 100644
index 000000000..79a3295e1
--- /dev/null
+++ b/inc/geshi/c.php
@@ -0,0 +1,144 @@
+<?php
+/*************************************************************************************
+ * c.php
+ * -----
+ * Author: Nigel McNie (oracle.shinoda@gmail.com)
+ * Contributors:
+ * - Jack Lloyd (lloyd@randombit.net)
+ * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.4
+ * CVS Revision Version: $Revision: 1.2 $
+ * Date Started: 2004/06/04
+ * Last Modified: $Date: 2004/12/01 08:44:47 $
+ *
+ * C language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/XX/XX (1.0.4)
+ * - Added a couple of new keywords (Jack Lloyd)
+ * 2004/11/27 (1.0.3)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.2)
+ * - Added support for URLs
+ * 2004/08/05 (1.0.1)
+ * - Added support for symbols
+ * 2004/07/14 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ * - Get a list of inbuilt functions to add (and explore C more
+ * to complete this rather bare language file
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'C',
+ 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'if', 'return', 'while', 'case', 'continue', 'default',
+ 'do', 'else', 'for', 'switch', 'goto'
+ ),
+ 2 => array(
+ 'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline'
+ ),
+ 3 => array(
+ 'printf', 'cout'
+ ),
+ 4 => array(
+ 'auto', 'char', 'const', 'double', 'float', 'int', 'long',
+ 'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct',
+ 'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t'
+ ),
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;',
+ 2 => 'color: #000000; font-weight: bold;',
+ 3 => 'color: #000066;',
+ 4 => 'color: #993333;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 2 => 'color: #339933;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #202020;',
+ 2 => 'color: #202020;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html',
+ 4 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.',
+ 2 => '::'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/c_mac.php b/inc/geshi/c_mac.php
new file mode 100644
index 000000000..94a8fd25a
--- /dev/null
+++ b/inc/geshi/c_mac.php
@@ -0,0 +1,176 @@
+<?php
+/*************************************************************************************
+ * c_mac.php
+ * ---------
+ * Author: M. Uli Kusterer (witness.of.teachtext@gmx.net)
+ * Copyright: (c) 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.0
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/04
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * C for Macs language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'C',
+ 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'if', 'return', 'while', 'case', 'continue', 'default',
+ 'do', 'else', 'for', 'switch', 'goto'
+ ),
+ 2 => array(
+ 'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM',
+ 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
+ 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
+ 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
+ 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
+ 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
+ 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
+ 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
+ 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
+ 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL',
+ 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
+ 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
+ // Mac-specific constants:
+ 'kCFAllocatorDefault'
+ ),
+ 3 => array(
+ 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
+ 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
+ 'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper',
+ 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
+ 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
+ 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2',
+ 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
+ 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
+ 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
+ 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
+ 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
+ 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
+ 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
+ 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
+ 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
+ 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
+ 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
+ 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
+ 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
+ ),
+ 4 => array(
+ 'auto', 'char', 'const', 'double', 'float', 'int', 'long',
+ 'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct',
+ 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
+ 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
+ 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm',
+ // Mac-specific types:
+ 'CFArrayRef', 'CFDictionaryRef', 'CFMutableDictionaryRef', 'CFBundleRef', 'CFSetRef', 'CFStringRef',
+ 'CFURLRef', 'CFLocaleRef', 'CFDateFormatterRef', 'CFNumberFormatterRef', 'CFPropertyListRef',
+ 'CFTreeRef', 'CFWriteStreamRef', 'CFCharacterSetRef', 'CFMutableStringRef', 'CFNotificationRef',
+ 'CFNotificationRef', 'CFReadStreamRef', 'CFNull', 'CFAllocatorRef', 'CFBagRef', 'CFBinaryHeapRef',
+ 'CFBitVectorRef', 'CFBooleanRef', 'CFDataRef', 'CFDateRef', 'CFMachPortRef', 'CFMessagePortRef',
+ 'CFMutableArrayRef', 'CFMutableBagRef', 'CFMutableBitVectorRef', 'CFMutableCharacterSetRef',
+ 'CFMutableDataRef', 'CFMutableSetRef', 'CFNumberRef', 'CFPlugInRef', 'CFPlugInInstanceRef',
+ 'CFRunLoopRef', 'CFRunLoopObserverRef', 'CFRunLoopSourceRef', 'CFRunLoopTimerRef', 'CFSocketRef',
+ 'CFTimeZoneRef', 'CFTypeRef', 'CFUserNotificationRef', 'CFUUIDRef', 'CFXMLNodeRef', 'CFXMLParserRef',
+ 'CFXMLTreeRef'
+ ),
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #0000ff;',
+ 2 => 'color: #0000ff;',
+ 3 => 'color: #0000dd;',
+ 4 => 'color: #0000ff;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #ff0000;',
+ 2 => 'color: #339900;',
+ 'MULTI' => 'color: #ff0000; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #666666; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #000000;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #666666;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #0000dd;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #00eeff;',
+ 2 => 'color: #00eeff;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #000000;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html',
+ 4 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.',
+ 2 => '::'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/caddcl.php b/inc/geshi/caddcl.php
new file mode 100644
index 000000000..04c3c117f
--- /dev/null
+++ b/inc/geshi/caddcl.php
@@ -0,0 +1,127 @@
+<?php
+/*************************************************************************************
+ * caddcl.php
+ * ----------
+ * Author: Roberto Rossi (rsoftware@altervista.org)
+ * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/08/30
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * CAD DCL (Dialog Control Language) file for GeSHi.
+ *
+ * DCL for AutoCAD 12 or later and IntelliCAD all versions.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/1!/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'CADDCL',
+ 'COMMENT_SINGLE' => array(1 => '//'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'boxed_column','boxed_radio_column','boxed_radio_row','boxed_row',
+ 'column','concatenation','button','dialog','edit_box','image','image_button',
+ 'errtile','list_box','ok_cancel','ok_cancel_help','ok_cancel_help_errtile',
+ 'ok_cancel_help_info','ok_only','paragraph','popup_list','radio_button',
+ 'radio_column','radio_row','row','slider','spacer','spacer_0','spacer_1','text',
+ 'text_part','toggle',
+ 'action','alignment','allow_accept','aspect_ratio','big_increment',
+ 'children_alignment','children_fixed_height',
+ 'children_fixed_width','color',
+ 'edit_limit','edit_width','fixed_height','fixed_width',
+ 'height','initial_focus','is_cancel','is_default',
+ 'is_enabled','is_tab_stop','is-bold','key','label','layout','list',
+ 'max_value','min_value','mnemonic','multiple_select','password_char',
+ 'small_increment','tabs','tab_truncate','value','width',
+ 'false','true','left','right','centered','top','bottom',
+ 'dialog_line','dialog_foreground','dialog_background',
+ 'graphics_background','black','red','yellow','green','cyan',
+ 'blue','magenta','whitegraphics_foreground',
+ 'horizontal','vertical'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?>
diff --git a/inc/geshi/cadlisp.php b/inc/geshi/cadlisp.php
new file mode 100644
index 000000000..23991d576
--- /dev/null
+++ b/inc/geshi/cadlisp.php
@@ -0,0 +1,187 @@
+<?php
+/*************************************************************************************
+ * cadlisp.php
+ * -----------
+ * Author: Roberto Rossi (rsoftware@altervista.org)
+ * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/blog)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/08/30
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * AutoCAD/IntelliCAD Lisp language file for GeSHi.
+ *
+ * For AutoCAD V.12..2005 and IntelliCAD all versions.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'CADLISP',
+ 'COMMENT_SINGLE' => array(1 => ";"),
+ 'COMMENT_MULTI' => array(";|" => "|;"),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'abs','acad_colordlg','acad_helpdlg','acad_strlsort','action_tile',
+ 'add_list','alert','alloc','and','angle','angtof','angtos','append','apply',
+ 'arx','arxload','arxunload','ascii','assoc','atan','atof','atoi','atom',
+ 'atoms-family','autoarxload','autoload','Boole','boundp','caddr',
+ 'cadr','car','cdr','chr','client_data_tile','close','command','cond',
+ 'cons','cos','cvunit','defun','defun-q','defun-q-list-ref',
+ 'defun-q-list-set','dictadd','dictnext','dictremove','dictrename',
+ 'dictsearch','dimx_tile','dimy_tile','distance','distof','done_dialog',
+ 'end_image','end_list','entdel','entget','entlast','entmake',
+ 'entmakex','entmod','entnext','entsel','entupd','eq','equal','eval','exit',
+ 'exp','expand','expt','fill_image','findfile','fix','float','foreach','function',
+ 'gc','gcd','get_attr','get_tile','getangle','getcfg','getcname','getcorner',
+ 'getdist','getenv','getfiled','getint','getkword','getorient','getpoint',
+ 'getreal','getstring','getvar','graphscr','grclear','grdraw','grread','grtext',
+ 'grvecs','handent','help','if','initdia','initget','inters','itoa','lambda','last',
+ 'layoutlist','length','list','listp','load','load_dialog','log','logand','logior',
+ 'lsh','mapcar','max','mem','member','menucmd','menugroup','min','minusp','mode_tile',
+ 'namedobjdict','nentsel','nentselp','new_dialog','nil','not','nth','null',
+ 'numberp','open','or','osnap','polar','prin1','princ','print','progn','prompt',
+ 'quit','quote','read','read-char','read-line','redraw','regapp','rem','repeat',
+ 'reverse','rtos','set','set_tile','setcfg','setenv','setfunhelp','setq','setvar',
+ 'setview','sin','slide_image','snvalid','sqrt','ssadd','ssdel','ssget','ssgetfirst',
+ 'sslength','ssmemb','ssname','ssnamex','sssetfirst','start_dialog','start_image',
+ 'start_list','startapp','strcase','strcat','strlen','subst','substr','t','tablet',
+ 'tblnext','tblobjname','tblsearch','term_dialog','terpri','textbox','textpage',
+ 'textscr','trace','trans','type','unload_dialog','untrace','vector_image','ver',
+ 'vports','wcmatch','while','write-char','write-line','xdroom','xdsize','zerop',
+ 'vl-acad-defun','vl-acad-undefun','vl-arx-import','vlax-3D-point',
+ 'vlax-add-cmd','vlax-create-object','vlax-curve-getArea',
+ 'vlax-curve-getClosestPointTo','vlax-curve-getClosestPointToProjection',
+ 'vlax-curve-getDistAtParam','vlax-curve-getDistAtPoint',
+ 'vlax-curve-getEndParam','vlax-curve-getEndPoint',
+ 'vlax-curve-getFirstDeriv','vlax-curve-getParamAtDist',
+ 'vlax-curve-getParamAtPoint','vlax-curve-getPointAtDist',
+ 'vlax-curve-getPointAtParam','vlax-curve-getSecondDeriv',
+ 'vlax-curve-getStartParam','vlax-curve-getStartPoint',
+ 'vlax-curve-isClosed','vlax-curve-isPeriodic','vlax-curve-isPlanar',
+ 'vlax-dump-object','vlax-erased-p','vlax-for','vlax-get-acad-object',
+ 'vlax-get-object','vlax-get-or-create-object','vlax-get-property',
+ 'vlax-import-type-library','vlax-invoke-method','vlax-ldata-delete',
+ 'vlax-ldata-get','vlax-ldata-list','vlax-ldata-put','vlax-ldata-test',
+ 'vlax-make-safearray','vlax-make-variant','vlax-map-collection',
+ 'vlax-method-applicable-p','vlax-object-released-p','vlax-product-key',
+ 'vlax-property-available-p','vlax-put-property','vlax-read-enabled-p',
+ 'vlax-release-object','vlax-remove-cmd','vlax-safearray-fill',
+ 'vlax-safearray-get-dim','vlax-safearray-get-element',
+ 'vlax-safearray-get-l-bound','vlax-safearray-get-u-bound',
+ 'vlax-safearray-put-element','vlax-safearray-type','vlax-tmatrix',
+ 'vlax-typeinfo-available-p','vlax-variant-change-type',
+ 'vlax-variant-type','vlax-variant-value','vlax-write-enabled-p',
+ 'vl-bb-ref','vl-bb-set','vl-catch-all-apply','vl-catch-all-error-message',
+ 'vl-catch-all-error-p','vl-cmdf','vl-consp','vl-directory-files','vl-doc-export',
+ 'vl-doc-import','vl-doc-ref','vl-doc-set','vl-every','vl-exit-with-error',
+ 'vl-exit-with-value','vl-file-copy','vl-file-delete','vl-file-directory-p',
+ 'vl-filename-base','vl-filename-directory','vl-filename-extension',
+ 'vl-filename-mktemp','vl-file-rename','vl-file-size','vl-file-systime',
+ 'vl-get-resource','vlisp-compile','vl-list-exported-functions',
+ 'vl-list-length','vl-list-loaded-vlx','vl-load-all','vl-load-com',
+ 'vl-load-reactors','vl-member-if','vl-member-if-not','vl-position',
+ 'vl-prin1-to-string','vl-princ-to-string','vl-propagate','vlr-acdb-reactor',
+ 'vlr-add','vlr-added-p','vlr-beep-reaction','vlr-command-reactor',
+ 'vlr-current-reaction-name','vlr-data','vlr-data-set',
+ 'vlr-deepclone-reactor','vlr-docmanager-reactor','vlr-dwg-reactor',
+ 'vlr-dxf-reactor','vlr-editor-reactor','vl-registry-delete',
+ 'vl-registry-descendents','vl-registry-read','vl-registry-write',
+ 'vl-remove','vl-remove-if','vl-remove-if-not','vlr-insert-reactor',
+ 'vlr-linker-reactor','vlr-lisp-reactor','vlr-miscellaneous-reactor',
+ 'vlr-mouse-reactor','vlr-notification','vlr-object-reactor',
+ 'vlr-owner-add','vlr-owner-remove','vlr-owners','vlr-pers','vlr-pers-list',
+ 'vlr-pers-p','vlr-pers-release','vlr-reaction-names','vlr-reactions',
+ 'vlr-reaction-set','vlr-reactors','vlr-remove','vlr-remove-all',
+ 'vlr-set-notification','vlr-sysvar-reactor','vlr-toolbar-reactor',
+ 'vlr-trace-reaction','vlr-type','vlr-types','vlr-undo-reactor',
+ 'vlr-wblock-reactor','vlr-window-reactor','vlr-xref-reactor',
+ 'vl-some','vl-sort','vl-sort-i','vl-string-elt','vl-string-left-trim',
+ 'vl-string-mismatch','vl-string-position','vl-string-right-trim',
+ 'vl-string-search','vl-string-subst','vl-string-translate','vl-string-trim',
+ 'vl-symbol-name','vl-symbolp','vl-symbol-value','vl-unload-vlx','vl-vbaload',
+ 'vl-vbarun','vl-vlx-loaded-p'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/cpp.php b/inc/geshi/cpp.php
new file mode 100644
index 000000000..b7cd988c1
--- /dev/null
+++ b/inc/geshi/cpp.php
@@ -0,0 +1,174 @@
+<?php
+/*************************************************************************************
+ * cpp.php
+ * -------
+ * Author: Dennis Bayer (Dennis.Bayer@mnifh-giessen.de)
+ * Contributors:
+ * - M. Uli Kusterer (witness.of.teachtext@gmx.net)
+ * - Jack Lloyd (lloyd@randombit.net)
+ * Copyright: (c) 2004 Dennis Bayer, Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.2
+ * CVS Revision Version: $Revision: 1.2 $
+ * Date Started: 2004/09/27
+ * Last Modified: $Date: 2004/12/01 08:44:47 $
+ *
+ * C++ language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/XX/XX (1.0.2)
+ * - Added several new keywords (Jack Lloyd)
+ * 2004/11/27 (1.0.1)
+ * - Added StdCLib function and constant names, changed color scheme to
+ * a cleaner one. (M. Uli Kusterer)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'C++',
+ 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return',
+ 'switch', 'while'
+ ),
+ 2 => array(
+ 'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM',
+ 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
+ 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
+ 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
+ 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
+ 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
+ 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
+ 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
+ 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
+ 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL',
+ 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
+ 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
+ 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace',
+ 'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast',
+ 'static_cast', 'explicit', 'friend', 'wchar_t', 'typename', 'typeid'
+ ),
+ 3 => array(
+ 'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this',
+ 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
+ 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
+ 'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper',
+ 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
+ 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
+ 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2',
+ 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
+ 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
+ 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
+ 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
+ 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
+ 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
+ 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
+ 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
+ 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
+ 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
+ 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
+ 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
+ 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
+ ),
+ 4 => array(
+ 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint',
+ 'register', 'short', 'shortint', 'signed', 'static', 'struct',
+ 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
+ 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
+ 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm',
+ ),
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #0000ff;',
+ 2 => 'color: #0000ff;',
+ 3 => 'color: #0000dd;',
+ 4 => 'color: #0000ff;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #ff0000;',
+ 2 => 'color: #339900;',
+ 'MULTI' => 'color: #ff0000; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #666666; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #000000;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #666666;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #0000dd;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #00eeff;',
+ 2 => 'color: #00eeff;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #000000;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.',
+ 2 => '::'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?>
+
+
diff --git a/inc/geshi/csharp.php b/inc/geshi/csharp.php
new file mode 100644
index 000000000..d602d53fc
--- /dev/null
+++ b/inc/geshi/csharp.php
@@ -0,0 +1,229 @@
+<?php
+/*************************************************************************************
+ * csharp.php
+ * ----------
+ * Author: Alan Juden (alan@judenware.org)
+ * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.0
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/04
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * C# language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.0)
+ * - Initial release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+ $language_data = array (
+ 'LANG_NAME' => 'CSharp',
+ 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'as', 'auto', 'base', 'break', 'case', 'catch', 'const', 'continue',
+ 'default', 'do', 'else', 'event', 'explicit', 'extern', 'false',
+ 'finally', 'fixed', 'for', 'foreach', 'goto', 'if', 'implicit',
+ 'in', 'internal', 'lock', 'namespace', 'null', 'operator', 'out',
+ 'override', 'params', 'private', 'protected', 'public', 'readonly',
+ 'ref', 'return', 'sealed', 'stackalloc', 'static', 'switch', 'this',
+ 'throw', 'true', 'try', 'unsafe', 'using', 'virtual', 'void', 'while'
+ ),
+ 2 => array(
+ '#elif', '#endif', '#endregion', '#else', '#error', '#define', '#if',
+ '#line', '#region', '#undef', '#warning'
+ ),
+ 3 => array(
+ 'checked', 'is', 'new', 'sizeof', 'typeof', 'unchecked'
+ ),
+ 4 => array(
+ 'bool', 'byte', 'char', 'class', 'decimal', 'delegate', 'double',
+ 'enum', 'float', 'int', 'interface', 'long', 'object', 'sbyte',
+ 'short', 'string', 'struct', 'uint', 'ulong', 'ushort'
+ ),
+ 5 => array(
+ 'Microsoft.Win32',
+ 'System',
+ 'System.CodeDOM',
+ 'System.CodeDOM.Compiler',
+ 'System.Collections',
+ 'System.Collections.Bases',
+ 'System.ComponentModel',
+ 'System.ComponentModel.Design',
+ 'System.ComponentModel.Design.CodeModel',
+ 'System.Configuration',
+ 'System.Configuration.Assemblies',
+ 'System.Configuration.Core',
+ 'System.Configuration.Install',
+ 'System.Configuration.Interceptors',
+ 'System.Configuration.Schema',
+ 'System.Configuration.Web',
+ 'System.Core',
+ 'System.Data',
+ 'System.Data.ADO',
+ 'System.Data.Design',
+ 'System.Data.Internal',
+ 'System.Data.SQL',
+ 'System.Data.SQLTypes',
+ 'System.Data.XML',
+ 'System.Data.XML.DOM',
+ 'System.Data.XML.XPath',
+ 'System.Data.XML.XSLT',
+ 'System.Diagnostics',
+ 'System.Diagnostics.SymbolStore',
+ 'System.DirectoryServices',
+ 'System.Drawing',
+ 'System.Drawing.Design',
+ 'System.Drawing.Drawing2D',
+ 'System.Drawing.Imaging',
+ 'System.Drawing.Printing',
+ 'System.Drawing.Text',
+ 'System.Globalization',
+ 'System.IO',
+ 'System.IO.IsolatedStorage',
+ 'System.Messaging',
+ 'System.Net',
+ 'System.Net.Sockets',
+ 'System.NewXml',
+ 'System.NewXml.XPath',
+ 'System.NewXml.Xsl',
+ 'System.Reflection',
+ 'System.Reflection.Emit',
+ 'System.Resources',
+ 'System.Runtime.InteropServices',
+ 'System.Runtime.InteropServices.Expando',
+ 'System.Runtime.Remoting',
+ 'System.Runtime.Serialization',
+ 'System.Runtime.Serialization.Formatters',
+ 'System.Runtime.Serialization.Formatters.Binary',
+ 'System.Security',
+ 'System.Security.Cryptography',
+ 'System.Security.Cryptography.X509Certificates',
+ 'System.Security.Permissions',
+ 'System.Security.Policy',
+ 'System.Security.Principal',
+ 'System.ServiceProcess',
+ 'System.Text',
+ 'System.Text.RegularExpressions',
+ 'System.Threading',
+ 'System.Timers',
+ 'System.Web',
+ 'System.Web.Caching',
+ 'System.Web.Configuration',
+ 'System.Web.Security',
+ 'System.Web.Services',
+ 'System.Web.Services.Description',
+ 'System.Web.Services.Discovery',
+ 'System.Web.Services.Protocols',
+ 'System.Web.UI',
+ 'System.Web.UI.Design',
+ 'System.Web.UI.Design.WebControls',
+ 'System.Web.UI.Design.WebControls.ListControls',
+ 'System.Web.UI.HtmlControls',
+ 'System.Web.UI.WebControls',
+ 'System.WinForms',
+ 'System.WinForms.ComponentModel',
+ 'System.WinForms.Design',
+ 'System.Xml',
+ 'System.Xml.Serialization',
+ 'System.Xml.Serialization.Code',
+ 'System.Xml.Serialization.Schema'
+ ),
+ ),
+ 'SYMBOLS' => array(
+ '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', '|', ':',
+ '(', ')', '{', '}', '[', ']'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ 5 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #0600FF;',
+ 2 => 'color: #FF8000; font-weight: bold;',
+ 3 => 'color: #008000;',
+ 4 => 'color: #FF0000;',
+ 5 => 'color: #000000;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #008080; font-style: italic;',
+ 2 => 'color: #008080;',
+ 'MULTI' => 'color: #008080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #008080; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #000000;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #808080;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #FF0000;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #0000FF;',
+ 2 => 'color: #0000FF;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #008000;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => 'http://www.google.com/search?q={FNAME}+msdn.microsoft.com',
+ 4 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.',
+ 2 => '::'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/css-gen.cfg b/inc/geshi/css-gen.cfg
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/inc/geshi/css-gen.cfg
diff --git a/inc/geshi/css.php b/inc/geshi/css.php
new file mode 100644
index 000000000..b82aa555a
--- /dev/null
+++ b/inc/geshi/css.php
@@ -0,0 +1,177 @@
+<?php
+/*************************************************************************************
+ * css.php
+ * -------
+ * Author: Nigel McNie (oracle.shinoda@gmail.com)
+ * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.3
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/18
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * CSS language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.3)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.2)
+ * - Changed regexps to catch "-" symbols
+ * - Added support for URLs
+ * 2004/08/05 (1.0.1)
+ * - Added support for symbols
+ * 2004/07/14 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ * * Improve or drop regexps for class/id/psuedoclass highlighting
+ * * Re-look at keywords - possibly to make several CSS language
+ * files, all with different versions of CSS in them
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+
+$language_data = array (
+ 'LANG_NAME' => 'CSS',
+ 'COMMENT_SINGLE' => array(1 => '@'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"', "'"),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'aqua', 'azimuth', 'background-attachment', 'background-color',
+ 'background-image', 'background-position', 'background-repeat',
+ 'background', 'black', 'blue', 'border-bottom-color', 'border-bottom-style',
+ 'border-bottom-width', 'border-left-color', 'border-left-style',
+ 'border-left-width', 'border-right', 'border-right-color',
+ 'border-right-style', 'border-right-width', 'border-top-color',
+ 'border-top-style', 'border-top-width','border-bottom', 'border-collapse',
+ 'border-left', 'border-width', 'border-color', 'border-spacing',
+ 'border-style', 'border-top', 'border', 'bottom', 'caption-side',
+ 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset',
+ 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
+ 'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
+ 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
+ 'font-weight', 'font', 'height', 'left', 'letter-spacing', 'line-height',
+ 'list-style', 'list-style-image', 'list-style-position', 'list-style-type',
+ 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin',
+ 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height',
+ 'min-width', 'orphans', 'outline', 'outline-color', 'outline-style',
+ 'outline-width', 'overflow', 'padding-bottom', 'padding-left',
+ 'padding-right', 'padding-top', 'padding', 'page', 'page-break-after',
+ 'page-break-before', 'page-break-inside', 'pause-after', 'pause-before',
+ 'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes',
+ 'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation',
+ 'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration',
+ 'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi',
+ 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows',
+ 'width', 'word-spacing', 'z-index'
+ ),
+ 2 => array(
+ 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid',
+ 'baseline', 'behind', 'below', 'bidi-override', 'blink', 'block', 'bold', 'bolder', 'both',
+ 'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive',
+ 'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
+ 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded',
+ 'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia',
+ 'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher',
+ 'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline',
+ 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana',
+ 'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low',
+ 'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace',
+ 'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize',
+ 'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline',
+ 'pointer', 'portrait', 'purple', 'px',
+ 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards',
+ 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square',
+ 'static', 'status-bar', 'super', 'sw-resize',
+ 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent',
+ 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',
+ 'visible',
+ 'w-resize', 'wait', 'white', 'wider',
+ 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small',
+ 'yellow', 'yes'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '{', '}', ':', ';'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => true,
+ 2 => true
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #000000; font-weight: bold;',
+ 2 => 'color: #993333;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #a1a100;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'SCRIPT' => array(
+ ),
+ 'REGEXPS' => array(
+ 0 => 'color: #cc00cc;',
+ 1 => 'color: #6666ff;',
+ 2 => 'color: #3333ff;',
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => ''
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ 0 => '\#[a-zA-Z0-9\-]+\s+\{',
+ 1 => '\.[a-zA-Z0-9\-]+\s',
+ 2 => ':[a-zA-Z0-9\-]+\s'
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/delphi.php b/inc/geshi/delphi.php
new file mode 100644
index 000000000..b27ec698d
--- /dev/null
+++ b/inc/geshi/delphi.php
@@ -0,0 +1,159 @@
+<?php
+/*************************************************************************************
+ * delphi.php
+ * ----------
+ * Author: Jrja Norbert (jnorbi@vipmail.hu)
+ * Copyright: (c) 2004 Jrja Norbert, Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/07/26
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * Delphi (Object Pascal) language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Delphi',
+ 'COMMENT_SINGLE' => array(1 => '//'),
+ 'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'),
+ 'CASE_KEYWORDS' => 0,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'And', 'Array', 'As', 'Begin', 'Case', 'Class', 'Constructor', 'Destructor', 'Div', 'Do', 'DownTo', 'Else',
+ 'End', 'Except', 'File', 'Finally', 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', 'Inherited', 'Interface',
+ 'Is', 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Packed', 'Procedure', 'Program', 'Property', 'Raise', 'Record',
+ 'Repeat', 'Set', 'Shl', 'Shr', 'Then', 'ThreadVar', 'To', 'Try', 'Unit', 'Until', 'Uses', 'While', 'With', 'Xor'
+ ),
+ 2 => array(
+ 'nil', 'false', 'true', 'var', 'type', 'const'
+ ),
+ 3 => array(
+ 'Abs', 'Addr', 'AnsiCompareStr', 'AnsiCompareText', 'AnsiContainsStr', 'AnsiEndsStr', 'AnsiIndexStr', 'AnsiLeftStr',
+ 'AnsiLowerCase', 'AnsiMatchStr', 'AnsiMidStr', 'AnsiPos', 'AnsiReplaceStr', 'AnsiReverseString', 'AnsiRightStr',
+ 'AnsiStartsStr', 'AnsiUpperCase', 'ArcCos', 'ArcSin', 'ArcTan', 'Assigned', 'BeginThread', 'Bounds', 'CelsiusToFahrenheit',
+ 'ChangeFileExt', 'Chr', 'CompareStr', 'CompareText', 'Concat', 'Convert', 'Copy', 'Cos', 'CreateDir', 'CurrToStr',
+ 'CurrToStrF', 'Date', 'DateTimeToFileDate', 'DateTimeToStr', 'DateToStr', 'DayOfTheMonth', 'DayOfTheWeek', 'DayOfTheYear',
+ 'DayOfWeek', 'DaysBetween', 'DaysInAMonth', 'DaysInAYear', 'DaySpan', 'DegToRad', 'DeleteFile', 'DiskFree', 'DiskSize',
+ 'DupeString', 'EncodeDate', 'EncodeDateTime', 'EncodeTime', 'EndOfADay', 'EndOfAMonth', 'Eof', 'Eoln', 'Exp', 'ExtractFileDir',
+ 'ExtractFileDrive', 'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath', 'FahrenheitToCelsius', 'FileAge',
+ 'FileDateToDateTime', 'FileExists', 'FilePos', 'FileSearch', 'FileSetDate', 'FileSize', 'FindClose', 'FindCmdLineSwitch',
+ 'FindFirst', 'FindNext', 'FloatToStr', 'FloatToStrF', 'Format', 'FormatCurr', 'FormatDateTime', 'FormatFloat', 'Frac',
+ 'GetCurrentDir', 'GetLastError', 'GetMem', 'High', 'IncDay', 'IncMinute', 'IncMonth', 'IncYear', 'InputBox',
+ 'InputQuery', 'Int', 'IntToHex', 'IntToStr', 'IOResult', 'IsInfinite', 'IsLeapYear', 'IsMultiThread', 'IsNaN',
+ 'LastDelimiter', 'Length', 'Ln', 'Lo', 'Log10', 'Low', 'LowerCase', 'Max', 'Mean', 'MessageDlg', 'MessageDlgPos',
+ 'MonthOfTheYear', 'Now', 'Odd', 'Ord', 'ParamCount', 'ParamStr', 'Pi', 'Point', 'PointsEqual', 'Pos', 'Pred',
+ 'Printer', 'PromptForFileName', 'PtInRect', 'RadToDeg', 'Random', 'RandomRange', 'RecodeDate', 'RecodeTime', 'Rect',
+ 'RemoveDir', 'RenameFile', 'Round', 'SeekEof', 'SeekEoln', 'SelectDirectory', 'SetCurrentDir', 'Sin', 'SizeOf',
+ 'Slice', 'Sqr', 'Sqrt', 'StringOfChar', 'StringReplace', 'StringToWideChar', 'StrToCurr', 'StrToDate', 'StrToDateTime',
+ 'StrToFloat', 'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime', 'StuffString', 'Succ', 'Sum', 'Tan',
+ 'Time', 'TimeToStr', 'Tomorrow', 'Trunc', 'UpCase', 'UpperCase', 'VarType', 'WideCharToString', 'WrapText', 'Yesterday',
+
+ 'Append', 'AppendStr', 'Assign', 'AssignFile', 'AssignPrn', 'Beep', 'BlockRead', 'BlockWrite', 'Break',
+ 'ChDir', 'Close', 'CloseFile', 'Continue', 'DateTimeToString', 'Dec', 'DecodeDate', 'DecodeDateTime',
+ 'DecodeTime', 'Delete', 'Dispose', 'EndThread', 'Erase', 'Exclude', 'Exit', 'FillChar', 'Flush', 'FreeAndNil',
+ 'FreeMem', 'GetDir', 'GetLocaleFormatSettings', 'Halt', 'Inc', 'Include', 'Insert', 'MkDir', 'Move', 'New',
+ 'ProcessPath', 'Randomize', 'Read', 'ReadLn', 'ReallocMem', 'Rename', 'ReplaceDate', 'ReplaceTime',
+ 'Reset', 'ReWrite', 'RmDir', 'RunError', 'Seek', 'SetLength', 'SetString', 'ShowMessage', 'ShowMessageFmt',
+ 'ShowMessagePos', 'Str', 'Truncate', 'Val', 'Write', 'WriteLn'
+ ),
+ 4 => array(
+ 'AnsiChar', 'AnsiString', 'Boolean', 'Byte', 'Cardinal', 'Char', 'Comp', 'Currency', 'Double', 'Extended',
+ 'Int64', 'Integer', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PChar', 'PCurrency', 'PDateTime',
+ 'PExtended', 'PInt64', 'Pointer', 'PShortString', 'PString', 'PVariant', 'PWideChar', 'PWideString',
+ 'Real', 'Real48', 'ShortInt', 'ShortString', 'Single', 'SmallInt', 'String', 'TBits', 'TConvType', 'TDateTime',
+ 'Text', 'TextFile', 'TFloatFormat', 'TFormatSettings', 'TList', 'TObject', 'TOpenDialog', 'TPoint',
+ 'TPrintDialog', 'TRect', 'TReplaceFlags', 'TSaveDialog', 'TSearchRec', 'TStringList', 'TSysCharSet',
+ 'TThreadFunc', 'Variant', 'WideChar', 'WideString', 'Word'
+ ),
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #000000; font-weight: bold;',
+ 2 => 'color: #000000; font-weight: bold;',
+ 3 => 'color: #000066;',
+ 4 => 'color: #993333;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => '',
+ 4 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/html4strict.php b/inc/geshi/html4strict.php
new file mode 100644
index 000000000..22c0c33eb
--- /dev/null
+++ b/inc/geshi/html4strict.php
@@ -0,0 +1,254 @@
+<?php
+/*************************************************************************************
+ * html4strict.php
+ * ---------------
+ * Author: Nigel McNie (oracle.shinoda@gmail.com)
+ * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.3
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/07/10
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * HTML 4.01 strict language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.3)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.2)
+ * - Added support for URLs
+ * 2004/08/05 (1.0.1)
+ * - Added INS and DEL
+ * - Removed the background colour from tags' styles
+ * 2004/07/14 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ * * Check that only HTML4 strict attributes are highlighted
+ * * Eliminate empty tags that aren't allowed in HTML4 strict
+ * * Split to several files - html4trans, xhtml1 etc
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'HTML',
+ 'COMMENT_SINGLE' => array(),
+ 'COMMENT_MULTI' => array('<!--' => '-->'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ ),
+ 2 => array(
+ '&lt;a&gt;', '&lt;abbr&gt;', '&lt;acronym&gt;', '&lt;address&gt;', '&lt;applet&gt;',
+ '&lt;a', '&lt;abbr', '&lt;acronym', '&lt;address', '&lt;applet',
+ '&lt;/a&gt;', '&lt;/abbr&gt;', '&lt;/acronym&gt;', '&lt;/address&gt;', '&lt;/applet&gt;',
+ '&lt;/a', '&lt;/abbr', '&lt;/acronym', '&lt;/address', '&lt;/applet',
+
+ '&lt;base&gt;', '&lt;basefont&gt;', '&lt;bdo&gt;', '&lt;big&gt;', '&lt;blockquote&gt;', '&lt;body&gt;', '&lt;br&gt;', '&lt;button&gt;', '&lt;b&gt;',
+ '&lt;base', '&lt;basefont', '&lt;bdo', '&lt;big', '&lt;blockquote', '&lt;body', '&lt;br', '&lt;button', '&lt;b',
+ '&lt;/base&gt;', '&lt;/basefont&gt;', '&lt;/bdo&gt;', '&lt;/big&gt;', '&lt;/blockquote&gt;', '&lt;/body&gt;', '&lt;/br&gt;', '&lt;/button&gt;', '&lt;/b&gt;',
+ '&lt;/base', '&lt;/basefont', '&lt;/bdo', '&lt;/big', '&lt;/blockquote', '&lt;/body', '&lt;/br', '&lt;/button', '&lt;/b',
+
+ '&lt;caption&gt;', '&lt;center&gt;', '&lt;cite&gt;', '&lt;code&gt;', '&lt;colgroup&gt;', '&lt;col&gt;',
+ '&lt;caption', '&lt;center', '&lt;cite', '&lt;code', '&lt;colgroup', '&lt;col',
+ '&lt;/caption&gt;', '&lt;/center&gt;', '&lt;/cite&gt;', '&lt;/code&gt;', '&lt;/colgroup&gt;', '&lt;/col&gt;',
+ '&lt;/caption', '&lt;/center', '&lt;/cite', '&lt;/code', '&lt;/colgroup', '&lt;/col',
+
+ '&lt;dd&gt;', '&lt;del&gt;', '&lt;dfn&gt;', '&lt;dir&gt;', '&lt;div&gt;', '&lt;dl&gt;', '&lt;dt&gt;',
+ '&lt;dd', '&lt;del', '&lt;dfn', '&lt;dir', '&lt;div', '&lt;dl', '&lt;dt',
+ '&lt;/dd&gt;', '&lt;/del&gt;', '&lt;/dfn&gt;', '&lt;/dir&gt;', '&lt;/div&gt;', '&lt;/dl&gt;', '&lt;/dt&gt;',
+ '&lt;/dd', '&lt;/del', '&lt;/dfn', '&lt;/dir', '&lt;/div', '&lt;/dl', '&lt;/dt',
+
+ '&lt;em&gt;',
+ '&lt;em',
+ '&lt;/em&gt;',
+ '&lt;/em',
+
+ '&lt;fieldset&gt;', '&lt;font&gt;', '&lt;form&gt;', '&lt;frame&gt;', '&lt;frameset&gt;',
+ '&lt;fieldset', '&lt;font', '&lt;form', '&lt;frame', '&lt;frameset',
+ '&lt;/fieldset&gt;', '&lt;/font&gt;', '&lt;/form&gt;', '&lt;/frame&gt;', '&lt;/frameset&gt;',
+ '&lt;/fieldset', '&lt;/font', '&lt;/form', '&lt;/frame', '&lt;/frameset',
+
+ '&lt;h1&gt;', '&lt;h2&gt;', '&lt;h3&gt;', '&lt;h4&gt;', '&lt;h5&gt;', '&lt;h6&gt;', '&lt;head&gt;', '&lt;hr&gt;', '&lt;html&gt;',
+ '&lt;h1', '&lt;h2', '&lt;h3', '&lt;h4', '&lt;h5', '&lt;h6', '&lt;head', '&lt;hr', '&lt;html',
+ '&lt;/h1&gt;', '&lt;/h2&gt;', '&lt;/h3&gt;', '&lt;/h4&gt;', '&lt;/h5&gt;', '&lt;/h6&gt;', '&lt;/head&gt;', '&lt;/hr&gt;', '&lt;/html&gt;',
+ '&lt;/h1', '&lt;/h2', '&lt;/h3', '&lt;/h4', '&lt;/h5', '&lt;/h6', '&lt;/head', '&lt;/hr', '&lt;/html',
+
+ '&lt;iframe&gt;', '&lt;ilayer&gt;', '&lt;img&gt;', '&lt;input&gt;', '&lt;ins&gt;', '&lt;isindex&gt;', '&lt;i&gt;',
+ '&lt;iframe', '&lt;ilayer', '&lt;img', '&lt;input', '&lt;ins', '&lt;isindex', '&lt;i',
+ '&lt;/iframe&gt;', '&lt;/ilayer&gt;', '&lt;/img&gt;', '&lt;/input&gt;', '&lt;/ins&gt;', '&lt;/isindex&gt;', '&lt;/i&gt;',
+ '&lt;/iframe', '&lt;/ilayer', '&lt;/img', '&lt;/input', '&lt;/ins', '&lt;/isindex', '&lt;/i',
+
+ '&lt;kbd&gt;',
+ '&lt;kbd',
+ '&t;/kbd&gt;',
+ '&lt;/kbd',
+
+ '&lt;label&gt;', '&lt;legend&gt;', '&lt;link&gt;', '&lt;li&gt;',
+ '&lt;label', '&lt;legend', '&lt;link', '&lt;li',
+ '&lt;/label&gt;', '&lt;/legend&gt;', '&lt;/link&gt;', '&lt;/li&gt;',
+ '&lt;/label', '&lt;/legend', '&lt;/link', '&lt;/li',
+
+ '&lt;map&gt;', '&lt;meta&gt;',
+ '&lt;map', '&lt;meta',
+ '&lt;/map&gt;', '&lt;/meta&gt;',
+ '&lt;/map', '&lt;/meta',
+
+ '&lt;noframes&gt;', '&lt;noscript&gt;',
+ '&lt;noframes', '&lt;noscript',
+ '&lt;/noframes&gt;', '&lt;/noscript&gt;',
+ '&lt;/noframes', '&lt;/noscript',
+
+ '&lt;object&gt;', '&lt;ol&gt;', '&lt;optgroup&gt;', '&lt;option&gt;',
+ '&lt;object', '&lt;ol', '&lt;optgroup', '&lt;option',
+ '&lt;/object&gt;', '&lt;/ol&gt;', '&lt;/optgroup&gt;', '&lt;/option&gt;',
+ '&lt;/object', '&lt;/ol', '&lt;/optgroup', '&lt;/option',
+
+ '&lt;param&gt;', '&lt;pre&gt;', '&lt;p&gt;',
+ '&lt;param', '&lt;pre', '&lt;p',
+ '&lt;/param&gt;', '&lt;/pre&gt;', '&lt;/p&gt;',
+ '&lt;/param', '&lt;/pre', '&lt;/p',
+
+ '&lt;q&gt;',
+ '&lt;q',
+ '&lt;/q&gt;',
+ '&lt;/q',
+
+ '&lt;samp&gt;', '&lt;script&gt;', '&lt;select&gt;', '&lt;small&gt;', '&lt;span&gt;', '&lt;strike&gt;', '&lt;strong&gt;', '&lt;style&gt;', '&lt;sub&gt;', '&lt;sup&gt;', '&lt;s&gt;',
+ '&lt;samp', '&lt;script', '&lt;select', '&lt;small', '&lt;span', '&lt;strike', '&lt;strong', '&lt;style', '&lt;sub', '&lt;sup', '&lt;s',
+ '&lt;/samp&gt;', '&lt;/script&gt;', '&lt;/select&gt;', '&lt;/small&gt;', '&lt;/span&gt;', '&lt;/strike&gt;', '&lt;/strong&gt;', '&lt;/style&gt;', '&lt;/sub&gt;', '&lt;/sup&gt;', '&lt;/s&gt;',
+ '&lt;/samp', '&lt;/script', '&lt;/select', '&lt;/small', '&lt;/span', '&lt;/strike', '&lt;/strong', '&lt;/style', '&lt;/sub', '&lt;/sup', '&lt;/s',
+
+ '&lt;table&gt;', '&lt;tbody&gt;', '&lt;td&gt;', '&lt;textarea&gt;', '&lt;text&gt;', '&lt;tfoot&gt;', '&lt;thead&gt;', '&lt;th&gt;', '&lt;title&gt;', '&lt;tr&gt;', '&lt;tt&gt;',
+ '&lt;table', '&lt;tbody', '&lt;td', '&lt;textarea', '&lt;text', '&lt;tfoot', '&lt;tfoot', '&lt;thead', '&lt;th', '&lt;title', '&lt;tr', '&lt;tt',
+ '&lt;/table&gt;', '&lt;/tbody&gt;', '&lt;/td&gt;', '&lt;/textarea&gt;', '&lt;/text&gt;', '&lt;/tfoot&gt;', '&lt;/thead', '&lt;/tfoot', '&lt;/th&gt;', '&lt;/title&gt;', '&lt;/tr&gt;', '&lt;/tt&gt;',
+ '&lt;/table', '&lt;/tbody', '&lt;/td', '&lt;/textarea', '&lt;/text', '&lt;/tfoot', '&lt;/tfoot', '&lt;/thead', '&lt;/th', '&lt;/title', '&lt;/tr', '&lt;/tt',
+
+ '&lt;ul&gt;', '&lt;u&gt;',
+ '&lt;ul', '&lt;u',
+ '&lt;/ul&gt;', '&lt;/ul&gt;',
+ '&lt;/ul', '&lt;/u',
+
+ '&lt;var&gt;',
+ '&lt;var',
+ '&lt;/var&gt;',
+ '&lt;/var',
+
+ '&gt;', '&lt;'
+ ),
+ 3 => array(
+ 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
+ 'background', 'bgcolor', 'border',
+ 'cellpadding', 'cellspacing', 'char', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
+ 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
+ 'enctype',
+ 'face', 'for', 'frame', 'frameborder',
+ 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
+ 'id', 'ismap',
+ 'label', 'lang', 'language', 'link', 'longdesc',
+ 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
+ 'name', 'nohref', 'noresize', 'noshade', 'nowrap',
+ 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
+ 'profile', 'prompt',
+ 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
+ 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
+ 'tabindex', 'target', 'text', 'title', 'type',
+ 'usemap',
+ 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
+ 'width'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '/', '='
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;',
+ 2 => 'color: #000000; font-weight: bold;',
+ 3 => 'color: #000066;'
+ ),
+ 'COMMENTS' => array(
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'SCRIPT' => array(
+ 0 => 'color: #00bbdd;',
+ 1 => 'color: #ddbb00;',
+ 2 => 'color: #009900;'
+ ),
+ 'REGEXPS' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => 'http://december.com/html/4/element/{FNAME}.html',
+ 3 => ''
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
+ 'SCRIPT_DELIMITERS' => array(
+ 0 => array(
+ '<!DOCTYPE' => '>'
+ ),
+ 1 => array(
+ '&' => ';'
+ ),
+ 2 => array(
+ '<' => '>'
+ )
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ 0 => false,
+ 1 => false,
+ 2 => true
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/java.php b/inc/geshi/java.php
new file mode 100644
index 000000000..3033b3738
--- /dev/null
+++ b/inc/geshi/java.php
@@ -0,0 +1,1402 @@
+<?php
+/*************************************************************************************
+ * java.php
+ * --------
+ * Author: Nigel McNie (oracle.shinoda@gmail.com)
+ * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.3
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/07/10
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * Java language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.3)
+ * - Added support for multiple object splitters
+ * 2004/08/05 (1.0.2)
+ * - Added URL support
+ * - Added keyword "this", as bugs in GeSHi class ironed out
+ * 2004/08/05 (1.0.1)
+ * - Added support for symbols
+ * - Added extra missed keywords
+ * 2004/07/14 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ * * Compact the class names like the first few have been
+ * and eliminate repeats
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Java',
+ 'COMMENT_SINGLE' => array(1 => '//', 2 => 'import'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'for', 'foreach', 'if', 'elseif', 'else', 'while', 'do',
+ 'switch', 'case'
+ ),
+ 2 => array(
+ 'null', 'return', 'false', 'final', 'true', 'public',
+ 'private', 'protected', 'extends', 'break', 'class',
+ 'new', 'try', 'catch', 'throws', 'finally', 'implements',
+ 'interface', 'throw', 'native', 'synchronized', 'this'
+ ),
+ 3 => array(
+ 'AbstractAction', 'AbstractBorder', 'AbstractButton', 'AbstractCellEditor',
+ 'AbstractCollection', 'AbstractColorChooserPanel', 'AbstractDocument',
+ 'AbstractDocument.AttributeContext', 'AbstractDocument.Content',
+ 'AbstractDocument.ElementEdit', 'AbstractLayoutCache',
+ 'AbstractLayoutCache.NodeDimensions', 'AbstractList', 'AbstractListModel',
+ 'AbstractMap', 'AbstractMethodError', 'AbstractSequentialList',
+ 'AbstractSet', 'AbstractTableModel', 'AbstractUndoableEdit', 'AbstractWriter',
+ 'AccessControlContext', 'AccessControlException', 'AccessController',
+ 'AccessException', 'Accessible', 'AccessibleAction', 'AccessibleBundle',
+ 'AccessibleComponent', 'AccessibleContext', 'AccessibleHyperlink',
+ 'AccessibleHypertext', 'AccessibleIcon', 'AccessibleObject',
+ 'AccessibleRelation', 'AccessibleRelationSet', 'AccessibleResourceBundle',
+ 'AccessibleRole', 'AccessibleSelection', 'AccessibleState',
+ 'AccessibleStateSet', 'AccessibleTable', 'AccessibleTableModelChange',
+ 'AccessibleText', 'AccessibleValue', 'Acl', 'AclEntry', 'AclNotFoundException',
+ 'Action', 'ActionEvent', 'ActionListener', 'ActionMap', 'ActionMapUIResource',
+ 'Activatable', 'ActivateFailedException', 'ActivationDesc',
+ 'ActivationException', 'ActivationGroup', 'ActivationGroupDesc',
+ 'ActivationGroupDesc.CommandEnvironment', 'ActivationGroupID', 'ActivationID',
+ 'ActivationInstantiator', 'ActivationMonitor', 'ActivationSystem',
+ 'Activator', 'ActiveEvent', 'Adjustable', 'AdjustmentEvent', 'AdjustmentListener',
+ 'Adler32', 'AffineTransform', 'AffineTransformOp', 'AlgorithmParameterGenerator',
+ 'AlgorithmParameterGeneratorSpi', 'AlgorithmParameters', 'AlgorithmParameterSpec',
+ 'AlgorithmParametersSpi', 'AllPermission', 'AlphaComposite', 'AlreadyBound',
+ 'AlreadyBoundException', 'AlreadyBoundHelper', 'AlreadyBoundHolder',
+ 'AncestorEvent', 'AncestorListener', 'Annotation', 'Any', 'AnyHolder',
+ 'AnySeqHelper', 'AnySeqHolder', 'Applet', 'AppletContext', 'AppletInitializer',
+ 'AppletStub', 'ApplicationException', 'Arc2D', 'Arc2D.Double', 'Arc2D.Float',
+ 'Area', 'AreaAveragingScaleFilter', 'ARG_IN', 'ARG_INOUT', 'ARG_OUT',
+ 'ArithmeticException', 'Array', 'ArrayIndexOutOfBoundsException',
+ 'ArrayList', 'Arrays', 'ArrayStoreException', 'AsyncBoxView',
+ 'Attribute', 'AttributedCharacterIterator', 'AttributedCharacterIterator.Attribute',
+ 'AttributedString', 'AttributeInUseException', 'AttributeList',
+ 'AttributeModificationException', 'Attributes', 'Attributes.Name',
+ 'AttributeSet', 'AttributeSet.CharacterAttribute', 'AttributeSet.ColorAttribute',
+ 'AttributeSet.FontAttribute', 'AttributeSet.ParagraphAttribute',
+ 'AudioClip', 'AudioFileFormat', 'AudioFileFormat.Type', 'AudioFileReader',
+ 'AudioFileWriter', 'AudioFormat', 'AudioFormat.Encoding', 'AudioInputStream',
+ 'AudioPermission', 'AudioSystem', 'AuthenticationException',
+ 'AuthenticationNotSupportedException', 'Authenticator', 'Autoscroll',
+ 'AWTError', 'AWTEvent', 'AWTEventListener', 'AWTEventMulticaster',
+ 'AWTException', 'AWTPermission', 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION',
+ 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', 'BAD_POLICY_VALUE', 'BAD_TYPECODE',
+ 'BadKind', 'BadLocationException', 'BandCombineOp', 'BandedSampleModel','BasicArrowButton',
+ 'BasicAttribute', 'BasicAttributes', 'BasicBorders', 'BasicBorders.ButtonBorder',
+ 'BasicBorders.FieldBorder', 'BasicBorders.MarginBorder', 'BasicBorders.MenuBarBorder',
+ 'BasicBorders.RadioButtonBorder', 'BasicBorders.SplitPaneBorder',
+ 'BasicBorders.ToggleButtonBorder', 'BasicButtonListener', 'BasicButtonUI',
+ 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', 'BasicColorChooserUI', 'BasicComboBoxEditor',
+ 'BasicComboBoxEditor.UIResource', 'BasicComboBoxRenderer', 'BasicComboBoxRenderer.UIResource',
+ 'BasicComboBoxUI', 'BasicComboPopup', 'BasicDesktopIconUI', 'BasicDesktopPaneUI',
+ 'BasicDirectoryModel', 'BasicEditorPaneUI', 'BasicFileChooserUI',
+ 'BasicGraphicsUtils', 'BasicHTML', 'BasicIconFactory', 'BasicInternalFrameTitlePane',
+ 'BasicInternalFrameUI', 'BasicLabelUI', 'BasicListUI', 'BasicLookAndFeel',
+ 'BasicMenuBarUI', 'BasicMenuItemUI', 'BasicMenuUI', 'BasicOptionPaneUI',
+ 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', 'BasicPasswordFieldUI',
+ 'BasicPermission', 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI',
+ 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', 'BasicRadioButtonUI',
+ 'BasicRootPaneUI', 'BasicScrollBarUI', 'BasicScrollPaneUI', 'BasicSeparatorUI',
+ 'BasicSliderUI', 'BasicSplitPaneDivider', 'BasicSplitPaneUI', 'BasicStroke',
+ 'BasicTabbedPaneUI', 'BasicTableHeaderUI', 'BasicTableUI', 'BasicTextAreaUI',
+ 'BasicTextFieldUI', 'BasicTextPaneUI', 'BasicTextUI', 'BasicTextUI.BasicCaret',
+ 'BasicTextUI.BasicHighlighter', 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI',
+ 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', 'BasicViewportUI',
+ 'BatchUpdateException', 'BeanContext', 'BeanContextChild',
+ 'BeanContextChildComponentProxy', 'BeanContextChildSupport', 'BeanContextContainerProxy',
+ 'BeanContextEvent', 'BeanContextMembershipEvent', 'BeanContextMembershipListener',
+ 'BeanContextProxy', 'BeanContextServiceAvailableEvent', 'BeanContextServiceProvider',
+ 'BeanContextServiceProviderBeanInfo', 'BeanContextServiceRevokedEvent',
+ 'BeanContextServiceRevokedListener', 'BeanContextServices',
+ 'BeanContextServicesListener', 'BeanContextServicesSupport',
+ 'BeanContextServicesSupport.BCSSServiceProvider', 'BeanContextSupport',
+ 'BeanContextSupport.BCSIterator', 'BeanDescriptor', 'BeanInfo', 'Beans',
+ 'BevelBorder', 'BigDecimal', 'BigInteger', 'BinaryRefAddr', 'BindException',
+ 'Binding', 'BindingHelper', 'BindingHolder', 'BindingIterator',
+ 'BindingIteratorHelper', 'BindingIteratorHolder', 'BindingIteratorOperations',
+ 'BindingListHelper', 'BindingListHolder', 'BindingType', 'BindingTypeHelper',
+ 'BindingTypeHolder', 'BitSet', 'Blob', 'BlockView', 'Book', 'Boolean',
+ 'BooleanControl', 'BooleanControl.Type', 'BooleanHolder', 'BooleanSeqHelper',
+ 'BooleanSeqHolder', 'Border', 'BorderFactory', 'BorderLayout', 'BorderUIResource',
+ 'BorderUIResource.BevelBorderUIResource', 'BorderUIResource.CompoundBorderUIResource',
+ 'BorderUIResource.EmptyBorderUIResource', 'BorderUIResource.EtchedBorderUIResource',
+ 'BorderUIResource.LineBorderUIResource', 'BorderUIResource.MatteBorderUIResource',
+ 'BorderUIResource.TitledBorderUIResource', 'BoundedRangeModel', 'Bounds',
+ 'Box', 'Box.Filler', 'BoxedValueHelper', 'BoxLayout', 'BoxView',
+ 'BreakIterator', 'BufferedImage', 'BufferedImageFilter', 'BufferedImageOp',
+ 'BufferedInputStream', 'BufferedOutputStream', 'BufferedReader', 'BufferedWriter',
+ 'Button', 'ButtonGroup', 'ButtonModel', 'ButtonUI', 'Byte', 'ByteArrayInputStream',
+ 'ByteArrayOutputStream', 'ByteHolder', 'ByteLookupTable', 'Calendar',
+ 'CallableStatement', 'CannotProceed', 'CannotProceedException', 'CannotProceedHelper',
+ 'CannotProceedHolder', 'CannotRedoException', 'CannotUndoException',
+ 'Canvas', 'CardLayout', 'Caret', 'CaretEvent', 'CaretListener', 'CellEditor',
+ 'CellEditorListener', 'CellRendererPane', 'Certificate', 'Certificate.CertificateRep',
+ 'CertificateEncodingException', 'CertificateException', 'CertificateExpiredException',
+ 'CertificateFactory', 'CertificateFactorySpi', 'CertificateNotYetValidException',
+ 'CertificateParsingException', 'ChangedCharSetException', 'ChangeEvent',
+ 'ChangeListener', 'Character', 'Character.Subset', 'Character.UnicodeBlock',
+ 'CharacterIterator', 'CharArrayReader', 'CharArrayWriter', 'CharConversionException',
+ 'CharHolder', 'CharSeqHelper', 'CharSeqHolder', 'Checkbox', 'CheckboxGroup',
+ 'CheckboxMenuItem', 'CheckedInputStream', 'CheckedOutputStream', 'Checksum',
+ 'Choice', 'ChoiceFormat', 'Class', 'ClassCastException', 'ClassCircularityError',
+ 'ClassDesc', 'ClassFormatError', 'ClassLoader', 'ClassNotFoundException',
+ 'Clip', 'Clipboard', 'ClipboardOwner', 'Clob', 'Cloneable', 'CloneNotSupportedException',
+ 'CMMException', 'CodeSource', 'CollationElementIterator', 'CollationKey',
+ 'Collator', 'Collection', 'Collections', 'Color', 'ColorChooserComponentFactory',
+ 'ColorChooserUI', 'ColorConvertOp', 'ColorModel', 'ColorSelectionModel',
+ 'ColorSpace', 'ColorUIResource', 'ComboBoxEditor', 'ComboBoxModel', 'ComboBoxUI',
+ 'ComboPopup', 'COMM_FAILURE', 'CommunicationException', 'Comparable',
+ 'Comparator', 'Compiler', 'CompletionStatus', 'CompletionStatusHelper',
+ 'Component', 'ComponentAdapter', 'ComponentColorModel', 'ComponentEvent',
+ 'ComponentInputMap', 'ComponentInputMapUIResource', 'ComponentListener',
+ 'ComponentOrientation', 'ComponentSampleModel', 'ComponentUI', 'ComponentView',
+ 'Composite', 'CompositeContext', 'CompositeName','CompositeView', 'CompoundBorder',
+ 'CompoundControl', 'CompoundControl.Type', 'CompoundEdit', 'CompoundName',
+ 'ConcurrentModificationException', 'ConfigurationException', 'ConnectException',
+ 'ConnectException', 'ConnectIOException', 'Connection', 'Constructor',
+ 'Container', 'ContainerAdapter', 'ContainerEvent', 'ContainerListener',
+ 'ContentHandler', 'ContentHandlerFactory', 'ContentModel', 'Context', 'ContextList',
+ 'ContextNotEmptyException', 'ContextualRenderedImageFactory', 'Control',
+ 'Control.Type', 'ControlFactory', 'ControllerEventListener', 'ConvolveOp',
+ 'CRC32', 'CRL', 'CRLException', 'CropImageFilter', 'CSS', 'CSS.Attribute',
+ 'CTX_RESTRICT_SCOPE', 'CubicCurve2D', 'CubicCurve2D.Double', 'CubicCurve2D.Float',
+ 'Current', 'CurrentHelper', 'CurrentHolder', 'CurrentOperations', 'Cursor',
+ 'Customizer', 'CustomMarshal', 'CustomValue', 'DATA_CONVERSION', 'DatabaseMetaData',
+ 'DataBuffer', 'DataBufferByte', 'DataBufferInt', 'DataBufferShort', 'DataBufferUShort',
+ 'DataFlavor', 'DataFormatException', 'DatagramPacket', 'DatagramSocket',
+ 'DatagramSocketImpl', 'DatagramSocketImplFactory', 'DataInput', 'DataInputStream',
+ 'DataLine', 'DataLine.Info', 'DataOutput', 'DataOutputStream', 'DataOutputStream',
+ 'DataTruncation', 'Date', 'DateFormat', 'DateFormatSymbols', 'DebugGraphics',
+ 'DecimalFormat', 'DecimalFormatSymbols', 'DefaultBoundedRangeModel',
+ 'DefaultButtonModel', 'DefaultCaret', 'DefaultCellEditor', 'DefaultColorSelectionModel',
+ 'DefaultComboBoxModel', 'DefaultDesktopManager', 'DefaultEditorKit',
+ 'DefaultEditorKit.BeepAction', 'DefaultEditorKit.CopyAction',
+ 'DefaultEditorKit.CutAction', 'DefaultEditorKit.DefaultKeyTypedAction',
+ 'DefaultEditorKit.InsertBreakAction', 'DefaultEditorKit.InsertContentAction',
+ 'DefaultEditorKit.InsertTabAction', 'DefaultEditorKit.PasteAction,',
+ 'DefaultFocusManager', 'DefaultHighlighter', 'DefaultHighlighter.DefaultHighlightPainter',
+ 'DefaultListCellRenderer', 'DefaultListCellRenderer.UIResource', 'DefaultListModel',
+ 'DefaultListSelectionModel', 'DefaultMenuLayout', 'DefaultMetalTheme',
+ 'DefaultMutableTreeNode', 'DefaultSingleSelectionModel', 'DefaultStyledDocument',
+ 'DefaultStyledDocument.AttributeUndoableEdit', 'DefaultStyledDocument.ElementSpec',
+ 'DefaultTableCellRenderer', 'DefaultTableCellRenderer.UIResource', 'DefaultTableColumnModel',
+ 'DefaultTableModel', 'DefaultTextUI', 'DefaultTreeCellEditor', 'DefaultTreeCellRenderer',
+ 'DefaultTreeModel', 'DefaultTreeSelectionModel', 'DefinitionKind', 'DefinitionKindHelper',
+ 'Deflater', 'DeflaterOutputStream', 'Delegate', 'DesignMode', 'DesktopIconUI',
+ 'DesktopManager', 'DesktopPaneUI', 'DGC', 'Dialog', 'Dictionary', 'DigestException',
+ 'DigestInputStream', 'DigestOutputStream', 'Dimension', 'Dimension2D',
+ 'DimensionUIResource', 'DirContext', 'DirectColorModel', 'DirectoryManager',
+ 'DirObjectFactory', 'DirStateFactory', 'DirStateFactory.Result', 'DnDConstants',
+ 'Document', 'DocumentEvent', 'DocumentEvent.ElementChange', 'DocumentEvent.EventType',
+ 'DocumentListener', 'DocumentParser', 'DomainCombiner', 'DomainManager',
+ 'DomainManagerOperations', 'Double', 'DoubleHolder', 'DoubleSeqHelper',
+ 'DoubleSeqHolder', 'DragGestureEvent', 'DragGestureListener', 'DragGestureRecognizer',
+ 'DragSource', 'DragSourceContext', 'DragSourceDragEvent', 'DragSourceDropEvent',
+ 'DragSourceEvent', 'DragSourceListener', 'Driver', 'DriverManager',
+ 'DriverPropertyInfo', 'DropTarget', 'DropTarget.DropTargetAutoScroller',
+ 'DropTargetContext', 'DropTargetDragEvent', 'DropTargetDropEvent',
+ 'DropTargetEvent', 'DropTargetListener', 'DSAKey', 'DSAKeyPairGenerator',
+ 'DSAParameterSpec', 'DSAParams', 'DSAPrivateKey', 'DSAPrivateKeySpec',
+ 'DSAPublicKey', 'DSAPublicKeySpec', 'DTD', 'DTDConstants', 'DynamicImplementation',
+ 'DynAny', 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', 'DynStruct',
+ 'DynUnion', 'DynValue', 'EditorKit', 'Element', 'ElementIterator', 'Ellipse2D',
+ 'Ellipse2D.Double', 'Ellipse2D.Float', 'EmptyBorder', 'EmptyStackException',
+ 'EncodedKeySpec', 'Entity', 'EnumControl', 'EnumControl.Type','Enumeration',
+ 'Environment', 'EOFException', 'Error', 'EtchedBorder', 'Event', 'EventContext',
+ 'EventDirContext', 'EventListener', 'EventListenerList', 'EventObject', 'EventQueue',
+ 'EventSetDescriptor', 'Exception', 'ExceptionInInitializerError', 'ExceptionList',
+ 'ExpandVetoException', 'ExportException', 'ExtendedRequest', 'ExtendedResponse',
+ 'Externalizable', 'FeatureDescriptor', 'Field', 'FieldNameHelper',
+ 'FieldPosition', 'FieldView', 'File', 'FileChooserUI', 'FileDescriptor',
+ 'FileDialog', 'FileFilter', 'FileFilter', 'FileInputStream', 'FilenameFilter',
+ 'FileNameMap', 'FileNotFoundException', 'FileOutputStream', 'FilePermission',
+ 'FileReader', 'FileSystemView', 'FileView', 'FileWriter', 'FilteredImageSource',
+ 'FilterInputStream', 'FilterOutputStream', 'FilterReader', 'FilterWriter',
+ 'FixedHeightLayoutCache', 'FixedHolder', 'FlatteningPathIterator', 'FlavorMap',
+ 'Float', 'FloatControl', 'FloatControl.Type', 'FloatHolder', 'FloatSeqHelper',
+ 'FloatSeqHolder', 'FlowLayout', 'FlowView', 'FlowView.FlowStrategy', 'FocusAdapter',
+ 'FocusEvent', 'FocusListener', 'FocusManager', 'Font', 'FontFormatException',
+ 'FontMetrics', 'FontRenderContext', 'FontUIResource', 'Format', 'FormatConversionProvider',
+ 'FormView', 'Frame', 'FREE_MEM', 'GapContent', 'GeneralPath', 'GeneralSecurityException',
+ 'GlyphJustificationInfo', 'GlyphMetrics', 'GlyphVector',
+ 'GlyphView',
+ 'GlyphView.GlyphPainter',
+ 'GradientPaint',
+ 'GraphicAttribute',
+ 'Graphics',
+ 'Graphics2D',
+ 'GraphicsConfigTemplate',
+ 'GraphicsConfiguration',
+ 'GraphicsDevice',
+ 'GraphicsEnvironment',
+ 'GrayFilter',
+ 'GregorianCalendar',
+ 'GridBagConstraints',
+ 'GridBagLayout',
+ 'GridLayout',
+ 'Group',
+ 'Guard',
+ 'GuardedObject',
+ 'GZIPInputStream',
+ 'GZIPOutputStream',
+ 'HasControls',
+ 'HashMap',
+ 'HashSet',
+ 'Hashtable',
+ 'HierarchyBoundsAdapter',
+ 'HierarchyBoundsListener',
+ 'HierarchyEvent',
+ 'HierarchyListener',
+ 'Highlighter',
+ 'Highlighter.Highlight',
+ 'Highlighter.HighlightPainter',
+ 'HTML',
+ 'HTML.Attribute',
+ 'HTML.Tag',
+ 'HTML.UnknownTag',
+ 'HTMLDocument',
+ 'HTMLDocument.Iterator',
+ 'HTMLEditorKit',
+ 'HTMLEditorKit.HTMLFactory',
+ 'HTMLEditorKit.HTMLTextAction',
+ 'HTMLEditorKit.InsertHTMLTextAction',
+ 'HTMLEditorKit.LinkController',
+ 'HTMLEditorKit.Parser',
+ 'HTMLEditorKit.ParserCallback',
+ 'HTMLFrameHyperlinkEvent',
+ 'HTMLWriter',
+ 'HttpURLConnection',
+ 'HyperlinkEvent',
+ 'HyperlinkEvent.EventType',
+ 'HyperlinkListener',
+ 'ICC_ColorSpace',
+ 'ICC_Profile',
+ 'ICC_ProfileGray',
+ 'ICC_ProfileRGB',
+ 'Icon',
+ 'IconUIResource',
+ 'IconView',
+ 'IdentifierHelper',
+ 'Identity',
+ 'IdentityScope',
+ 'IDLEntity',
+ 'IDLType',
+ 'IDLTypeHelper', 'IDLTypeOperations',
+ 'IllegalAccessError',
+ 'IllegalAccessException',
+ 'IllegalArgumentException',
+ 'IllegalComponentStateException',
+ 'IllegalMonitorStateException',
+ 'IllegalPathStateException',
+ 'IllegalStateException',
+ 'IllegalThreadStateException',
+ 'Image',
+ 'ImageConsumer',
+ 'ImageFilter',
+ 'ImageGraphicAttribute',
+ 'ImageIcon',
+ 'ImageObserver',
+ 'ImageProducer',
+ 'ImagingOpException',
+ 'IMP_LIMIT',
+ 'IncompatibleClassChangeError',
+ 'InconsistentTypeCode',
+ 'IndexColorModel',
+ 'IndexedPropertyDescriptor',
+ 'IndexOutOfBoundsException',
+ 'IndirectionException',
+ 'InetAddress',
+ 'Inflater',
+ 'InflaterInputStream',
+ 'InheritableThreadLocal',
+ 'InitialContext',
+ 'InitialContextFactory',
+ 'InitialContextFactoryBuilder',
+ 'InitialDirContext',
+ 'INITIALIZE',
+ 'Initializer',
+ 'InitialLdapContext',
+ 'InlineView',
+ 'InputContext',
+ 'InputEvent',
+ 'InputMap',
+ 'InputMapUIResource',
+ 'InputMethod',
+ 'InputMethodContext',
+ 'InputMethodDescriptor',
+ 'InputMethodEvent',
+ 'InputMethodHighlight',
+ 'InputMethodListener',
+ 'InputMethodRequests',
+ 'InputStream',
+ 'InputStream',
+ 'InputStream',
+ 'InputStreamReader',
+ 'InputSubset',
+ 'InputVerifier',
+ 'Insets',
+ 'InsetsUIResource',
+ 'InstantiationError',
+ 'InstantiationException',
+ 'Instrument',
+ 'InsufficientResourcesException',
+ 'Integer',
+ 'INTERNAL',
+ 'InternalError', 'InternalFrameAdapter',
+ 'InternalFrameEvent',
+ 'InternalFrameListener',
+ 'InternalFrameUI',
+ 'InterruptedException',
+ 'InterruptedIOException',
+ 'InterruptedNamingException',
+ 'INTF_REPOS',
+ 'IntHolder',
+ 'IntrospectionException',
+ 'Introspector',
+ 'INV_FLAG',
+ 'INV_IDENT',
+ 'INV_OBJREF',
+ 'INV_POLICY',
+ 'Invalid',
+ 'INVALID_TRANSACTION',
+ 'InvalidAlgorithmParameterException',
+ 'InvalidAttributeIdentifierException',
+ 'InvalidAttributesException',
+ 'InvalidAttributeValueException',
+ 'InvalidClassException',
+ 'InvalidDnDOperationException',
+ 'InvalidKeyException',
+ 'InvalidKeySpecException',
+ 'InvalidMidiDataException',
+ 'InvalidName',
+ 'InvalidName',
+ 'InvalidNameException',
+ 'InvalidNameHelper',
+ 'InvalidNameHolder',
+ 'InvalidObjectException',
+ 'InvalidParameterException',
+ 'InvalidParameterSpecException',
+ 'InvalidSearchControlsException',
+ 'InvalidSearchFilterException',
+ 'InvalidSeq',
+ 'InvalidTransactionException',
+ 'InvalidValue',
+ 'InvocationEvent',
+ 'InvocationHandler',
+ 'InvocationTargetException',
+ 'InvokeHandler',
+ 'IOException',
+ 'IRObject',
+ 'IRObjectOperations', 'IstringHelper', 'ItemEvent', 'ItemListener',
+ 'ItemSelectable', 'Iterator', 'JApplet', 'JarEntry', 'JarException',
+ 'JarFile', 'JarInputStream', 'JarOutputStream', 'JarURLConnection',
+ 'JButton', 'JCheckBox', 'JCheckBoxMenuItem', 'JColorChooser',
+ 'JComboBox',
+ 'JComboBox.KeySelectionManager',
+ 'JComponent',
+ 'JDesktopPane',
+ 'JDialog',
+ 'JEditorPane',
+ 'JFileChooser',
+ 'JFrame',
+ 'JInternalFrame',
+ 'JInternalFrame.JDesktopIcon',
+ 'JLabel',
+ 'JLayeredPane',
+ 'JList',
+ 'JMenu',
+ 'JMenuBar',
+ 'JMenuItem',
+ 'JobAttributes',
+ 'JobAttributes.DefaultSelectionType',
+ 'JobAttributes.DestinationType',
+ 'JobAttributes.DialogType',
+ 'JobAttributes.MultipleDocumentHandlingType',
+ 'JobAttributes.SidesType',
+ 'JOptionPane',
+ 'JPanel',
+ 'JPasswordField',
+ 'JPopupMenu',
+ 'JPopupMenu.Separator',
+ 'JProgressBar',
+ 'JRadioButton',
+ 'JRadioButtonMenuItem',
+ 'JRootPane',
+ 'JScrollBar',
+ 'JScrollPane',
+ 'JSeparator',
+ 'JSlider',
+ 'JSplitPane',
+ 'JTabbedPane',
+ 'JTable',
+ 'JTableHeader',
+ 'JTextArea',
+ 'JTextComponent',
+ 'JTextComponent.KeyBinding', 'JTextField',
+ 'JTextPane',
+ 'JToggleButton',
+ 'JToggleButton.ToggleButtonModel',
+ 'JToolBar',
+ 'JToolBar.Separator',
+ 'JToolTip',
+ 'JTree',
+ 'JTree.DynamicUtilTreeNode',
+ 'JTree.EmptySelectionModel',
+ 'JViewport',
+ 'JWindow',
+ 'Kernel',
+ 'Key',
+ 'KeyAdapter',
+ 'KeyEvent',
+ 'KeyException',
+ 'KeyFactory',
+ 'KeyFactorySpi',
+ 'KeyListener',
+ 'KeyManagementException',
+ 'Keymap',
+ 'KeyPair',
+ 'KeyPairGenerator',
+ 'KeyPairGeneratorSpi',
+ 'KeySpec',
+ 'KeyStore',
+ 'KeyStoreException',
+ 'KeyStoreSpi',
+ 'KeyStroke',
+ 'Label',
+ 'LabelUI',
+ 'LabelView',
+ 'LastOwnerException',
+ 'LayeredHighlighter',
+ 'LayeredHighlighter.LayerPainter',
+ 'LayoutManager',
+ 'LayoutManager2',
+ 'LayoutQueue',
+ 'LdapContext',
+ 'LdapReferralException',
+ 'Lease',
+ 'LimitExceededException',
+ 'Line',
+ 'Line.Info',
+ 'Line2D',
+ 'Line2D.Double',
+ 'Line2D.Float',
+ 'LineBorder',
+ 'LineBreakMeasurer',
+ 'LineEvent',
+ 'LineEvent.Type',
+ 'LineListener',
+ 'LineMetrics',
+ 'LineNumberInputStream',
+ 'LineNumberReader',
+ 'LineUnavailableException',
+ 'LinkageError',
+ 'LinkedList',
+ 'LinkException',
+ 'LinkLoopException',
+ 'LinkRef',
+ 'List',
+ 'List',
+ 'ListCellRenderer',
+ 'ListDataEvent',
+ 'ListDataListener',
+ 'ListIterator',
+ 'ListModel',
+ 'ListResourceBundle',
+ 'ListSelectionEvent',
+ 'ListSelectionListener',
+ 'ListSelectionModel',
+ 'ListUI',
+ 'ListView',
+ 'LoaderHandler',
+ 'Locale',
+ 'LocateRegistry',
+ 'LogStream',
+ 'Long',
+ 'LongHolder',
+ 'LongLongSeqHelper',
+ 'LongLongSeqHolder',
+ 'LongSeqHelper',
+ 'LongSeqHolder',
+ 'LookAndFeel',
+ 'LookupOp',
+ 'LookupTable',
+ 'MalformedLinkException',
+ 'MalformedURLException',
+ 'Manifest', 'Map',
+ 'Map.Entry',
+ 'MARSHAL',
+ 'MarshalException',
+ 'MarshalledObject',
+ 'Math',
+ 'MatteBorder',
+ 'MediaTracker',
+ 'Member',
+ 'MemoryImageSource',
+ 'Menu',
+ 'MenuBar',
+ 'MenuBarUI',
+ 'MenuComponent',
+ 'MenuContainer',
+ 'MenuDragMouseEvent',
+ 'MenuDragMouseListener',
+ 'MenuElement',
+ 'MenuEvent',
+ 'MenuItem',
+ 'MenuItemUI',
+ 'MenuKeyEvent',
+ 'MenuKeyListener',
+ 'MenuListener',
+ 'MenuSelectionManager',
+ 'MenuShortcut',
+ 'MessageDigest',
+ 'MessageDigestSpi',
+ 'MessageFormat',
+ 'MetaEventListener',
+ 'MetalBorders',
+ 'MetalBorders.ButtonBorder',
+ 'MetalBorders.Flush3DBorder',
+ 'MetalBorders.InternalFrameBorder',
+ 'MetalBorders.MenuBarBorder',
+ 'MetalBorders.MenuItemBorder',
+ 'MetalBorders.OptionDialogBorder',
+ 'MetalBorders.PaletteBorder',
+ 'MetalBorders.PopupMenuBorder',
+ 'MetalBorders.RolloverButtonBorder',
+ 'MetalBorders.ScrollPaneBorder',
+ 'MetalBorders.TableHeaderBorder',
+ 'MetalBorders.TextFieldBorder',
+ 'MetalBorders.ToggleButtonBorder',
+ 'MetalBorders.ToolBarBorder',
+ 'MetalButtonUI',
+ 'MetalCheckBoxIcon',
+ 'MetalCheckBoxUI',
+ 'MetalComboBoxButton',
+ 'MetalComboBoxEditor',
+ 'MetalComboBoxEditor.UIResource',
+ 'MetalComboBoxIcon',
+ 'MetalComboBoxUI',
+ 'MetalDesktopIconUI',
+ 'MetalFileChooserUI',
+ 'MetalIconFactory',
+ 'MetalIconFactory.FileIcon16',
+ 'MetalIconFactory.FolderIcon16',
+ 'MetalIconFactory.PaletteCloseIcon',
+ 'MetalIconFactory.TreeControlIcon',
+ 'MetalIconFactory.TreeFolderIcon',
+ 'MetalIconFactory.TreeLeafIcon',
+ 'MetalInternalFrameTitlePane',
+ 'MetalInternalFrameUI',
+ 'MetalLabelUI',
+ 'MetalLookAndFeel',
+ 'MetalPopupMenuSeparatorUI',
+ 'MetalProgressBarUI',
+ 'MetalRadioButtonUI',
+ 'MetalScrollBarUI',
+ 'MetalScrollButton',
+ 'MetalScrollPaneUI',
+ 'MetalSeparatorUI',
+ 'MetalSliderUI',
+ 'MetalSplitPaneUI',
+ 'MetalTabbedPaneUI',
+ 'MetalTextFieldUI',
+ 'MetalTheme',
+ 'MetalToggleButtonUI',
+ 'MetalToolBarUI',
+ 'MetalToolTipUI',
+ 'MetalTreeUI',
+ 'MetaMessage',
+ 'Method',
+ 'MethodDescriptor',
+ 'MidiChannel',
+ 'MidiDevice',
+ 'MidiDevice.Info',
+ 'MidiDeviceProvider',
+ 'MidiEvent',
+ 'MidiFileFormat',
+ 'MidiFileReader',
+ 'MidiFileWriter',
+ 'MidiMessage',
+ 'MidiSystem',
+ 'MidiUnavailableException',
+ 'MimeTypeParseException',
+ 'MinimalHTMLWriter',
+ 'MissingResourceException',
+ 'Mixer',
+ 'Mixer.Info',
+ 'MixerProvider',
+ 'ModificationItem',
+ 'Modifier',
+ 'MouseAdapter',
+ 'MouseDragGestureRecognizer',
+ 'MouseEvent',
+ 'MouseInputAdapter',
+ 'MouseInputListener',
+ 'MouseListener',
+ 'MouseMotionAdapter',
+ 'MouseMotionListener',
+ 'MultiButtonUI',
+ 'MulticastSocket',
+ 'MultiColorChooserUI',
+ 'MultiComboBoxUI',
+ 'MultiDesktopIconUI',
+ 'MultiDesktopPaneUI',
+ 'MultiFileChooserUI',
+ 'MultiInternalFrameUI',
+ 'MultiLabelUI', 'MultiListUI',
+ 'MultiLookAndFeel',
+ 'MultiMenuBarUI',
+ 'MultiMenuItemUI',
+ 'MultiOptionPaneUI',
+ 'MultiPanelUI',
+ 'MultiPixelPackedSampleModel',
+ 'MultipleMaster',
+ 'MultiPopupMenuUI',
+ 'MultiProgressBarUI',
+ 'MultiScrollBarUI',
+ 'MultiScrollPaneUI',
+ 'MultiSeparatorUI',
+ 'MultiSliderUI',
+ 'MultiSplitPaneUI',
+ 'MultiTabbedPaneUI',
+ 'MultiTableHeaderUI',
+ 'MultiTableUI',
+ 'MultiTextUI',
+ 'MultiToolBarUI',
+ 'MultiToolTipUI',
+ 'MultiTreeUI',
+ 'MultiViewportUI',
+ 'MutableAttributeSet',
+ 'MutableComboBoxModel',
+ 'MutableTreeNode',
+ 'Name',
+ 'NameAlreadyBoundException',
+ 'NameClassPair',
+ 'NameComponent',
+ 'NameComponentHelper',
+ 'NameComponentHolder',
+ 'NamedValue',
+ 'NameHelper',
+ 'NameHolder',
+ 'NameNotFoundException',
+ 'NameParser',
+ 'NamespaceChangeListener',
+ 'NameValuePair',
+ 'NameValuePairHelper',
+ 'Naming',
+ 'NamingContext',
+ 'NamingContextHelper',
+ 'NamingContextHolder',
+ 'NamingContextOperations',
+ 'NamingEnumeration',
+ 'NamingEvent',
+ 'NamingException',
+ 'NamingExceptionEvent',
+ 'NamingListener',
+ 'NamingManager',
+ 'NamingSecurityException',
+ 'NegativeArraySizeException',
+ 'NetPermission',
+ 'NO_IMPLEMENT',
+ 'NO_MEMORY',
+ 'NO_PERMISSION',
+ 'NO_RESOURCES',
+ 'NO_RESPONSE',
+ 'NoClassDefFoundError',
+ 'NoInitialContextException', 'NoninvertibleTransformException',
+ 'NoPermissionException',
+ 'NoRouteToHostException',
+ 'NoSuchAlgorithmException',
+ 'NoSuchAttributeException',
+ 'NoSuchElementException',
+ 'NoSuchFieldError',
+ 'NoSuchFieldException',
+ 'NoSuchMethodError',
+ 'NoSuchMethodException',
+ 'NoSuchObjectException',
+ 'NoSuchProviderException',
+ 'NotActiveException',
+ 'NotBoundException',
+ 'NotContextException',
+ 'NotEmpty',
+ 'NotEmptyHelper',
+ 'NotEmptyHolder',
+ 'NotFound',
+ 'NotFoundHelper',
+ 'NotFoundHolder',
+ 'NotFoundReason',
+ 'NotFoundReasonHelper',
+ 'NotFoundReasonHolder',
+ 'NotOwnerException',
+ 'NotSerializableException',
+ 'NullPointerException',
+ 'Number',
+ 'NumberFormat', 'NumberFormatException', 'NVList',
+ 'OBJ_ADAPTER', 'Object', 'OBJECT_NOT_EXIST', 'ObjectChangeListener',
+ 'ObjectFactory',
+ 'ObjectFactoryBuilder',
+ 'ObjectHelper',
+ 'ObjectHolder',
+ 'ObjectImpl', 'ObjectImpl',
+ 'ObjectInput',
+ 'ObjectInputStream',
+ 'ObjectInputStream.GetField',
+ 'ObjectInputValidation',
+ 'ObjectOutput',
+ 'ObjectOutputStream',
+ 'ObjectOutputStream.PutField',
+ 'ObjectStreamClass',
+ 'ObjectStreamConstants',
+ 'ObjectStreamException',
+ 'ObjectStreamField',
+ 'ObjectView',
+ 'ObjID',
+ 'Observable',
+ 'Observer',
+ 'OctetSeqHelper',
+ 'OctetSeqHolder',
+ 'OMGVMCID',
+ 'OpenType',
+ 'Operation',
+ 'OperationNotSupportedException',
+ 'Option',
+ 'OptionalDataException',
+ 'OptionPaneUI',
+ 'ORB',
+ 'OutOfMemoryError',
+ 'OutputStream',
+ 'OutputStreamWriter',
+ 'OverlayLayout',
+ 'Owner',
+ 'Package',
+ 'PackedColorModel',
+ 'Pageable',
+ 'PageAttributes',
+ 'PageAttributes.ColorType',
+ 'PageAttributes.MediaType',
+ 'PageAttributes.OrientationRequestedType',
+ 'PageAttributes.OriginType',
+ 'PageAttributes.PrintQualityType',
+ 'PageFormat',
+ 'Paint',
+ 'PaintContext',
+ 'PaintEvent',
+ 'Panel',
+ 'PanelUI',
+ 'Paper',
+ 'ParagraphView',
+ 'ParagraphView',
+ 'ParameterBlock',
+ 'ParameterDescriptor',
+ 'ParseException',
+ 'ParsePosition',
+ 'Parser',
+ 'ParserDelegator',
+ 'PartialResultException',
+ 'PasswordAuthentication',
+ 'PasswordView',
+ 'Patch',
+ 'PathIterator',
+ 'Permission',
+ 'Permission',
+ 'PermissionCollection',
+ 'Permissions',
+ 'PERSIST_STORE',
+ 'PhantomReference',
+ 'PipedInputStream',
+ 'PipedOutputStream',
+ 'PipedReader',
+ 'PipedWriter',
+ 'PixelGrabber',
+ 'PixelInterleavedSampleModel',
+ 'PKCS8EncodedKeySpec',
+ 'PlainDocument',
+ 'PlainView',
+ 'Point',
+ 'Point2D',
+ 'Point2D.Double',
+ 'Point2D.Float',
+ 'Policy',
+ 'Policy',
+ 'PolicyError',
+ 'PolicyHelper',
+ 'PolicyHolder',
+ 'PolicyListHelper',
+ 'PolicyListHolder',
+ 'PolicyOperations', 'PolicyTypeHelper',
+ 'Polygon',
+ 'PopupMenu',
+ 'PopupMenuEvent',
+ 'PopupMenuListener',
+ 'PopupMenuUI',
+ 'Port',
+ 'Port.Info',
+ 'PortableRemoteObject',
+ 'PortableRemoteObjectDelegate',
+ 'Position',
+ 'Position.Bias',
+ 'PreparedStatement',
+ 'Principal',
+ 'Principal',
+ 'PrincipalHolder',
+ 'Printable',
+ 'PrinterAbortException',
+ 'PrinterException',
+ 'PrinterGraphics',
+ 'PrinterIOException',
+ 'PrinterJob',
+ 'PrintGraphics',
+ 'PrintJob',
+ 'PrintStream',
+ 'PrintWriter',
+ 'PRIVATE_MEMBER',
+ 'PrivateKey',
+ 'PrivilegedAction',
+ 'PrivilegedActionException',
+ 'PrivilegedExceptionAction',
+ 'Process',
+ 'ProfileDataException',
+ 'ProgressBarUI',
+ 'ProgressMonitor',
+ 'ProgressMonitorInputStream',
+ 'Properties',
+ 'PropertyChangeEvent',
+ 'PropertyChangeListener',
+ 'PropertyChangeSupport',
+ 'PropertyDescriptor',
+ 'PropertyEditor',
+ 'PropertyEditorManager',
+ 'PropertyEditorSupport',
+ 'PropertyPermission',
+ 'PropertyResourceBundle',
+ 'PropertyVetoException',
+ 'ProtectionDomain',
+ 'ProtocolException',
+ 'Provider',
+ 'ProviderException',
+ 'Proxy',
+ 'PUBLIC_MEMBER',
+ 'PublicKey',
+ 'PushbackInputStream',
+ 'PushbackReader',
+ 'QuadCurve2D',
+ 'QuadCurve2D.Double',
+ 'QuadCurve2D.Float',
+ 'Random',
+ 'RandomAccessFile', 'Raster', 'RasterFormatException', 'RasterOp',
+ 'Reader', 'Receiver', 'Rectangle', 'Rectangle2D', 'Rectangle2D.Double',
+ 'Rectangle2D.Float', 'RectangularShape', 'Ref', 'RefAddr', 'Reference',
+ 'Referenceable', 'ReferenceQueue', 'ReferralException',
+ 'ReflectPermission', 'Registry', 'RegistryHandler', 'RemarshalException',
+ 'Remote', 'RemoteCall', 'RemoteException', 'RemoteObject', 'RemoteRef',
+ 'RemoteServer',
+ 'RemoteStub',
+ 'RenderableImage',
+ 'RenderableImageOp',
+ 'RenderableImageProducer',
+ 'RenderContext',
+ 'RenderedImage',
+ 'RenderedImageFactory',
+ 'Renderer',
+ 'RenderingHints',
+ 'RenderingHints.Key',
+ 'RepaintManager',
+ 'ReplicateScaleFilter',
+ 'Repository',
+ 'RepositoryIdHelper',
+ 'Request',
+ 'RescaleOp',
+ 'Resolver',
+ 'ResolveResult',
+ 'ResourceBundle',
+ 'ResponseHandler',
+ 'ResultSet',
+ 'ResultSetMetaData',
+ 'ReverbType',
+ 'RGBImageFilter',
+ 'RMIClassLoader',
+ 'RMIClientSocketFactory',
+ 'RMIFailureHandler',
+ 'RMISecurityException',
+ 'RMISecurityManager',
+ 'RMIServerSocketFactory',
+ 'RMISocketFactory',
+ 'Robot',
+ 'RootPaneContainer',
+ 'RootPaneUI',
+ 'RoundRectangle2D',
+ 'RoundRectangle2D.Double',
+ 'RoundRectangle2D.Float',
+ 'RowMapper',
+ 'RSAKey',
+ 'RSAKeyGenParameterSpec',
+ 'RSAPrivateCrtKey',
+ 'RSAPrivateCrtKeySpec',
+ 'RSAPrivateKey',
+ 'RSAPrivateKeySpec',
+ 'RSAPublicKey',
+ 'RSAPublicKeySpec',
+ 'RTFEditorKit',
+ 'RuleBasedCollator',
+ 'Runnable',
+ 'Runtime',
+ 'RunTime',
+ 'RuntimeException',
+ 'RunTimeOperations',
+ 'RuntimePermission',
+ 'SampleModel',
+ 'SchemaViolationException',
+ 'Scrollable',
+ 'Scrollbar',
+ 'ScrollBarUI',
+ 'ScrollPane',
+ 'ScrollPaneConstants',
+ 'ScrollPaneLayout',
+ 'ScrollPaneLayout.UIResource',
+ 'ScrollPaneUI',
+ 'SearchControls',
+ 'SearchResult',
+ 'SecureClassLoader',
+ 'SecureRandom',
+ 'SecureRandomSpi',
+ 'Security',
+ 'SecurityException',
+ 'SecurityManager',
+ 'SecurityPermission',
+ 'Segment',
+ 'SeparatorUI',
+ 'Sequence',
+ 'SequenceInputStream',
+ 'Sequencer',
+ 'Sequencer.SyncMode',
+ 'Serializable',
+ 'SerializablePermission',
+ 'ServantObject',
+ 'ServerCloneException',
+ 'ServerError', 'ServerException',
+ 'ServerNotActiveException',
+ 'ServerRef',
+ 'ServerRequest',
+ 'ServerRuntimeException',
+ 'ServerSocket',
+ 'ServiceDetail',
+ 'ServiceDetailHelper',
+ 'ServiceInformation',
+ 'ServiceInformationHelper',
+ 'ServiceInformationHolder',
+ 'ServiceUnavailableException',
+ 'Set',
+ 'SetOverrideType',
+ 'SetOverrideTypeHelper',
+ 'Shape',
+ 'ShapeGraphicAttribute',
+ 'Short',
+ 'ShortHolder',
+ 'ShortLookupTable',
+ 'ShortMessage',
+ 'ShortSeqHelper',
+ 'ShortSeqHolder',
+ 'Signature',
+ 'SignatureException',
+ 'SignatureSpi',
+ 'SignedObject',
+ 'Signer',
+ 'SimpleAttributeSet',
+ 'SimpleBeanInfo',
+ 'SimpleDateFormat',
+ 'SimpleTimeZone',
+ 'SinglePixelPackedSampleModel',
+ 'SingleSelectionModel',
+ 'SizeLimitExceededException',
+ 'SizeRequirements',
+ 'SizeSequence',
+ 'Skeleton',
+ 'SkeletonMismatchException',
+ 'SkeletonNotFoundException',
+ 'SliderUI',
+ 'Socket',
+ 'SocketException',
+ 'SocketImpl',
+ 'SocketImplFactory',
+ 'SocketOptions',
+ 'SocketPermission',
+ 'SocketSecurityException',
+ 'SoftBevelBorder',
+ 'SoftReference',
+ 'SortedMap',
+ 'SortedSet',
+ 'Soundbank',
+ 'SoundbankReader',
+ 'SoundbankResource',
+ 'SourceDataLine',
+ 'SplitPaneUI',
+ 'SQLData',
+ 'SQLException',
+ 'SQLInput',
+ 'SQLOutput', 'SQLPermission',
+ 'SQLWarning',
+ 'Stack',
+ 'StackOverflowError',
+ 'StateEdit',
+ 'StateEditable',
+ 'StateFactory',
+ 'Statement',
+ 'Streamable',
+ 'StreamableValue',
+ 'StreamCorruptedException',
+ 'StreamTokenizer',
+ 'StrictMath',
+ 'String',
+ 'StringBuffer',
+ 'StringBufferInputStream',
+ 'StringCharacterIterator',
+ 'StringContent',
+ 'StringHolder',
+ 'StringIndexOutOfBoundsException',
+ 'StringReader',
+ 'StringRefAddr',
+ 'StringSelection',
+ 'StringTokenizer',
+ 'StringValueHelper',
+ 'StringWriter',
+ 'Stroke',
+ 'Struct',
+ 'StructMember',
+ 'StructMemberHelper',
+ 'Stub',
+ 'StubDelegate',
+ 'StubNotFoundException',
+ 'Style',
+ 'StyleConstants',
+ 'StyleConstants.CharacterConstants',
+ 'StyleConstants.ColorConstants',
+ 'StyleConstants.FontConstants',
+ 'StyleConstants.ParagraphConstants',
+ 'StyleContext',
+ 'StyledDocument',
+ 'StyledEditorKit',
+ 'StyledEditorKit.AlignmentAction',
+ 'StyledEditorKit.BoldAction',
+ 'StyledEditorKit.FontFamilyAction',
+ 'StyledEditorKit.FontSizeAction',
+ 'StyledEditorKit.ForegroundAction',
+ 'StyledEditorKit.ItalicAction',
+ 'StyledEditorKit.StyledTextAction',
+ 'StyledEditorKit.UnderlineAction',
+ 'StyleSheet',
+ 'StyleSheet.BoxPainter',
+ 'StyleSheet.ListPainter',
+ 'SwingConstants',
+ 'SwingPropertyChangeSupport',
+ 'SwingUtilities',
+ 'SyncFailedException',
+ 'Synthesizer',
+ 'SysexMessage',
+ 'System',
+ 'SystemColor', 'SystemException',
+ 'SystemFlavorMap',
+ 'TabableView',
+ 'TabbedPaneUI',
+ 'TabExpander',
+ 'TableCellEditor',
+ 'TableCellRenderer',
+ 'TableColumn',
+ 'TableColumnModel',
+ 'TableColumnModelEvent',
+ 'TableColumnModelListener',
+ 'TableHeaderUI',
+ 'TableModel',
+ 'TableModelEvent',
+ 'TableModelListener',
+ 'TableUI',
+ 'TableView',
+ 'TabSet',
+ 'TabStop',
+ 'TagElement',
+ 'TargetDataLine',
+ 'TCKind',
+ 'TextAction',
+ 'TextArea',
+ 'TextAttribute',
+ 'TextComponent',
+ 'TextEvent',
+ 'TextField',
+ 'TextHitInfo',
+ 'TextLayout',
+ 'TextLayout.CaretPolicy',
+ 'TextListener',
+ 'TextMeasurer',
+ 'TextUI',
+ 'TexturePaint',
+ 'Thread',
+ 'ThreadDeath',
+ 'ThreadGroup',
+ 'ThreadLocal',
+ 'Throwable',
+ 'Tie',
+ 'TileObserver',
+ 'Time',
+ 'TimeLimitExceededException',
+ 'Timer',
+ 'Timer',
+ 'TimerTask',
+ 'Timestamp',
+ 'TimeZone',
+ 'TitledBorder',
+ 'ToolBarUI',
+ 'Toolkit',
+ 'ToolTipManager',
+ 'ToolTipUI',
+ 'TooManyListenersException',
+ 'Track',
+ 'TRANSACTION_REQUIRED',
+ 'TRANSACTION_ROLLEDBACK',
+ 'TransactionRequiredException',
+ 'TransactionRolledbackException',
+ 'Transferable',
+ 'TransformAttribute',
+ 'TRANSIENT',
+ 'Transmitter',
+ 'Transparency',
+ 'TreeCellEditor',
+ 'TreeCellRenderer',
+ 'TreeExpansionEvent',
+ 'TreeExpansionListener',
+ 'TreeMap',
+ 'TreeModel',
+ 'TreeModelEvent',
+ 'TreeModelListener',
+ 'TreeNode',
+ 'TreePath',
+ 'TreeSelectionEvent',
+ 'TreeSelectionListener',
+ 'TreeSelectionModel',
+ 'TreeSet',
+ 'TreeUI',
+ 'TreeWillExpandListener',
+ 'TypeCode',
+ 'TypeCodeHolder',
+ 'TypeMismatch',
+ 'Types',
+ 'UID',
+ 'UIDefaults',
+ 'UIDefaults.ActiveValue',
+ 'UIDefaults.LazyInputMap',
+ 'UIDefaults.LazyValue',
+ 'UIDefaults.ProxyLazyValue', 'UIManager',
+ 'UIManager.LookAndFeelInfo',
+ 'UIResource',
+ 'ULongLongSeqHelper',
+ 'ULongLongSeqHolder',
+ 'ULongSeqHelper',
+ 'ULongSeqHolder',
+ 'UndeclaredThrowableException',
+ 'UndoableEdit',
+ 'UndoableEditEvent',
+ 'UndoableEditListener',
+ 'UndoableEditSupport',
+ 'UndoManager',
+ 'UnexpectedException',
+ 'UnicastRemoteObject',
+ 'UnionMember',
+ 'UnionMemberHelper',
+ 'UNKNOWN',
+ 'UnknownError',
+ 'UnknownException',
+ 'UnknownGroupException',
+ 'UnknownHostException',
+ 'UnknownHostException',
+ 'UnknownObjectException',
+ 'UnknownServiceException',
+ 'UnknownUserException',
+ 'UnmarshalException',
+ 'UnrecoverableKeyException',
+ 'Unreferenced',
+ 'UnresolvedPermission',
+ 'UnsatisfiedLinkError',
+ 'UnsolicitedNotification',
+ 'UnsolicitedNotificationEvent',
+ 'UnsolicitedNotificationListener',
+ 'UNSUPPORTED_POLICY',
+ 'UNSUPPORTED_POLICY_VALUE',
+ 'UnsupportedAudioFileException',
+ 'UnsupportedClassVersionError',
+ 'UnsupportedEncodingException',
+ 'UnsupportedFlavorException',
+ 'UnsupportedLookAndFeelException',
+ 'UnsupportedOperationException',
+ 'URL',
+ 'URLClassLoader',
+ 'URLConnection',
+ 'URLDecoder',
+ 'URLEncoder',
+ 'URLStreamHandler',
+ 'URLStreamHandlerFactory',
+ 'UserException',
+ 'UShortSeqHelper',
+ 'UShortSeqHolder',
+ 'UTFDataFormatException',
+ 'Util',
+ 'UtilDelegate',
+ 'Utilities',
+ 'ValueBase',
+ 'ValueBaseHelper',
+ 'ValueBaseHolder',
+ 'ValueFactory',
+ 'ValueHandler',
+ 'ValueMember',
+ 'ValueMemberHelper',
+ 'VariableHeightLayoutCache',
+ 'Vector',
+ 'VerifyError',
+ 'VersionSpecHelper',
+ 'VetoableChangeListener',
+ 'VetoableChangeSupport',
+ 'View',
+ 'ViewFactory',
+ 'ViewportLayout',
+ 'ViewportUI',
+ 'VirtualMachineError',
+ 'Visibility',
+ 'VisibilityHelper',
+ 'VM_ABSTRACT',
+ 'VM_CUSTOM',
+ 'VM_NONE',
+ 'VM_TRUNCATABLE',
+ 'VMID',
+ 'VoiceStatus',
+ 'Void',
+ 'WCharSeqHelper',
+ 'WCharSeqHolder',
+ 'WeakHashMap',
+ 'WeakReference',
+ 'Window',
+ 'WindowAdapter',
+ 'WindowConstants',
+ 'WindowEvent', 'WindowListener',
+ 'WrappedPlainView',
+ 'WritableRaster',
+ 'WritableRenderedImage',
+ 'WriteAbortedException',
+ 'Writer',
+ 'WrongTransaction',
+ 'WStringValueHelper',
+ 'X509Certificate',
+ 'X509CRL',
+ 'X509CRLEntry',
+ 'X509EncodedKeySpec',
+ 'X509Extension',
+ 'ZipEntry',
+ 'ZipException',
+ 'ZipFile',
+ 'ZipInputStream',
+ 'ZipOutputStream',
+ 'ZoneView',
+ '_BindingIteratorImplBase',
+ '_BindingIteratorStub',
+ '_IDLTypeStub',
+ '_NamingContextImplBase',
+ '_NamingContextStub',
+ '_PolicyStub',
+ '_Remote_Stub '
+ ),
+ 4 => array(
+ 'static', 'void', 'double', 'int', 'real', 'boolean', 'byte'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => true,
+ 4 => true
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;',
+ 2 => 'color: #000000; font-weight: bold;',
+ 3 => 'color: #aaaadd; font-weight: bold;',
+ 4 => 'color: #993333;'
+ ),
+ 'COMMENTS' => array(
+ 1=> 'color: #808080; font-style: italic;',
+ 2=> 'color: #a1a100;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;',
+ 2 => 'color: #006600;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'SCRIPT' => array(
+ ),
+ 'REGEXPS' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => 'http://www.google.com/search?q=allinurl%3A{FNAME}+java.sun.com&bntl=1',
+ 4 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.',
+ 2 => '::'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/javascript.php b/inc/geshi/javascript.php
new file mode 100644
index 000000000..95f41ee05
--- /dev/null
+++ b/inc/geshi/javascript.php
@@ -0,0 +1,146 @@
+<?php
+/*************************************************************************************
+ * javascript.php
+ * --------------
+ * Author: Ben Keen (ben.keen@gmail.com)
+ * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/20
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * JavaScript language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'JAVASCRIPT',
+ 'COMMENT_SINGLE' => array(1 => '//'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
+ 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
+ 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
+ 'while', 'write', 'with'
+ ),
+ 2 => array(
+ 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
+ 'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
+ 'protected', 'public', 'super', 'true', 'use', 'var'
+ ),
+ 3 => array(
+
+ // common functions for Window object
+ 'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
+ 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
+ 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
+ 'stop',
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false,
+ 2 => false,
+ 3 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #000066; font-weight: bold;',
+ 2 => 'color: #003366; font-weight: bold;',
+ 3 => 'color: #000066;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #009900; font-style: italic;',
+ 'MULTI' => 'color: #009900; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #3366CC;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #CC0000;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ 0 => 'color: #0066FF;'
+ ),
+ 'SCRIPT' => array(
+ 0 => '',
+ 1 => '',
+ 2 => '',
+ 3 => ''
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ 0 => "/.*/([igm]*)?" // matches js reg exps
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
+ 'SCRIPT_DELIMITERS' => array(
+ 0 => array(
+ '<script type="text/javascript">' => '</script>'
+ ),
+ 1 => array(
+ '<script language="javascript">' => '</script>'
+ )
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ 0 => true,
+ 1 => true
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/lisp.php b/inc/geshi/lisp.php
new file mode 100644
index 000000000..38ce47274
--- /dev/null
+++ b/inc/geshi/lisp.php
@@ -0,0 +1,131 @@
+<?php
+/*************************************************************************************
+ * lisp.php
+ * --------
+ * Author: Roberto Rossi (rsoftware@altervista.org)
+ * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/08/30
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * Generic Lisp language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/08/30 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'LISP',
+ 'COMMENT_SINGLE' => array(1 => ';'),
+ 'COMMENT_MULTI' => array(';|' => '|;'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'not','defun','princ',
+ 'eval','apply','funcall','quote','identity','function',
+ 'complement','backquote','lambda','set','setq','setf',
+ 'defun','defmacro','gensym','make','symbol','intern',
+ 'symbol','name','symbol','value','symbol','plist','get',
+ 'getf','putprop','remprop','hash','make','array','aref',
+ 'car','cdr','caar','cadr','cdar','cddr','caaar','caadr','cadar',
+ 'caddr','cdaar','cdadr','cddar','cdddr','caaaar','caaadr',
+ 'caadar','caaddr','cadaar','cadadr','caddar','cadddr',
+ 'cdaaar','cdaadr','cdadar','cdaddr','cddaar','cddadr',
+ 'cdddar','cddddr','cons','list','append','reverse','last','nth',
+ 'nthcdr','member','assoc','subst','sublis','nsubst',
+ 'nsublis','remove','length','list','length',
+ 'mapc','mapcar','mapl','maplist','mapcan','mapcon','rplaca',
+ 'rplacd','nconc','delete','atom','symbolp','numberp',
+ 'boundp','null','listp','consp','minusp','zerop','plusp',
+ 'evenp','oddp','eq','eql','equal','cond','case','and','or',
+ 'let','l','if','prog','prog1','prog2','progn','go','return',
+ 'do','dolist','dotimes','catch','throw','error','cerror','break',
+ 'continue','errset','baktrace','evalhook','truncate','float',
+ 'rem','min','max','abs','sin','cos','tan','expt','exp','sqrt',
+ 'random','logand','logior','logxor','lognot','bignums','logeqv',
+ 'lognand','lognor','logorc2','logtest','logbitp','logcount',
+ 'integer','length','nil'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 0 => 'color: #202020;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/lua.php b/inc/geshi/lua.php
new file mode 100644
index 000000000..939fa1644
--- /dev/null
+++ b/inc/geshi/lua.php
@@ -0,0 +1,132 @@
+<?php
+/*************************************************************************************
+ * lua.php
+ * -------
+ * Author: Roberto Rossi (rsoftware@altervista.org)
+ * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/blog)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/07/10
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * LUA language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'LUA',
+ 'COMMENT_SINGLE' => array(1 => "--"),
+ 'COMMENT_MULTI' => array('--[[' => ']]'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'and','break','do','else','elseif','end','false','for','function','if',
+ 'in','local','nil','not','or','repeat','return','then','true','until','while',
+ '_VERSION','assert','collectgarbage','dofile','error','gcinfo','loadfile','loadstring',
+ 'print','tonumber','tostring','type','unpack',
+ '_ALERT','_ERRORMESSAGE','_INPUT','_PROMPT','_OUTPUT',
+ '_STDERR','_STDIN','_STDOUT','call','dostring','foreach','foreachi','getn','globals','newtype',
+ 'rawget','rawset','require','sort','tinsert','tremove',
+ 'abs','acos','asin','atan','atan2','ceil','cos','deg','exp',
+ 'floor','format','frexp','gsub','ldexp','log','log10','max','min','mod','rad','random','randomseed',
+ 'sin','sqrt','strbyte','strchar','strfind','strlen','strlower','strrep','strsub','strupper','tan',
+ 'openfile','closefile','readfrom','writeto','appendto',
+ 'remove','rename','flush','seek','tmpfile','tmpname','read','write',
+ 'clock','date','difftime','execute','exit','getenv','setlocale','time',
+ '_G','getfenv','getmetatable','ipairs','loadlib','next','pairs','pcall',
+ 'rawegal','rawget','rawset','require','setfenv','setmetatable','xpcall',
+ 'string','table','math','coroutine','io','os','debug',
+ 'string.byte','string.char','string.dump','string.find','string.len',
+ 'string.lower','string.rep','string.sub','string.upper','string.format','string.gfind','string.gsub',
+ 'table.concat','table.foreach','table.foreachi','table.getn','table.sort','table.insert','table.remove','table.setn',
+ 'math.abs','math.acos','math.asin','math.atan','math.atan2','math.ceil','math.cos','math.deg','math.exp',
+ 'math.floor','math.frexp','math.ldexp','math.log','math.log10','math.max','math.min','math.mod',
+ 'math.pi','math.rad','math.random','math.randomseed','math.sin','math.sqrt','math.tan',
+ 'coroutine.create','coroutine.resume','coroutine.status',
+ 'coroutine.wrap','coroutine.yield',
+ 'io.close','io.flush','io.input','io.lines','io.open','io.output','io.read','io.tmpfile','io.type','io.write',
+ 'io.stdin','io.stdout','io.stderr',
+ 'os.clock','os.date','os.difftime','os.execute','os.exit','os.getenv','os.remove','os.rename',
+ 'os.setlocale','os.time','os.tmpname'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '=', ';'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => true
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/nsis.php b/inc/geshi/nsis.php
new file mode 100644
index 000000000..1d249c524
--- /dev/null
+++ b/inc/geshi/nsis.php
@@ -0,0 +1,164 @@
+<?php
+/*************************************************************************************
+ * nsis.php
+ * --------
+ * Author: Tux (tux@inmail.cz)
+ * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.2
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/29/07
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * NullSoft Installer System language file for GeSHi.
+ * Words are from SciTe configuration file
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.2)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.1)
+ * - Added support for URLs
+ * 2004/08/05 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'nsis',
+ 'COMMENT_SINGLE' => array(1 => ';'),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'",'"'),
+ 'ESCAPE_CHAR' => '',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'What','Abort','AddSize','AllowRootDirInstall','AutoCloseWindow',
+ 'BGGradient','BrandingText','BringToFront','CRCCheck','Call','CallInstDLL','Caption','ClearErrors',
+ 'CompletedText','ComponentText','CopyFiles','CreateDirectory','CreateShortCut','Delete',
+ 'DeleteINISec','DeleteINIStr','DeleteRegKey','DeleteRegValue','DetailPrint','DetailsButtonText',
+ 'DirShow','DirText','DisabledBitmap','EnabledBitmap','EnumRegKey','EnumRegValue','Exch','Exec',
+ 'ExecShell','ExecWait','ExpandEnvStrings','File','FileClose','FileErrorText','FileOpen','FileRead',
+ 'FileReadByte','FileSeek','FileWrite','FileWriteByte','FindClose','FindFirst','FindNext','FindWindow',
+ 'Function','FunctionEnd','GetCurrentAddress','GetDLLVersionLocal','GetDllVersion','GetFileTime',
+ 'GetFileTimeLocal','GetFullPathName','GetFunctionAddress','GetLabelAddress','GetTempFileName',
+ 'Goto','HideWindow','Icon','IfErrors','IfFileExists','IfRebootFlag','InstProgressFlags','InstType',
+ 'InstallButtonText','InstallColors','InstallDir','InstallDirRegKey','IntCmp','IntCmpU','IntFmt','IntOp',
+ 'IsWindow','LicenseData','LicenseText','MessageBox','MiscButtonText','Name','OutFile','Pop','Push',
+ 'Quit','RMDir','ReadEnvStr','ReadINIStr','ReadRegDword','ReadRegStr','Reboot','RegDLL','Rename',
+ 'Return','SearchPath','Section','SectionDivider','SectionEnd','SectionIn','SendMessage','SetAutoClose',
+ 'SetCompress','SetCompressor','SetDatablockOptimize','SetDateSave','SetDetailsPrint','SetDetailsView','SetErrors',
+ 'SetFileAttributes','SetOutPath','SetOverwrite','SetRebootFlag','ShowInstDetails','ShowUninstDetails',
+ 'SilentInstall','SilentUnInstall','Sleep','SpaceTexts','StrCmp','StrCpy','StrLen','SubCaption','UnRegDLL',
+ 'UninstallButtonText','UninstallCaption','UninstallEXEName','UninstallIcon','UninstallSubCaption',
+ 'UninstallText','WindowIcon','WriteINIStr','WriteRegBin','WriteRegDword','WriteRegDWORD','WriteRegExpandStr',
+ 'WriteRegStr','WriteUninstaller','SectionGetFlags','SectionSetFlags','SectionSetText','SectionGetText',
+ 'LogText','LogSet','CreateFont','SetShellVarContext','SetStaticBkColor','SetBrandingImage','PluginDir',
+ 'SubSectionEnd','SubSection','CheckBitmap','ChangeUI','SetFont','AddBrandingImage','XPStyle','Var',
+ 'LangString','!define','!undef','!ifdef','!ifndef','!endif','!else','!macro','!echo','!warning','!error','!verbose',
+ '!macroend','!insertmacro','!system','!include','!cd','!packhdr','!addplugindir'
+ ),
+ 2 => array(
+ '$0','$1','$2','$3','$4','$5','$6','$7','$8','$9',
+ '$R0','$R1','$R2','$R3','$R4','$R5','$R6','$R7','$R8','$R9','$CMDLINE','$DESKTOP',
+ '$EXEDIR','$HWNDPARENT','$INSTDIR','$OUTDIR','$PROGRAMFILES','${NSISDIR}',
+ '$QUICKLAUNCH','$SMPROGRAMS','$SMSTARTUP','$STARTMENU','$SYSDIR','$TEMP','$WINDIR'
+ ),
+ 3 => array(
+ 'ARCHIVE','FILE_ATTRIBUTE_ARCHIVE','FILE_ATTRIBUTE_HIDDEN',
+ 'FILE_ATTRIBUTE_NORMAL','FILE_ATTRIBUTE_OFFLINE','FILE_ATTRIBUTE_READONLY',
+ 'FILE_ATTRIBUTE_SYSTEM','FILE_ATTRIBUTE_TEMPORARY','HIDDEN','HKCC','HKCR','HKCU',
+ 'HKDD','HKEY_CLASSES_ROOT','HKEY_CURRENT_CONFIG','HKEY_CURRENT_USER','HKEY_DYN_DATA',
+ 'HKEY_LOCAL_MACHINE','HKEY_PERFORMANCE_DATA','HKEY_USERS','HKLM','HKPD','HKU','IDABORT',
+ 'IDCANCEL','IDIGNORE','IDNO','IDOK','IDRETRY','IDYES','MB_ABORTRETRYIGNORE','MB_DEFBUTTON1',
+ 'MB_DEFBUTTON2','MB_DEFBUTTON3','MB_DEFBUTTON4','MB_ICONEXCLAMATION',
+ 'MB_ICONINFORMATION','MB_ICONQUESTION','MB_ICONSTOP','MB_OK','MB_OKCANCEL',
+ 'MB_RETRYCANCEL','MB_RIGHT','MB_SETFOREGROUND','MB_TOPMOST','MB_YESNO','MB_YESNOCANCEL',
+ 'NORMAL','OFFLINE','READONLY','SW_SHOWMAXIMIZED','SW_SHOWMINIMIZED','SW_SHOWNORMAL',
+ 'SYSTEM','TEMPORARY','auto','colored','false','force','hide','ifnewer','nevershow','normal',
+ 'off','on','show','silent','silentlog','smooth','true','try'
+ ),
+ 4 => array(
+ 'MyFunction','MySomethingElse'
+ )
+ ),
+ 'SYMBOLS' => array(
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #00007f;',
+ 2 => 'color: #0000ff;',
+ 3 => 'color: #46aa03; font-weight:bold;',
+ 4 => 'color: #0000ff;',
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #adadad; font-style: italic;',
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #7f007f;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => '',
+ 4 => ''
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?>
diff --git a/inc/geshi/objc.php b/inc/geshi/objc.php
new file mode 100644
index 000000000..d9fc56adf
--- /dev/null
+++ b/inc/geshi/objc.php
@@ -0,0 +1,241 @@
+<?php
+/*************************************************************************************
+ * objc.php
+ * --------
+ * Author: M. Uli Kusterer (witness.of.teachtext@gmx.net)
+ * Copyright: (c) 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.0
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/04
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * Objective C language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Objective C',
+ 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'if', 'return', 'while', 'case', 'continue', 'default',
+ 'do', 'else', 'for', 'switch', 'goto'
+ ),
+ 2 => array(
+ 'NULL', 'false', 'break', 'true', 'enum', 'nil', 'Nil', 'errno', 'EDOM',
+ 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
+ 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
+ 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
+ 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
+ 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
+ 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
+ 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
+ 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
+ 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL',
+ 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
+ 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC'
+ ),
+ 3 => array(
+ 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
+ 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
+ 'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper',
+ 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
+ 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
+ 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2',
+ 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
+ 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
+ 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
+ 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
+ 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
+ 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
+ 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
+ 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
+ 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
+ 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
+ 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
+ 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
+ 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
+ ),
+ 4 => array( // Data types:
+ 'auto', 'char', 'const', 'double', 'float', 'int', 'long',
+ 'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct',
+ 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
+ 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
+ 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm',
+ // OpenStep/GNUstep/Cocoa:
+ 'SEL', 'id', 'NSRect', 'NSRange', 'NSPoint', 'NSZone', 'Class', 'IMP', 'BOOL',
+ // OpenStep/GNUstep/Cocoa @identifiers
+ '@selector', '@class', '@protocol', '@interface', '@implementation', '@end',
+ '@private', '@protected', '@public', '@try', '@throw', '@catch', '@finally',
+ '@encode', '@defs', '@synchronized'
+ ),
+ 5 => array( // OpenStep/GNUstep/Cocoa Foundation
+ 'NSAppleEventDescriptor', 'NSNetService', 'NSAppleEventManager',
+ 'NSNetServiceBrowser', 'NSAppleScript', 'NSNotification', 'NSArchiver',
+ 'NSNotificationCenter', 'NSArray', 'NSNotificationQueue', 'NSAssertionHandler',
+ 'NSNull', 'NSAttributedString', 'NSNumber', 'NSAutoreleasePool',
+ 'NSNumberFormatter', 'NSBundle', 'NSObject', 'NSCachedURLResponse',
+ 'NSOutputStream', 'NSCalendarDate', 'NSPipe', 'NSCharacterSet', 'NSPort',
+ 'NSClassDescription', 'NSPortCoder', 'NSCloneCommand', 'NSPortMessage',
+ 'NSCloseCommand', 'NSPortNameServer', 'NSCoder', 'NSPositionalSpecifier',
+ 'NSConditionLock', 'NSProcessInfo', 'NSConnection', 'NSPropertyListSerialization',
+ 'NSCountCommand', 'NSPropertySpecifier', 'NSCountedSet', 'NSProtocolChecker',
+ 'NSCreateCommand', 'NSProxy', 'NSData', 'NSQuitCommand', 'NSDate',
+ 'NSRandomSpecifier', 'NSDateFormatter', 'NSRangeSpecifier', 'NSDecimalNumber',
+ 'NSRecursiveLock', 'NSDecimalNumberHandler', 'NSRelativeSpecifier',
+ 'NSDeleteCommand', 'NSRunLoop', 'NSDeserializer', 'NSScanner', 'NSDictionary',
+ 'NSScriptClassDescription', 'NSDirectoryEnumerator', 'NSScriptCoercionHandler',
+ 'NSDistantObject', 'NSScriptCommand', 'NSDistantObjectRequest',
+ 'NSScriptCommandDescription', 'NSDistributedLock', 'NSScriptExecutionContext',
+ 'NSDistributedNotificationCenter', 'NSScriptObjectSpecifier', 'NSEnumerator',
+ 'NSScriptSuiteRegistry', 'NSError', 'NSScriptWhoseTest', 'NSException',
+ 'NSSerializer', 'NSExistsCommand', 'NSSet', 'NSFileHandle', 'NSSetCommand',
+ 'NSFileManager', 'NSSocketPort', 'NSFormatter', 'NSSocketPortNameServer',
+ 'NSGetCommand', 'NSSortDescriptor', 'NSHost', 'NSSpecifierTest', 'NSHTTPCookie',
+ 'NSSpellServer', 'NSHTTPCookieStorage', 'NSStream', 'NSHTTPURLResponse',
+ 'NSString', 'NSIndexSet', 'NSTask', 'NSIndexSpecifier', 'NSThread',
+ 'NSInputStream', 'NSTimer', 'NSInvocation', 'NSTimeZone', 'NSKeyedArchiver',
+ 'NSUnarchiver', 'NSKeyedUnarchiver', 'NSUndoManager', 'NSLock',
+ 'NSUniqueIDSpecifier', 'NSLogicalTest', 'NSURL', 'NSMachBootstrapServer',
+ 'NSURLAuthenticationChallenge', 'NSMachPort', 'NSURLCache', 'NSMessagePort',
+ 'NSURLConnection', 'NSMessagePortNameServer', 'NSURLCredential',
+ 'NSMethodSignature', 'NSURLCredentialStorage', 'NSMiddleSpecifier',
+ 'NSURLDownload', 'NSMoveCommand', 'NSURLHandle', 'NSMutableArray',
+ 'NSURLProtectionSpace', 'NSMutableAttributedString', 'NSURLProtocol',
+ 'NSMutableCharacterSet', 'NSURLRequest', 'NSMutableData', 'NSURLResponse',
+ 'NSMutableDictionary', 'NSUserDefaults', 'NSMutableIndexSet', 'NSValue',
+ 'NSMutableSet', 'NSValueTransformer', 'NSMutableString', 'NSWhoseSpecifier',
+ 'NSMutableURLRequest', 'NSXMLParser', 'NSNameSpecifier'
+ ),
+ 6 => array( // OpenStep/GNUstep/Cocoa AppKit
+ 'NSActionCell', 'NSOpenGLPixelFormat', 'NSAffineTransform', 'NSOpenGLView',
+ 'NSAlert', 'NSOpenPanel', 'NSAppleScript Additions', 'NSOutlineView',
+ 'NSApplication', 'NSPageLayout', 'NSArrayController', 'NSPanel',
+ 'NSATSTypesetter', 'NSParagraphStyle', 'NSPasteboard', 'NSBezierPath',
+ 'NSPDFImageRep', 'NSBitmapImageRep', 'NSPICTImageRep', 'NSBox', 'NSPopUpButton',
+ 'NSBrowser', 'NSPopUpButtonCell', 'NSBrowserCell', 'NSPrinter', 'NSPrintInfo',
+ 'NSButton', 'NSPrintOperation', 'NSButtonCell', 'NSPrintPanel', 'NSCachedImageRep',
+ 'NSProgressIndicator', 'NSCell', 'NSQuickDrawView', 'NSClipView', 'NSResponder',
+ 'NSRulerMarker', 'NSColor', 'NSRulerView', 'NSColorList', 'NSSavePanel',
+ 'NSColorPanel', 'NSScreen', 'NSColorPicker', 'NSScroller', 'NSColorWell',
+ 'NSScrollView', 'NSComboBox', 'NSSearchField', 'NSComboBoxCell',
+ 'NSSearchFieldCell', 'NSControl', 'NSSecureTextField', 'NSController',
+ 'NSSecureTextFieldCell', 'NSCursor', 'NSSegmentedCell', 'NSCustomImageRep',
+ 'NSSegmentedControl', 'NSDocument', 'NSShadow', 'NSDocumentController',
+ 'NSSimpleHorizontalTypesetter', 'NSDrawer', 'NSSlider', 'NSEPSImageRep',
+ 'NSSliderCell', 'NSEvent', 'NSSound', 'NSFileWrapper', 'NSSpeechRecognizer',
+ 'NSFont', 'NSSpeechSynthesizer', 'NSFontDescriptor', 'NSSpellChecker',
+ 'NSFontManager', 'NSSplitView', 'NSFontPanel', 'NSStatusBar', 'NSForm',
+ 'NSStatusItem', 'NSFormCell', 'NSStepper', 'NSGlyphGenerator', 'NSStepperCell',
+ 'NSGlyphInfo', 'NSGraphicsContext', 'NSTableColumn', 'NSHelpManager',
+ 'NSTableHeaderCell', 'NSImage', 'NSTableHeaderView', 'NSImageCell', 'NSTableView',
+ 'NSImageRep', 'NSTabView', 'NSImageView', 'NSTabViewItem', 'NSInputManager',
+ 'NSText', 'NSInputServer', 'NSTextAttachment', 'NSLayoutManager',
+ 'NSTextAttachmentCell', 'NSMatrix', 'NSTextContainer', 'NSMenu', 'NSTextField',
+ 'NSMenuItem', 'NSTextFieldCell', 'NSMenuItemCell', 'NSTextStorage', 'NSMenuView',
+ 'NSTextTab', 'NSMovie', 'NSTextView', 'NSMovieView', 'NSToolbar', 'NSToolbarItem',
+ 'NSMutableParagraphStyle', 'NSTypesetter', 'NSNib', 'NSNibConnector',
+ 'NSUserDefaultsController', 'NSNibControlConnector', 'NSView',
+ 'NSNibOutletConnector', 'NSWindow', 'NSObjectController', 'NSWindowController',
+ 'NSOpenGLContext', 'NSWorkspace', 'NSOpenGLPixelBuffer'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ 5 => false,
+ 6 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #0000ff;',
+ 2 => 'color: #0000ff;',
+ 3 => 'color: #0000dd;',
+ 4 => 'color: #0000ff;',
+ 5 => 'color: #0000ff;',
+ 6 => 'color: #0000ff;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #ff0000;',
+ 2 => 'color: #339900;',
+ 'MULTI' => 'color: #ff0000; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #666666; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #002200;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #666666;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #0000dd;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #002200;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html',
+ 4 => '',
+ 5 => 'http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/{FNAME}.html',
+ 6 => 'http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/{FNAME}.html'
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/oobas.php b/inc/geshi/oobas.php
new file mode 100644
index 000000000..f771d1239
--- /dev/null
+++ b/inc/geshi/oobas.php
@@ -0,0 +1,132 @@
+<?php
+/*************************************************************************************
+ * oobas.php
+ * ---------
+ * Author: Roberto Rossi (rsoftware@altervista.org)
+ * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/08/30
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * OpenOffice.org Basic language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'OpenOffice.org Basic',
+ 'COMMENT_SINGLE' => array(1 => "'"),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'dim','private','public','global','as','if','redim','true','set',
+ 'byval',
+ 'false','bool','double','integer','long','object','single','variant',
+ 'msgbox','print','inputbox','green','blue','red','qbcolor',
+ 'rgb','open','close','reset','freefile','get','input','line',
+ 'put','write','loc','seek','eof','lof','chdir','chdrive',
+ 'curdir','dir','fileattr','filecopy','filedatetime','fileexists',
+ 'filelen','getattr','kill','mkdir','name','rmdir','setattr',
+ 'dateserial','datevalue','day','month','weekday','year','cdatetoiso',
+ 'cdatefromiso','hour','minute','second','timeserial','timevalue',
+ 'date','now','time','timer','erl','err','error','on','error','goto','resume',
+ 'and','eqv','imp','not','or','xor','mod','','atn','cos','sin','tan','log',
+ 'exp','rnd','randomize','sqr','fix','int','abs','sgn','hex','oct',
+ 'it','then','else','select','case','iif','do','loop','for','next',
+ 'while','wend','gosub','return','goto','on','goto','call','choose','declare',
+ 'end','exit','freelibrary','function','rem','stop','sub','switch','with',
+ 'cbool','cdate','cdbl','cint','clng','const','csng','cstr','defbool',
+ 'defdate','defdbl','defint','deflng','asc','chr','str','val','cbyte',
+ 'space','string','format','lcase','left','lset','ltrim','mid','right',
+ 'rset','rtrim','trim','ucase','split','join','converttourl','convertfromurl',
+ 'instr','len','strcomp','beep','shell','wait','getsystemticks','environ',
+ 'getsolarversion','getguitype','twipsperpixelx','twipsperpixely',
+ 'createunostruct','createunoservice','getprocessservicemanager',
+ 'createunodialog','createunolistener','createunovalue','thiscomponent',
+ 'globalscope'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '='
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099;'
+ ),
+ 'SCRIPT' => array(
+ ),
+ 'REGEXPS' => array(
+ )
+ ),
+ 'URLS' => array(
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/pascal.php b/inc/geshi/pascal.php
new file mode 100644
index 000000000..ac44eebd5
--- /dev/null
+++ b/inc/geshi/pascal.php
@@ -0,0 +1,145 @@
+<?php
+/*************************************************************************************
+ * pascal.php
+ * ----------
+ * Author: Tux (tux@inamil.cz)
+ * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.2
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/07/26
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * Pascal language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.2)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.1)
+ * - Added support for URLs
+ * 2004/08/05 (1.0.0)
+ * - Added support for symbols
+ * 2004/07/27 (0.9.1)
+ * - Pascal is OO language. Some new words.
+ * 2004/07/26 (0.9.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Pascal',
+ 'COMMENT_SINGLE' => array(1 => '//'),
+ 'COMMENT_MULTI' => array('{' => '}','(*' => '*)'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'if', 'while', 'until', 'repeat', 'default',
+ 'do', 'else', 'for', 'switch', 'goto','label','asm','begin','end',
+ 'assembler','case', 'downto', 'to','div','mod','far','forward','in','inherited',
+ 'inline','interrupt','label','library','not','var','of','then','stdcall',
+ 'cdecl','end.','raise','try','except','name','finally','resourcestring','override','overload',
+ 'default','public','protected','private','property','published','stored','catch'
+ ),
+ 2 => array(
+ 'nil', 'false', 'break', 'true', 'function', 'procedure','implementation','interface',
+ 'unit','program','initialization','finalization','uses'
+ ),
+ 3 => array(
+ 'abs', 'absolute','and','arc','arctan','chr','constructor','destructor',
+ 'dispose','cos','eof','eoln','exp','get','index','ln','new','xor','write','writeln',
+ 'shr','sin','sqrt','succ','pred','odd','read','readln','ord','ordinal','blockread','blockwrite'
+ ),
+ 4 => array(
+ 'array', 'char', 'const', 'boolean', 'real', 'integer', 'longint',
+ 'word', 'shortint', 'record','byte','bytebool','string',
+ 'type','object','export','exports','external','file','longbool','pointer','set',
+ 'packed','ansistring','union'
+ ),
+ ),
+ 'SYMBOLS' => array(
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;',
+ 2 => 'color: #000000; font-weight: bold;',
+ 3 => '',
+ 4 => 'color: #993333;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 2 => 'color: #339933;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #202020;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => '',
+ 4 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?>
diff --git a/inc/geshi/perl.php b/inc/geshi/perl.php
new file mode 100644
index 000000000..196dd8689
--- /dev/null
+++ b/inc/geshi/perl.php
@@ -0,0 +1,162 @@
+<?php
+/*************************************************************************************
+ * perl.php
+ * --------
+ * Author: Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com)
+ * Copyright: (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/08/20
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * Perl language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/08/20 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ * * LABEL:
+ * * string comparison operators
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Perl',
+ 'COMMENT_SINGLE' => array(1 => '#'),
+ 'COMMENT_MULTI' => array( '=pod' => '=cut'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my',
+ 'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our',
+ 'reset', 'continue','and', 'cmp', 'ne'
+ ),
+ 2 => array(
+ 'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN',
+ 'STDIN', 'STDOUT', 'STDERR'
+ ),
+ 3 => array(
+ 'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless',
+ 'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr',
+ 'chroot', 'close', 'closedir', 'connect', 'continue', 'cos',
+ 'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die',
+ 'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent',
+ 'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit',
+ 'exp', 'fcntl', 'fileno', 'flock', 'fork', 'format', 'formline',
+ 'getc', 'getgrent', 'getgrgid', 'getgrnam', 'gethostbyaddr',
+ 'gethostbyname', 'gethostent', 'getlogin', 'getnetbyaddr', 'getnetbyname',
+ 'getnetent', 'getpeername', 'getpgrp', 'getppid', 'getpriority',
+ 'getprotobyname', 'getprotobynumber', 'getprotoent', 'getpwent',
+ 'getpwnam', 'getpwuid', 'getservbyname', 'getservbyport', 'getservent',
+ 'getsockname', 'getsockopt', 'glob', 'gmtime', 'goto', 'grep',
+ 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill',
+ 'last', 'lc', 'lcfirst', 'length', 'link', 'listen', 'local',
+ 'localtime', 'log', 'lstat', 'm', 'map', 'mkdir', 'msgctl', 'msgget',
+ 'msgrcv', 'msgsnd', 'my', 'next', 'no', 'oct', 'open', 'opendir',
+ 'ord', 'our', 'pack', 'package', 'pipe', 'pop', 'pos', 'print',
+ 'printf', 'prototype', 'push', 'qq', 'qr', 'quotemeta', 'qw',
+ 'qx', 'q', 'rand', 'read', 'readdir', 'readline', 'readlink', 'readpipe',
+ 'recv', 'redo', 'ref', 'rename', 'require', 'return',
+ 'reverse', 'rewinddir', 'rindex', 'rmdir', 's', 'scalar', 'seek',
+ 'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent',
+ 'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent',
+ 'setpwent', 'setservent', 'setsockopt', 'shift', 'shmctl', 'shmget',
+ 'shmread', 'shmwrite', 'shutdown', 'sin', 'sleep', 'socket', 'socketpair',
+ 'sort', 'splice', 'split', 'sprintf', 'sqrt', 'srand', 'stat',
+ 'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread',
+ 'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied',
+ 'time', 'times', 'tr', 'truncate', 'uc', 'ucfirst', 'umask', 'undef',
+ 'unlink', 'unpack', 'unshift', 'untie', 'utime', 'values',
+ 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', 'y'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => true,
+ 2 => true,
+ 3 => true,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;',
+ 2 => 'color: #000000; font-weight: bold;',
+ 3 => 'color: #000066;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;',
+ 2 => 'color: #006600;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ 0 => 'color: #0000ff;',
+ 4 => 'color: #009999;',
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 3 => 'http://www.perldoc.com/perl5.6/pod/func/{FNAME}.html'
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '-&gt;',
+ 2 => '::'
+ ),
+ 'REGEXPS' => array(
+ 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*',
+ 4 => '&lt;[a-zA-Z_][a-zA-Z0-9_]*&gt;',
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?>
diff --git a/inc/geshi/php-brief.php b/inc/geshi/php-brief.php
new file mode 100644
index 000000000..54729318e
--- /dev/null
+++ b/inc/geshi/php-brief.php
@@ -0,0 +1,162 @@
+<?php
+/*************************************************************************************
+ * php-brief.php
+ * -------------
+ * Author: Nigel McNie (oracle.shinoda@gmail.com)
+ * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.3
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/02
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * PHP language file for GeSHi (brief version).
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.3)
+ * - Added support for multiple object splitters
+ * - Fixed &new problem
+ * 2004/10/27 (1.0.2)
+ * - Added support for URLs
+ * 2004/08/05 (1.0.1)
+ * - Added support for symbols
+ * 2004/07/14 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/07/14)
+ * -------------------------
+ * * Remove more functions that are hardly used
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'PHP',
+ 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'include', 'require', 'include_once', 'require_once',
+ 'for', 'as', 'foreach', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 'endif', 'switch', 'case', 'endswitch',
+ 'return', 'break'
+ ),
+ 2 => array(
+ 'null', '__LINE__', '__FILE__',
+ 'false', '&lt;?php', '?&gt;',
+ 'true', 'var', 'default',
+ 'function', 'class', 'new', '&amp;new'
+ ),
+ 3 => array(
+ 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined',
+ 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions',
+ 'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
+ 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv',
+ 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime',
+ 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar',
+ 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown',
+ 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate',
+ 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode',
+ 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat',
+ 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from',
+ 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport',
+ 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'
+ )
+ ),
+ 'SYMBOLS' => array(
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false,
+ 2 => false,
+ 3 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;',
+ 2 => 'color: #000000; font-weight: bold;',
+ 3 => 'color: #000066;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 2 => 'color: #808080; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;',
+ 2 => 'color: #006600;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ 0 => 'color: #0000ff;'
+ ),
+ 'SCRIPT' => array(
+ 0 => '',
+ 1 => '',
+ 2 => '',
+ 3 => ''
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => 'http://www.php.net/{FNAME}',
+ 4 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '-&gt;',
+ 2 => '::'
+ ),
+ 'REGEXPS' => array(
+ 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*"
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
+ 'SCRIPT_DELIMITERS' => array(
+ '<?php' => '?>',
+ '<?' => '?>',
+ '<%' => '%>',
+ '<script language="php">' => '</script>'
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ 0 => true,
+ 1 => true,
+ 2 => true,
+ 3 => true
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/php.php b/inc/geshi/php.php
new file mode 100644
index 000000000..447e85fb2
--- /dev/null
+++ b/inc/geshi/php.php
@@ -0,0 +1,346 @@
+<?php
+/*************************************************************************************
+ * php.php
+ * --------
+ * Author: Nigel McNie (oracle.shinoda@gmail.com)
+ * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.3
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/20
+ * Last Modified: $Date: 2004/11/29 08:46:24 $
+ *
+ * PHP language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/25 (1.0.3)
+ * - Added support for multiple object splitters
+ * - Fixed &new problem
+ * 2004/10/27 (1.0.2)
+ * - Added URL support
+ * - Added extra constants
+ * 2004/08/05 (1.0.1)
+ * - Added support for symbols
+ * 2004/07/14 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/07/14)
+ * -------------------------
+ * * Make sure the last few function I may have missed
+ * (like eval()) are included for highlighting
+ * * Split to several files - php4, php5 etc
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'PHP',
+ 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
+ 'COMMENT_MULTI' => array('/*' => '*/'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'include', 'require', 'include_once', 'require_once',
+ 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 'endif', 'switch', 'case', 'endswitch',
+ 'return', 'break'
+ ),
+ 2 => array(
+ 'null', '__LINE__', '__FILE__',
+ 'false', '&lt;?php', '?&gt;', '&lt;?',
+ '&lt;script language', '&lt;/script&gt;',
+ 'true', 'var', 'default',
+ 'function', 'class', 'new', '&amp;new',
+ '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION',
+ 'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR',
+ 'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR',
+ 'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT',
+ 'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE',
+ 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',
+ 'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL'
+ ),
+ 3 => array(
+ 'zlib_get_coding_type','zend_version','zend_logo_guid','yp_order','yp_next',
+ 'yp_match','yp_master','yp_get_default_domain','yp_first','yp_errno','yp_err_string',
+ 'yp_cat','yp_all','xml_set_unparsed_entity_decl_handler','xml_set_start_namespace_decl_handler','xml_set_processing_instruction_handler','xml_set_object',
+ 'xml_set_notation_decl_handler','xml_set_external_entity_ref_handler','xml_set_end_namespace_decl_handler','xml_set_element_handler','xml_set_default_handler','xml_set_character_data_handler',
+ 'xml_parser_set_option','xml_parser_get_option','xml_parser_free','xml_parser_create_ns','xml_parser_create','xml_parse_into_struct',
+ 'xml_parse','xml_get_error_code','xml_get_current_line_number','xml_get_current_column_number','xml_get_current_byte_index','xml_error_string',
+ 'wordwrap','wddx_serialize_vars','wddx_serialize_value','wddx_packet_start','wddx_packet_end','wddx_deserialize',
+ 'wddx_add_vars','vsprintf','vprintf','virtual','version_compare','var_export',
+ 'var_dump','utf8_encode','utf8_decode','usort','usleep','user_error',
+ 'urlencode','urldecode','unserialize','unregister_tick_function','unpack','unlink',
+ 'unixtojd','uniqid','umask','uksort','ucwords','ucfirst',
+ 'uasort','trim','trigger_error','touch','token_name','token_get_all',
+ 'tmpfile','time','textdomain','tempnam','tanh','tan',
+ 'system','syslog','symlink','substr_replace','substr_count','substr',
+ 'strval','strtr','strtoupper','strtotime','strtolower','strtok',
+ 'strstr','strspn','strrpos','strrev','strrchr','strpos',
+ 'strncmp','strncasecmp','strnatcmp','strnatcasecmp','strlen','stristr',
+ 'stripslashes','stripcslashes','strip_tags','strftime','stream_wrapper_register','stream_set_write_buffer',
+ 'stream_set_timeout','stream_set_blocking','stream_select','stream_register_wrapper','stream_get_meta_data','stream_filter_prepend',
+ 'stream_filter_append','stream_context_set_params','stream_context_set_option','stream_context_get_options','stream_context_create','strcspn',
+ 'strcoll','strcmp','strchr','strcasecmp','str_word_count','str_shuffle',
+ 'str_rot13','str_replace','str_repeat','str_pad','stat','sscanf',
+ 'srand','sqrt','sql_regcase','sprintf','spliti','split',
+ 'soundex','sort','socket_writev','socket_write','socket_strerror','socket_shutdown',
+ 'socket_setopt','socket_set_timeout','socket_set_option','socket_set_nonblock','socket_set_blocking','socket_set_block',
+ 'socket_sendto','socket_sendmsg','socket_send','socket_select','socket_recvmsg','socket_recvfrom',
+ 'socket_recv','socket_readv','socket_read','socket_listen','socket_last_error','socket_iovec_set',
+ 'socket_iovec_free','socket_iovec_fetch','socket_iovec_delete','socket_iovec_alloc','socket_iovec_add','socket_getsockname',
+ 'socket_getpeername','socket_getopt','socket_get_status','socket_get_option','socket_create_pair','socket_create_listen',
+ 'socket_create','socket_connect','socket_close','socket_clear_error','socket_bind','socket_accept',
+ 'sleep','sizeof','sinh','sin','similar_text','shuffle',
+ 'show_source','shmop_write','shmop_size','shmop_read','shmop_open','shmop_delete',
+ 'shmop_close','shm_remove_var','shm_remove','shm_put_var','shm_get_var','shm_detach',
+ 'shm_attach','shell_exec','sha1_file','sha1','settype','setlocale',
+ 'setcookie','set_time_limit','set_socket_blocking','set_magic_quotes_runtime','set_include_path','set_file_buffer',
+ 'set_error_handler','session_write_close','session_unset','session_unregister','session_start','session_set_save_handler',
+ 'session_set_cookie_params','session_save_path','session_register','session_regenerate_id','session_name','session_module_name',
+ 'session_is_registered','session_id','session_get_cookie_params','session_encode','session_destroy','session_decode',
+ 'session_cache_limiter','session_cache_expire','serialize','sem_remove','sem_release','sem_get',
+ 'sem_acquire','rtrim','rsort','round','rmdir','rewinddir',
+ 'rewind','restore_include_path','restore_error_handler','reset','rename','register_tick_function',
+ 'register_shutdown_function','realpath','readlink','readgzfile','readfile','readdir',
+ 'read_exif_data','rawurlencode','rawurldecode','range','rand','rad2deg',
+ 'quotemeta','quoted_printable_decode','putenv','proc_open','proc_close','printf',
+ 'print_r','prev','preg_split','preg_replace_callback','preg_replace','preg_quote',
+ 'preg_match_all','preg_match','preg_grep','pow','posix_uname','posix_ttyname',
+ 'posix_times','posix_strerror','posix_setuid','posix_setsid','posix_setpgid','posix_setgid',
+ 'posix_seteuid','posix_setegid','posix_mkfifo','posix_kill','posix_isatty','posix_getuid',
+ 'posix_getsid','posix_getrlimit','posix_getpwuid','posix_getpwnam','posix_getppid','posix_getpid',
+ 'posix_getpgrp','posix_getpgid','posix_getlogin','posix_getgroups','posix_getgrnam','posix_getgrgid',
+ 'posix_getgid','posix_geteuid','posix_getegid','posix_getcwd','posix_get_last_error','posix_errno',
+ 'posix_ctermid','pos','popen','pi','phpversion','phpinfo',
+ 'phpcredits','php_uname','php_sapi_name','php_logo_guid','php_ini_scanned_files','pg_update',
+ 'pg_untrace','pg_unescape_bytea','pg_tty','pg_trace','pg_setclientencoding','pg_set_client_encoding',
+ 'pg_send_query','pg_select','pg_result_status','pg_result_seek','pg_result_error','pg_result',
+ 'pg_query','pg_put_line','pg_port','pg_ping','pg_pconnect','pg_options',
+ 'pg_numrows','pg_numfields','pg_num_rows','pg_num_fields','pg_meta_data','pg_lowrite',
+ 'pg_lounlink','pg_loreadall','pg_loread','pg_loopen','pg_loimport','pg_loexport',
+ 'pg_locreate','pg_loclose','pg_lo_write','pg_lo_unlink','pg_lo_tell','pg_lo_seek',
+ 'pg_lo_read_all','pg_lo_read','pg_lo_open','pg_lo_import','pg_lo_export','pg_lo_create',
+ 'pg_lo_close','pg_last_oid','pg_last_notice','pg_last_error','pg_insert','pg_host',
+ 'pg_getlastoid','pg_get_result','pg_get_pid','pg_get_notify','pg_freeresult','pg_free_result',
+ 'pg_fieldtype','pg_fieldsize','pg_fieldprtlen','pg_fieldnum','pg_fieldname','pg_fieldisnull',
+ 'pg_field_type','pg_field_size','pg_field_prtlen','pg_field_num','pg_field_name','pg_field_is_null',
+ 'pg_fetch_row','pg_fetch_result','pg_fetch_object','pg_fetch_assoc','pg_fetch_array','pg_fetch_all',
+ 'pg_exec','pg_escape_string','pg_escape_bytea','pg_errormessage','pg_end_copy','pg_delete',
+ 'pg_dbname','pg_copy_to','pg_copy_from','pg_convert','pg_connection_status','pg_connection_reset',
+ 'pg_connection_busy','pg_connect','pg_cmdtuples','pg_close','pg_clientencoding','pg_client_encoding',
+ 'pg_cancel_query','pg_affected_rows','pfsockopen','pclose','pathinfo','passthru',
+ 'parse_url','parse_str','parse_ini_file','pack','overload','output_reset_rewrite_vars',
+ 'output_add_rewrite_var','ord','openssl_x509_read','openssl_x509_parse','openssl_x509_free','openssl_x509_export_to_file',
+ 'openssl_x509_export','openssl_x509_checkpurpose','openssl_x509_check_private_key','openssl_verify','openssl_sign','openssl_seal',
+ 'openssl_public_encrypt','openssl_public_decrypt','openssl_private_encrypt','openssl_private_decrypt','openssl_pkey_new','openssl_pkey_get_public',
+ 'openssl_pkey_get_private','openssl_pkey_free','openssl_pkey_export_to_file','openssl_pkey_export','openssl_pkcs7_verify','openssl_pkcs7_sign',
+ 'openssl_pkcs7_encrypt','openssl_pkcs7_decrypt','openssl_open','openssl_get_publickey','openssl_get_privatekey','openssl_free_key',
+ 'openssl_error_string','openssl_csr_sign','openssl_csr_new','openssl_csr_export_to_file','openssl_csr_export','openlog',
+ 'opendir','octdec','ob_start','ob_list_handlers','ob_implicit_flush','ob_iconv_handler',
+ 'ob_gzhandler','ob_get_status','ob_get_level','ob_get_length','ob_get_flush','ob_get_contents',
+ 'ob_get_clean','ob_flush','ob_end_flush','ob_end_clean','ob_clean','number_format',
+ 'nl_langinfo','nl2br','ngettext','next','natsort','natcasesort',
+ 'mysql_unbuffered_query','mysql_thread_id','mysql_tablename','mysql_table_name','mysql_stat','mysql_selectdb',
+ 'mysql_select_db','mysql_result','mysql_real_escape_string','mysql_query','mysql_ping','mysql_pconnect',
+ 'mysql_numrows','mysql_numfields','mysql_num_rows','mysql_num_fields','mysql_listtables','mysql_listfields',
+ 'mysql_listdbs','mysql_list_tables','mysql_list_processes','mysql_list_fields','mysql_list_dbs','mysql_insert_id',
+ 'mysql_info','mysql_get_server_info','mysql_get_proto_info','mysql_get_host_info','mysql_get_client_info','mysql_freeresult',
+ 'mysql_free_result','mysql_fieldtype','mysql_fieldtable','mysql_fieldname','mysql_fieldlen','mysql_fieldflags',
+ 'mysql_field_type','mysql_field_table','mysql_field_seek','mysql_field_name','mysql_field_len','mysql_field_flags',
+ 'mysql_fetch_row','mysql_fetch_object','mysql_fetch_lengths','mysql_fetch_field','mysql_fetch_assoc','mysql_fetch_array',
+ 'mysql_escape_string','mysql_error','mysql_errno','mysql_dropdb','mysql_drop_db','mysql_dbname',
+ 'mysql_db_query','mysql_db_name','mysql_data_seek','mysql_createdb','mysql_create_db','mysql_connect',
+ 'mysql_close','mysql_client_encoding','mysql_affected_rows','mysql','mt_srand','mt_rand',
+ 'mt_getrandmax','move_uploaded_file','money_format','mktime','mkdir','min',
+ 'microtime','method_exists','metaphone','memory_get_usage','md5_file','md5',
+ 'mbsubstr','mbstrrpos','mbstrpos','mbstrlen','mbstrcut','mbsplit',
+ 'mbregex_encoding','mberegi_replace','mberegi','mbereg_search_setpos','mbereg_search_regs','mbereg_search_pos',
+ 'mbereg_search_init','mbereg_search_getregs','mbereg_search_getpos','mbereg_search','mbereg_replace','mbereg_match',
+ 'mbereg','mb_substr_count','mb_substr','mb_substitute_character','mb_strwidth','mb_strtoupper',
+ 'mb_strtolower','mb_strrpos','mb_strpos','mb_strlen','mb_strimwidth','mb_strcut',
+ 'mb_split','mb_send_mail','mb_regex_set_options','mb_regex_encoding','mb_preferred_mime_name','mb_parse_str',
+ 'mb_output_handler','mb_language','mb_internal_encoding','mb_http_output','mb_http_input','mb_get_info',
+ 'mb_eregi_replace','mb_eregi','mb_ereg_search_setpos','mb_ereg_search_regs','mb_ereg_search_pos','mb_ereg_search_init',
+ 'mb_ereg_search_getregs','mb_ereg_search_getpos','mb_ereg_search','mb_ereg_replace','mb_ereg_match','mb_ereg',
+ 'mb_encode_numericentity','mb_encode_mimeheader','mb_detect_order','mb_detect_encoding','mb_decode_numericentity','mb_decode_mimeheader',
+ 'mb_convert_variables','mb_convert_kana','mb_convert_encoding','mb_convert_case','max','mail',
+ 'magic_quotes_runtime','ltrim','lstat','long2ip','log1p','log10',
+ 'log','localtime','localeconv','linkinfo','link','levenshtein',
+ 'lcg_value','ksort','krsort','key_exists','key','juliantojd',
+ 'join','jewishtojd','jdtounix','jdtojulian','jdtojewish','jdtogregorian',
+ 'jdtofrench','jdmonthname','jddayofweek','is_writeable','is_writable','is_uploaded_file',
+ 'is_subclass_of','is_string','is_scalar','is_resource','is_real','is_readable',
+ 'is_object','is_numeric','is_null','is_nan','is_long','is_link',
+ 'is_integer','is_int','is_infinite','is_float','is_finite','is_file',
+ 'is_executable','is_double','is_dir','is_callable','is_bool','is_array',
+ 'is_a','iptcparse','iptcembed','ip2long','intval','ini_set',
+ 'ini_restore','ini_get_all','ini_get','ini_alter','in_array','import_request_variables',
+ 'implode','image_type_to_mime_type','ignore_user_abort','iconv_set_encoding','iconv_get_encoding','iconv',
+ 'i18n_mime_header_encode','i18n_mime_header_decode','i18n_ja_jp_hantozen','i18n_internal_encoding','i18n_http_output','i18n_http_input',
+ 'i18n_discover_encoding','i18n_convert','hypot','htmlspecialchars','htmlentities','html_entity_decode',
+ 'highlight_string','highlight_file','hexdec','hebrevc','hebrev','headers_sent',
+ 'header','gzwrite','gzuncompress','gztell','gzseek','gzrewind',
+ 'gzread','gzputs','gzpassthru','gzopen','gzinflate','gzgetss',
+ 'gzgets','gzgetc','gzfile','gzeof','gzencode','gzdeflate',
+ 'gzcompress','gzclose','gregoriantojd','gmstrftime','gmmktime','gmdate',
+ 'glob','gettype','gettimeofday','gettext','getservbyport','getservbyname',
+ 'getrusage','getrandmax','getprotobynumber','getprotobyname','getopt','getmyuid',
+ 'getmypid','getmyinode','getmygid','getmxrr','getlastmod','getimagesize',
+ 'gethostbynamel','gethostbyname','gethostbyaddr','getenv','getdate','getcwd',
+ 'getallheaders','get_resource_type','get_required_files','get_parent_class','get_object_vars','get_meta_tags',
+ 'get_magic_quotes_runtime','get_magic_quotes_gpc','get_loaded_extensions','get_included_files','get_include_path','get_html_translation_table',
+ 'get_extension_funcs','get_defined_vars','get_defined_functions','get_defined_constants','get_declared_classes','get_current_user',
+ 'get_class_vars','get_class_methods','get_class','get_cfg_var','get_browser','fwrite',
+ 'function_exists','func_num_args','func_get_args','func_get_arg','ftruncate','ftp_systype',
+ 'ftp_ssl_connect','ftp_size','ftp_site','ftp_set_option','ftp_rmdir','ftp_rename',
+ 'ftp_rawlist','ftp_quit','ftp_pwd','ftp_put','ftp_pasv','ftp_nlist',
+ 'ftp_nb_put','ftp_nb_get','ftp_nb_fput','ftp_nb_fget','ftp_nb_continue','ftp_mkdir',
+ 'ftp_mdtm','ftp_login','ftp_get_option','ftp_get','ftp_fput','ftp_fget',
+ 'ftp_exec','ftp_delete','ftp_connect','ftp_close','ftp_chdir','ftp_cdup',
+ 'ftok','ftell','fstat','fsockopen','fseek','fscanf',
+ 'frenchtojd','fread','fputs','fpassthru','fopen','fnmatch',
+ 'fmod','flush','floor','flock','floatval','filetype',
+ 'filesize','filepro_rowcount','filepro_retrieve','filepro_fieldwidth','filepro_fieldtype','filepro_fieldname',
+ 'filepro_fieldcount','filepro','fileperms','fileowner','filemtime','fileinode',
+ 'filegroup','filectime','fileatime','file_get_contents','file_exists','file',
+ 'fgetss','fgets','fgetcsv','fgetc','fflush','feof',
+ 'fclose','ezmlm_hash','extract','extension_loaded','expm1','explode',
+ 'exp','exif_thumbnail','exif_tagname','exif_read_data','exif_imagetype','exec',
+ 'escapeshellcmd','escapeshellarg','error_reporting','error_log','eregi_replace','eregi',
+ 'ereg_replace','ereg','end','easter_days','easter_date','each',
+ 'doubleval','dngettext','dl','diskfreespace','disk_total_space','disk_free_space',
+ 'dirname','dir','dgettext','deg2rad','defined','define_syslog_variables',
+ 'define','decoct','dechex','decbin','debug_zval_dump','debug_backtrace',
+ 'deaggregate','dcngettext','dcgettext','dba_sync','dba_replace','dba_popen',
+ 'dba_optimize','dba_open','dba_nextkey','dba_list','dba_insert','dba_handlers',
+ 'dba_firstkey','dba_fetch','dba_exists','dba_delete','dba_close','date',
+ 'current','ctype_xdigit','ctype_upper','ctype_space','ctype_punct','ctype_print',
+ 'ctype_lower','ctype_graph','ctype_digit','ctype_cntrl','ctype_alpha','ctype_alnum',
+ 'crypt','create_function','crc32','count_chars','count','cosh',
+ 'cos','copy','convert_cyr_string','constant','connection_status','connection_aborted',
+ 'compact','closelog','closedir','clearstatcache','class_exists','chunk_split',
+ 'chr','chown','chop','chmod','chgrp','checkdnsrr',
+ 'checkdate','chdir','ceil','call_user_method_array','call_user_method','call_user_func_array',
+ 'call_user_func','cal_to_jd','cal_info','cal_from_jd','cal_days_in_month','bzwrite',
+ 'bzread','bzopen','bzflush','bzerrstr','bzerror','bzerrno',
+ 'bzdecompress','bzcompress','bzclose','bindtextdomain','bindec','bind_textdomain_codeset',
+ 'bin2hex','bcsub','bcsqrt','bcscale','bcpow','bcmul',
+ 'bcmod','bcdiv','bccomp','bcadd','basename','base_convert',
+ 'base64_encode','base64_decode','atanh','atan2','atan','assert_options',
+ 'assert','asort','asinh','asin','arsort','array_walk',
+ 'array_values','array_unshift','array_unique','array_sum','array_splice','array_slice',
+ 'array_shift','array_search','array_reverse','array_reduce','array_rand','array_push',
+ 'array_pop','array_pad','array_multisort','array_merge_recursive','array_merge','array_map',
+ 'array_keys','array_key_exists','array_intersect_assoc','array_intersect','array_flip','array_filter',
+ 'array_fill','array_diff_assoc','array_diff','array_count_values','array_chunk','array_change_key_case',
+ 'apache_setenv','apache_response_headers','apache_request_headers','apache_note','apache_lookup_uri','apache_get_version',
+ 'apache_child_terminate','aggregation_info','aggregate_properties_by_regexp','aggregate_properties_by_list','aggregate_properties','aggregate_methods_by_regexp',
+ 'aggregate_methods_by_list','aggregate_methods','aggregate','addslashes','addcslashes','acosh',
+ 'acos','abs','_','echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;',
+ 2 => 'color: #000000; font-weight: bold;',
+ 3 => 'color: #000066;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 2 => 'color: #808080; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;',
+ 2 => 'color: #006600;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ 0 => 'color: #0000ff;'
+ ),
+ 'SCRIPT' => array(
+ 0 => '',
+ 1 => '',
+ 2 => '',
+ 3 => ''
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => 'http://www.php.net/{FNAME}',
+ 4 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '-&gt;',
+ 2 => '::'
+ ),
+ 'REGEXPS' => array(
+ 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*",
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
+ 'SCRIPT_DELIMITERS' => array(
+ 0 => array(
+ '<?php' => '?>'
+ ),
+ 1 => array(
+ '<?' => '?>'
+ ),
+ 2 => array(
+ '<%' => '%>'
+ ),
+ 3 => array(
+ '<script language="php">' => '</script>'
+ )
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ 0 => true,
+ 1 => true,
+ 2 => true,
+ 3 => true
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/python.php b/inc/geshi/python.php
new file mode 100644
index 000000000..86a8f22f1
--- /dev/null
+++ b/inc/geshi/python.php
@@ -0,0 +1,143 @@
+<?php
+/*************************************************************************************
+ * python.php
+ * ----------
+ * Author: Roberto Rossi (rsoftware@altervista.org)
+ * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/08/30
+ * Last Modified: $Date: 2004/11/29 08:46:25 $
+ *
+ * Python language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/08/30 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Python',
+ 'COMMENT_SINGLE' => array(1 => '#'),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'and','assert','break','class','continue','def','del','elif','else','except','exec','finally','for','from',
+ 'global','if','import','in','is','lambda','map','not','None','or','pass','print','raise','range','return',
+ 'try','while','abs','apply','callable','chr','cmp','coerce','compile','complex','delattr','dir','divmod',
+ 'eval','execfile','filter','float','getattr','globals','group','hasattr','hash','hex','',
+ 'id','input','int','intern','isinstance','issubclass','joinfields','len','list','local','long',
+ 'max','min','match','oct','open','ord','pow','raw_input','reduce','reload','repr','round',
+ 'search','setattr','setdefault','slice','str','splitfields','unichr','unicode','tuple','type',
+ 'vars','xrange','zip','__abs__','__add__','__and__','__call__','__cmp__','__coerce__',
+ '__del__','__delattr__','__delitem__','__delslice__','__div__','__divmod__',
+ '__float__','__getattr__','__getitem__','__getslice__','__hash__','__hex__',
+ '__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__','__ior__','__ixor__',
+ '__ilshift__','__irshift__','__invert__','__int__','__init__','__len__','__long__','__lshift__',
+ '__mod__','__mul__','__neg__','__nonzero__','__oct__','__or__','__pos__','__pow__',
+ '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__',
+ '__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__',
+ '__setattr__','__setitem__','__setslice__','__str__','__sub__','__xor__',
+ '__bases__','__class__','__dict__','__methods__','__members__','__name__',
+ '__version__','ArithmeticError','AssertionError','AttributeError','EOFError','Exception',
+ 'FloatingPointError','IOError','ImportError','IndentationError','IndexError',
+ 'KeyError','KeyboardInterrupt','LookupError','MemoryError','NameError','OverflowError',
+ 'RuntimeError','StandardError','SyntaxError','SystemError','SystemExit','TabError','TypeError',
+ 'ValueError','ZeroDivisionError','AST','','atexit','BaseHTTPServer','Bastion',
+ 'cmd','codecs','commands','compileall','copy','CGIHTTPServer','Complex','dbhash',
+ 'dircmp','dis','dospath','dumbdbm','emacs','find','fmt','fnmatch','ftplib',
+ 'getopt','glob','gopherlib','grep','htmllib','httplib','ihooks','imghdr','imputil',
+ 'linecache','lockfile','macpath','macurl2path','mailbox','mailcap',
+ 'mimetools','mimify','mutex','math','Mimewriter','newdir','ni','nntplib','ntpath','nturl2path',
+ 'os','ospath','pdb','pickle','pipes','poly','popen2','posixfile','posixpath','profile','pstats','pyclbr',
+ 'pyexpat','Para','quopri','Queue','rand','random','regex','regsub','rfc822',
+ 'sched','sgmllib','shelve','site','sndhdr','string','sys','snmp',
+ 'SimpleHTTPServer','StringIO','SocketServer',
+ 'tb','tempfile','toaiff','token','tokenize','traceback','tty','types','tzparse',
+ 'Tkinter','unicodedata','urllib','urlparse','util','uu','UserDict','UserList',
+ 'wave','webbrowser','whatsound','whichdb','whrandom','xdrlib','xml','xmlpackage',
+ 'zmod','array','struct','self',
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => true
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #202020;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/qbasic.php b/inc/geshi/qbasic.php
new file mode 100644
index 000000000..c1aa44abd
--- /dev/null
+++ b/inc/geshi/qbasic.php
@@ -0,0 +1,146 @@
+<?php
+/*************************************************************************************
+ * qbasic.php
+ * ----------
+ * Author: Nigel McNie (oracle.shinoda@gmail.com)
+ * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.3
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/20
+ * Last Modified: $Date: 2004/11/29 08:46:25 $
+ *
+ * QBasic/QuickBASIC language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.3)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.2)
+ * - Added support for URLs
+ * 2004/08/05 (1.0.1)
+ * - Added support for symbols
+ * - Removed unnessecary slashes from some keywords
+ * 2004/07/14 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ * * Make sure all possible combinations of keywords with
+ * a space in them (EXIT FOR, END SELECT) are added
+ * to the first keyword group
+ * * Update colours, especially for the first keyword group
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+$language_data = array (
+ 'LANG_NAME' => 'QBasic/QuickBASIC',
+ 'COMMENT_SINGLE' => array(1 => "'", 2 => 'REM'),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'DO', 'LOOP', 'WHILE', 'WEND', 'THEN', 'ELSE', 'ELSEIF', 'IF',
+ 'FOR', 'TO', 'NEXT', 'STEP', 'GOTO', 'GOSUB', 'RETURN', 'RESUME', 'SELECT',
+ 'CASE', 'UNTIL'
+ ),
+ 3 => array(
+ 'ABS', 'ABSOLUTE', 'ACCESS', 'ALIAS', 'AND', 'ANY', 'APPEND', 'AS', 'ASC', 'ATN',
+ 'BASE', 'BEEP', 'BINARY', 'BLOAD', 'BSAVE', 'BYVAL', 'CALL', 'CALLS', 'CASE',
+ 'CDBL', 'CDECL', 'CHAIN', 'CHDIR', 'CHDIR', 'CHR$', 'CINT', 'CIRCLE', 'CLEAR',
+ 'CLNG', 'CLOSE', 'CLS', 'COM', 'COMMAND$', 'COMMON', 'CONST', 'COS', 'CSNG',
+ 'CSRLIN', 'CVD', 'CVDMBF', 'CVI', 'CVL', 'CVS', 'CVSMDF', 'DATA', 'DATE$',
+ 'DECLARE', 'DEF', 'FN', 'SEG', 'DEFDBL', 'DEFINT', 'DEFLNG', 'DEFSNG', 'DEFSTR',
+ 'DIM', 'DOUBLE', 'DRAW', 'END', 'ENVIRON', 'ENVIRON$', 'EOF', 'EQV', 'ERASE',
+ 'ERDEV', 'ERDEV$', 'ERL', 'ERR', 'ERROR', 'EXIT', 'EXP', 'FIELD', 'FILEATTR',
+ 'FILES', 'FIX', 'FRE', 'FREEFILE', 'FUNCTION', 'GET', 'HEX$', 'IMP', 'INKEY$',
+ 'INP', 'INPUT', 'INPUT$', 'INSTR', 'INT', 'INTEGER', 'IOCTL', 'IOCTL$', 'IS',
+ 'KEY', 'KILL', 'LBOUND', 'LCASE$', 'LEFT$', 'LEN', 'LET', 'LINE', 'LIST', 'LOC',
+ 'LOCAL', 'LOCATE', 'LOCK', 'LOF', 'LOG', 'UNLOCK', 'LONG', 'LPOS', 'LPRINT',
+ 'LSET', 'LTRIM$', 'MID$', 'MKD$', 'MKDIR', 'MKDMBF$', 'MKI$', 'MKL$',
+ 'MKS$', 'MKSMBF$', 'MOD', 'NAME', 'NOT', 'OCT$', 'OFF', 'ON', 'PEN', 'PLAY',
+ 'STRIG', 'TIMER', 'UEVENT', 'OPEN', 'OPTION', 'BASE', 'OR', 'OUT', 'OUTPUT',
+ 'PAINT', 'PALETTE', 'PCOPY', 'PEEK', 'PMAP', 'POINT', 'POKE', 'POS', 'PRESET',
+ 'PRINT', 'USING', 'PSET', 'PUT', 'RANDOM', 'RANDOMIZE', 'READ', 'REDIM', 'RESET',
+ 'RESTORE', 'RIGHT$', 'RMDIR', 'RND', 'RSET', 'RTRIM$', 'RUN', 'SADD', 'SCREEN',
+ 'SEEK', 'SETMEM', 'SGN', 'SHARED', 'SHELL', 'SIGNAL', 'SIN', 'SINGLE', 'SLEEP',
+ 'SOUND', 'SPACE$', 'SPC', 'SQR', 'STATIC', 'STICK', 'STOP', 'STR$', 'STRIG',
+ 'STRING', 'STRING$', 'SUB', 'SWAP', 'SYSTEM', 'TAB', 'TAN', 'TIME$', 'TIMER',
+ 'TROFF', 'TRON', 'TYPE', 'UBOUND', 'UCASE$', 'UEVENT', 'UNLOCK', 'USING', 'VAL',
+ 'VARPTR', 'VARPTR$', 'VARSEG', 'VIEW', 'WAIT', 'WIDTH', 'WINDOW', 'WRITE', 'XOR'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false,
+ 3 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #a1a100;',
+ 3 => 'color: #000066;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080;',
+ 2 => 'color: #808080;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099;'
+ ),
+ 'SCRIPT' => array(
+ ),
+ 'REGEXPS' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 3 => 'http://www.qbasicnews.com/qboho/qck{FNAME}.shtml'
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/smarty.php b/inc/geshi/smarty.php
new file mode 100644
index 000000000..7a6b4e5f5
--- /dev/null
+++ b/inc/geshi/smarty.php
@@ -0,0 +1,167 @@
+<?php
+/*************************************************************************************
+ * smarty.php
+ * ----------
+ * Author: Alan Juden (alan@judenware.org)
+ * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.0
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/07/10
+ * Last Modified: $Date: 2004/11/29 08:46:25 $
+ *
+ * Smarty template language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.0)
+ * - Initial Release
+ *
+ * TODO
+ * ----
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'Smarty',
+ 'COMMENT_SINGLE' => array(),
+ 'COMMENT_MULTI' => array('{*' => '*}'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ '$smarty', 'now', 'const', 'capture', 'config', 'section', 'foreach', 'template', 'version', 'ldelim', 'rdelim',
+ 'config_load', 'foreach', 'foreachelse', 'include', 'include_php', 'insert', 'if', 'elseif', 'else', 'php',
+ 'sectionelse', 'clear_all_cache', 'clear_cache', 'is_cached', 'from', 'item'
+ ),
+ 2 => array(
+ 'capitalize', 'count_characters', 'cat', 'count_paragraphs', 'count_sentences', 'count_words', 'date_format',
+ 'default', 'escape', 'indent', 'lower', 'nl2br', 'regex_replace', 'replace', 'spacify', 'string_format',
+ 'strip', 'strip_tags', 'truncate', 'upper', 'wordwrap'
+ ),
+ 3 => array(
+ 'assign', 'counter', 'cycle', 'debug', 'eval', 'fetch', 'html_checkboxes', 'html_image', 'html_options',
+ 'html_radios', 'html_select_date', 'html_select_time', 'html_table', 'math', 'mailto', 'popup_init',
+ 'popup', 'textformat'
+ ),
+ 4 => array(
+ '$template_dir', '$compile_dir', '$config_dir', '$plugins_dir', '$debugging', '$debug_tpl',
+ '$debugging_ctrl', '$autoload_filters', '$compile_check', '$force_compile', '$caching', '$cache_dir',
+ '$cache_lifetime', '$cache_handler_func', '$cache_modified_check', '$config_overwrite',
+ '$config_booleanize', '$config_read_hidden', '$config_fix_newlines', '$default_template_handler_func',
+ '$php_handling', '$security', '$secure_dir', '$security_settings', '$trusted_dir', '$left_delimiter',
+ '$right_delimiter', '$compiler_class', '$request_vars_order', '$request_use_auto_globals',
+ '$error_reporting', '$compile_id', '$use_sub_dirs', '$default_modifiers', '$default_resource_type'
+ ),
+ 5 => array(
+ 'append', 'append_by_ref', 'assign', 'assign_by_ref', 'clear_all_assign', 'clear_all_cache',
+ 'clear_assign', 'clear_cache', 'clear_compiled_tpl', 'clear_config', 'config_load', 'display',
+ 'fetch', 'get_config_vars', 'get_registered_object', 'get_template_vars', 'is_cached',
+ 'load_filter', 'register_block', 'register_compiler_function', 'register_function',
+ 'register_modifier', 'register_object', 'register_outputfilter', 'register_postfilter',
+ 'register_prefilter', 'register_resource', 'trigger_error', 'template_exists', 'unregister_block',
+ 'unregister_compiler_function', 'unregister_function', 'unregister_modifier', 'unregister_object',
+ 'unregister_outputfilter', 'unregister_postfilter', 'unregister_prefilter', 'unregister_resource'
+ ),
+ 6 => array(
+ 'name', 'assign', 'file', 'scope', 'global', 'key', 'once', 'script',
+ 'loop', 'start', 'step', 'max', 'show', 'values', 'value'
+ ),
+ 7 => array(
+ 'eq', 'neq', 'ne', 'lte', 'gte', 'ge', 'le', 'not', 'mod'
+ ),
+ ),
+ 'SYMBOLS' => array(
+ '/', '=', '==', '!=', '>', '<', '>=', '<=', '!', '%'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ 5 => false,
+ 6 => false,
+ 7 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #0600FF;', //Functions
+ 2 => 'color: #008000;', //Modifiers
+ 3 => 'color: #0600FF;', //Custom Functions
+ 4 => 'color: #804040;', //Variables
+ 5 => 'color: #008000;', //Methods
+ 6 => 'color: #6A0A0A;', //Attributes
+ 7 => 'color: #D36900;' //Text-based symbols
+ ),
+ 'COMMENTS' => array(
+ 'MULTI' => 'color: #008080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #D36900;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #D36900;'
+ ),
+ 'SCRIPT' => array(
+ ),
+ 'REGEXPS' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => 'http://smarty.php.net/{FNAME}',
+ 2 => 'http://smarty.php.net/{FNAME}',
+ 3 => 'http://smarty.php.net/{FNAME}',
+ 4 => 'http://smarty.php.net/{FNAME}',
+ 5 => 'http://smarty.php.net/{FNAME}',
+ 6 => '',
+ 7 => 'http://smarty.php.net/{FNAME}'
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
+ 'SCRIPT_DELIMITERS' => array(
+ 0 => array(
+ '{' => '}'
+ )
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ 0 => true
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/sql.php b/inc/geshi/sql.php
new file mode 100644
index 000000000..e0bac2671
--- /dev/null
+++ b/inc/geshi/sql.php
@@ -0,0 +1,136 @@
+<?php
+/*************************************************************************************
+ * sql.php
+ * -------
+ * Author: Nigel McNie (oracle.shinoda@gmail.com)
+ * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.3
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/04
+ * Last Modified: $Date: 2004/11/29 08:46:25 $
+ *
+ * SQL language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.3)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.2)
+ * - Added "`" string delimiter
+ * - Added "#" single comment starter
+ * 2004/08/05 (1.0.1)
+ * - Added support for symbols
+ * - Added many more keywords (mostly MYSQL keywords)
+ * 2004/07/14 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ * * Add all keywords
+ * * Split this to several sql files - mysql-sql, ansi-sql etc
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'SQL',
+ 'COMMENT_SINGLE' => array(1 =>'--', 2 => '#'),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => 1,
+ 'QUOTEMARKS' => array("'", '"', '`'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'ALL', 'ASC', 'AS', 'ALTER', 'AND', 'ADD', 'AUTO_INCREMENT',
+ 'BETWEEN', 'BINARY', 'BOTH', 'BY', 'BOOLEAN',
+ 'CHANGE', 'CHECK', 'COLUMNS', 'COLUMN', 'CROSS','CREATE',
+ 'DATABASES', 'DATABASE', 'DATA', 'DELAYED', 'DESCRIBE', 'DESC', 'DISTINCT', 'DELETE', 'DROP', 'DEFAULT',
+ 'ENCLOSED', 'ESCAPED', 'EXISTS', 'EXPLAIN',
+ 'FIELDS', 'FIELD', 'FLUSH', 'FOR', 'FOREIGN', 'FUNCTION', 'FROM',
+ 'GROUP', 'GRANT',
+ 'HAVING',
+ 'IGNORE', 'INDEX', 'INFILE', 'INSERT', 'INNER', 'INTO', 'IDENTIFIED', 'IN', 'IS', 'IF',
+ 'JOIN',
+ 'KEYS', 'KILL','KEY',
+ 'LEADING', 'LIKE', 'LIMIT', 'LINES', 'LOAD', 'LOCAL', 'LOCK', 'LOW_PRIORITY', 'LEFT', 'LANGUAGE',
+ 'MODIFY',
+ 'NATURAL', 'NOT', 'NULL', 'NEXTVAL',
+ 'OPTIMIZE', 'OPTION', 'OPTIONALLY', 'ORDER', 'OUTFILE', 'OR', 'OUTER', 'ON',
+ 'PROCEEDURE','PROCEDURAL', 'PRIMARY',
+ 'READ', 'REFERENCES', 'REGEXP', 'RENAME', 'REPLACE', 'RETURN', 'REVOKE', 'RLIKE', 'RIGHT',
+ 'SHOW', 'SONAME', 'STATUS', 'STRAIGHT_JOIN', 'SELECT', 'SETVAL', 'SET',
+ 'TABLES', 'TEMINATED', 'TO', 'TRAILING','TRUNCATE', 'TABLE', 'TEMPORARY', 'TRIGGER', 'TRUSTED',
+ 'UNIQUE', 'UNLOCK', 'USE', 'USING', 'UPDATE', 'UNSIGNED',
+ 'VALUES', 'VARIABLES', 'VIEW',
+ 'WITH', 'WRITE', 'WHERE',
+ 'ZEROFILL',
+ 'XOR',
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')', '=', '<', '>', '|'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #993333; font-weight: bold;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080; font-style: italic;',
+ 2 => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'SCRIPT' => array(
+ ),
+ 'REGEXPS' => array(
+ )
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/vb.php b/inc/geshi/vb.php
new file mode 100644
index 000000000..c46883bdf
--- /dev/null
+++ b/inc/geshi/vb.php
@@ -0,0 +1,150 @@
+<?php
+/*************************************************************************************
+ * vb.php
+ * ------
+ * Author: Roberto Rossi (rsoftware@altervista.org)
+ * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/08/30
+ * Last Modified: $Date: 2004/11/29 08:46:25 $
+ *
+ * Visual Basic language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/08/30 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+ $language_data = array (
+ 'LANG_NAME' => 'Visual Basic',
+ 'COMMENT_SINGLE' => array(1 => "'"),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '',
+ 'KEYWORDS' => array(
+ 1 => array(
+ 'as', 'err', 'boolean', 'and', 'or', 'recordset', 'unload', 'to',
+ 'integer','long','single','new','database','nothing','set','close',
+ 'open','print','split','line','field','querydef','instrrev',
+ 'abs','array','asc','ascb','ascw','atn','avg','me',
+ 'cbool','cbyte','ccur','cdate','cdbl','cdec','choose','chr','chrb','chrw','cint','clng',
+ 'command','cos','count','createobject','csng','cstr','curdir','cvar','cvdate','cverr',
+ 'date','dateadd','datediff','datepart','dateserial','datevalue','day','ddb','dir','doevents',
+ 'environ','eof','error','exp',
+ 'fileattr','filedatetime','filelen','fix','format','freefile','fv',
+ 'getallstrings','getattr','getautoserversettings','getobject','getsetting',
+ 'hex','hour','iif','imestatus','input','inputb','inputbox','instr','instb','int','ipmt',
+ 'isarray','isdate','isempty','iserror','ismissing','isnull','isnumeric','isobject',
+ 'lbound','lcase','left','leftb','len','lenb','loadpicture','loc','lof','log','ltrim',
+ 'max','mid','midb','min','minute','mirr','month','msgbox',
+ 'now','nper','npv','oct','partition','pmt','ppmt','pv','qbcolor',
+ 'rate','rgb','right','rightb','rnd','rtrim',
+ 'second','seek','sgn','shell','sin','sln','space','spc','sqr','stdev','stdevp','str',
+ 'strcomp','strconv','string','switch','sum','syd',
+ 'tab','tan','time','timer','timeserial','timevalue','trim','typename',
+ 'ubound','ucase','val','var','varp','vartype','weekday','year',
+ 'appactivate','base','beep','call','case','chdir','chdrive','const',
+ 'declare','defbool','defbyte','defcur','defdate','defdbl','defdec','defint',
+ 'deflng','defobj','defsng','defstr','deftype','defvar','deletesetting','dim','do',
+ 'else','elseif','end','enum','erase','event','exit','explicit',
+ 'false','filecopy','for','foreach','friend','function','get','gosub','goto',
+ 'if','implements','kill','let','lineinput','lock','loop','lset','mkdir','name','next','not',
+ 'onerror','on','option','private','property','public','put','raiseevent','randomize',
+ 'redim','rem','reset','resume','return','rmdir','rset',
+ 'savepicture','savesetting','sendkeys','setattr','static','sub',
+ 'then','true','type','unlock','wend','while','width','with','write',
+ 'vbabort','vbabortretryignore','vbapplicationmodal','vbarray',
+ 'vbbinarycompare','vbblack','vbblue','vbboolean','vbbyte','vbcancel',
+ 'vbcr','vbcritical','vbcrlf','vbcurrency','vbcyan','vbdataobject',
+ 'vbdate','vbdecimal','vbdefaultbutton1','vbdefaultbutton2',
+ 'vbdefaultbutton3','vbdefaultbutton4','vbdouble','vbempty',
+ 'vberror','vbexclamation','vbfirstfourdays','vbfirstfullweek',
+ 'vbfirstjan1','vbformfeed','vbfriday','vbgeneraldate','vbgreen',
+ 'vbignore','vbinformation','vbinteger','vblf','vblong','vblongdate',
+ 'vblongtime','vbmagenta','vbmonday','vbnewline','vbno','vbnull',
+ 'vbnullchar','vbnullstring','vbobject','vbobjecterror','vbok','vbokcancel',
+ 'vbokonly','vbquestion','vbred','vbretry','vbretrycancel','vbsaturday',
+ 'vbshortdate','vbshorttime','vbsingle','vbstring','vbsunday',
+ 'vbsystemmodal','vbtab','vbtextcompare','vbthursday','vbtuesday',
+ 'vbusesystem','vbusesystemdayofweek','vbvariant','vbverticaltab',
+ 'vbwednesday','vbwhite','vbyellow','vbyes','vbyesno','vbyesnocancel',
+ 'vbnormal','vbdirectory'
+ )
+ ),
+ 'SYMBOLS' => array(
+ '(', ')'
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ 1 => false
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #b1b100;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #808080;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099;'
+ ),
+ 'SCRIPT' => array(
+ ),
+ 'REGEXPS' => array(
+ )
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/vbnet.php b/inc/geshi/vbnet.php
new file mode 100644
index 000000000..37f11133e
--- /dev/null
+++ b/inc/geshi/vbnet.php
@@ -0,0 +1,200 @@
+<?php
+/*************************************************************************************
+ * vbnet.php
+ * ---------
+ * Author: Alan Juden (alan@judenware.org)
+ * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter)
+ * Release Version: 1.0.0
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/06/04
+ * Last Modified: $Date: 2004/11/29 08:46:25 $
+ *
+ * VB.NET language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.0)
+ * - Initial release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+ $language_data = array (
+ 'LANG_NAME' => 'vb.net',
+ 'COMMENT_SINGLE' => array(1 => "'"),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '',
+ 'KEYWORDS' => array(
+ 1 => array(
+ '3DDKSHADOW', '3DHIGHLIGHT', '3DLIGHT', 'ABORT', 'ABORTRETRYIGNORE', 'ACTIVEBORDER',
+ 'ACTIVETITLEBAR', 'ALIAS', 'APPLICATIONMODAL', 'APPLICATIONWORKSPACE', 'ARCHIVE',
+ 'BACK', 'BINARYCOMPARE', 'BLACK', 'BLUE', 'BUTTONFACE', 'BUTTONSHADOW', 'BUTTONTEXT',
+ 'CANCEL', 'CDROM', 'CR', 'CRITICAL', 'CRLF', 'CYAN', 'DEFAULT', 'DEFAULTBUTTON1',
+ 'DEFAULTBUTTON2', 'DEFAULTBUTTON3', 'DESKTOP', 'DIRECTORY', 'EXCLAMATION', 'FALSE',
+ 'FIXED', 'FORAPPENDING', 'FORMFEED', 'FORREADING', 'FORWRITING', 'FROMUNICODE',
+ 'GRAYTEXT', 'GREEN', 'HIDDEN', 'HIDE', 'HIGHLIGHT', 'HIGHLIGHTTEXT', 'HIRAGANA',
+ 'IGNORE', 'INACTIVEBORDER', 'INACTIVECAPTIONTEXT', 'INACTIVETITLEBAR', 'INFOBACKGROUND',
+ 'INFORMATION', 'INFOTEXT', 'KATAKANALF', 'LOWERCASE', 'MAGENTA', 'MAXIMIZEDFOCUS',
+ 'MENUBAR', 'MENUTEXT', 'METHOD', 'MINIMIZEDFOCUS', 'MINIMIZEDNOFOCUS', 'MSGBOXRIGHT',
+ 'MSGBOXRTLREADING', 'MSGBOXSETFOREGROUND', 'NARROW', 'NEWLINE', 'NO', 'NORMAL',
+ 'NORMALFOCUS', 'NORMALNOFOCUS', 'NULLSTRING', 'OBJECTERROR', 'OK', 'OKCANCEL', 'OKONLY',
+ 'PROPERCASE', 'QUESTION', 'RAMDISK', 'READONLY', 'RED', 'REMOTE', 'REMOVABLE', 'RETRY',
+ 'RETRYCANCEL', 'SCROLLBARS', 'SYSTEMFOLDER', 'SYSTEMMODAL', 'TAB', 'TEMPORARYFOLDER',
+ 'TEXTCOMPARE', 'TITLEBARTEXT', 'TRUE', 'UNICODE', 'UNKNOWN', 'UPPERCASE', 'VERTICALTAB',
+ 'VOLUME', 'WHITE', 'WIDE', 'WIN16', 'WIN32', 'WINDOWBACKGROUND', 'WINDOWFRAME',
+ 'WINDOWSFOLDER', 'WINDOWTEXT', 'YELLOW', 'YES', 'YESNO', 'YESNOCANCEL'
+ ),
+ 2 => array(
+ 'As', 'ADDHANDLER', 'ASSEMBLY', 'AUTO', 'Binary', 'ByRef', 'ByVal', 'BEGINEPILOGUE',
+ 'Else', 'Empty', 'Error', 'ENDPROLOGUE', 'EXTERNALSOURCE', 'ENVIRON', 'For',
+ 'Friend', 'GET', 'HANDLES', 'Input', 'Is', 'Len', 'Lock', 'Me', 'Mid', 'MUSTINHERIT',
+ 'MYBASE', 'MYCLASS', 'New', 'Next', 'Nothing', 'Null', 'NOTINHERITABLE',
+ 'NOTOVERRIDABLE', 'OFF', 'On', 'Option', 'Optional', 'OVERRIDABLE', 'ParamArray',
+ 'Print', 'Private', 'Property', 'Public', 'Resume', 'Seek', 'Static', 'Step',
+ 'String', 'SHELL', 'SENDKEYS', 'SET', 'Then', 'Time', 'To', 'THROW', 'WithEvents'
+ ),
+ 3 => array(
+ 'COLLECTION', 'DEBUG', 'DICTIONARY', 'DRIVE', 'DRIVES', 'ERR', 'FILE', 'FILES',
+ 'FILESYSTEMOBJECT', 'FOLDER', 'FOLDERS', 'TEXTSTREAM'
+ ),
+ 4 => array(
+ 'BOOLEAN', 'BYTE', 'DATE', 'DECIMIAL', 'DOUBLE', 'INTEGER', 'LONG', 'OBJECT',
+ 'SINGLE STRING'
+ ),
+ 5 => array(
+ 'ADDRESSOF', 'AND', 'BITAND', 'BITNOT', 'BITOR', 'BITXOR',
+ 'GETTYPE', 'LIKE', 'MOD', 'NOT', 'ORXOR'
+ ),
+ 6 => array(
+ 'APPACTIVATE', 'BEEP', 'CALL', 'CHDIR', 'CHDRIVE', 'CLASS', 'CASE', 'CATCH',
+ 'DECLARE', 'DELEGATE', 'DELETESETTING', 'DIM', 'DO', 'DOEVENTS', 'END', 'ENUM',
+ 'EVENT', 'EXIT', 'EACH', 'FUNCTION', 'FINALLY', 'IF', 'IMPORTS', 'INHERITS',
+ 'INTERFACE', 'IMPLEMENTS', 'KILL', 'LOOP', 'MIDB', 'NAMESPACE', 'OPEN', 'PUT',
+ 'RAISEEVENT', 'RANDOMIZE', 'REDIM', 'REM', 'RESET', 'SAVESETTING', 'SELECT',
+ 'SETATTR', 'STOP', 'SUB', 'SYNCLOCK', 'STRUCTURE', 'SHADOWS', 'SWITCH',
+ 'TIMEOFDAY', 'TODAY', 'TRY', 'WIDTH', 'WITH', 'WRITE', 'WHILE'
+ ),
+ 7 => array(
+ 'ABS', 'ARRAY', 'ASC', 'ASCB', 'ASCW', 'CALLBYNAME', 'CBOOL', 'CBYTE', 'CCHAR',
+ 'CCHR', 'CDATE', 'CDBL', 'CDEC', 'CHOOSE', 'CHR', 'CHR$', 'CHRB', 'CHRB$', 'CHRW',
+ 'CINT', 'CLNG', 'CLNG8', 'CLOSE', 'COBJ', 'COMMAND', 'COMMAND$', 'CONVERSION',
+ 'COS', 'CREATEOBJECT', 'CSHORT', 'CSTR', 'CURDIR', 'CTYPE', 'CVDATE', 'DATEADD',
+ 'DATEDIFF', 'DATEPART', 'DATESERIAL', 'DATEVALUE', 'DAY', 'DDB', 'DIR', 'DIR$',
+ 'EOF', 'ERROR$', 'EXP', 'FILEATTR', 'FILECOPY', 'FILEDATATIME', 'FILELEN', 'FILTER',
+ 'FIX', 'FORMAT', 'FORMAT$', 'FORMATCURRENCY', 'FORMATDATETIME', 'FORMATNUMBER',
+ 'FORMATPERCENT', 'FREEFILE', 'FV', 'GETALLSETTINGS', 'GETATTRGETOBJECT', 'GETSETTING',
+ 'HEX', 'HEX$', 'HOUR', 'IIF', 'IMESTATUS', 'INPUT$', 'INPUTB', 'INPUTB$', 'INPUTBOX',
+ 'INSTR', 'INSTRB', 'INSTRREV', 'INT', 'IPMT', 'IRR', 'ISARRAY', 'ISDATE', 'ISEMPTY',
+ 'ISERROR', 'ISNULL', 'ISNUMERIC', 'ISOBJECT', 'JOIN', 'LBOUND', 'LCASE', 'LCASE$',
+ 'LEFT', 'LEFT$', 'LEFTB', 'LEFTB$', 'LENB', 'LINEINPUT', 'LOC', 'LOF', 'LOG', 'LTRIM',
+ 'LTRIM$', 'MID$', 'MIDB', 'MIDB$', 'MINUTE', 'MIRR', 'MKDIR', 'MONTH', 'MONTHNAME',
+ 'MSGBOX', 'NOW', 'NPER', 'NPV', 'OCT', 'OCT$', 'PARTITION', 'PMT', 'PPMT', 'PV',
+ 'RATE', 'REPLACE', 'RIGHT', 'RIGHT$', 'RIGHTB', 'RIGHTB$', 'RMDIR', 'RND', 'RTRIM',
+ 'RTRIM$', 'SECOND', 'SIN', 'SLN', 'SPACE', 'SPACE$', 'SPC', 'SPLIT', 'STR', 'STR$',
+ 'STRCOMP', 'STRCONV', 'STRING$', 'STRREVERSE', 'SYD', 'TAB', 'TAN', 'TIMEOFDAY',
+ 'TIMER', 'TIMESERIAL', 'TIMEVALUE', 'TODAY', 'TRIM', 'TRIM$', 'TYPENAME', 'UBOUND',
+ 'UCASE', 'UCASE$', 'VAL', 'WEEKDAY', 'WEEKDAYNAME', 'YEAR'
+ ),
+ 8 => array(
+ 'ANY', 'ATN', 'CALENDAR', 'CIRCLE', 'CURRENCY', 'DEFBOOL', 'DEFBYTE', 'DEFCUR',
+ 'DEFDATE', 'DEFDBL', 'DEFDEC', 'DEFINT', 'DEFLNG', 'DEFOBJ', 'DEFSNG', 'DEFSTR',
+ 'DEFVAR', 'EQV', 'GOSUB', 'IMP', 'INITIALIZE', 'ISMISSING', 'LET', 'LINE', 'LSET',
+ 'RSET', 'SGN', 'SQR', 'TERMINATE', 'VARIANT', 'VARTYPE', 'WEND'
+ ),
+ ),
+ 'SYMBOLS' => array(
+ '&', '&=', '*', '*=', '+', '+=', '-', '-=', '//', '/', '/=', '=', '\\', '\\=',
+ '^', '^='
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ 5 => false,
+ 6 => false,
+ 7 => false,
+ 8 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: #0600FF;', //Constants
+ 2 => 'color: #FF8000;', //Keywords
+ 3 => 'color: #008000;', //Data Types
+ 4 => 'color: #FF0000;', //Objects
+ 5 => 'color: #804040;', //Operators
+ 6 => 'color: #0600FF;', //Statements
+ 7 => 'color: #0600FF;', //Functions
+ 8 => 'color: #0600FF;' //Deprecated
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: #008080; font-style: italic;',
+ 2 => 'color: #008080;',
+ 'MULTI' => 'color: #008080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #008080; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #000000;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #808080;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #FF0000;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #0000FF;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #008000;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'URLS' => array(
+ 1 => '',
+ 2 => '',
+ 3 => 'http://www.google.com/search?q={FNAME}+msdn.microsoft.com',
+ 4 => ''
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 =>'.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/visualfoxpro.php b/inc/geshi/visualfoxpro.php
new file mode 100644
index 000000000..0203d116e
--- /dev/null
+++ b/inc/geshi/visualfoxpro.php
@@ -0,0 +1,444 @@
+<?php
+/*************************************************************************************
+ * visualfoxpro.php
+ * ----------------
+ * Author: Roberto Armellin (r.armellin@tin.it)
+ * Copyright: (c) 2004 Roberto Armellin, Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/09/17
+ * Last Modified: 2004/09/18
+ *
+ * Visual FoxPro language file for GeSHi.
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/10/27)
+ * -------------------------
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'VFP',
+ 'COMMENT_SINGLE' => array(1 => "//", 2 => "\n*"),
+ 'COMMENT_MULTI' => array(),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array('"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ 1 => array('Case', 'Else', '#Else', 'Then',
+ 'Endcase', 'Enddefine', 'Enddo', 'Endfor', 'Endfunc', 'Endif', 'Endprintjob',
+ 'Endproc', 'Endscan', 'Endtext', 'Endwith', '#Endif',
+ '#Elif','#Else','#Endif','#Define','#If','#Include',
+ '#Itsexpression','#Readclauses','#Region','#Section','#Undef','#Wname',
+ 'Case','Define','Do','Else','Endcase','Enddefine',
+ 'Enddo','Endfor','Endfunc','Endif','Endprintjob','Endproc',
+ 'Endscan','Endtext','Endwith','For','Function','Hidden',
+ 'If','Local','Lparameter','Lparameters','Next','Otherwise',
+ 'Parameters','Printjob','Procedure','Protected','Public','Scan',
+ 'Text','Then','While','With','?','??',
+ '???','Abs','Accept','Access','Aclass','Acopy',
+ 'Acos','Adatabases','Adbobjects','Addbs','Addrelationtoenv','Addtabletoenv',
+ 'Adel','Adir','Aelement','Aerror','Afields','Afont',
+ 'Agetclass','Agetfileversion','Ains','Ainstance','Alen','Align',
+ 'Alines','Alltrim','Alter','Amembers','Amouseobj','Anetresources',
+ 'Ansitooem','Append','Aprinters','Ascan','Aselobj','Asin',
+ 'Asort','Assert','Asserts','Assist','Asubscript','Asynchronous',
+ 'At_c','Atan','Atc','Atcc','Atcline','Atline',
+ 'Atn2','Aused','Autoform','Autoreport','Avcxclasses','Average',
+ 'BarCount','BarPrompt','BatchMode','BatchUpdateCount','Begin','BellSound',
+ 'BinToC','Bintoc','Bitand','Bitclear','Bitlshift','Bitnot',
+ 'Bitor','Bitrshift','Bitset','Bittest','Bitxor','Bof',
+ 'Browse','BrowseRefresh','Buffering','BuilderLock','COMArray','COMReturnError',
+ 'CToBin','Calculate','Call','Capslock','Cd','Cdow',
+ 'Ceiling','Central','Change','Char','Chdir','Chr',
+ 'Chrsaw','Chrtran','Chrtranc','Close','Cmonth','Cntbar',
+ 'Cntpad','Col','Comclassinfo','CommandTargetQuery','Compile','Completed',
+ 'Compobj','Compute','Concat','ConnectBusy','ConnectHandle','ConnectName',
+ 'ConnectString','ConnectTimeOut','ContainerReleaseType','Continue','Copy','Cos',
+ 'Cot','Count','Coverage','Cpconvert','Cpcurrent','Cpdbf',
+ 'Cpnotrans','Create','CreateBinary','Createobject','Createobjectex','Createoffline',
+ 'CrsBuffering','CrsFetchMemo','CrsFetchSize','CrsMaxRows','CrsMethodUsed','CrsNumBatch',
+ 'CrsShareConnection','CrsUseMemoSize','CrsWhereClause','Ctobin','Ctod','Ctot',
+ 'Curdate','Curdir','CurrLeft','CurrSymbol','CursorGetProp','CursorSetProp',
+ 'Curtime','Curval','DBGetProp','DBSetProp','DB_BufLockRow','DB_BufLockTable',
+ 'DB_BufOff','DB_BufOptRow','DB_BufOptTable','DB_Complette','DB_DeleteInsert','DB_KeyAndModified',
+ 'DB_KeyAndTimestamp','DB_KeyAndUpdatable','DB_LocalSQL','DB_NoPrompt','DB_Prompt','DB_RemoteSQL',
+ 'DB_TransAuto','DB_TransManual','DB_TransNone','DB_Update','Datetime','Day',
+ 'Dayname','Dayofmonth','Dayofweek','Dayofyear','Dbalias','Dbused',
+ 'Ddeaborttrans','Ddeadvise','Ddeenabled','Ddeexecute','Ddeinitiate','Ddelasterror',
+ 'Ddepoke','Dderequest','Ddesetoption','Ddesetservice','Ddesettopic','Ddeterminate',
+ 'Debugout','Declare','DefOLELCid','DefaultValue','Defaultext','Degrees',
+ 'DeleteTrigger','Desc','Description','Difference','Dimension','Dir',
+ 'Directory','Diskspace','DispLogin','DispWarnings','Display','Dll',
+ 'Dmy','DoDefault','DoEvents','Doc','Doevents','Dow',
+ 'Drivetype','Drop','Dropoffline','Dtoc','Dtor','Dtos',
+ 'Dtot','DynamicInputMask','Each','Edit','Eject','Elif',
+ 'End','Eof','Erase','Evaluate','Event','Eventtracking',
+ 'Exclude','Exclusive','Exit','Exp','Export','External',
+ 'FDate','FTime','Fchsize','Fclose','Fcount','Fcreate',
+ 'Feof','Ferror','FetchMemo','FetchSize','Fflush','Fgets',
+ 'Filer','Filetostr','Find','Fklabel','Fkmax','Fldlist',
+ 'Flock','Floor','Flush','Fontmetric','Fopen','Forceext',
+ 'Forcepath','FormSetClass','FormSetLib','FormsClass','FormsLib','Found',
+ 'FoxPro','Foxcode','Foxdoc','Foxgen','Foxgraph','Foxview',
+ 'Fputs','Fread','French','Fseek','Fsize','Fv',
+ 'Fwrite','Gather','German','GetPem','Getbar','Getcolor',
+ 'Getcp','Getdir','Getenv','Getexpr','Getfile','Getfldstate',
+ 'Getfont','Gethost','Getnextmodified','Getobject','Getpad','Getpict',
+ 'Getprinter','Go','Gomonth','Goto','Graph','GridHorz',
+ 'GridShow','GridShowPos','GridSnap','GridVert','Help','HelpOn',
+ 'HelpTo','HighLightRow','Home','Hour','IMEStatus','IdleTimeOut',
+ 'Idxcollate','Ifdef','Ifndef','Iif','Import','Include',
+ 'Indbc','Index','Indexseek','Inkey','Inlist','Input',
+ 'Insert','InsertTrigger','Insmode','IsBlank','IsFLocked','IsLeadByte',
+ 'IsMouse','IsNull','IsRLocked','Isalpha','Iscolor','Isdigit',
+ 'Isexclusive','Isflocked','Ishosted','Islower','Isreadonly','Isrlocked',
+ 'Isupper','Italian','Japan','Join','Justdrive','Justext',
+ 'Justfname','Justpath','Juststem','KeyField','KeyFieldList','Keyboard'
+ ),
+ 2 => array('Keymatch','LastProject','Lastkey','Lcase','Leftc','Len',
+ 'Lenc','Length','Likec','Lineno','LoadPicture','Loadpicture',
+ 'Locate','Locfile','Log','Log10','Logout','Lookup',
+ 'Loop','Lower','Ltrim','Lupdate','Mail','MaxRecords',
+ 'Mcol','Md','Mdown','Mdx','Mdy','Memlines',
+ 'Menu','Messagebox','Minute','Mkdir','Mline','Modify',
+ 'Month','Monthname','Mouse','Mrkbar','Mrkpad','Mrow',
+ 'Mtdll','Mton','Mwindow','Native','Ndx','Network',
+ 'NoFilter','Nodefault','Normalize','Note','Now','Ntom',
+ 'NullString','Numlock','Nvl','ODBChdbc','ODBChstmt','OLEDropTextInsertion',
+ 'OLELCid','Objnum','Objref','Objtoclient','Objvar','Occurs',
+ 'Oemtoansi','Oldval','OlePublic','Olereturnerror','On','Open',
+ 'Oracle','Order','Os','Outer','PCount','Pack',
+ 'PacketSize','Padc','Padl','Padr','Payment','Pcol',
+ 'PemStatus','Pi','Pivot','Play','Pop','Popup',
+ 'Power','PrimaryKey','Printstatus','Private','Prmbar','Prmpad',
+ 'ProjectClick','Proper','Prow','Prtinfo','Push','Putfile',
+ 'Pv','Qpr','Quater','QueryTimeOut','Quit','Radians',
+ 'Rand','Rat','Ratc','Ratline','Rd','Rdlevel',
+ 'Read','Readkey','Recall','Reccount','RecentlyUsedFiles','Recno',
+ 'Recsize','Regional','Reindex','RelatedChild','RelatedTable','RelatedTag',
+ 'Remove','Rename','Repeat','Replace','Replicate','Report',
+ 'ResHeight','ResWidth','ResourceOn','ResourceTo','Resources','Restore',
+ 'Resume','Retry','Return','Revertoffline','Rgbscheme','Rightc',
+ 'Rlock','Rmdir','Rollback','Round','Rtod','Rtrim',
+ 'RuleExpression','RuleText','Run','Runscript','Rview','SQLAsynchronous',
+ 'SQLBatchMode','SQLCancel','SQLColumns','SQLConnect','SQLConnectTimeOut','SQLDisconnect',
+ 'SQLDispLogin','SQLDispWarnings','SQLExec','SQLGetProp','SQLIdleTimeOut','SQLMoreResults',
+ 'SQLPrepare','SQLQueryTimeOut','SQLSetProp','SQLTables','SQLTransactions','SQLWaitTime',
+ 'Save','SavePicture','Savepicture','ScaleUnits','Scatter','Scols',
+ 'Scroll','Sec','Second','Seek','Select','SendUpdates',
+ 'Set','SetDefault','Setfldstate','Setup','ShareConnection','ShowOLEControls',
+ 'ShowOLEInsertable','ShowVCXs','Sign','Sin','Size','SizeBox',
+ 'Skpbar','Skppad','Sort','Soundex','SourceName','Sqlcommit',
+ 'Sqll','Sqlrollback','Sqlstringconnect','Sqrt','Srows','StatusBar',
+ 'Store','Str','Strconv','Strtofile','Strtran','Stuff',
+ 'Stuffc','Substr','Substrc','Substring','Sum','Suspend',
+ 'Sys','Sysmetric','TabOrdering','Table','TableRefresh','Tablerevert',
+ 'Tableupdate','TagCount','TagNo','Tan','Target','This',
+ 'Thisform','Thisformset','Timestamp','Timestampdiff','Total','Transactions',
+ 'Transform','Trim','Truncate','Ttoc','Ttod','Txnlevel',
+ 'Txtwidth','Type','Ucase','Undefine','Unlock','Unpack',
+ 'Updatable','UpdatableFieldList','Update','UpdateName','UpdateNameList','UpdateTrigger',
+ 'UpdateType','Updated','Upper','Upsizing','Usa','Use',
+ 'UseMemoSize','Used','Val','Validate','Varread','Vartype',
+ 'Version','VersionLanguage','Wait','WaitTime','Wborder','Wchild',
+ 'Wcols','Week','Wexist','Wfont','WhereType','Windcmd',
+ 'Windhelp','Windmemo','Windmenu','Windmodify','Windquery','Windscreen',
+ 'Windsnip','Windstproc','WizardPrompt','Wlast','Wlcol','Wlrow',
+ 'Wmaximum','Wminimum','Wontop','Woutput','Wparent','Wread',
+ 'Wrows','Wtitle','Wvisible','Year','Zap','_Alignment',
+ '_Asciicols','_Asciirows','_Assist','_Beautify','_Box','_Browser',
+ '_Builder','_Calcmem','_Calcvalue','_Cliptext','_Converter','_Coverage',
+ '_Curobj','_Dblclick','_Diarydate','_Dos','_Foxdoc','_Foxgraph',
+ '_Gallery','_Gengraph','_Genhtml','_Genmenu','_Genpd','_Genscrn',
+ '_Genxtab','_Getexpr','_Include','_Indent','_Lmargin','_Mac',
+ '_Mbr_appnd','_Mbr_cpart','_Mbr_delet','_Mbr_font','_Mbr_goto','_Mbr_grid',
+ '_Mbr_link','_Mbr_mode','_Mbr_mvfld','_Mbr_mvprt','_Mbr_seek','_Mbr_sp100',
+ '_Mbr_sp200','_Mbr_szfld','_Mbrowse','_Mda_appnd','_Mda_avg','_Mda_brow',
+ '_Mda_calc','_Mda_copy','_Mda_count','_Mda_label','_Mda_pack','_Mda_reprt',
+ '_Mda_rindx','_Mda_setup','_Mda_sort','_Mda_sp100','_Mda_sp200','_Mda_sp300',
+ '_Mda_sum','_Mda_total','_Mdata','_Mdiary','_Med_clear','_Med_copy',
+ '_Med_cut','_Med_cvtst','_Med_find','_Med_finda','_Med_goto','_Med_insob',
+ '_Med_link','_Med_obj','_Med_paste','_Med_pref','_Med_pstlk','_Med_redo',
+ '_Med_repl','_Med_repla','_Med_slcta','_Med_sp100','_Med_sp200','_Med_sp300',
+ '_Med_sp400','_Med_sp500','_Med_undo','_Medit','_Mfi_clall','_Mfi_close',
+ '_Mfi_export','_Mfi_import','_Mfi_new','_Mfi_open','_Mfi_pgset','_Mfi_prevu',
+ '_Mfi_print','_Mfi_quit','_Mfi_revrt','_Mfi_savas','_Mfi_save','_Mfi_send',
+ '_Mfi_setup','_Mfi_sp100','_Mfi_sp200','_Mfi_sp300','_Mfi_sp400','_Mfile',
+ '_Mfiler','_Mfirst','_Mlabel','_Mlast','_Mline','_Mmacro',
+ '_Mmbldr','_Mpr_beaut','_Mpr_cancl','_Mpr_compl','_Mpr_do','_Mpr_docum',
+ '_Mpr_formwz','_Mpr_gener','_Mpr_graph','_Mpr_resum','_Mpr_sp100','_Mpr_sp200',
+ '_Mpr_sp300','_Mpr_suspend','_Mprog','_Mproj','_Mrc_appnd','_Mrc_chnge',
+ '_Mrc_cont','_Mrc_delet','_Mrc_goto','_Mrc_locat','_Mrc_recal','_Mrc_repl',
+ '_Mrc_seek','_Mrc_sp100','_Mrc_sp200','_Mrecord','_Mreport','_Mrqbe',
+ '_Mscreen','_Msm_data','_Msm_edit','_Msm_file','_Msm_format','_Msm_prog',
+ '_Msm_recrd','_Msm_systm','_Msm_text','_Msm_tools','_Msm_view','_Msm_windo',
+ '_Mst_about','_Mst_ascii','_Mst_calcu','_Mst_captr','_Mst_dbase','_Mst_diary',
+ '_Mst_filer','_Mst_help','_Mst_hphow','_Mst_hpsch','_Mst_macro','_Mst_office',
+ '_Mst_puzzl','_Mst_sp100','_Mst_sp200','_Mst_sp300','_Mst_specl','_Msysmenu',
+ '_Msystem','_Mtable','_Mtb_appnd','_Mtb_cpart','_Mtb_delet','_Mtb_delrc',
+ '_Mtb_goto','_Mtb_link','_Mtb_mvfld','_Mtb_mvprt','_Mtb_props','_Mtb_recal',
+ '_Mtb_sp100','_Mtb_sp200','_Mtb_sp300','_Mtb_sp400','_Mtb_szfld','_Mwi_arran',
+ '_Mwi_clear','_Mwi_cmd','_Mwi_color','_Mwi_debug','_Mwi_hide','_Mwi_hidea',
+ '_Mwi_min','_Mwi_move','_Mwi_rotat','_Mwi_showa','_Mwi_size','_Mwi_sp100',
+ '_Mwi_sp200','_Mwi_toolb','_Mwi_trace','_Mwi_view','_Mwi_zoom','_Mwindow',
+ '_Mwizards','_Mwz_all','_Mwz_form','_Mwz_foxdoc','_Mwz_import','_Mwz_label',
+ '_Mwz_mail','_Mwz_pivot','_Mwz_query','_Mwz_reprt','_Mwz_setup','_Mwz_table',
+ '_Mwz_upsizing','_Netware','_Oracle','_Padvance','_Pageno','_Pbpage',
+ '_Pcolno','_Pcopies','_Pdparms','_Pdriver','_Pdsetup','_Pecode',
+ '_Peject','_Pepage','_Pform','_Plength','_Plineno','_Ploffset',
+ '_Ppitch','_Pquality','_Pretext','_Pscode','_Pspacing','_Pwait',
+ '_Rmargin','_Runactivedoc','_Samples','_Screen','_Shell','_Spellchk',
+ '_Sqlserver','_Startup','_Tabs','_Tally','_Text','_Throttle',
+ '_Transport','_Triggerlevel','_Unix','_WebDevOnly','_WebMenu','_WebMsftHomePage',
+ '_WebVFPHomePage','_WebVfpOnlineSupport','_Windows','_Wizard','_Wrap','_scctext',
+ '_vfp','Additive','After','Again','Aindent','Alignright',
+ 'All','Alt','Alternate','And','Ansi','Any',
+ 'Aplabout','App','Array','As','Asc','Ascending',
+ 'Ascii','At','Attributes','Automatic','Autosave','Avg',
+ 'Bar','Before','Bell','Between','Bitmap','Blank',
+ 'Blink','Blocksize','Border','Bottom','Brstatus','Bucket',
+ 'Buffers','By','Candidate','Carry','Cascade','Catalog',
+ 'Cdx','Center','Century','Cga','Character','Check',
+ 'Classlib','Clock','Cnt','Codepage','Collate','Color',
+ 'Com1','Com2','Command','Compact','Compatible','Compress',
+ 'Confirm','Connection','Connections','Connstring','Console','Copies',
+ 'Cpcompile','Cpdialog','Csv','Currency','Cycle','Databases',
+ 'Datasource','Date','Db4','Dbc','Dbf','Dbmemo3',
+ 'Debug','Decimals','Defaultsource','Deletetables','Delimited','Delimiters',
+ 'Descending','Design','Development','Device','Dif','Disabled',
+ 'Distinct','Dlls','Dohistory','Dos','Dosmem','Double',
+ 'Driver','Duplex','Echo','Editwork','Ega25','Ega43',
+ 'Ems','Ems64','Encrypt','Encryption','Environment','Escape',
+ 'Events','Exact','Except','Exe','Exists','Expression',
+ 'Extended','F','Fdow','Fetch','Field','Fields',
+ 'File','Files','Fill','Fixed','Float','Foldconst',
+ 'Font','Footer','Force','Foreign','Fox2x','Foxplus',
+ 'Free','Freeze','From','Fullpath','Fw2','Fweek',
+ 'Get','Gets','Global','Group','Grow','Halfheight',
+ 'Having','Heading','Headings','Helpfilter','History','Hmemory',
+ 'Hours','Id','In','Indexes','Information','Instruct',
+ 'Int','Integer','Intensity','Intersect','Into','Is',
+ 'Isometric','Key','Keycolumns','Keycomp','Keyset','Last',
+ 'Ledit','Level','Library','Like','Linked','Lock',
+ 'Logerrors','Long','Lpartition','Mac','Macdesktop','Machelp',
+ 'Mackey','Macros','Mark','Master','Max','Maxmem',
+ 'Mdi','Memlimit','Memory','Memos','Memowidth','Memvar',
+ 'Menus','Messages','Middle','Min','Minimize','Minus',
+ 'Mod','Modal','Module','Mono43','Movers','Multilocks',
+ 'Mvarsiz','Mvcount','N','Near','Negotiate','Noalias',
+ 'Noappend','Noclear','Noclose','Noconsole','Nocptrans','Nodata',
+ 'Nodebug','Nodelete','Nodup','Noedit','Noeject','Noenvironment',
+ 'Nofloat','Nofollow','Nogrow','Noinit','Nolgrid','Nolink',
+ 'Nolock','Nomargin','Nomdi','Nomenu','Nominimize','Nomodify'
+ ),
+ 3 => array('Nomouse','None','Nooptimize','Nooverwrite','Noprojecthook','Noprompt',
+ 'Noread','Norefresh','Norequery','Norgrid','Norm','Normal',
+ 'Nosave','Noshadow','Noshow','Nospace','Not','Notab',
+ 'Notify','Noupdate','Novalidate','Noverify','Nowait','Nowindow',
+ 'Nowrap','Nozoom','Npv','Null','Number','Objects',
+ 'Odometer','Of','Off','Oleobjects','Only','Optimize',
+ 'Or','Orientation','Output','Outshow','Overlay','Overwrite',
+ 'Pad','Palette','Paperlength','Papersize','Paperwidth','Password',
+ 'Path','Pattern','Pause','Pdox','Pdsetup','Pen',
+ 'Pfs','Pixels','Plain','Popups','Precision','Preference',
+ 'Preview','Primary','Printer','Printquality','Procedures','Production',
+ 'Program','Progwork','Project','Prompt','Query','Random',
+ 'Range','Readborder','Readerror','Record','Recover','Redit',
+ 'Reference','References','Relative','Remote','Reprocess','Resource',
+ 'Rest','Restrict','Rgb','Right','Row','Rowset',
+ 'Rpd','Runtime','Safety','Same','Sample','Say',
+ 'Scale','Scheme','Scoreboard','Screen','Sdf','Seconds',
+ 'Selection','Shadows','Shared','Sheet','Shell','Shift',
+ 'Shutdown','Single','Some','Sortwork','Space','Sql',
+ 'Standalone','Status','Std','Step','Sticky','String',
+ 'Structure','Subclass','Summary','Sylk','Sysformats','Sysmenus',
+ 'System','T','Tab','Tables','Talk','Tedit',
+ 'Textmerge','Time','Timeout','Titles','Tmpfiles','To',
+ 'Topic','Transaction','Trap','Trbetween','Trigger','Ttoption',
+ 'Typeahead','Udfparms','Union','Unique','Userid','Users',
+ 'Values','Var','Verb','Vga25','Vga50','Views',
+ 'Volume','Where','Windows','Wk1','Wk3','Wks',
+ 'Workarea','Wp','Wr1','Wrap','Wrk','Xcmdfile',
+ 'Xl5','Xl8','Xls','Y','Yresolution','Zoom',
+ 'Activate','ActivateCell','Add','AddColumn','AddItem','AddListItem',
+ 'AddObject','AddProperty','AddToSCC','AfterBuild','AfterCloseTables','AfterDock',
+ 'AfterRowColChange','BeforeBuild','BeforeDock','BeforeOpenTables','BeforeRowColChange','Box',
+ 'Build','CheckIn','CheckOut','Circle','Clear','ClearData',
+ 'Cleanup','Click','CloneObject','CloseEditor','CloseTables','Cls',
+ 'CommandTargetExec','CommandTargetQueryStas','ContainerRelease','DataToClip','DblClick','Deactivate',
+ 'Delete','DeleteColumn','Deleted','Destroy','DoCmd','Dock',
+ 'DoScroll','DoVerb','DownClick','Drag','DragDrop','DragOver',
+ 'DropDown','Draw','EnterFocus','Error','ErrorMessage','Eval',
+ 'ExitFocus','FormatChange','GetData','GetFormat','GetLatestVersion','GoBack',
+ 'GotFocus','GoForward','GridHitTest','Hide','HideDoc','IndexToItemId',
+ 'Init','InteractiveChange','Item','ItemIdToIndex','KeyPress','Line',
+ 'Load','LostFocus','Message','MiddleClick','MouseDown','MouseMove',
+ 'MouseUp','MouseWheel','Move','Moved','NavigateTo','Newobject',
+ 'OLECompleteDrag','OLEDrag','OLEDragDrop','OLEDragOver','OLEGiveFeedback','OLESetData',
+ 'OLEStartDrag','OpenEditor','OpenTables','Paint','Point','Print',
+ 'ProgrammaticChange','PSet','QueryAddFile','QueryModifyFile','QueryRemoveFile','QueryRunFile',
+ 'QueryUnload','RangeHigh','RangeLow','ReadActivate','ReadExpression','ReadDeactivate',
+ 'ReadMethod','ReadShow','ReadValid','ReadWhen','Refresh','Release',
+ 'RemoveFromSCC','RemoveItem','RemoveListItem','RemoveObject','Requery','RequestData',
+ 'Reset','ResetToDefault','Resize','RightClick','SaveAs','SaveAsClass',
+ 'Scrolled','SetAll','SetData','SetFocus','SetFormat','SetMain',
+ 'SetVar','SetViewPort','ShowDoc','ShowWhatsThis','TextHeight','TextWidth',
+ 'Timer','UIEnable','UnDock','UndoCheckOut','Unload','UpClick',
+ 'Valid','WhatsThisMode','When','WriteExpression','WriteMethod','ZOrder',
+ 'ATGetColors','ATListColors','Accelerate','ActiveColumn','ActiveControl','ActiveForm',
+ 'ActiveObjectId','ActivePage','ActiveProject','ActiveRow','AddLineFeeds','Alias',
+ 'Alignment','AllowAddNew','AllowHeaderSizing','AllowResize','AllowRowSizing','AllowTabs',
+ 'AlwaysOnTop','Application','AutoActivate','AutoCenter','AutoCloseTables','AutoIncrement',
+ 'AutoOpenTables','AutoRelease','AutoSize','AutoVerbMenu','AutoYield','AvailNum',
+ 'BackColor','BackStyle','BaseClass','BorderColor','BorderStyle','BorderWidth',
+ 'Bound','BoundColumn','BoundTo','BrowseAlignment','BrowseCellMarg','BrowseDestWidth',
+ 'BufferMode','BufferModeOverride','BuildDateTime','ButtonCount','ButtonIndex','Buttons',
+ 'CLSID','CanAccelerate','CanGetFocus','CanLoseFocus','Cancel','Caption',
+ 'ChildAlias','ChildOrder','Class','ClassLibrary','ClipControls','ClipRect',
+ 'Closable','ColorScheme','ColorSource','ColumnCount','ColumnHeaders','ColumnLines',
+ 'ColumnOrder','ColumnWidths','Columns','Comment','ContinuousScroll','ControlBox',
+ 'ControlCount','ControlIndex','ControlSource','Controls','CurrentControl','CurrentX',
+ 'CurrentY','CursorSource','Curvature','DataSession','DataSessionId','DataSourceObj',
+ 'DataType','Database','DateFormat','DateMark','DefButton','DefButtonOrig',
+ 'DefHeight','DefLeft','DefTop','DefWidth','Default','DefaultFilePath',
+ 'DefineWindows','DeleteMark','Desktop','Dirty','DisabledBackColor','DisabledByEOF',
+ 'DisabledForeColor','DisabledItemBackColor','DisabledItemForeColor','DisabledPicture','DispPageHeight','DispPageWidth',
+ 'DisplayCount','DisplayValue','DoCreate','DockPosition','Docked','DocumentFile',
+ 'DownPicture','DragIcon','DragMode','DragState','DrawMode','DrawStyle',
+ 'DrawWidth','DynamicAlignment','DynamicBackColor','DynamicCurrentControl','DynamicFontBold','DynamicFontItalic',
+ 'DynamicFontName','DynamicFontOutline','DynamicFontShadow','DynamicFontSize','DynamicFontStrikethru','DynamicFontUnderline',
+ 'DynamicForeColor','EditFlags','Enabled','EnabledByReadLock','Encrypted','EnvLevel',
+ 'ErasePage','FileClass','FileClassLibrary','FillColor','FillStyle','Filter',
+ 'FirstElement','FontBold','FontItalic','FontName','FontOutline','FontShadow',
+ 'FontSize','FontStrikethru','FontUnderline','ForceFocus','ForeColor','FormCount',
+ 'FormIndex','FormPageCount','FormPageIndex','Format','Forms','FoxFont',
+ 'FullName','GoFirst','GoLast','GridLineColor','GridLineWidth','GridLines'
+ ),
+ 4 => array('HPROJ','HWnd','HalfHeightCaption','HasClip','HeaderGap','HeaderHeight',
+ 'Height','HelpContextID','HideSelection','Highlight','HomeDir','HostName',
+ 'HotKey','HscrollSmallChange','IMEMode','Icon','IgnoreInsert','InResize',
+ 'Increment','IncrementalSearch','InitialSelectedAlias','InputMask','Instancing','IntegralHeight',
+ 'Interval','ItemBackColor','ItemData','ItemForeColor','ItemIDData','ItemTips',
+ 'JustReadLocked','KeyPreview','KeyboardHighValue','KeyboardLowValue','LastModified','Left',
+ 'LeftColumn','LineSlant','LinkMaster','List','ListCount','ListIndex',
+ 'ListItem','ListItemId','LockDataSource','LockScreen','MDIForm','MainClass',
+ 'MainFile','Margin','MaxButton','MaxHeight','MaxLeft','MaxLength',
+ 'MaxTop','MaxWidth','MemoWindow','MinButton','MinHeight','MinWidth',
+ 'MouseIcon','MousePointer','Movable','MoverBars','MultiSelect','Name',
+ 'NapTime','NewIndex','NewItemId','NoDataOnLoad','NoDefine','NotifyContainer',
+ 'NullDisplay','NumberOfElements','OLEDragMode','OLEDragPicture','OLEDropEffects','OLEDropHasData',
+ 'OLEDropMode','OLERequestPendingTimeOut','OLEServerBusyRaiseError','OLEServerBusyTimeOut','OLETypeAllowed','OleClass',
+ 'OleClassId','OleControlContainer','OleIDispInValue','OleIDispOutValue','OleIDispatchIncoming','OleIDispatchOutgoing',
+ 'OnResize','OneToMany','OpenViews','OpenWindow','PageCount','PageHeight',
+ 'PageOrder','PageWidth','Pages','Panel','PanelLink','Parent',
+ 'ParentAlias','ParentClass','Partition','PasswordChar','Picture','ProcessID',
+ 'ProgID','ProjectHookClass','ProjectHookLibrary','Projects','ReadColors','ReadCycle',
+ 'ReadFiller','ReadLock','ReadMouse','ReadOnly','ReadSave','ReadSize',
+ 'ReadTimeout','RecordMark','RecordSource','RecordSourceType','Rect','RelationalExpr',
+ 'RelativeColumn','RelativeRow','ReleaseErase','ReleaseType','ReleaseWindows','Resizable',
+ 'RightToLeft','RowHeight','RowSource','RowSourceType','SCCProvider','SCCStatus',
+ 'SDIForm','ScaleMode','ScrollBars','SelLength','SelStart','SelText',
+ 'SelectOnEntry','Selected','SelectedBackColor','SelectedForeColor','SelectedID','SelectedItemBackColor',
+ 'SelectedItemForeColor','SelfEdit','ServerClass','ServerClassLibrary','ServerHelpFile','ServerName',
+ 'ServerProject','ShowTips','ShowWindow','Sizable','Size<height>','Size<maxlength>',
+ 'Size<width>','Skip','SkipForm','Sorted','SourceType','Sparse',
+ 'SpecialEffect','SpinnerHighValue','SpinnerLowValue','SplitBar','StartMode','StatusBarText',
+ 'Stretch','StrictDateEntry','Style','SystemRefCount','TabIndex','TabStop',
+ 'TabStretch','TabStyle','Tabhit','Tabs','Tag','TerminateRead',
+ 'ThreadID','TitleBar','ToolTipText','Top','TopIndex','TopItemId',
+ 'TypeLibCLSID','TypeLibDesc','TypeLibName','UnlockDataSource','Value','ValueDirty',
+ 'VersionComments','VersionCompany','VersionCopyright','VersionDescription','VersionNumber','VersionProduct',
+ 'VersionTrademarks','View','ViewPortHeight','ViewPortLeft','ViewPortTop','ViewPortWidth',
+ 'Visible','VscrollSmallChange','WasActive','WasOpen','WhatsThisButton','WhatsThisHelp',
+ 'WhatsThisHelpID','Width','WindowList','WindowNTIList','WindowState','WindowType',
+ 'WordWrap','ZOrderSet','ActiveDoc','Checkbox','Column','ComboBox',
+ 'CommandButton','CommandGroup','Container','Control','Cursor','Custom',
+ 'DataEnvironment','EditBox','Empty','FontClass','Form','Formset',
+ 'General','Grid','Header','HyperLink','Image','Label',
+ 'ListBox','Memo','OleBaseControl','OleBoundControl','OleClassIDispOut','OleControl',
+ 'OptionButton','OptionGroup','Page','PageFrame','ProjectHook','RectClass',
+ 'Relation','Session','Shape','Spinner','TextBox' ,'Toolbar'
+ ),
+ ),
+ 'SYMBOLS' => array("!", "@", "$", "%", "(", ")", "-", "+", "=", "/", "{", "}", "[", "]", ":", ";", ",", " ", ".", "*", "&"),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => true,
+ 1 => false,
+ 2 => false,
+ 3 => false,
+ 4 => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ 1 => 'color: blue;',
+ 2 => 'color: blue;',
+ 3 => 'color: blue;',
+ 4 => 'color: blue;'
+ ),
+ 'COMMENTS' => array(
+ 1 => 'color: green; font-style: italic;',
+ 2 => 'color: green font-style: italic;',
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: blue;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ 1 => 'color: #006600;'
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: blue;'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'SCRIPT' => array(
+ )
+ ),
+ 'OOLANG' => true,
+ 'OBJECT_SPLITTERS' => array(
+ 1 => '.'
+ ),
+ 'REGEXPS' => array(
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_NEVER,
+ 'SCRIPT_DELIMITERS' => array(
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/geshi/xml.php b/inc/geshi/xml.php
new file mode 100644
index 000000000..b6c116c76
--- /dev/null
+++ b/inc/geshi/xml.php
@@ -0,0 +1,145 @@
+<?php
+/*************************************************************************************
+ * xml.php
+ * -------
+ * Author: Nigel McNie (oracle.shinoda@gmail.com)
+ * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
+ * Release Version: 1.0.1
+ * CVS Revision Version: $Revision: 1.1 $
+ * Date Started: 2004/09/01
+ * Last Modified: $Date: 2004/11/29 08:46:25 $
+ *
+ * XML language file for GeSHi. Based on the idea/file by Christian Weiske
+ *
+ * CHANGES
+ * -------
+ * 2004/11/27 (1.0.1)
+ * - Added support for multiple object splitters
+ * 2004/10/27 (1.0.0)
+ * - First Release
+ *
+ * TODO (updated 2004/11/27)
+ * -------------------------
+ * * Check regexps work and correctly highlight XML stuff and nothing else
+ *
+ *************************************************************************************
+ *
+ * This file is part of GeSHi.
+ *
+ * GeSHi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GeSHi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GeSHi; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+ 'LANG_NAME' => 'HTML',
+ 'COMMENT_SINGLE' => array(),
+ 'COMMENT_MULTI' => array('<!--' => '-->'),
+ 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+ 'QUOTEMARKS' => array("'", '"'),
+ 'ESCAPE_CHAR' => '\\',
+ 'KEYWORDS' => array(
+ ),
+ 'SYMBOLS' => array(
+ ),
+ 'CASE_SENSITIVE' => array(
+ GESHI_COMMENTS => false,
+ ),
+ 'STYLES' => array(
+ 'KEYWORDS' => array(
+ ),
+ 'COMMENTS' => array(
+ 'MULTI' => 'color: #808080; font-style: italic;'
+ ),
+ 'ESCAPE_CHAR' => array(
+ 0 => 'color: #000099; font-weight: bold;'
+ ),
+ 'BRACKETS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'STRINGS' => array(
+ 0 => 'color: #ff0000;'
+ ),
+ 'NUMBERS' => array(
+ 0 => 'color: #cc66cc;'
+ ),
+ 'METHODS' => array(
+ ),
+ 'SYMBOLS' => array(
+ 0 => 'color: #66cc66;'
+ ),
+ 'SCRIPT' => array(
+ 0 => 'color: #00bbdd;',
+ 1 => 'color: #ddbb00;',
+ 2 => 'color: #339933;',
+ 3 => 'color: #009900;'
+ ),
+ 'REGEXPS' => array(
+ 0 => 'color: #000066;',
+ 1 => 'font-weight: bold; color: black;',
+ 2 => 'font-weight: bold; color: black;',
+ )
+ ),
+ 'URLS' => array(
+ ),
+ 'OOLANG' => false,
+ 'OBJECT_SPLITTERS' => array(
+ ),
+ 'REGEXPS' => array(
+ 0 => array(
+ GESHI_SEARCH => '(((xml:)?[a-z\-]+))(=)',
+ GESHI_REPLACE => '\\1',
+ GESHI_MODIFIERS => 'i',
+ GESHI_BEFORE => '',
+ GESHI_AFTER => '\\4'
+ ),
+ 1 => array(
+ GESHI_SEARCH => '(&lt;/?[a-z0-9]*(&gt;)?)',
+ GESHI_REPLACE => '\\1',
+ GESHI_MODIFIERS => 'i',
+ GESHI_BEFORE => '',
+ GESHI_AFTER => ''
+ ),
+ 2 => array(
+ GESHI_SEARCH => '((/)?&gt;)',
+ GESHI_REPLACE => '\\1',
+ GESHI_MODIFIERS => 'i',
+ GESHI_BEFORE => '',
+ GESHI_AFTER => ''
+ )
+ ),
+ 'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
+ 'SCRIPT_DELIMITERS' => array(
+ 0 => array(
+ '<!DOCTYPE' => '>'
+ ),
+ 1 => array(
+ '&' => ';'
+ ),
+ 2 => array(
+ '<![CDATA[' => ']]>'
+ ),
+ 3 => array(
+ '<' => '>'
+ )
+ ),
+ 'HIGHLIGHT_STRICT_BLOCK' => array(
+ 0 => false,
+ 1 => false,
+ 2 => false,
+ 3 => true
+ )
+);
+
+?> \ No newline at end of file
diff --git a/inc/html.php b/inc/html.php
new file mode 100644
index 000000000..a28bd2dca
--- /dev/null
+++ b/inc/html.php
@@ -0,0 +1,970 @@
+<?
+include_once("inc/format.php");
+
+/**
+ * Convenience function to quickly build a wikilink
+ */
+function html_wikilink($url,$name='',$search=''){
+ global $conf;
+ $link = array();
+ $link['url'] = $url;
+ $link['name'] = $name;
+ $link = format_link_wiki($link);
+
+ if($search){
+ ($conf['userewrite']) ? $link['url'].='?s=' : $link['url'].='&amp;s=';
+ $link['url'] .= urlencode($search);
+ }
+
+ return format_link_build($link);
+}
+
+/**
+ * The loginform
+ */
+function html_login(){
+ global $lang;
+ global $conf;
+ global $ID;
+
+ print parsedLocale('login');
+ ?>
+ <div align="center">
+ <form action="<?=script()?>" accept-charset="<?=$lang['encoding']?>" method="post">
+ <fieldset>
+ <legend><?=$lang['btn_login']?></legend>
+ <input type="hidden" name="id" value="<?=$ID?>" />
+ <input type="hidden" name="do" value="login" />
+ <label>
+ <span><?=$lang['user']?></span>
+ <input type="text" name="u" value="<?=formText($_REQUEST['u'])?>" class="edit" />
+ </label><br />
+ <label>
+ <span><?=$lang['pass']?></span>
+ <input type="password" name="p" class="edit" />
+ </label><br />
+ <input type="submit" value="<?=$lang['btn_login']?>" class="button" />
+ </fieldset>
+ </form>
+ <?
+ if($conf['openregister']){
+ print '<p>';
+ print $lang['reghere'];
+ print ': <a href="'.wl($ID,'do=register').'" class="wikilink1">'.$lang['register'].'</a>';
+ print '</p>';
+ }
+ ?>
+ </div>
+ <?
+ if(@file_exists('includes/login.txt')){
+ print io_cacheParse('includes/login.txt');
+ }
+}
+
+/**
+ * shows the edit/source/show button dependent on current mode
+ */
+function html_editbutton(){
+ global $ID;
+ global $REV;
+ global $ACT;
+ global $INFO;
+
+ if($ACT == 'show' || $ACT == 'search'){
+ if($INFO['writable']){
+ if($INFO['exists']){
+ $r = html_btn('edit',$ID,'e',array('do' => 'edit','rev' => $REV),'post');
+ }else{
+ $r = html_btn('create',$ID,'e',array('do' => 'edit','rev' => $REV),'post');
+ }
+ }else{
+ $r = html_btn('source',$ID,'v',array('do' => 'edit','rev' => $REV),'post');
+ }
+ }else{
+ $r = html_btn('show',$ID,'v',array('do' => 'show'));
+ }
+ return $r;
+}
+
+function html_secedit_button($section,$p){
+ global $ID;
+ global $lang;
+ $secedit = '';
+ if($p) $secedit .= "</p>\n";
+ $secedit .= '<div class="secedit">';
+ $secedit .= html_btn('secedit',$ID,'',
+ array('do' => 'edit',
+ 'lines' => "$section"),
+ 'post');
+ $secedit .= '</div>';
+ if($p) $secedit .= "\n<p>";
+ return $secedit;
+}
+
+function html_secedit($text,$show=true){
+ global $INFO;
+ if($INFO['writable'] && $show){
+ $text = preg_replace('#<!-- SECTION \[(\d+-\d+)\] -->#e',
+ "html_secedit_button('\\1',true)",
+ $text);
+ $text = preg_replace('#<!-- SECTION \[(\d+-)\] -->#e',
+ "html_secedit_button('\\1',false)",
+ $text);
+ }else{
+ $text = preg_replace('#<!-- SECTION \[(\d*-\d*)\] -->#e','',$text);
+ }
+ return $text;
+}
+
+/**
+ * displays the breadcrumbs trace
+ */
+function html_breadcrumbs(){
+ global $lang;
+ global $conf;
+
+ //check if enabled
+ if(!$conf['breadcrumbs']) return;
+
+ $crumbs = breadcrumbs(); //setup crumb trace
+ print '<div class="breadcrumbs">';
+ print $lang['breadcrumb'].':';
+ foreach ($crumbs as $crumb){
+ print ' &raquo; ';
+ print '<a href="'.wl($crumb).'" class="breadcrumbs" onclick="return svchk()" onkeypress="return svchk()" title="'.$crumb.'">'.noNS($crumb).'</a>';
+ }
+ print '</div>';
+}
+
+/**
+ * display the HTML head and metadata
+ */
+function html_head(){
+ global $ID;
+ global $ACT;
+ global $INFO;
+ global $conf;
+ global $lang;
+
+ print '<'.'?xml version="1.0"?'.">\n";
+ print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"';
+ print ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
+ print "\n";
+?>
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$conf['lang']?>" lang="<?=$conf['lang']?>" dir="ltr">
+ <head>
+ <title><?=$ID?> [<?=$conf['title']?>]</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=<?=$lang['encoding']?>" />
+ <meta name="generator" content="DokuWiki <?=DOKUWIKIVERSION?>" />
+ <link rel="stylesheet" media="screen" type="text/css" href="<?=getBaseURL()?>style.css" />
+ <link rel="stylesheet" media="print" type="text/css" href="<?=getBaseURL()?>print.css" />
+ <link rel="shortcut icon" href="<?=getBaseURL()?>images/favicon.ico" />
+ <link rel="start" href="<?=wl()?>" />
+ <link rel="contents" href="<?=wl($ID,'do=index')?>" title="<?=$lang['index']?>" />
+ <link rel="alternate" type="application/rss+xml" title="Recent Changes" href="<?=getBaseURL()?>feed.php" />
+ <link rel="alternate" type="application/rss+xml" title="Current Namespace" href="<?=getBaseURL()?>feed.php?mode=list&amp;ns=<?=$INFO['namespace']?>" />
+ <link rel="alternate" type="text/html" title="Plain HTML" href="<?=wl($ID,'do=export_html')?>" />
+ <link rel="alternate" type="text/plain" title="Wiki Markup" href="<?=wl($ID, 'do=export_raw')?>" />
+<?
+ if($ACT=='show' || $ACT=='export_html'){
+ if($INFO['exists']){
+ print ' <meta name="robots" content="index,follow" />'."\n";
+ print ' <meta name="date" content="'.date('Y-m-d\TH:i:sO',$INFO['lastmod']).'" />'."\n";
+ }else{
+ print ' <meta name="robots" content="noindex,follow" />'."\n";
+ }
+ }else{
+ print ' <meta name="robots" content="noindex,nofollow" />'."\n";
+ }
+?>
+
+ <script language="JavaScript" type="text/javascript">
+ var alertText = '<?=$lang['qb_alert']?>';
+ var notSavedYet = '<?=$lang['notsavedyet']?>';
+ var baseURL = '<?=getBaseURL()?>';
+ </script>
+ <script language="JavaScript" type="text/javascript" src="<?=getBaseURL()?>script.js"></script>
+
+ <!--[if gte IE 5]>
+ <style type="text/css">
+ /* that IE 5+ conditional comment makes this only visible in IE 5+ */
+ img { behavior: url("<?=getBaseURL()?>pngbehavior.htc"); } /* IE bugfix for transparent PNGs */
+ </style>
+ <![endif]-->
+
+ <?@include("includes/meta.html")?>
+ </head>
+<?
+}
+
+/**
+ * Displays a button (using it's own form)
+ */
+function html_btn($name,$id,$akey,$params,$method='get'){
+ global $conf;
+ global $lang;
+
+ $label = $lang['btn_'.$name];
+
+ $ret = '';
+
+ $id = idfilter($id);
+
+ //make nice URLs even for buttons
+ $link = getBaseURL().'/';
+ $link = preg_replace('#//$#','/',$link);
+ if(!$conf['userewrite']){
+ $script = $link.'doku.php';
+ $params['id'] = $id;
+ }else{
+ $script = $link.$id;
+ }
+
+ $ret .= '<form class="button" method="'.$method.'" action="'.$script.'" onsubmit="return svchk()">';
+
+ reset($params);
+ while (list($key, $val) = each($params)) {
+ $ret .= '<input type="hidden" name="'.$key.'" ';
+ $ret .= 'value="'.htmlspecialchars($val).'" />';
+ }
+
+ $ret .= '<input type="submit" value="'.htmlspecialchars($label).'" class="button" ';
+ if($akey){
+ $ret .= 'title="ALT+'.strtoupper($akey).'" ';
+ $ret .= 'accesskey="'.$akey.'" ';
+ }
+ $ret .= '/>';
+ $ret .= '</form>';
+
+ return $ret;
+}
+
+/**
+ * Check for the given permission or prints an error
+ */
+function html_acl($perm){
+ global $INFO;
+ if($INFO['perm'] >= $perm) return true;
+
+ print parsedLocale('denied');
+ return false;
+}
+
+/**
+ * Displays the page header and calls html_head()
+ */
+function html_header(){
+ global $ID;
+ global $REV;
+ global $lang;
+ global $conf;
+ html_head();
+?>
+<body>
+ <div class="all">
+ <?
+ html_msgarea();
+ @include("includes/topheader.html")
+ ?>
+ <div class="header">
+ <div class="pagename">
+ [[<a href="<?=wl($ID,'do=backlink')?>" onclick="return svchk()" onkeypress="return svchk()"><?=$ID?></a>]]
+ </div>
+ <div class="logo">
+ <a href="<?=wl()?>" name="top" accesskey="h" title="[ALT+H]" onclick="return svchk()" onkeypress="return svchk()"><?=$conf['title']?></a>
+ </div>
+ </div>
+ <?@include("includes/header.html")?>
+
+ <div class="bar" id="bar_top">
+ <div class="bar-left" id="bar_topleft">
+ <?=html_editbutton()?>
+ <?=html_btn(revs,$ID,'r',array('do' => 'revisions'))?>
+ </div>
+
+ <div class="bar-right" id="bar_topright">
+ <?=html_btn(recent,'','r',array('do' => 'recent'))?>
+ <form action="<?=wl()?>" accept-charset="<?=$lang['encoding']?>">
+ <input type="hidden" name="do" value="search" />
+ <input type="text" name="id" class="edit" />
+ <input type="submit" value="<?=$lang['btn_search']?>" class="button" />
+ </form>&nbsp;
+ </div>
+ </div>
+
+ <?
+ flush();
+ html_breadcrumbs();
+ @include("includes/pageheader.html");
+ ?>
+ <div class="page">
+ <!-- wikipage start -->
+<?
+}
+
+/**
+ * Displays some Metadata like who's logged in and the last modified
+ * date - do not confuse this with the HTML meta header.
+ */
+function html_metainfo(){
+ global $conf;
+ global $lang;
+ global $INFO;
+ global $REV;
+
+ $fn = $INFO['filepath'];
+ if(!$conf['fullpath']){
+ if($REV){
+ $fn = str_replace(realpath($conf['olddir']).DIRECTORY_SEPARATOR,'',$fn);
+ }else{
+ $fn = str_replace(realpath($conf['datadir']).DIRECTORY_SEPARATOR,'',$fn);
+ }
+ }
+ $date = date($conf['dformat'],$INFO['lastmod']);
+
+ print '<div class="meta">';
+ if($_SERVER['REMOTE_USER']){
+ print '<div class="user">';
+ print $lang['loggedinas'].': '.$_SERVER['REMOTE_USER'];
+ print '</div>';
+ }
+ print ' &nbsp; ';
+ if($INFO['exists']){
+ print $fn;
+ print ' &middot; ';
+ print $lang['lastmod'];
+ print ': ';
+ print $date;
+ if($INFO['locked']){
+ print ' &middot; ';
+ print $lang['lockedby'];
+ print ': ';
+ print $INFO['locked'];
+ }
+ }
+ print '</div>';
+}
+
+function html_footer(){
+ global $ID;
+ global $REV;
+ global $INFO;
+ global $lang;
+ global $conf;
+?>
+ <!-- wikipage stop -->
+ </div>
+ <div class="clearer">&nbsp;</div>
+ <?
+ flush();
+ @include("includes/pagefooter.html");
+ html_metainfo();
+ ?>
+ <div class="bar" id="bar_bottom">
+ <div class="bar-left" id="bar_bottomleft">
+ <?=html_editbutton()?>
+ <?=html_btn(revs,$ID,'r',array('do' => 'revisions'))?>
+ </div>
+
+ <div class="bar-right" id="bar_bottomright">
+ <?
+ if($conf['useacl']){
+ if($_SERVER['REMOTE_USER']){
+ print html_btn('logout',$ID,'',array('do' => 'logout',));
+ }else{
+ print html_btn('login',$ID,'',array('do' => 'login'));
+ }
+ }
+ ?>
+ <?=html_btn(index,$ID,'x',array('do' => 'index'))?>
+ <a href="#top"><input type="button" class="button" value="<?=$lang['btn_top']?>" /></a>&nbsp;
+ </div>
+ </div>
+ <?@include("includes/footer.html")?>
+ </div>
+ </body>
+ </html>
+<?
+}
+
+function html_toc($toc){
+ global $lang;
+ $ret = '';
+ $ret .= '<div class="toc">';
+ $ret .= '<div class="tocheader">';
+ $ret .= $lang['toc'];
+ $ret .= ' <script type="text/javascript">';
+ $ret .= 'showTocToggle("+","-")';
+ $ret .= '</script>';
+ $ret .= '</div>';
+ $ret .= '<div id="tocinside">';
+ $ret .= html_buildlist($toc,'toc','html_list_toc');
+ $ret .= '</div>';
+ $ret .= '</div>';
+ return $ret;
+}
+
+/**
+ * User function for html_buildlist()
+ */
+function html_list_toc($item){
+ $ret = '';
+ $ret .= '<a href="#'.$item['id'].'" class="toc">';
+ $ret .= $item['name'];
+ $ret .= '</a>';
+ return $ret;
+}
+
+function html_show($text=''){
+ global $ID;
+ global $REV;
+ global $HIGH;
+ //disable section editing for old revisions or in preview
+ if($text || $REV){
+ global $parser;
+ $parser['secedit'] = false;
+ }
+
+ if ($text){
+ //PreviewHeader
+ print parsedLocale('preview');
+ print '<div class="preview">';
+ print html_secedit(parse($text),false);
+ print '</div>';
+ }else{
+ if ($REV) print parsedLocale('showrev');
+ $html = parsedWiki($ID,$REV,true);
+ $html = html_secedit($html);
+ print html_hilight($html,$HIGH);
+ }
+}
+
+/**
+ * Highlights searchqueries in HTML code
+ */
+function html_hilight($html,$query){
+ $queries = preg_split ("/\s/",$query,-1,PREG_SPLIT_NO_EMPTY);
+ foreach ($queries as $q){
+ $q = preg_quote($q,'/');
+ $html = preg_replace("/((<[^>]*)|$q)/ie", '"\2"=="\1"? "\1":"<span class=\"search_hit\">\1</span>"', $html);
+ }
+ return $html;
+}
+
+/**
+ * This function runs a search and displays the result
+ */
+function html_search(){
+ require_once("inc/search.php");
+ global $conf;
+ global $QUERY;
+ global $ID;
+ global $lang;
+
+ print parsedLocale('searchpage');
+ flush();
+
+ //do quick pagesearch
+ $data = array();
+ search($data,$conf['datadir'],'search_pagename',array(query => $QUERY));
+ if(count($data)){
+ sort($data);
+ print '<div class="search_quickresult">';
+ print '<b>'.$lang[quickhits].':</b><br />';
+ foreach($data as $row){
+ print '<div class="search_quickhits">';
+ print html_wikilink(':'.$row['id'],$row['id']);
+ print '</div> ';
+ }
+ //clear float (see http://www.complexspiral.com/publications/containing-floats/)
+ print '<div class="clearer">&nbsp;</div>';
+ print '</div>';
+ }
+ flush();
+
+ //do fulltext search
+ $data = array();
+ search($data,$conf['datadir'],'search_fulltext',array(query => $QUERY));
+ if(count($data)){
+ usort($data,'sort_search_fulltext');
+ foreach($data as $row){
+ print '<div class="search_result">';
+ print html_wikilink(':'.$row['id'],$row['id'],$QUERY);
+ print ': <span class="search_cnt">'.$row['count'].' '.$lang['hits'].'</span><br />';
+ print '<div class="search_snippet">'.$row['snippet'].'</div>';
+ print '</div>';
+ }
+ }else{
+ print '<div align="center">'.$lang['nothingfound'].'</div>';
+ }
+}
+
+function html_locked($ip){
+ global $ID;
+ global $conf;
+ global $lang;
+
+ $locktime = filemtime(wikiFN($ID).'.lock');
+ $expire = @date($conf['dformat'], $locktime + $conf['locktime'] );
+ $min = round(($conf['locktime'] - (time() - $locktime) )/60);
+
+ print parsedLocale('locked');
+ print '<ul>';
+ print '<li><b>'.$lang['lockedby'].':</b> '.$ip.'</li>';
+ print '<li><b>'.$lang['lockexpire'].':</b> '.$expire.' ('.$min.' min)</li>';
+ print '</ul>';
+}
+
+function html_revisions(){
+ global $ID;
+ global $INFO;
+ global $conf;
+ global $lang;
+ $revisions = getRevisions($ID);
+ $date = @date($conf['dformat'],$INFO['lastmod']);
+
+ print parsedLocale('revisions');
+ print '<ul>';
+ if($INFO['exists']){
+ print '<li>'.$date.' <a class="wikilink1" href="'.wl($ID).'">'.$ID.'</a> ('.$lang['current'].')</li>';
+ }
+
+ foreach($revisions as $rev){
+ $date = date($conf['dformat'],$rev);
+ print '<li>';
+ print $date.' <a class="wikilink1" href="'.wl($ID,"rev=$rev").'">'.$ID.'</a> ';
+ print '<a href="'.wl($ID,"rev=$rev,do=diff").'">['.$lang['diff'].']</a>';
+ print '</li>';
+ }
+ print '</ul>';
+}
+
+function html_recent(){
+ global $conf;
+ $recents = getRecents(0,true);
+
+ print parsedLocale('recent');
+ print '<ul>';
+ foreach(array_keys($recents) as $id){
+ $date = date($conf['dformat'],$recents[$id]['date']);
+ print '<li>';
+ print $date.' '.html_wikilink($id,$id);
+ print ' '.htmlspecialchars($recents[$id]['sum']);
+ print ' <span class="user">(';
+ print $recents[$id]['ip'];
+ if($recents[$id]['user']) print ' '.$recents[$id]['user'];
+ print ')</span>';
+ print '</li>';
+ }
+ print '</ul>';
+}
+
+function html_index($ns){
+ require_once("inc/search.php");
+ global $conf;
+ global $ID;
+ $dir = $conf['datadir'];
+ $ns = cleanID($ns);
+ if(empty($ns)){
+ $ns = dirname(str_replace(':','/',$ID));
+ if($ns == '.') $ns ='';
+ }
+ $ns = str_replace(':','/',$ns);
+
+ print parsedLocale('index');
+
+ $data = array();
+ search($data,$conf['datadir'],'search_index',array('ns' => $ns));
+ print html_buildlist($data,'idx','html_list_index');
+}
+
+/**
+ * User function for html_buildlist()
+ */
+function html_list_index($item){
+ $ret = '';
+ $base = ':'.$item['id'];
+ $base = substr($base,strrpos($base,':')+1);
+ if($item['type']=='d'){
+ $ret .= '<a href="'.wl($ID,'idx='.$item['id']).'" class="idx_dir">';
+ $ret .= $base;
+ $ret .= '</a>';
+ }else{
+ $ret .= html_wikilink(':'.$item['id']);
+ }
+ return $ret;
+}
+
+/**
+ * Build an unordered list from the given $data array
+ * Each item in the array has to have a 'level' property
+ * the item itself gets printed by the given $func user
+ * function
+ */
+function html_buildlist($data,$class,$func){
+ $level = 0;
+ $opens = 0;
+ $ret = '';
+
+ foreach ($data as $item){
+
+ if( $item['level'] > $level ){
+ //open new list
+ $ret .= "\n<ul class=\"$class\">\n";
+ }elseif( $item['level'] < $level ){
+ //close last item
+ $ret .= "</li>\n";
+ for ($i=0; $i<($level - $item['level']); $i++){
+ //close higher lists
+ $ret .= "</ul>\n</li>\n";
+ }
+ }else{
+ //close last item
+ $ret .= "</li>\n";
+ }
+
+ //remember current level
+ $level = $item['level'];
+
+ //print item
+ $ret .= '<li class="level'.$item['level'].'">';
+ $ret .= '<span class="li">';
+ $ret .= $func($item); //user function
+ $ret .= '</span>';
+ }
+
+ //close remaining items and lists
+ for ($i=0; $i < $level; $i++){
+ $ret .= "</li></ul>\n";
+ }
+
+ return $ret;
+}
+
+function html_backlinks(){
+ require_once("inc/search.php");
+ global $ID;
+ global $conf;
+
+ if(preg_match('#^(.*):(.*)$#',$ID,$matches)){
+ $opts['ns'] = $matches[1];
+ $opts['name'] = $matches[2];
+ }else{
+ $opts['ns'] = '';
+ $opts['name'] = $ID;
+ }
+
+ print parsedLocale('backlinks');
+
+ $data = array();
+ search($data,$conf['datadir'],'search_backlinks',$opts);
+ sort($data);
+
+ print '<ul class="idx">';
+ foreach($data as $row){
+ print '<li>';
+ print html_wikilink(':'.$row['id'],$row['id']);
+ print '</li>';
+ }
+ print '</ul>';
+}
+
+function html_diff($text='',$intro=true){
+ require_once("inc/DifferenceEngine.php");
+ global $ID;
+ global $REV;
+ global $lang;
+ global $conf;
+ if($text){
+ $df = new Diff(split("\n",htmlspecialchars(rawWiki($ID,''))),
+ split("\n",htmlspecialchars(cleanText($text))));
+ $left = '<a class="wikilink1" href="'.wl($ID).'">'.
+ $ID.' '.date($conf['dformat'],@filemtime(wikiFN($ID))).'</a>'.
+ $lang['current'];
+ $right = $lang['yours'];
+ }else{
+ $df = new Diff(split("\n",htmlspecialchars(rawWiki($ID,$REV))),
+ split("\n",htmlspecialchars(rawWiki($ID,''))));
+ $left = '<a class="wikilink1" href="'.wl($ID,"rev=$REV").'">'.
+ $ID.' '.date($conf['dformat'],$REV).'</a>';
+ $right = '<a class="wikilink1" href="'.wl($ID).'">'.
+ $ID.' '.date($conf['dformat'],@filemtime(wikiFN($ID))).'</a> '.
+ $lang['current'];
+ }
+ $tdf = new TableDiffFormatter();
+ if($intro) print parsedLocale('diff');
+ ?>
+ <table class="diff" width="100%">
+ <tr>
+ <td colspan="2" width="50%" class="diff-header">
+ <?=$left?>
+ </td>
+ <td colspan="2" width="50%" class="diff-header">
+ <?=$right?>
+ </td>
+ </tr>
+ <?=$tdf->format($df)?>
+ </table>
+ <?
+}
+
+function html_conflict($text,$summary){
+ global $ID;
+ global $lang;
+
+ print parsedLocale('conflict');
+ ?>
+ <form name="editform" method="post" action="<?=script()?>" accept-charset="<?=$lang['encoding']?>">
+ <input type="hidden" name="id" value="<?=$ID?>" />
+ <input type="hidden" name="wikitext" value="<?=formText($text)?>" />
+ <input type="hidden" name="summary" value="<?=formText($summary)?>" />
+
+ <div align="center">
+ <input class="button" type="submit" name="do" value="<?=$lang['btn_save']?>" accesskey="s" title="[ALT+S]" />
+ <input class="button" type="submit" name="do" value="<?=$lang['btn_cancel']?>" />
+ </div>
+ </form>
+ <br /><br /><br /><br />
+ <?
+}
+
+/**
+ * Prints the glovbal message array
+ */
+function html_msgarea(){
+ global $MSG;
+
+ if(!isset($MSG)) return;
+
+ foreach($MSG as $msg){
+ print '<div class="'.$msg['lvl'].'">';
+ print $msg['msg'];
+ print '</div>';
+ }
+}
+
+/**
+ * Prints the registration form
+ */
+function html_register(){
+ global $lang;
+ global $ID;
+
+ print parsedLocale('register');
+?>
+ <div align="center">
+ <form name="register" method="post" action="<?=wl($ID)?>" accept-charset="<?=$lang['encoding']?>">
+ <input type="hidden" name="do" value="register" />
+ <input type="hidden" name="save" value="1" />
+ <fieldset>
+ <legend><?=$lang['register']?></legend>
+ <label>
+ <?=$lang['user']?>
+ <input type="text" name="login" class="edit" size="50" value="<?=formText($_POST['login'])?>" />
+ </label><br />
+ <label>
+ <?=$lang['fullname']?>
+ <input type="text" name="fullname" class="edit" size="50" value="<?=formText($_POST['fullname'])?>" />
+ </label><br />
+ <label>
+ <?=$lang['email']?>
+ <input type="text" name="email" class="edit" size="50" value="<?=formText($_POST['email'])?>" />
+ </label><br />
+ <input type="submit" class="button" value="<?=$lang['register']?>" />
+ </fieldset>
+ </form>
+ </div>
+<?
+}
+
+/**
+ * This displays the edit form (lots of logic included)
+ */
+function html_edit($text=null,$include='edit'){ //FIXME: include needed?
+ global $ID;
+ global $REV;
+ global $DATE;
+ global $RANGE;
+ global $PRE;
+ global $SUF;
+ global $INFO;
+ global $SUM;
+ global $lang;
+ global $conf;
+
+ //check for create permissions first
+ if(!$INFO['exists'] && !html_acl(AUTH_CREATE)) return;
+
+ //set summary default
+ if(!$SUM){
+ if($REV){
+ $SUM = $lang['restored'];
+ }elseif(!$INFO['exists']){
+ $SUM = $lang['created'];
+ }
+ }
+
+ //no text? Load it!
+ if(!isset($text)){
+ $pr = false; //no preview mode
+ if($RANGE){
+ list($PRE,$text,$SUF) = rawWikiSlices($RANGE,$ID,$REV);
+ }else{
+ $text = rawWiki($ID,$REV);
+ }
+ }else{
+ $pr = true; //preview mode
+ }
+
+ $wr = $INFO['writable'];
+ if($wr){
+ if ($REV) print parsedLocale('editrev');
+ print parsedLocale($include);
+ }else{
+ print parsedLocale('read');
+ $ro='readonly="readonly"';
+ }
+ if(!$DATE) $DATE = $INFO['lastmod'];
+?>
+ <form name="editform" method="post" action="<?=script()?>" accept-charset="<?=$lang['encoding']?>" onsubmit="return svchk()">
+ <input type="hidden" name="id" value="<?=$ID?>" />
+ <input type="hidden" name="rev" value="<?=$REV?>" />
+ <input type="hidden" name="date" value="<?=$DATE?>" />
+ <input type="hidden" name="prefix" value="<?=formText($PRE)?>" />
+ <input type="hidden" name="suffix" value="<?=formText($SUF)?>" />
+ <table style="width:99%">
+ <tr>
+ <td class="toolbar" colspan="3">
+ <?if($wr){?>
+ <script language="JavaScript" type="text/javascript">
+ <?/* sets changed to true when previewed */?>
+ textChanged = <? ($pr) ? print 'true' : print 'false' ?>;
+
+ formatButton('images/bold.png','<?=$lang['qb_bold']?>','**','**','<?=$lang['qb_bold']?>','b');
+ formatButton('images/italic.png','<?=$lang['qb_italic']?>',"\/\/","\/\/",'<?=$lang['qb_italic']?>','i');
+ formatButton('images/underline.png','<?=$lang['qb_underl']?>','__','__','<?=$lang['qb_underl']?>','u');
+ formatButton('images/code.png','<?=$lang['qb_code']?>','\'\'','\'\'','<?=$lang['qb_code']?>','c');
+
+ formatButton('images/fonth1.png','<?=$lang['qb_h1']?>','====== ',' ======\n','<?=$lang['qb_h1']?>','1');
+ formatButton('images/fonth2.png','<?=$lang['qb_h2']?>','===== ',' =====\n','<?=$lang['qb_h2']?>','2');
+ formatButton('images/fonth3.png','<?=$lang['qb_h3']?>','==== ',' ====\n','<?=$lang['qb_h3']?>','3');
+ formatButton('images/fonth4.png','<?=$lang['qb_h4']?>','=== ',' ===\n','<?=$lang['qb_h4']?>','4');
+ formatButton('images/fonth5.png','<?=$lang['qb_h5']?>','== ',' ==\n','<?=$lang['qb_h5']?>','5');
+
+ formatButton('images/link.png','<?=$lang['qb_link']?>','[[',']]','<?=$lang['qb_link']?>','l');
+ formatButton('images/extlink.png','<?=$lang['qb_extlink']?>','[[',']]','http://www.example.com|<?=$lang['qb_extlink']?>');
+
+ formatButton('images/list.png','<?=$lang['qb_ol']?>',' - ','\n','<?=$lang['qb_ol']?>');
+ formatButton('images/list_ul.png','<?=$lang['qb_ul']?>',' * ','\n','<?=$lang['qb_ul']?>');
+
+ insertButton('images/rule.png','<?=$lang['qb_hr']?>','----\n');
+ mediaButton('images/image.png','<?=$lang['qb_media']?>','m','<?=$INFO['namespace']?>');
+
+ <?
+ if($conf['useacl'] && $_SERVER['REMOTE_USER']){
+ echo "insertButton('images/sig.png','".$lang['qb_sig']."','".html_signature()."','y');";
+ }
+ ?>
+ </script>
+ <?}?>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <textarea name="wikitext" id="wikitext" <?=$ro?> cols="80" rows="10" class="edit" onchange="textChanged = true;" tabindex="1"><?="\n".formText($text)?></textarea>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <?if($wr){?>
+ <input class="button" type="submit" name="do" value="<?=$lang['btn_save']?>" accesskey="s" title="[ALT+S]" onclick="textChanged=false" onkeypress="textChanged=false" tabindex="3" />
+ <input class="button" type="submit" name="do" value="<?=$lang['btn_preview']?>" accesskey="p" title="[ALT+P]" onclick="textChanged=false" onkeypress="textChanged=false" tabindex="4" />
+ <input class="button" type="submit" name="do" value="<?=$lang['btn_cancel']?>" tabindex="5" />
+ <?}?>
+ </td>
+ <td>
+ <?if($wr){?>
+ <?=$lang['summary']?>:
+ <input type="text" class="edit" name="summary" size="50" value="<?=formText($SUM)?>" tabindex="2" />
+ <?}?>
+ </td>
+ <td align="right">
+ <script type="text/javascript">
+ showSizeCtl();
+ <?if($wr){?>
+ init_locktimer(<?=$conf['locktime']-60?>,'<?=$lang['willexpire']?>');
+ document.editform.wikitext.focus();
+ <?}?>
+ </script>
+ </td>
+ </tr>
+ </table>
+ </form>
+<?
+}
+
+/**
+ * prepares the signature string as configured in the config
+ */
+function html_signature(){
+ global $conf;
+ global $INFO;
+
+ $sig = $conf['signature'];
+ $sig = strftime($sig);
+ $sig = str_replace('@USER@',$_SERVER['REMOTE_USER'],$sig);
+ $sig = str_replace('@NAME@',$INFO['userinfo']['name'],$sig);
+ $sig = str_replace('@MAIL@',$INFO['userinfo']['mail'],$sig);
+ $sig = str_replace('@DATE@',date($conf['dformat']),$sig);
+ return $sig;
+}
+
+/**
+ * prints some debug info
+ */
+function html_debug(){
+ global $conf;
+
+ print '<html><body>';
+
+ print '<p>When reporting bugs please send all the following ';
+ print 'output as a mail to andi@splitbrain.org ';
+ print 'The best way to do this is to save this page in your browser</p>';
+
+ print '<b>$_SERVER:</b><pre>';
+ print_r($_SERVER);
+ print '</pre>';
+
+ print '<b>$conf:</b><pre>';
+ print_r($conf);
+ print '</pre>';
+
+ print '<b>abs baseURL:</b><pre>';
+ print getBaseURL(true);
+ print '</pre>';
+
+ print '<b>rel baseURL:</b><pre>';
+ print dirname($_SERVER['PHP_SELF']).'/';
+ print '</pre>';
+
+ print '<b>PHP Version:</b><pre>';
+ print phpversion();
+ print '</pre>';
+
+ print '<b>locale:</b><pre>';
+ print setlocale(LC_ALL,0);
+ print '</pre>';
+
+ print '<b>Environment:</b><pre>';
+ print_r($_ENV);
+ print '</pre>';
+
+ print '<b>PHP settings:</b><pre>';
+ $inis = ini_get_all();
+ print_r($inis);
+ print '</pre>';
+
+ print '</body></html>';
+}
+
+?>
diff --git a/inc/io.php b/inc/io.php
new file mode 100644
index 000000000..c84604a43
--- /dev/null
+++ b/inc/io.php
@@ -0,0 +1,139 @@
+<?
+require_once("inc/common.php");
+require_once("inc/parser.php");
+
+
+
+
+/**
+ * Returns the parsed text from the given sourcefile. Uses cache
+ * if exists. Creates it if not.
+ */
+function io_cacheParse($file){
+ global $conf;
+ global $CACHEGROUP;
+ global $parser; //we read parser options
+ $parsed = '';
+ $cache = $conf['datadir'].'/.cache/';
+ $cache .= md5($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].$CACHEGROUP);
+ $purge = $conf['datadir'].'/.cache/purgefile';
+
+ // check if cache can be used
+ $cachetime = @filemtime($cache);
+
+ if( @file_exists($cache) // does the cachefile exist
+ && @file_exists($file) // and does the source exist
+ && !isset($_REQUEST['purge']) // no purge param was set
+ && filesize($cache) // and contains the cachefile any data
+ && ((time() - $cachetime) < $conf['cachetime']) // and is cachefile young enough
+ && ($cachetime > filemtime($file)) // and newer than the source
+ && ($cachetime > @filemtime($purge)) // and newer than the purgefile
+ && ($cachetime > filemtime('conf/dokuwiki.php')) // and newer than the config file
+ && ($cachetime > @filemtime('conf/local.php')) // and newer than the local config file
+ && ($cachetime > filemtime('inc/parser.php')) // and newer than the parser
+ && ($cachetime > filemtime('inc/format.php'))) // and newer than the formating functions
+ {
+ $parsed = io_readFile($cache); //give back cache
+ $parsed .= "\n<!-- cachefile $cache used -->\n";
+ }elseif(@file_exists($file)){
+ $parsed = parse(io_readFile($file)); //sets global parseroptions
+ if($parser['cache']){
+ io_saveFile($cache,$parsed); //save cachefile
+ $parsed .= "\n<!-- no cachefile used, but created -->\n";
+ }else{
+ @unlink($cache); //try to delete cachefile
+ $parsed .= "\n<!-- no cachefile used, caching forbidden -->\n";
+ }
+ }
+
+ return $parsed;
+}
+
+/**
+ * Returns content of $file as cleaned string. Uses gzip if extension
+ * is .gz
+ */
+function io_readFile($file){
+ $ret = '';
+ if(@file_exists($file)){
+ if(substr($file,-3) == '.gz'){
+ $ret = join('',gzfile($file));
+ }else{
+ $ret = join('',file($file));
+ }
+ }
+ return cleanText($ret);
+}
+
+/**
+ * Saves $content to $file. Uses gzip if extension
+ * is .gz
+ *
+ * returns true on success
+ */
+function io_saveFile($file,$content){
+ io_makeFileDir($file);
+ if(substr($file,-3) == '.gz'){
+ $fh = @gzopen($file,'wb9');
+ if(!$fh){
+ msg("Writing $file failed",-1);
+ return false;
+ }
+ gzwrite($fh, $content);
+ gzclose($fh);
+ }else{
+ $fh = @fopen($file,'wb');
+ if(!$fh){
+ msg("Writing $file failed",-1);
+ return false;
+ }
+ fwrite($fh, $content);
+ fclose($fh);
+ }
+ return true;
+}
+
+/**
+ * Create the directory needed for the given file
+ */
+function io_makeFileDir($file){
+ global $conf;
+
+ $dir = dirname($file);
+ umask($conf['dmask']);
+ if(!is_dir($dir)){
+ io_mkdir_p($dir) || msg("Creating directory $dir failed",-1);
+ }
+ umask($conf['umask']);
+}
+
+/**
+ * Creates a directory hierachy.
+ *
+ * @see http://www.php.net/manual/en/function.mkdir.php
+ * @author <saint@corenova.com>
+ */
+function io_mkdir_p($target){
+ if (is_dir($target)||empty($target)) return 1; // best case check first
+ if (@file_exists($target) && !is_dir($target)) return 0;
+ if (io_mkdir_p(substr($target,0,strrpos($target,'/'))))
+ return @mkdir($target,0777); // crawl back up & create dir tree
+ return 0;
+}
+
+/**
+ * Runs an external command and returns it's output as string
+ * inspired by a patch by Harry Brueckner <harry_b@eml.cc>
+ */
+function io_runcmd($cmd){
+ $fh = popen($cmd, "r");
+ if(!$fh) return false;
+ $ret = '';
+ while (!feof($fh)) {
+ $ret .= fread($fh, 8192);
+ }
+ pclose($fh);
+ return $ret;
+}
+
+?>
diff --git a/inc/magpie/extlib/Snoopy.class.inc b/inc/magpie/extlib/Snoopy.class.inc
new file mode 100644
index 000000000..532ecba10
--- /dev/null
+++ b/inc/magpie/extlib/Snoopy.class.inc
@@ -0,0 +1,899 @@
+<?php
+
+/*************************************************
+
+Snoopy - the PHP net client
+Author: Monte Ohrt <monte@ispi.net>
+Copyright (c): 1999-2000 ispi, all rights reserved
+Version: 1.0
+
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+You may contact the author of Snoopy by e-mail at:
+monte@ispi.net
+
+Or, write to:
+Monte Ohrt
+CTO, ispi
+237 S. 70th suite 220
+Lincoln, NE 68510
+
+The latest version of Snoopy can be obtained from:
+http://snoopy.sourceforge.com
+
+*************************************************/
+
+class Snoopy
+{
+ /**** Public variables ****/
+
+ /* user definable vars */
+
+ var $host = "www.php.net"; // host name we are connecting to
+ var $port = 80; // port we are connecting to
+ var $proxy_host = ""; // proxy host to use
+ var $proxy_port = ""; // proxy port to use
+ var $agent = "Snoopy v1.0"; // agent we masquerade as
+ var $referer = ""; // referer info to pass
+ var $cookies = array(); // array of cookies to pass
+ // $cookies["username"]="joe";
+ var $rawheaders = array(); // array of raw headers to send
+ // $rawheaders["Content-type"]="text/html";
+
+ var $maxredirs = 5; // http redirection depth maximum. 0 = disallow
+ var $lastredirectaddr = ""; // contains address of last redirected address
+ var $offsiteok = true; // allows redirection off-site
+ var $maxframes = 0; // frame content depth maximum. 0 = disallow
+ var $expandlinks = true; // expand links to fully qualified URLs.
+ // this only applies to fetchlinks()
+ // or submitlinks()
+ var $passcookies = true; // pass set cookies back through redirects
+ // NOTE: this currently does not respect
+ // dates, domains or paths.
+
+ var $user = ""; // user for http authentication
+ var $pass = ""; // password for http authentication
+
+ // http accept types
+ var $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
+
+ var $results = ""; // where the content is put
+
+ var $error = ""; // error messages sent here
+ var $response_code = ""; // response code returned from server
+ var $headers = array(); // headers returned from server sent here
+ var $maxlength = 500000; // max return data length (body)
+ var $read_timeout = 0; // timeout on read operations, in seconds
+ // supported only since PHP 4 Beta 4
+ // set to 0 to disallow timeouts
+ var $timed_out = false; // if a read operation timed out
+ var $status = 0; // http request status
+
+ var $curl_path = "/usr/bin/curl";
+ // Snoopy will use cURL for fetching
+ // SSL content if a full system path to
+ // the cURL binary is supplied here.
+ // set to false if you do not have
+ // cURL installed. See http://curl.haxx.se
+ // for details on installing cURL.
+ // Snoopy does *not* use the cURL
+ // library functions built into php,
+ // as these functions are not stable
+ // as of this Snoopy release.
+
+ // send Accept-encoding: gzip?
+ var $use_gzip = true;
+
+ /**** Private variables ****/
+
+ var $_maxlinelen = 4096; // max line length (headers)
+
+ var $_httpmethod = "GET"; // default http request method
+ var $_httpversion = "HTTP/1.0"; // default http request version
+ var $_submit_method = "POST"; // default submit method
+ var $_submit_type = "application/x-www-form-urlencoded"; // default submit type
+ var $_mime_boundary = ""; // MIME boundary for multipart/form-data submit type
+ var $_redirectaddr = false; // will be set if page fetched is a redirect
+ var $_redirectdepth = 0; // increments on an http redirect
+ var $_frameurls = array(); // frame src urls
+ var $_framedepth = 0; // increments on frame depth
+
+ var $_isproxy = false; // set if using a proxy server
+ var $_fp_timeout = 30; // timeout for socket connection
+
+/*======================================================================*\
+ Function: fetch
+ Purpose: fetch the contents of a web page
+ (and possibly other protocols in the
+ future like ftp, nntp, gopher, etc.)
+ Input: $URI the location of the page to fetch
+ Output: $this->results the output text from the fetch
+\*======================================================================*/
+
+ function fetch($URI)
+ {
+
+ //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
+ $URI_PARTS = parse_url($URI);
+ if (!empty($URI_PARTS["user"]))
+ $this->user = $URI_PARTS["user"];
+ if (!empty($URI_PARTS["pass"]))
+ $this->pass = $URI_PARTS["pass"];
+
+ switch($URI_PARTS["scheme"])
+ {
+ case "http":
+ $this->host = $URI_PARTS["host"];
+ if(!empty($URI_PARTS["port"]))
+ $this->port = $URI_PARTS["port"];
+ if($this->_connect($fp))
+ {
+ if($this->_isproxy)
+ {
+ // using proxy, send entire URI
+ $this->_httprequest($URI,$fp,$URI,$this->_httpmethod);
+ }
+ else
+ {
+ $path = $URI_PARTS["path"].(isset($URI_PARTS["query"]) ? "?".$URI_PARTS["query"] : "");
+ // no proxy, send only the path
+ $this->_httprequest($path, $fp, $URI, $this->_httpmethod);
+ }
+
+ $this->_disconnect($fp);
+
+ if($this->_redirectaddr)
+ {
+ /* url was redirected, check if we've hit the max depth */
+ if($this->maxredirs > $this->_redirectdepth)
+ {
+ // only follow redirect if it's on this site, or offsiteok is true
+ if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+ {
+ /* follow the redirect */
+ $this->_redirectdepth++;
+ $this->lastredirectaddr=$this->_redirectaddr;
+ $this->fetch($this->_redirectaddr);
+ }
+ }
+ }
+
+ if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+ {
+ $frameurls = $this->_frameurls;
+ $this->_frameurls = array();
+
+ while(list(,$frameurl) = each($frameurls))
+ {
+ if($this->_framedepth < $this->maxframes)
+ {
+ $this->fetch($frameurl);
+ $this->_framedepth++;
+ }
+ else
+ break;
+ }
+ }
+ }
+ else
+ {
+ return false;
+ }
+ return true;
+ break;
+ case "https":
+ if(!$this->curl_path || (!is_executable($this->curl_path))) {
+ $this->error = "Bad curl ($this->curl_path), can't fetch HTTPS \n";
+ return false;
+ }
+ $this->host = $URI_PARTS["host"];
+ if(!empty($URI_PARTS["port"]))
+ $this->port = $URI_PARTS["port"];
+ if($this->_isproxy)
+ {
+ // using proxy, send entire URI
+ $this->_httpsrequest($URI,$URI,$this->_httpmethod);
+ }
+ else
+ {
+ $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+ // no proxy, send only the path
+ $this->_httpsrequest($path, $URI, $this->_httpmethod);
+ }
+
+ if($this->_redirectaddr)
+ {
+ /* url was redirected, check if we've hit the max depth */
+ if($this->maxredirs > $this->_redirectdepth)
+ {
+ // only follow redirect if it's on this site, or offsiteok is true
+ if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+ {
+ /* follow the redirect */
+ $this->_redirectdepth++;
+ $this->lastredirectaddr=$this->_redirectaddr;
+ $this->fetch($this->_redirectaddr);
+ }
+ }
+ }
+
+ if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+ {
+ $frameurls = $this->_frameurls;
+ $this->_frameurls = array();
+
+ while(list(,$frameurl) = each($frameurls))
+ {
+ if($this->_framedepth < $this->maxframes)
+ {
+ $this->fetch($frameurl);
+ $this->_framedepth++;
+ }
+ else
+ break;
+ }
+ }
+ return true;
+ break;
+ default:
+ // not a valid protocol
+ $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
+ return false;
+ break;
+ }
+ return true;
+ }
+
+
+
+/*======================================================================*\
+ Private functions
+\*======================================================================*/
+
+
+/*======================================================================*\
+ Function: _striplinks
+ Purpose: strip the hyperlinks from an html document
+ Input: $document document to strip.
+ Output: $match an array of the links
+\*======================================================================*/
+
+ function _striplinks($document)
+ {
+ preg_match_all("'<\s*a\s+.*href\s*=\s* # find <a href=
+ ([\"\'])? # find single or double quote
+ (?(1) (.*?)\\1 | ([^\s\>]+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space
+ 'isx",$document,$links);
+
+
+ // catenate the non-empty matches from the conditional subpattern
+
+ while(list($key,$val) = each($links[2]))
+ {
+ if(!empty($val))
+ $match[] = $val;
+ }
+
+ while(list($key,$val) = each($links[3]))
+ {
+ if(!empty($val))
+ $match[] = $val;
+ }
+
+ // return the links
+ return $match;
+ }
+
+/*======================================================================*\
+ Function: _stripform
+ Purpose: strip the form elements from an html document
+ Input: $document document to strip.
+ Output: $match an array of the links
+\*======================================================================*/
+
+ function _stripform($document)
+ {
+ preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements);
+
+ // catenate the matches
+ $match = implode("\r\n",$elements[0]);
+
+ // return the links
+ return $match;
+ }
+
+
+
+/*======================================================================*\
+ Function: _striptext
+ Purpose: strip the text from an html document
+ Input: $document document to strip.
+ Output: $text the resulting text
+\*======================================================================*/
+
+ function _striptext($document)
+ {
+
+ // I didn't use preg eval (//e) since that is only available in PHP 4.0.
+ // so, list your entities one by one here. I included some of the
+ // more common ones.
+
+ $search = array("'<script[^>]*?>.*?</script>'si", // strip out javascript
+ "'<[\/\!]*?[^<>]*?>'si", // strip out html tags
+ "'([\r\n])[\s]+'", // strip out white space
+ "'&(quote|#34);'i", // replace html entities
+ "'&(amp|#38);'i",
+ "'&(lt|#60);'i",
+ "'&(gt|#62);'i",
+ "'&(nbsp|#160);'i",
+ "'&(iexcl|#161);'i",
+ "'&(cent|#162);'i",
+ "'&(pound|#163);'i",
+ "'&(copy|#169);'i"
+ );
+ $replace = array( "",
+ "",
+ "\\1",
+ "\"",
+ "&",
+ "<",
+ ">",
+ " ",
+ chr(161),
+ chr(162),
+ chr(163),
+ chr(169));
+
+ $text = preg_replace($search,$replace,$document);
+
+ return $text;
+ }
+
+/*======================================================================*\
+ Function: _expandlinks
+ Purpose: expand each link into a fully qualified URL
+ Input: $links the links to qualify
+ $URI the full URI to get the base from
+ Output: $expandedLinks the expanded links
+\*======================================================================*/
+
+ function _expandlinks($links,$URI)
+ {
+
+ preg_match("/^[^\?]+/",$URI,$match);
+
+ $match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]);
+
+ $search = array( "|^http://".preg_quote($this->host)."|i",
+ "|^(?!http://)(\/)?(?!mailto:)|i",
+ "|/\./|",
+ "|/[^\/]+/\.\./|"
+ );
+
+ $replace = array( "",
+ $match."/",
+ "/",
+ "/"
+ );
+
+ $expandedLinks = preg_replace($search,$replace,$links);
+
+ return $expandedLinks;
+ }
+
+/*======================================================================*\
+ Function: _httprequest
+ Purpose: go get the http data from the server
+ Input: $url the url to fetch
+ $fp the current open file pointer
+ $URI the full URI
+ $body body contents to send if any (POST)
+ Output:
+\*======================================================================*/
+
+ function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="")
+ {
+ if($this->passcookies && $this->_redirectaddr)
+ $this->setcookies();
+
+ $URI_PARTS = parse_url($URI);
+ if(empty($url))
+ $url = "/";
+ $headers = $http_method." ".$url." ".$this->_httpversion."\r\n";
+ if(!empty($this->agent))
+ $headers .= "User-Agent: ".$this->agent."\r\n";
+ if(!empty($this->host) && !isset($this->rawheaders['Host']))
+ $headers .= "Host: ".$this->host."\r\n";
+ if(!empty($this->accept))
+ $headers .= "Accept: ".$this->accept."\r\n";
+
+ if($this->use_gzip) {
+ // make sure PHP was built with --with-zlib
+ // and we can handle gzipp'ed data
+ if ( function_exists(gzinflate) ) {
+ $headers .= "Accept-encoding: gzip\r\n";
+ }
+ else {
+ trigger_error(
+ "use_gzip is on, but PHP was built without zlib support.".
+ " Requesting file(s) without gzip encoding.",
+ E_USER_NOTICE);
+ }
+ }
+
+ if(!empty($this->referer))
+ $headers .= "Referer: ".$this->referer."\r\n";
+ if(!empty($this->cookies))
+ {
+ if(!is_array($this->cookies))
+ $this->cookies = (array)$this->cookies;
+
+ reset($this->cookies);
+ if ( count($this->cookies) > 0 ) {
+ $cookie_headers .= 'Cookie: ';
+ foreach ( $this->cookies as $cookieKey => $cookieVal ) {
+ $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
+ }
+ $headers .= substr($cookie_headers,0,-2) . "\r\n";
+ }
+ }
+ if(!empty($this->rawheaders))
+ {
+ if(!is_array($this->rawheaders))
+ $this->rawheaders = (array)$this->rawheaders;
+ while(list($headerKey,$headerVal) = each($this->rawheaders))
+ $headers .= $headerKey.": ".$headerVal."\r\n";
+ }
+ if(!empty($content_type)) {
+ $headers .= "Content-type: $content_type";
+ if ($content_type == "multipart/form-data")
+ $headers .= "; boundary=".$this->_mime_boundary;
+ $headers .= "\r\n";
+ }
+ if(!empty($body))
+ $headers .= "Content-length: ".strlen($body)."\r\n";
+ if(!empty($this->user) || !empty($this->pass))
+ $headers .= "Authorization: BASIC ".base64_encode($this->user.":".$this->pass)."\r\n";
+
+ $headers .= "\r\n";
+
+ // set the read timeout if needed
+ if ($this->read_timeout > 0)
+ socket_set_timeout($fp, $this->read_timeout);
+ $this->timed_out = false;
+
+ fwrite($fp,$headers.$body,strlen($headers.$body));
+
+ $this->_redirectaddr = false;
+ unset($this->headers);
+
+ // content was returned gzip encoded?
+ $is_gzipped = false;
+
+ while($currentHeader = fgets($fp,$this->_maxlinelen))
+ {
+ if ($this->read_timeout > 0 && $this->_check_timeout($fp))
+ {
+ $this->status=-100;
+ return false;
+ }
+
+ // if($currentHeader == "\r\n")
+ if(preg_match("/^\r?\n$/", $currentHeader) )
+ break;
+
+ // if a header begins with Location: or URI:, set the redirect
+ if(preg_match("/^(Location:|URI:)/i",$currentHeader))
+ {
+ // get URL portion of the redirect
+ preg_match("/^(Location:|URI:)\s+(.*)/",chop($currentHeader),$matches);
+ // look for :// in the Location header to see if hostname is included
+ if(!preg_match("|\:\/\/|",$matches[2]))
+ {
+ // no host in the path, so prepend
+ $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+ // eliminate double slash
+ if(!preg_match("|^/|",$matches[2]))
+ $this->_redirectaddr .= "/".$matches[2];
+ else
+ $this->_redirectaddr .= $matches[2];
+ }
+ else
+ $this->_redirectaddr = $matches[2];
+ }
+
+ if(preg_match("|^HTTP/|",$currentHeader))
+ {
+ if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status))
+ {
+ $this->status= $status[1];
+ }
+ $this->response_code = $currentHeader;
+ }
+
+ if (preg_match("/Content-Encoding: gzip/", $currentHeader) ) {
+ $is_gzipped = true;
+ }
+
+ $this->headers[] = $currentHeader;
+ }
+
+ # $results = fread($fp, $this->maxlength);
+ $results = "";
+ while ( $data = fread($fp, $this->maxlength) ) {
+ $results .= $data;
+ if (
+ strlen($results) > $this->maxlength ) {
+ break;
+ }
+ }
+
+ // gunzip
+ if ( $is_gzipped ) {
+ // per http://www.php.net/manual/en/function.gzencode.php
+ $results = substr($results, 10);
+ $results = gzinflate($results);
+ }
+
+ if ($this->read_timeout > 0 && $this->_check_timeout($fp))
+ {
+ $this->status=-100;
+ return false;
+ }
+
+ // check if there is a a redirect meta tag
+
+ if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
+ {
+ $this->_redirectaddr = $this->_expandlinks($match[1],$URI);
+ }
+
+ // have we hit our frame depth and is there frame src to fetch?
+ if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
+ {
+ $this->results[] = $results;
+ for($x=0; $x<count($match[1]); $x++)
+ $this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
+ }
+ // have we already fetched framed content?
+ elseif(is_array($this->results))
+ $this->results[] = $results;
+ // no framed content
+ else
+ $this->results = $results;
+
+ return true;
+ }
+
+/*======================================================================*\
+ Function: _httpsrequest
+ Purpose: go get the https data from the server using curl
+ Input: $url the url to fetch
+ $URI the full URI
+ $body body contents to send if any (POST)
+ Output:
+\*======================================================================*/
+
+ function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
+ {
+ if($this->passcookies && $this->_redirectaddr)
+ $this->setcookies();
+
+ $headers = array();
+
+ $URI_PARTS = parse_url($URI);
+ if(empty($url))
+ $url = "/";
+ // GET ... header not needed for curl
+ //$headers[] = $http_method." ".$url." ".$this->_httpversion;
+ if(!empty($this->agent))
+ $headers[] = "User-Agent: ".$this->agent;
+ if(!empty($this->host))
+ $headers[] = "Host: ".$this->host;
+ if(!empty($this->accept))
+ $headers[] = "Accept: ".$this->accept;
+ if(!empty($this->referer))
+ $headers[] = "Referer: ".$this->referer;
+ if(!empty($this->cookies))
+ {
+ if(!is_array($this->cookies))
+ $this->cookies = (array)$this->cookies;
+
+ reset($this->cookies);
+ if ( count($this->cookies) > 0 ) {
+ $cookie_str = 'Cookie: ';
+ foreach ( $this->cookies as $cookieKey => $cookieVal ) {
+ $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; ";
+ }
+ $headers[] = substr($cookie_str,0,-2);
+ }
+ }
+ if(!empty($this->rawheaders))
+ {
+ if(!is_array($this->rawheaders))
+ $this->rawheaders = (array)$this->rawheaders;
+ while(list($headerKey,$headerVal) = each($this->rawheaders))
+ $headers[] = $headerKey.": ".$headerVal;
+ }
+ if(!empty($content_type)) {
+ if ($content_type == "multipart/form-data")
+ $headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary;
+ else
+ $headers[] = "Content-type: $content_type";
+ }
+ if(!empty($body))
+ $headers[] = "Content-length: ".strlen($body);
+ if(!empty($this->user) || !empty($this->pass))
+ $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
+
+ for($curr_header = 0; $curr_header < count($headers); $curr_header++)
+ $cmdline_params .= " -H \"".$headers[$curr_header]."\"";
+
+ if(!empty($body))
+ $cmdline_params .= " -d \"$body\"";
+
+ if($this->read_timeout > 0)
+ $cmdline_params .= " -m ".$this->read_timeout;
+
+ $headerfile = uniqid(time());
+
+ # accept self-signed certs
+ $cmdline_params .= " -k";
+ exec($this->curl_path." -D \"/tmp/$headerfile\"".$cmdline_params." ".$URI,$results,$return);
+
+ if($return)
+ {
+ $this->error = "Error: cURL could not retrieve the document, error $return.";
+ return false;
+ }
+
+
+ $results = implode("\r\n",$results);
+
+ $result_headers = file("/tmp/$headerfile");
+
+ $this->_redirectaddr = false;
+ unset($this->headers);
+
+ for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++)
+ {
+
+ // if a header begins with Location: or URI:, set the redirect
+ if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader]))
+ {
+ // get URL portion of the redirect
+ preg_match("/^(Location: |URI:)(.*)/",chop($result_headers[$currentHeader]),$matches);
+ // look for :// in the Location header to see if hostname is included
+ if(!preg_match("|\:\/\/|",$matches[2]))
+ {
+ // no host in the path, so prepend
+ $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+ // eliminate double slash
+ if(!preg_match("|^/|",$matches[2]))
+ $this->_redirectaddr .= "/".$matches[2];
+ else
+ $this->_redirectaddr .= $matches[2];
+ }
+ else
+ $this->_redirectaddr = $matches[2];
+ }
+
+ if(preg_match("|^HTTP/|",$result_headers[$currentHeader]))
+ {
+ $this->response_code = $result_headers[$currentHeader];
+ if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$this->response_code, $match))
+ {
+ $this->status= $match[1];
+ }
+ }
+ $this->headers[] = $result_headers[$currentHeader];
+ }
+
+ // check if there is a a redirect meta tag
+
+ if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
+ {
+ $this->_redirectaddr = $this->_expandlinks($match[1],$URI);
+ }
+
+ // have we hit our frame depth and is there frame src to fetch?
+ if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
+ {
+ $this->results[] = $results;
+ for($x=0; $x<count($match[1]); $x++)
+ $this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
+ }
+ // have we already fetched framed content?
+ elseif(is_array($this->results))
+ $this->results[] = $results;
+ // no framed content
+ else
+ $this->results = $results;
+
+ unlink("/tmp/$headerfile");
+
+ return true;
+ }
+
+/*======================================================================*\
+ Function: setcookies()
+ Purpose: set cookies for a redirection
+\*======================================================================*/
+
+ function setcookies()
+ {
+ for($x=0; $x<count($this->headers); $x++)
+ {
+ if(preg_match("/^set-cookie:[\s]+([^=]+)=([^;]+)/i", $this->headers[$x],$match))
+ $this->cookies[$match[1]] = $match[2];
+ }
+ }
+
+
+/*======================================================================*\
+ Function: _check_timeout
+ Purpose: checks whether timeout has occurred
+ Input: $fp file pointer
+\*======================================================================*/
+
+ function _check_timeout($fp)
+ {
+ if ($this->read_timeout > 0) {
+ $fp_status = socket_get_status($fp);
+ if ($fp_status["timed_out"]) {
+ $this->timed_out = true;
+ return true;
+ }
+ }
+ return false;
+ }
+
+/*======================================================================*\
+ Function: _connect
+ Purpose: make a socket connection
+ Input: $fp file pointer
+\*======================================================================*/
+
+ function _connect(&$fp)
+ {
+ if(!empty($this->proxy_host) && !empty($this->proxy_port))
+ {
+ $this->_isproxy = true;
+ $host = $this->proxy_host;
+ $port = $this->proxy_port;
+ }
+ else
+ {
+ $host = $this->host;
+ $port = $this->port;
+ }
+
+ $this->status = 0;
+
+ if($fp = fsockopen(
+ $host,
+ $port,
+ $errno,
+ $errstr,
+ $this->_fp_timeout
+ ))
+ {
+ // socket connection succeeded
+
+ return true;
+ }
+ else
+ {
+ // socket connection failed
+ $this->status = $errno;
+ switch($errno)
+ {
+ case -3:
+ $this->error="socket creation failed (-3)";
+ case -4:
+ $this->error="dns lookup failure (-4)";
+ case -5:
+ $this->error="connection refused or timed out (-5)";
+ default:
+ $this->error="connection failed (".$errno.")";
+ }
+ return false;
+ }
+ }
+/*======================================================================*\
+ Function: _disconnect
+ Purpose: disconnect a socket connection
+ Input: $fp file pointer
+\*======================================================================*/
+
+ function _disconnect($fp)
+ {
+ return(fclose($fp));
+ }
+
+
+/*======================================================================*\
+ Function: _prepare_post_body
+ Purpose: Prepare post body according to encoding type
+ Input: $formvars - form variables
+ $formfiles - form upload files
+ Output: post body
+\*======================================================================*/
+
+ function _prepare_post_body($formvars, $formfiles)
+ {
+ settype($formvars, "array");
+ settype($formfiles, "array");
+
+ if (count($formvars) == 0 && count($formfiles) == 0)
+ return;
+
+ switch ($this->_submit_type) {
+ case "application/x-www-form-urlencoded":
+ reset($formvars);
+ while(list($key,$val) = each($formvars)) {
+ if (is_array($val) || is_object($val)) {
+ while (list($cur_key, $cur_val) = each($val)) {
+ $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&";
+ }
+ } else
+ $postdata .= urlencode($key)."=".urlencode($val)."&";
+ }
+ break;
+
+ case "multipart/form-data":
+ $this->_mime_boundary = "Snoopy".md5(uniqid(microtime()));
+
+ reset($formvars);
+ while(list($key,$val) = each($formvars)) {
+ if (is_array($val) || is_object($val)) {
+ while (list($cur_key, $cur_val) = each($val)) {
+ $postdata .= "--".$this->_mime_boundary."\r\n";
+ $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
+ $postdata .= "$cur_val\r\n";
+ }
+ } else {
+ $postdata .= "--".$this->_mime_boundary."\r\n";
+ $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n";
+ $postdata .= "$val\r\n";
+ }
+ }
+
+ reset($formfiles);
+ while (list($field_name, $file_names) = each($formfiles)) {
+ settype($file_names, "array");
+ while (list(, $file_name) = each($file_names)) {
+ if (!is_readable($file_name)) continue;
+
+ $fp = fopen($file_name, "r");
+ $file_content = fread($fp, filesize($file_name));
+ fclose($fp);
+ $base_name = basename($file_name);
+
+ $postdata .= "--".$this->_mime_boundary."\r\n";
+ $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n";
+ $postdata .= "$file_content\r\n";
+ }
+ }
+ $postdata .= "--".$this->_mime_boundary."--\r\n";
+ break;
+ }
+
+ return $postdata;
+ }
+}
+
+?>
diff --git a/inc/magpie/rss_cache.inc b/inc/magpie/rss_cache.inc
new file mode 100644
index 000000000..5b4e37db3
--- /dev/null
+++ b/inc/magpie/rss_cache.inc
@@ -0,0 +1,184 @@
+<?php
+/*
+ * Project: MagpieRSS: a simple RSS integration tool
+ * File: rss_cache.inc, a simple, rolling(no GC), cache
+ * for RSS objects, keyed on URL.
+ * Author: Kellan Elliott-McCrea <kellan@protest.net>
+ * Version: 0.51
+ * License: GPL
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Magpie mailing list:
+ * http://lists.sourceforge.net/lists/listinfo/magpierss-general
+ *
+ */
+
+class RSSCache {
+ var $BASE_CACHE = './cache'; // where the cache files are stored
+ var $MAX_AGE = 3600; // when are files stale, default one hour
+ var $ERROR = ""; // accumulate error messages
+
+ function RSSCache ($base='', $age='') {
+ if ( $base ) {
+ $this->BASE_CACHE = $base;
+ }
+ if ( $age ) {
+ $this->MAX_AGE = $age;
+ }
+
+ // attempt to make the cache directory
+ if ( ! @file_exists( $this->BASE_CACHE ) ) {
+ $status = @mkdir( $this->BASE_CACHE, 0755 );
+
+ // if make failed
+ if ( ! $status ) {
+ $this->error(
+ "Cache couldn't make dir '" . $this->BASE_CACHE . "'."
+ );
+ }
+ }
+ }
+
+/*=======================================================================*\
+ Function: set
+ Purpose: add an item to the cache, keyed on url
+ Input: url from wich the rss file was fetched
+ Output: true on sucess
+\*=======================================================================*/
+ function set ($url, $rss) {
+ $this->ERROR = "";
+ $cache_file = $this->file_name( $url );
+ $fp = @fopen( $cache_file, 'w' );
+
+ if ( ! $fp ) {
+ $this->error(
+ "Cache unable to open file for writing: $cache_file"
+ );
+ return 0;
+ }
+
+
+ $data = $this->serialize( $rss );
+ fwrite( $fp, $data );
+ fclose( $fp );
+
+ return $cache_file;
+ }
+
+/*=======================================================================*\
+ Function: get
+ Purpose: fetch an item from the cache
+ Input: url from wich the rss file was fetched
+ Output: cached object on HIT, false on MISS
+\*=======================================================================*/
+ function get ($url) {
+ $this->ERROR = "";
+ $cache_file = $this->file_name( $url );
+
+ if ( ! @file_exists( $cache_file ) ) {
+ $this->debug(
+ "Cache doesn't contain: $url (cache file: $cache_file)"
+ );
+ return 0;
+ }
+
+ $fp = @fopen($cache_file, 'r');
+ if ( ! $fp ) {
+ $this->error(
+ "Failed to open cache file for reading: $cache_file"
+ );
+ return 0;
+ }
+
+ $data = fread( $fp, filesize($cache_file) );
+ $rss = $this->unserialize( $data );
+
+ return $rss;
+ }
+
+/*=======================================================================*\
+ Function: check_cache
+ Purpose: check a url for membership in the cache
+ and whether the object is older then MAX_AGE (ie. STALE)
+ Input: url from wich the rss file was fetched
+ Output: cached object on HIT, false on MISS
+\*=======================================================================*/
+ function check_cache ( $url ) {
+ $this->ERROR = "";
+ $filename = $this->file_name( $url );
+
+ if ( @file_exists( $filename ) ) {
+ // find how long ago the file was added to the cache
+ // and whether that is longer then MAX_AGE
+ $mtime = filemtime( $filename );
+ $age = time() - $mtime;
+ if ( $this->MAX_AGE > $age ) {
+ // object exists and is current
+ return 'HIT';
+ }
+ else {
+ // object exists but is old
+ return 'STALE';
+ }
+ }
+ else {
+ // object does not exist
+ return 'MISS';
+ }
+ }
+
+/*=======================================================================*\
+ Function: serialize
+\*=======================================================================*/
+ function serialize ( $rss ) {
+ return serialize( $rss );
+ }
+
+/*=======================================================================*\
+ Function: unserialize
+\*=======================================================================*/
+ function unserialize ( $data ) {
+ return unserialize( $data );
+ }
+
+/*=======================================================================*\
+ Function: file_name
+ Purpose: map url to location in cache
+ Input: url from wich the rss file was fetched
+ Output: a file name
+\*=======================================================================*/
+ function file_name ($url) {
+ $filename = md5( $url );
+ return join( DIRECTORY_SEPARATOR, array( $this->BASE_CACHE, $filename ) );
+ }
+
+/*=======================================================================*\
+ Function: error
+ Purpose: register error
+\*=======================================================================*/
+ function error ($errormsg, $lvl=E_USER_WARNING) {
+ // append PHP's error message if track_errors enabled
+ if ( isset($php_errormsg) ) {
+ $errormsg .= " ($php_errormsg)";
+ }
+ $this->ERROR = $errormsg;
+ if ( MAGPIE_DEBUG ) {
+ trigger_error( $errormsg, $lvl);
+ }
+ else {
+ error_log( $errormsg, 0);
+ }
+ }
+
+ function debug ($debugmsg, $lvl=E_USER_NOTICE) {
+ if ( MAGPIE_DEBUG ) {
+ $this->error("MagpieRSS [debug] $debugmsg", $lvl);
+ }
+ }
+
+}
+
+?>
diff --git a/inc/magpie/rss_fetch.inc b/inc/magpie/rss_fetch.inc
new file mode 100644
index 000000000..5c559baef
--- /dev/null
+++ b/inc/magpie/rss_fetch.inc
@@ -0,0 +1,438 @@
+<?php
+/*
+ * Project: MagpieRSS: a simple RSS integration tool
+ * File: rss_fetch.inc, a simple functional interface
+ to fetching and parsing RSS files, via the
+ function fetch_rss()
+ * Author: Kellan Elliott-McCrea <kellan@protest.net>
+ * License: GPL
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Magpie mailing list:
+ * magpierss-general@lists.sourceforge.net
+ *
+ */
+
+// Setup MAGPIE_DIR for use on hosts that don't include
+// the current path in include_path.
+// with thanks to rajiv and smarty
+if (!defined('DIR_SEP')) {
+ define('DIR_SEP', DIRECTORY_SEPARATOR);
+}
+
+if (!defined('MAGPIE_DIR')) {
+ define('MAGPIE_DIR', dirname(__FILE__) . DIR_SEP);
+}
+
+require_once( MAGPIE_DIR . 'rss_parse.inc' );
+require_once( MAGPIE_DIR . 'rss_cache.inc' );
+
+// for including 3rd party libraries
+define('MAGPIE_EXTLIB', MAGPIE_DIR . 'extlib' . DIR_SEP);
+require_once( MAGPIE_EXTLIB . 'Snoopy.class.inc');
+
+
+/*
+ * CONSTANTS - redefine these in your script to change the
+ * behaviour of fetch_rss() currently, most options effect the cache
+ *
+ * MAGPIE_CACHE_ON - Should Magpie cache parsed RSS objects?
+ * For me a built in cache was essential to creating a "PHP-like"
+ * feel to Magpie, see rss_cache.inc for rationale
+ *
+ *
+ * MAGPIE_CACHE_DIR - Where should Magpie cache parsed RSS objects?
+ * This should be a location that the webserver can write to. If this
+ * directory does not already exist Mapie will try to be smart and create
+ * it. This will often fail for permissions reasons.
+ *
+ *
+ * MAGPIE_CACHE_AGE - How long to store cached RSS objects? In seconds.
+ *
+ *
+ * MAGPIE_CACHE_FRESH_ONLY - If remote fetch fails, throw error
+ * instead of returning stale object?
+ *
+ * MAGPIE_DEBUG - Display debugging notices?
+ *
+*/
+
+
+/*=======================================================================*\
+ Function: fetch_rss:
+ Purpose: return RSS object for the give url
+ maintain the cache
+ Input: url of RSS file
+ Output: parsed RSS object (see rss_parse.inc)
+
+ NOTES ON CACHEING:
+ If caching is on (MAGPIE_CACHE_ON) fetch_rss will first check the cache.
+
+ NOTES ON RETRIEVING REMOTE FILES:
+ If conditional gets are on (MAGPIE_CONDITIONAL_GET_ON) fetch_rss will
+ return a cached object, and touch the cache object upon recieving a
+ 304.
+
+ NOTES ON FAILED REQUESTS:
+ If there is an HTTP error while fetching an RSS object, the cached
+ version will be return, if it exists (and if MAGPIE_CACHE_FRESH_ONLY is off)
+\*=======================================================================*/
+
+define('MAGPIE_VERSION', '0.61');
+
+$MAGPIE_ERROR = "";
+
+function fetch_rss ($url) {
+ // initialize constants
+ init();
+
+ if ( !isset($url) ) {
+ error("fetch_rss called without a url");
+ return false;
+ }
+
+ // if cache is disabled
+ if ( !MAGPIE_CACHE_ON ) {
+ // fetch file, and parse it
+ $resp = _fetch_remote_file( $url );
+ if ( is_success( $resp->status ) ) {
+ return _response_to_rss( $resp );
+ }
+ else {
+ error("Failed to fetch $url and cache is off");
+ return false;
+ }
+ }
+ // else cache is ON
+ else {
+ // Flow
+ // 1. check cache
+ // 2. if there is a hit, make sure its fresh
+ // 3. if cached obj fails freshness check, fetch remote
+ // 4. if remote fails, return stale object, or error
+
+ $cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE );
+
+ if (MAGPIE_DEBUG and $cache->ERROR) {
+ debug($cache->ERROR, E_USER_WARNING);
+ }
+
+
+ $cache_status = 0; // response of check_cache
+ $request_headers = array(); // HTTP headers to send with fetch
+ $rss = 0; // parsed RSS object
+ $errormsg = 0; // errors, if any
+
+ if (!$cache->ERROR) {
+ // return cache HIT, MISS, or STALE
+ $cache_status = $cache->check_cache( $url );
+ }
+
+ // if object cached, and cache is fresh, return cached obj
+ if ( $cache_status == 'HIT' ) {
+ $rss = $cache->get( $url );
+ if ( isset($rss) and $rss ) {
+ $rss->from_cache = 1;
+ if ( MAGPIE_DEBUG > 1) {
+ debug("MagpieRSS: Cache HIT", E_USER_NOTICE);
+ }
+ return $rss;
+ }
+ }
+
+ // else attempt a conditional get
+
+ // setup headers
+ if ( $cache_status == 'STALE' ) {
+ $rss = $cache->get( $url );
+ if ( $rss->etag and $rss->last_modified ) {
+ $request_headers['If-None-Match'] = $rss->etag;
+ $request_headers['If-Last-Modified'] = $rss->last_modified;
+ }
+ }
+
+ $resp = _fetch_remote_file( $url, $request_headers );
+
+ if (isset($resp) and $resp) {
+ if ($resp->status == '304' ) {
+ // we have the most current copy
+ if ( MAGPIE_DEBUG > 1) {
+ debug("Got 304 for $url");
+ }
+ // reset cache on 304 (at minutillo insistent prodding)
+ $cache->set($url, $rss);
+ return $rss;
+ }
+ elseif ( is_success( $resp->status ) ) {
+ $rss = _response_to_rss( $resp );
+ if ( $rss ) {
+ if (MAGPIE_DEBUG > 1) {
+ debug("Fetch successful");
+ }
+ // add object to cache
+ $cache->set( $url, $rss );
+ return $rss;
+ }
+ }
+ else {
+ $errormsg = "Failed to fetch $url. ";
+ if ( $resp->error ) {
+ # compensate for Snoopy's annoying habbit to tacking
+ # on '\n'
+ $http_error = substr($resp->error, 0, -2);
+ $errormsg .= "(HTTP Error: $http_error)";
+ }
+ else {
+ $errormsg .= "(HTTP Response: " . $resp->response_code .')';
+ }
+ }
+ }
+ else {
+ $errormsg = "Unable to retrieve RSS file for unknown reasons.";
+ }
+
+ // else fetch failed
+
+ // attempt to return cached object
+ if ($rss) {
+ if ( MAGPIE_DEBUG ) {
+ debug("Returning STALE object for $url");
+ }
+ return $rss;
+ }
+
+ // else we totally failed
+ error( $errormsg );
+
+ return false;
+
+ } // end if ( !MAGPIE_CACHE_ON ) {
+} // end fetch_rss()
+
+/*=======================================================================*\
+ Function: error
+ Purpose: set MAGPIE_ERROR, and trigger error
+\*=======================================================================*/
+
+function error ($errormsg, $lvl=E_USER_WARNING) {
+ global $MAGPIE_ERROR;
+
+ // append PHP's error message if track_errors enabled
+ if ( isset($php_errormsg) ) {
+ $errormsg .= " ($php_errormsg)";
+ }
+ if ( $errormsg ) {
+ $errormsg = "MagpieRSS: $errormsg";
+ $MAGPIE_ERROR = $errormsg;
+ trigger_error( $errormsg, $lvl);
+ }
+}
+
+function debug ($debugmsg, $lvl=E_USER_NOTICE) {
+ trigger_error("MagpieRSS [debug] $debugmsg", $lvl);
+}
+
+/*=======================================================================*\
+ Function: magpie_error
+ Purpose: accessor for the magpie error variable
+\*=======================================================================*/
+function magpie_error ($errormsg="") {
+ global $MAGPIE_ERROR;
+
+ if ( isset($errormsg) and $errormsg ) {
+ $MAGPIE_ERROR = $errormsg;
+ }
+
+ return $MAGPIE_ERROR;
+}
+
+/*=======================================================================*\
+ Function: _fetch_remote_file
+ Purpose: retrieve an arbitrary remote file
+ Input: url of the remote file
+ headers to send along with the request (optional)
+ Output: an HTTP response object (see Snoopy.class.inc)
+\*=======================================================================*/
+function _fetch_remote_file ($url, $headers = "" ) {
+ // Snoopy is an HTTP client in PHP
+ $client = new Snoopy();
+ $client->agent = MAGPIE_USER_AGENT;
+ $client->read_timeout = MAGPIE_FETCH_TIME_OUT;
+ $client->use_gzip = MAGPIE_USE_GZIP;
+ if (is_array($headers) ) {
+ $client->rawheaders = $headers;
+ }
+
+ @$client->fetch($url);
+ return $client;
+
+}
+
+/*=======================================================================*\
+ Function: _response_to_rss
+ Purpose: parse an HTTP response object into an RSS object
+ Input: an HTTP response object (see Snoopy)
+ Output: parsed RSS object (see rss_parse)
+\*=======================================================================*/
+function _response_to_rss ($resp) {
+ $rss = new MagpieRSS( $resp->results );
+
+ // if RSS parsed successfully
+ if ( $rss and !$rss->ERROR) {
+
+ // find Etag, and Last-Modified
+ foreach($resp->headers as $h) {
+ // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1"
+ if (strpos($h, ": ")) {
+ list($field, $val) = explode(": ", $h, 2);
+ }
+ else {
+ $field = $h;
+ $val = "";
+ }
+
+ if ( $field == 'ETag' ) {
+ $rss->etag = $val;
+ }
+
+ if ( $field == 'Last-Modified' ) {
+ $rss->last_modified = $val;
+ }
+ }
+
+ return $rss;
+ } // else construct error message
+ else {
+ $errormsg = "Failed to parse RSS file.";
+
+ if ($rss) {
+ $errormsg .= " (" . $rss->ERROR . ")";
+ }
+ error($errormsg);
+
+ return false;
+ } // end if ($rss and !$rss->error)
+}
+
+/*=======================================================================*\
+ Function: init
+ Purpose: setup constants with default values
+ check for user overrides
+\*=======================================================================*/
+function init () {
+ if ( defined('MAGPIE_INITALIZED') ) {
+ return;
+ }
+ else {
+ define('MAGPIE_INITALIZED', 1);
+ }
+
+ if ( !defined('MAGPIE_CACHE_ON') ) {
+ define('MAGPIE_CACHE_ON', 1);
+ }
+
+ if ( !defined('MAGPIE_CACHE_DIR') ) {
+ define('MAGPIE_CACHE_DIR', './cache');
+ }
+
+ if ( !defined('MAGPIE_CACHE_AGE') ) {
+ define('MAGPIE_CACHE_AGE', 60*60); // one hour
+ }
+
+ if ( !defined('MAGPIE_CACHE_FRESH_ONLY') ) {
+ define('MAGPIE_CACHE_FRESH_ONLY', 0);
+ }
+
+ if ( !defined('MAGPIE_DEBUG') ) {
+ define('MAGPIE_DEBUG', 0);
+ }
+
+ if ( !defined('MAGPIE_USER_AGENT') ) {
+ $ua = 'MagpieRSS/'. MAGPIE_VERSION . ' (+http://magpierss.sf.net';
+
+ if ( MAGPIE_CACHE_ON ) {
+ $ua = $ua . ')';
+ }
+ else {
+ $ua = $ua . '; No cache)';
+ }
+
+ define('MAGPIE_USER_AGENT', $ua);
+ }
+
+ if ( !defined('MAGPIE_FETCH_TIME_OUT') ) {
+ define('MAGPIE_FETCH_TIME_OUT', 5); // 5 second timeout
+ }
+
+ // use gzip encoding to fetch rss files if supported?
+ if ( !defined('MAGPIE_USE_GZIP') ) {
+ define('MAGPIE_USE_GZIP', true);
+ }
+}
+
+// NOTE: the following code should really be in Snoopy, or at least
+// somewhere other then rss_fetch!
+
+/*=======================================================================*\
+ HTTP STATUS CODE PREDICATES
+ These functions attempt to classify an HTTP status code
+ based on RFC 2616 and RFC 2518.
+
+ All of them take an HTTP status code as input, and return true or false
+
+ All this code is adapted from LWP's HTTP::Status.
+\*=======================================================================*/
+
+
+/*=======================================================================*\
+ Function: is_info
+ Purpose: return true if Informational status code
+\*=======================================================================*/
+function is_info ($sc) {
+ return $sc >= 100 && $sc < 200;
+}
+
+/*=======================================================================*\
+ Function: is_success
+ Purpose: return true if Successful status code
+\*=======================================================================*/
+function is_success ($sc) {
+ return $sc >= 200 && $sc < 300;
+}
+
+/*=======================================================================*\
+ Function: is_redirect
+ Purpose: return true if Redirection status code
+\*=======================================================================*/
+function is_redirect ($sc) {
+ return $sc >= 300 && $sc < 400;
+}
+
+/*=======================================================================*\
+ Function: is_error
+ Purpose: return true if Error status code
+\*=======================================================================*/
+function is_error ($sc) {
+ return $sc >= 400 && $sc < 600;
+}
+
+/*=======================================================================*\
+ Function: is_client_error
+ Purpose: return true if Error status code, and its a client error
+\*=======================================================================*/
+function is_client_error ($sc) {
+ return $sc >= 400 && $sc < 500;
+}
+
+/*=======================================================================*\
+ Function: is_client_error
+ Purpose: return true if Error status code, and its a server error
+\*=======================================================================*/
+function is_server_error ($sc) {
+ return $sc >= 500 && $sc < 600;
+}
+
+?>
diff --git a/inc/magpie/rss_parse.inc b/inc/magpie/rss_parse.inc
new file mode 100644
index 000000000..337dc3596
--- /dev/null
+++ b/inc/magpie/rss_parse.inc
@@ -0,0 +1,547 @@
+<?php
+/*
+ * Project: MagpieRSS: a simple RSS integration tool
+ * File: rss_parse.inc - parse an RSS or Atom feed
+ * return as a simple object.
+ *
+ * Handles RSS 0.9x, RSS 2.0, RSS 1.0, and Atom 0.3
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Magpie mailing list:
+ * magpierss-general@lists.sourceforge.net
+ *
+ * Author: Kellan Elliott-McCrea <kellan@protest.net>
+ * Version: 0.6a
+ * License: GPL
+ *
+ *
+ * ABOUT MAGPIE's APPROACH TO PARSING:
+ * - Magpie is based on expat, an XML parser, and therefore will only parse
+ * valid XML files. This includes all properly constructed RSS or Atom.
+ *
+ * - Magpie is an inclusive parser. It will include any elements that
+ * it can turn into a key value pair in the parsed feed object it returns.
+ *
+ * - Magpie supports namespaces, and will return any elements found in a
+ * namespace in a sub-array, with the key point to that array being the
+ * namespace prefix.
+ * (e.g. if an item contains a <dc:date> element, then that date can
+ * be accessed at $item['dc']['date']
+ *
+ * - Magpie supports nested elements by combining the names. If an item
+ * includes XML like:
+ * <author>
+ * <name>Kellan</name>
+ * </author>
+ *
+ * The name field is accessible at $item['author_name']
+ *
+ * - Magpie makes no attempt validate a feed beyond insuring that it
+ * is valid XML.
+ * RSS validators are readily available on the web at:
+ * http://feeds.archive.org/validator/
+ * http://www.ldodds.com/rss_validator/1.0/validator.html
+ *
+ *
+ * EXAMPLE PARSED RSS ITEM:
+ *
+ * Magpie tries to parse RSS into easy to use PHP datastructures.
+ *
+ * For example, Magpie on encountering (a rather complex) RSS 1.0 item entry:
+ *
+ * <item rdf:about="http://protest.net/NorthEast/calendrome.cgi?span=event&#38;ID=210257">
+ * <title>Weekly Peace Vigil</title>
+ * <link>http://protest.net/NorthEast/calendrome.cgi?span=event&#38;ID=210257</link>
+ * <description>Wear a white ribbon</description>
+ * <dc:subject>Peace</dc:subject>
+ * <ev:startdate>2002-06-01T11:00:00</ev:startdate>
+ * <ev:location>Northampton, MA</ev:location>
+ * <ev:type>Protest</ev:type>
+ * </item>
+ *
+ * Would transform it into the following associative array, and push it
+ * onto the array $rss-items
+ *
+ * array(
+ * title => 'Weekly Peace Vigil',
+ * link => 'http://protest.net/NorthEast/calendrome.cgi?span=event&#38;ID=210257',
+ * description => 'Wear a white ribbon',
+ * dc => array (
+ * subject => 'Peace'
+ * ),
+ * ev => array (
+ * startdate => '2002-06-01T11:00:00',
+ * enddate => '2002-06-01T12:00:00',
+ * type => 'Protest',
+ * location => 'Northampton, MA'
+ * )
+ * )
+ *
+ *
+ *
+ * A FEW NOTES ON PARSING Atom FEEDS
+ *
+ * Atom support is considered alpha. Atom elements will be often be available
+ * as their RSS equivalent, summary is available as description for example.
+ *
+ * Elements of mode=xml, as flattened into a single string, just as if they
+ * had been wrapped in a CDATA container.
+ *
+ * See: http://laughingmeme.org/archives/001676.html
+ *
+ */
+
+define('RSS', 'RSS');
+define('ATOM', 'Atom');
+
+
+class MagpieRSS {
+ /*
+ * Hybrid parser, and object. (probably a bad idea! :)
+ *
+ * Useage Example:
+ *
+ * $some_rss = "<?xml version="1.0"......
+ *
+ * $rss = new MagpieRSS( $some_rss );
+ *
+ * // print rss chanel title
+ * echo $rss->channel['title'];
+ *
+ * // print the title of each item
+ * foreach ($rss->items as $item ) {
+ * echo $item[title];
+ * }
+ *
+ * see: rss_fetch.inc for a simpler interface
+ */
+
+ var $parser;
+
+ var $current_item = array(); // item currently being parsed
+ var $items = array(); // collection of parsed items
+ var $channel = array(); // hash of channel fields
+ var $textinput = array();
+ var $image = array();
+ var $feed_type;
+ var $feed_version;
+
+ // parser variables
+ var $stack = array(); // parser stack
+ var $inchannel = false;
+ var $initem = false;
+ var $incontent = false; // if in Atom <content mode="xml"> field
+ var $intextinput = false;
+ var $inimage = false;
+ var $current_field = '';
+ var $current_namespace = false;
+
+ var $ERROR = "";
+
+ var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
+/*======================================================================*\
+ Function: MagpieRSS
+ Purpose: Constructor, sets up XML parser,parses source,
+ and populates object..
+ Input: String containing the RSS to be parsed
+\*======================================================================*/
+ function MagpieRSS ($source) {
+
+ # if PHP xml isn't compiled in, die
+ #
+ if (!function_exists('xml_parser_create')) {
+ $this->error( "Failed to load PHP's XML Extension. " .
+ "http://www.php.net/manual/en/ref.xml.php",
+ E_USER_ERROR );
+ }
+
+ $parser = @xml_parser_create();
+
+ if (!is_resource($parser))
+ {
+ $this->error( "Failed to create an instance of PHP's XML parser. " .
+ "http://www.php.net/manual/en/ref.xml.php",
+ E_USER_ERROR );
+ }
+
+
+ $this->parser = $parser;
+
+ # pass in parser, and a reference to this object
+ # setup handlers
+ #
+ xml_set_object( $this->parser, $this );
+ xml_set_element_handler($this->parser,
+ 'feed_start_element', 'feed_end_element' );
+
+ xml_set_character_data_handler( $this->parser, 'feed_cdata' );
+
+ $status = xml_parse( $this->parser, $source );
+
+ if (! $status ) {
+ $errorcode = xml_get_error_code( $this->parser );
+ if ( $errorcode != XML_ERROR_NONE ) {
+ $xml_error = xml_error_string( $errorcode );
+ $error_line = xml_get_current_line_number($this->parser);
+ $error_col = xml_get_current_column_number($this->parser);
+ $errormsg = "$xml_error at line $error_line, column $error_col";
+
+ $this->error( $errormsg );
+ }
+ }
+
+ xml_parser_free( $this->parser );
+
+ $this->normalize();
+ }
+
+ function feed_start_element($p, $element, &$attrs) {
+ $el = $element = strtolower($element);
+ $attrs = array_change_key_case($attrs, CASE_LOWER);
+
+ // check for a namespace, and split if found
+ $ns = false;
+ if ( strpos( $element, ':' ) ) {
+ list($ns, $el) = split( ':', $element, 2);
+ }
+ if ( $ns and $ns != 'rdf' ) {
+ $this->current_namespace = $ns;
+ }
+
+ # if feed type isn't set, then this is first element of feed
+ # identify feed from root element
+ #
+ if (!isset($this->feed_type) ) {
+ if ( $el == 'rdf' ) {
+ $this->feed_type = RSS;
+ $this->feed_version = '1.0';
+ }
+ elseif ( $el == 'rss' ) {
+ $this->feed_type = RSS;
+ $this->feed_version = $attrs['version'];
+ }
+ elseif ( $el == 'feed' ) {
+ $this->feed_type = ATOM;
+ $this->feed_version = $attrs['version'];
+ $this->inchannel = true;
+ }
+ return;
+ }
+
+ if ( $el == 'channel' )
+ {
+ $this->inchannel = true;
+ }
+ elseif ($el == 'item' or $el == 'entry' )
+ {
+ $this->initem = true;
+ if ( isset($attrs['rdf:about']) ) {
+ $this->current_item['about'] = $attrs['rdf:about'];
+ }
+ }
+
+ // if we're in the default namespace of an RSS feed,
+ // record textinput or image fields
+ elseif (
+ $this->feed_type == RSS and
+ $this->current_namespace == '' and
+ $el == 'textinput' )
+ {
+ $this->intextinput = true;
+ }
+
+ elseif (
+ $this->feed_type == RSS and
+ $this->current_namespace == '' and
+ $el == 'image' )
+ {
+ $this->inimage = true;
+ }
+
+ # handle atom content constructs
+ elseif ( $this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) )
+ {
+ // avoid clashing w/ RSS mod_content
+ if ($el == 'content' ) {
+ $el = 'atom_content';
+ }
+
+ $this->incontent = $el;
+
+
+ }
+
+ // if inside an Atom content construct (e.g. content or summary) field treat tags as text
+ elseif ($this->feed_type == ATOM and $this->incontent )
+ {
+ // if tags are inlined, then flatten
+ $attrs_str = join(' ',
+ array_map('map_attrs',
+ array_keys($attrs),
+ array_values($attrs) ) );
+
+ $this->append_content( "<$element $attrs_str>" );
+
+ array_unshift( $this->stack, $el );
+ }
+
+ // Atom support many links per containging element.
+ // Magpie treats link elements of type rel='alternate'
+ // as being equivalent to RSS's simple link element.
+ //
+ elseif ($this->feed_type == ATOM and $el == 'link' )
+ {
+ if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' )
+ {
+ $link_el = 'link';
+ }
+ else {
+ $link_el = 'link_' . $attrs['rel'];
+ }
+
+ $this->append($link_el, $attrs['href']);
+ }
+ // set stack[0] to current element
+ else {
+ array_unshift($this->stack, $el);
+ }
+ }
+
+
+
+ function feed_cdata ($p, $text) {
+
+ if ($this->feed_type == ATOM and $this->incontent)
+ {
+ $this->append_content( $text );
+ }
+ else {
+ $current_el = join('_', array_reverse($this->stack));
+ $this->append($current_el, $text);
+ }
+ }
+
+ function feed_end_element ($p, $el) {
+ $el = strtolower($el);
+
+ if ( $el == 'item' or $el == 'entry' )
+ {
+ $this->items[] = $this->current_item;
+ $this->current_item = array();
+ $this->initem = false;
+ }
+ elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' )
+ {
+ $this->intextinput = false;
+ }
+ elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' )
+ {
+ $this->inimage = false;
+ }
+ elseif ($this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) )
+ {
+ $this->incontent = false;
+ }
+ elseif ($el == 'channel' or $el == 'feed' )
+ {
+ $this->inchannel = false;
+ }
+ elseif ($this->feed_type == ATOM and $this->incontent ) {
+ // balance tags properly
+ // note: i don't think this is actually neccessary
+ if ( $this->stack[0] == $el )
+ {
+ $this->append_content("</$el>");
+ }
+ else {
+ $this->append_content("<$el />");
+ }
+
+ array_shift( $this->stack );
+ }
+ else {
+ array_shift( $this->stack );
+ }
+
+ $this->current_namespace = false;
+ }
+
+ function concat (&$str1, $str2="") {
+ if (!isset($str1) ) {
+ $str1="";
+ }
+ $str1 .= $str2;
+ }
+
+
+
+ function append_content($text) {
+ if ( $this->initem ) {
+ $this->concat( $this->current_item[ $this->incontent ], $text );
+ }
+ elseif ( $this->inchannel ) {
+ $this->concat( $this->channel[ $this->incontent ], $text );
+ }
+ }
+
+ // smart append - field and namespace aware
+ function append($el, $text) {
+ if (!$el) {
+ return;
+ }
+ if ( $this->current_namespace )
+ {
+ if ( $this->initem ) {
+ $this->concat(
+ $this->current_item[ $this->current_namespace ][ $el ], $text);
+ }
+ elseif ($this->inchannel) {
+ $this->concat(
+ $this->channel[ $this->current_namespace][ $el ], $text );
+ }
+ elseif ($this->intextinput) {
+ $this->concat(
+ $this->textinput[ $this->current_namespace][ $el ], $text );
+ }
+ elseif ($this->inimage) {
+ $this->concat(
+ $this->image[ $this->current_namespace ][ $el ], $text );
+ }
+ }
+ else {
+ if ( $this->initem ) {
+ $this->concat(
+ $this->current_item[ $el ], $text);
+ }
+ elseif ($this->intextinput) {
+ $this->concat(
+ $this->textinput[ $el ], $text );
+ }
+ elseif ($this->inimage) {
+ $this->concat(
+ $this->image[ $el ], $text );
+ }
+ elseif ($this->inchannel) {
+ $this->concat(
+ $this->channel[ $el ], $text );
+ }
+
+ }
+ }
+
+ function normalize () {
+ // if atom populate rss fields
+ if ( $this->is_atom() ) {
+ $this->channel['descripton'] = $this->channel['tagline'];
+ for ( $i = 0; $i < count($this->items); $i++) {
+ $item = $this->items[$i];
+ if ( isset($item['summary']) )
+ $item['description'] = $item['summary'];
+ if ( isset($item['atom_content']))
+ $item['content']['encoded'] = $item['atom_content'];
+
+ $this->items[$i] = $item;
+ }
+ }
+ elseif ( $this->is_rss() ) {
+ $this->channel['tagline'] = $this->channel['description'];
+ for ( $i = 0; $i < count($this->items); $i++) {
+ $item = $this->items[$i];
+ if ( isset($item['description']))
+ $item['summary'] = $item['description'];
+ if ( isset($item['content']['encoded'] ) )
+ $item['atom_content'] = $item['content']['encoded'];
+
+ $this->items[$i] = $item;
+ }
+ }
+ }
+
+ function error ($errormsg, $lvl=E_USER_WARNING) {
+ // append PHP's error message if track_errors enabled
+ if ( $php_errormsg ) {
+ $errormsg .= " ($php_errormsg)";
+ }
+ $this->ERROR = $errormsg;
+ if ( MAGPIE_DEBUG ) {
+ trigger_error( $errormsg, $lvl);
+ }
+ else {
+ error_log( $errormsg, 0);
+ }
+ }
+
+ function is_rss () {
+ if ( $this->feed_type == RSS ) {
+ return $this->feed_version;
+ }
+ else {
+ return false;
+ }
+ }
+
+ function is_atom() {
+ if ( $this->feed_type == ATOM ) {
+ return $this->feed_version;
+ }
+ else {
+ return false;
+ }
+ }
+
+/*======================================================================*\
+ EVERYTHING BELOW HERE IS FOR DEBUGGING PURPOSES
+\*======================================================================*/
+ function show_list () {
+ echo "<ol>\n";
+ foreach ($this->items as $item) {
+ echo "<li>", $this->show_item( $item );
+ }
+ echo "</ol>";
+ }
+
+ function show_channel () {
+ echo "channel:<br>";
+ echo "<ul>";
+ while ( list($key, $value) = each( $this->channel ) ) {
+ echo "<li> $key: $value";
+ }
+ echo "</ul>";
+ }
+
+ function show_item ($item) {
+ echo "item: $item[title]";
+ echo "<ul>";
+ while ( list($key, $value) = each($item) ) {
+ if ( is_array($value) ) {
+ echo "<br><b>$key</b>";
+ echo "<ul>";
+ while ( list( $ns_key, $ns_value) = each( $value ) ) {
+ echo "<li>$ns_key: $ns_value";
+ }
+ echo "</ul>";
+ }
+ else {
+ echo "<li> $key: $value";
+ }
+ }
+ echo "</ul>";
+ }
+
+/*======================================================================*\
+ END DEBUGGING FUNCTIONS
+\*======================================================================*/
+
+
+
+} # end class RSS
+
+function map_attrs($k, $v) {
+ return "$k=\"$v\"";
+}
+
+
+?>
diff --git a/inc/magpie/rss_utils.inc b/inc/magpie/rss_utils.inc
new file mode 100644
index 000000000..655db8a19
--- /dev/null
+++ b/inc/magpie/rss_utils.inc
@@ -0,0 +1,67 @@
+<?php
+/*
+ * Project: MagpieRSS: a simple RSS integration tool
+ * File: rss_utils.inc, utility methods for working with RSS
+ * Author: Kellan Elliott-McCrea <kellan@protest.net>
+ * Version: 0.51
+ * License: GPL
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Magpie mailing list:
+ * magpierss-general@lists.sourceforge.net
+ */
+
+
+/*======================================================================*\
+ Function: parse_w3cdtf
+ Purpose: parse a W3CDTF date into unix epoch
+
+ NOTE: http://www.w3.org/TR/NOTE-datetime
+\*======================================================================*/
+
+function parse_w3cdtf ( $date_str ) {
+
+ # regex to match wc3dtf
+ $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/";
+
+ if ( preg_match( $pat, $date_str, $match ) ) {
+ list( $year, $month, $day, $hours, $minutes, $seconds) =
+ array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[6]);
+
+ # calc epoch for current date assuming GMT
+ $epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year);
+
+ $offset = 0;
+ if ( $match[10] == 'Z' ) {
+ # zulu time, aka GMT
+ }
+ else {
+ list( $tz_mod, $tz_hour, $tz_min ) =
+ array( $match[8], $match[9], $match[10]);
+
+ # zero out the variables
+ if ( ! $tz_hour ) { $tz_hour = 0; }
+ if ( ! $tz_min ) { $tz_min = 0; }
+
+ $offset_secs = (($tz_hour*60)+$tz_min)*60;
+
+ # is timezone ahead of GMT? then subtract offset
+ #
+ if ( $tz_mod == '+' ) {
+ $offset_secs = $offset_secs * -1;
+ }
+
+ $offset = $offset_secs;
+ }
+ $epoch = $epoch + $offset;
+ return $epoch;
+ }
+ else {
+ return -1;
+ }
+}
+
+?>
diff --git a/inc/parser.php b/inc/parser.php
new file mode 100644
index 000000000..5b8a1323e
--- /dev/null
+++ b/inc/parser.php
@@ -0,0 +1,763 @@
+<?
+include_once("inc/common.php");
+include_once("inc/html.php");
+include_once("inc/format.php");
+require_once("lang/en/lang.php");
+require_once("lang/".$conf['lang']."/lang.php");
+
+/**
+ * The main parser function. Accepts raw data and returns
+ * valid xhtml
+*/
+function parse($text){
+ global $parser;
+ global $conf;
+ $table = array();
+ $hltable = array();
+
+ //preparse
+ $text = preparse($text,$table,$hltable);
+
+ //padding with a newline
+ $text = "\n".$text."\n";
+
+ #for link matching
+ $urls = '(https?|telnet|gopher|file|wais|ftp|ed2k|irc)';
+ $ltrs = '\w';
+ $gunk = '/\#~:.?+=&%@!\-';
+ $punc = '.:?\-;,';
+ $host = $ltrs.$punc;
+ $any = $ltrs.$gunk.$punc;
+
+ /* first pass */
+
+ //preformated texts
+ firstpass($table,$text,"#<nowiki>(.*?)</nowiki>#se","preformat('\\1','nowiki')");
+ firstpass($table,$text,"#%%(.*?)%%#se","preformat('\\1','nowiki')");
+ firstpass($table,$text,"#<code( (\w+))?>(.*?)</code>#se","preformat('\\3','code','\\2')");
+ firstpass($table,$text,"#<file>(.*?)</file>#se","preformat('\\1','file')");
+
+ // html and php includes
+ firstpass($table,$text,"#<html>(.*?)</html>#se","preformat('\\1','html')");
+ firstpass($table,$text,"#<php>(.*?)</php>#se","preformat('\\1','php')");
+
+ // codeblocks
+ firstpass($table,$text,"/(\n( {2,}|\t)[^\*\-\n ][^\n]+)(\n( {2,}|\t)[^\n]*)*/se","preformat('\\0','block')","\n");
+
+ //check if toc is wanted
+ if(!isset($parser['toc'])){
+ if(strpos($text,'~~NOTOC~~')!== false){
+ $text = str_replace('~~NOTOC~~','',$text);
+ $parser['toc'] = false;
+ }else{
+ $parser['toc'] = true;
+ }
+ }
+
+ //check if this file may be cached
+ if(!isset($parser['cache'])){
+ if(strpos($text,'~~NOCACHE~~')!=false){
+ $text = str_replace('~~NOCACHE~~','',$text);
+ $parser['cache'] = false;
+ }else{
+ $parser['cache'] = true;
+ }
+ }
+
+ //headlines
+ format_headlines($table,$hltable,$text);
+
+ //links
+ firstpass($table,$text,"#\[\[([^\]]+?)\]\]#ie","linkformat('\\1')");
+
+ //media
+ firstpass($table,$text,"/\{\{([^\}]+)\}\}/se","mediaformat('\\1')");
+
+ //match full URLs (adapted from Perl cookbook)
+ firstpass($table,$text,"#(\b)($urls://[$any]+?)([$punc]*[^$any])#ie","linkformat('\\2')",'\1','\4');
+
+ //short www URLs
+ firstpass($table,$text,"#(\b)(www\.[$host]+?\.[$host]+?[$any]+?)([$punc]*[^$any])#ie","linkformat('http://\\2|\\2')",'\1','\3');
+
+ //windows shares
+ firstpass($table,$text,"#([$gunk$punc\s])(\\\\\\\\[$host]+?\\\\[$any]+?)([$punc]*[^$any])#ie","linkformat('\\2')",'\1','\3');
+
+ //short ftp URLs
+ firstpass($table,$text,"#(\b)(ftp\.[$host]+?\.[$host]+?[$any]+?)([$punc]*[^$any])#ie","linkformat('ftp://\\2')",'\1','\3');
+
+ // email@domain.tld
+ firstpass($table,$text,"#<([\w0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)>#ie", "linkformat('\\1@\\2')");
+
+ //CamelCase if wanted
+ if($conf['camelcase']){
+ firstpass($table,$text,"#(\b)([A-Z]+[a-z]+[A-Z][A-Za-z]*)(\b)#se","linkformat('\\2')",'\1','\3');
+ }
+
+ $text = htmlspecialchars($text);
+
+ //smileys
+ smileys($table,$text);
+
+ //acronyms
+ acronyms($table,$text);
+
+ /* second pass for simple formating */
+ $text = simpleformat($text);
+
+ /* third pass - insert the matches from 1st pass */
+ reset($table);
+ while (list($key, $val) = each($table)) {
+ $text = str_replace($key,$val,$text);
+ }
+
+ /* remove empty paragraphs */
+ $text = preg_replace('"<p>\n*</p>"','',$text);
+
+ /* remove padding */
+ $text = trim($text);
+ return $text;
+}
+
+/**
+ * This preparses the text by walking it line by line. This
+ * is the only place where linenumbers are still available (needed
+ * for section edit. Some precautions have to be taken to not change
+ * any noparse block.
+ */
+function preparse($text,&$table,&$hltable){
+ $lines = split("\n",$text);
+
+ //prepare a tokens for paragraphs
+ $po = mkToken();
+ $table[$po] = "<p>";
+ $pc = mkToken();
+ $table[$pc] = "</p>";
+
+ for ($l=0; $l<count($lines); $l++){
+ //temporay line holder
+ $line = $lines[$l];
+
+ //look for end of multiline noparse areas
+ if($noparse){
+ if(preg_match("#^.*?$noparse#",$line)){
+ $noparse = '';
+ $line = preg_replace("#^.*?$noparse#",$line,1);
+ }else{
+ continue;
+ }
+ }
+
+ if(!$noparse){
+ //skip indented lines
+ if(preg_match('#^( |\t)#',$line)) continue;
+ //remove norparse areas which open and close on the same line
+ $line = preg_replace("#<nowiki>(.*?)</nowiki>#","",$line);
+ $line = preg_replace("#%%(.*?)%%#","",$line);
+ $line = preg_replace("#<code( (\w+))?>(.*?)</code>#","",$line);
+ $line = preg_replace("#<file>(.*?)</file>#","",$line);
+ $line = preg_replace("#<html>(.*?)</html>#","",$line);
+ $line = preg_replace("#<php>(.*?)</php>#","",$line);
+ //check for start of multiline noparse areas
+ if(preg_match('#^.*?<(nowiki|code|php|html|file)( (\w+))?>#',$line,$matches)){
+ list($noparse) = split(" ",$matches[1]); //remove options
+ $noparse = '</'.$noparse.'>';
+ continue;
+ }elseif(preg_match('#^.*?%%#',$line)){
+ $noparse = '%%';
+ continue;
+ }
+ }
+
+ //handle headlines
+ if(preg_match('/^(\s)*(==+)(.+?)(==+)(\s*)$/',$lines[$l],$matches)){
+ //get token
+ $tk = tokenize_headline($hltable,$matches[2],$matches[3],$l);
+ //replace line with token
+ $lines[$l] = $tk;
+ }
+
+ //handle paragraphs
+ if(empty($lines[$l])){
+ $lines[$l] = "$pc\n$po";
+ }
+ }
+
+ //reassemble full text
+ $text = join("\n",$lines);
+ //open first and close last paragraph
+ $text = "$po\n$text\n$pc";
+
+ return $text;
+}
+
+/**
+ * This function adds some information about the given headline
+ * to a lookuptable to be processed later. Returns a unique token
+ * that idetifies the headline later
+ */
+function tokenize_headline(&$hltable,$pre,$hline,$lno){
+ switch (strlen($pre)){
+ case 2:
+ $lvl = 5;
+ break;
+ case 3:
+ $lvl = 4;
+ break;
+ case 4:
+ $lvl = 3;
+ break;
+ case 5:
+ $lvl = 2;
+ break;
+ default:
+ $lvl = 1;
+ break;
+ }
+ $token = mkToken();
+ $hltable[] = array( 'name' => htmlspecialchars(trim($hline)),
+ 'level' => $lvl,
+ 'line' => $lno,
+ 'token' => $token );
+ return $token;
+}
+
+function format_headlines(&$table,&$hltable,&$text){
+ global $parser;
+ global $conf;
+ global $lang;
+ global $ID;
+
+ // walk the headline table prepared in preparsing
+ $last = 0;
+ $cnt = 0;
+ $hashs = array();
+ foreach($hltable as $hl){
+ $cnt++;
+
+ //make unique headlinehash
+ $hash = cleanID($hl['name']);
+ $i=2;
+ while(in_array($hash,$hashs))
+ $hash = cleanID($hl['name']).$i++;
+ $hashs[] = $hash;
+
+ // build headline
+ $headline = "</p>\n"; //close paragraph
+ if($cnt - 1) $headline .= '</div>'; //no close on first HL
+ $headline .= '<a name="'.$hash.'"></a>';
+ $headline .= '<h'.$hl['level'].'>';
+ $headline .= $hl['name'];
+ $headline .= '</h'.$hl['level'].'>';
+ $headline .= '<div class="level'.$hl['level'].'">';
+ $headline .= "\n<p>"; //open new paragraph
+
+ //remember for autoTOC
+ if($hl['level'] <= $conf['maxtoclevel']){
+ $content[] = array('id' => $hash,
+ 'name' => $hl['name'],
+ 'level' => $hl['level']);
+ }
+
+ //add link for section edit for HLs 1, and 3
+ if( ($hl['level'] <= $conf['maxseclevel']) &&
+ ($hl['line'] - $last > 1)){
+ $secedit = '<!-- SECTION ['.$last.'-'.($hl['line'] - 1).'] -->';
+ $headline = $secedit.$headline;
+ $last = $hl['line'];
+ }
+
+ //put headline into firstpasstable
+ $table[$hl['token']] = $headline;
+ }
+
+ //add link for editing the last section
+ if($last){
+ $secedit = '<!-- SECTION ['.$last.'-] -->';
+ $token = mktoken();
+ $text .= $token;
+ $table[$token] = $secedit;
+ }
+
+ //close last div
+ if ($cnt){
+ $token = mktoken();
+ $text .= $token;
+ $table[$token] = '</div>';
+ }
+
+ //prepend toc
+ if ($parser['toc'] && count($content) > 2){
+ $token = mktoken();
+ $text = $token.$text;
+ $table[$token] = html_toc($content);
+ }
+}
+
+/**
+ * Formats various link types using the functions from format.php
+ */
+function linkformat($match){
+ global $conf;
+ //unescape
+ $match = str_replace('\\"','"',$match);
+
+ //prepare variables for the formaters
+ $link = array();
+ list($link['url'],$link['name']) = split('\|',$match,2);
+ $link['url'] = trim($link['url']);
+ $link['name'] = trim($link['name']);
+ $link['class'] = '';
+ $link['target'] = '';
+ $link['style'] = '';
+ $link['pre'] = '';
+ $link['suf'] = '';
+ $link['more'] = '';
+
+ //save real name for image check
+ $realname = $link['name'];
+
+ /* put it into the right formater */
+ if(strpos($link['url'],'>')){
+ // InterWiki
+ $link = format_link_interwiki($link);
+ }elseif(preg_match('#^([a-z0-9]+?){1}://#i',$link['url'])){
+ // external URL
+ $link = format_link_externalurl($link);
+ }elseif(preg_match("/^\\\\\\\\([a-z0-9\-_.]+)\\\\(.+)$/",$link['url'])){
+ // windows shares
+ $link = format_link_windows($link);
+ }elseif(preg_match('#([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i',$link['url'])){
+ // email
+ $link = format_link_email($link);
+ }else{
+ // wiki link
+ $link = format_link_wiki($link);
+ }
+
+ //is realname an image? use media formater
+ if(preg_match('#^{{.*?\.(gif|png|jpe?g)(\?.*?)?\s*(\|.*?)?}}$#',$realname)){
+ $link['name'] = substr($realname,2,-2);
+ $link = format_link_media($link);
+ }
+
+ // build the replacement with the variables set by the formaters
+ return format_link_build($link);
+}
+
+/**
+ * Simple text formating and typography is done here
+ */
+function simpleformat($text){
+ global $conf;
+
+ $text = preg_replace('/__(.+?)__/s','<u>\1</u>',$text); //underline
+ $text = preg_replace('/\/\/(.+?)\/\//s','<em>\1</em>',$text); //emphasize
+ $text = preg_replace('/\*\*(.+?)\*\*/s','<strong>\1</strong>',$text); //bold
+ $text = preg_replace('/\'\'(.+?)\'\'/s','<code>\1</code>',$text); //code
+ $text = preg_replace('#&lt;del&gt;(.*?)&lt;/del&gt;#is','<del>\1</del>',$text); //deleted
+ $text = preg_replace('/^(\s)*----+(\s*)$/m',"</p>\n<hr noshade=\"noshade\" size=\"1\" />\n<p>",$text); //hr
+
+ //sub and superscript
+ $text = preg_replace('#&lt;sub&gt;(.*?)&lt;/sub&gt;#is','<sub>\1</sub>',$text);
+ $text = preg_replace('#&lt;sup&gt;(.*?)&lt;/sup&gt;#is','<sup>\1</sup>',$text);
+
+ //do quoting
+ $text = preg_replace("/\n((&gt;)[^\n]*?\n)+/se","'\n'.quoteformat('\\0').'\n'",$text);
+
+ // Typography
+ if($conf['typography']){
+ $text = preg_replace('/([^-])--([^-])/s','\1&#8211;\2',$text); //endash
+ $text = preg_replace('/([^-])---([^-])/s','\1&#8212;\2',$text); //emdash
+ $text = preg_replace('/&quot;([^\"]+?)&quot;/s','&#8220;\1&#8221;',$text); //curly quotes
+ $text = preg_replace('/(\s)\'(\S)/m','\1&#8216;\2',$text); //single open quote
+ $text = preg_replace('/(\S)\'/','\1&#8217;',$text); //single closing quote or apostroph
+ $text = preg_replace('/\.\.\./','\1&#8230;\2',$text); //ellipse
+ $text = preg_replace('/(\d+)x(\d+)/i','\1&#215;\2',$text); //640x480
+
+ $text = preg_replace('/&gt;&gt;/i','&raquo;',$text); // >>
+ $text = preg_replace('/&lt;&lt;/i','&laquo;',$text); // <<
+
+ $text = preg_replace('/&lt;-&gt;/i','&#8596;',$text); // <->
+ $text = preg_replace('/&lt;-/i','&#8592;',$text); // <-
+ $text = preg_replace('/-&gt;/i','&#8594;',$text); // ->
+
+ $text = preg_replace('/&lt;=&gt;/i','&#8660;',$text); // <=>
+ $text = preg_replace('/&lt;=/i','&#8656;',$text); // <=
+ $text = preg_replace('/=&gt;/i','&#8658;',$text); // =>
+
+ $text = preg_replace('/\(c\)/i','&copy;',$text); // copyrigtht
+ $text = preg_replace('/\(r\)/i','&reg;',$text); // registered
+ $text = preg_replace('/\(tm\)/i','&trade;',$text); // trademark
+ }
+
+ //forced linebreaks
+ $text = preg_replace('#\\\\\\\\(\s)#',"<br />\\1",$text);
+
+ // lists (blocks leftover after blockformat)
+ $text = preg_replace("/(\n( {2,}|\t)[\*\-][^\n]+)(\n( {2,}|\t)[^\n]*)*/se","\"\\n\".listformat('\\0')",$text);
+
+ // tables
+ $text = preg_replace("/\n(([\|\^][^\n]*?)+[\|\^] *\n)+/se","\"\\n\".tableformat('\\0')",$text);
+
+ // footnotes
+ $text = footnotes($text);
+
+ // run custom text replacements
+ $text = customs($text);
+
+ return $text;
+}
+
+/**
+ * Does the footnote formating
+ */
+function footnotes($text){
+ $num = 0;
+ while (preg_match('/\(\((.+?)\)\)/s',$text,$match)){
+ $num++;
+ $fn = $match[1];
+ $linkt = '<a href="#fn'.$num.'" name="fnt'.$num.'" class="fn_top">'.$num.')</a>';
+ $linkb = '<a href="#fnt'.$num.'" name="fn'.$num.'" class="fn_bot">'.$num.')</a>';
+
+ $text = preg_replace('/ ?\(\((.+?)\)\)/s',$linkt,$text,1);
+ if($num == 1) $text .= '<div class="footnotes">';
+ $text .= '<div class="fn">'.$linkb.' '.$fn.'</div>';
+ }
+
+ if($num) $text .= '</div>';
+ return $text;
+}
+
+/**
+ * Replaces smileys with their graphic equivalents
+ */
+function smileys(&$table,&$text){
+ $smileys = file('conf/smileys.conf');
+ foreach($smileys as $smiley){
+ $smiley = preg_replace('/#.*$/','',$smiley); //ignore comments
+ $smiley = trim($smiley);
+ if(empty($smiley)) continue;
+ $sm = preg_split('/\s+/',$smiley,2);
+ $sm[1] = '<img src="'.getBaseURL().'smileys/'.$sm[1].'" align="middle" alt="'.$sm[0].'" />';
+ $sm[0] = preg_quote($sm[0],'/');
+ firstpass($table,$text,'/(\W)'.$sm[0].'(\W)/s',$sm[1],"\\1","\\2");
+ }
+}
+
+/**
+ * Adds acronym tags to known acronyms
+ */
+function acronyms(&$table,&$text){
+ $acronyms = file('conf/acronyms.conf');
+ foreach($acronyms as $acro){
+ $acro = preg_replace('/#.*$/','',$acro); //ignore comments
+ $acro = trim($acro);
+ if(empty($acro)) continue;
+ list($ac,$desc) = preg_split('/\s+/',$acro,2);
+ $ac = preg_quote($ac,'/');
+ firstpass($table,$text,'/(\b)('.$ac.')(\b)/s',"<acronym title=\"$desc\">\\2</acronym>","\\1","\\3");
+ }
+}
+
+
+/**
+ * Applies custom text replacements
+ */
+function customs($text){
+ $reps = file ('conf/custom.conf');
+ foreach($reps as $rep){
+ //strip comments only outside a regexp
+ $rep = preg_replace('/#[^\/]*$/','',$rep); //ignore comments
+ $rep = trim($rep);
+ if(empty($rep)) continue;
+ if(preg_match('#^(/.+/\w*)\s+\'(.*)\'$#',$rep,$matches)){
+ $text = preg_replace($matches[1],$matches[2],$text);
+ }
+ }
+ return $text;
+}
+
+function firstpass(&$table,&$text,$regexp,$replace,$lpad='',$rpad=''){
+ //extended regexps have to be disabled for inserting the token
+ //and later reenabled when handling the actual code:
+ $ext='';
+ if(substr($regexp,-1) == 'e'){
+ $ext='e';
+ $regexp = substr($regexp,0,-1);
+ }
+
+ while(preg_match($regexp,$text,$matches)){
+ $token = mkToken();
+ $match = $matches[0];
+ $text = preg_replace($regexp,$lpad.$token.$rpad,$text,1);
+ $table[$token] = preg_replace($regexp.$ext,$replace,$match);
+ }
+}
+
+function mkToken(){
+ return '~'.md5(uniqid(rand(), true)).'~';
+}
+
+/**
+ * Do quote blocks
+ *
+ * FIXME fix paragraphs
+ */
+function quoteformat($block){
+ $block = trim($block);
+ $lines = split("\n",$block);
+
+ $lvl = 0;
+ $ret = "";
+ foreach ($lines as $line){
+ //remove '>' and count them
+ $cnt = 0;
+ while(substr($line,0,4) == '&gt;'){
+ $line = substr($line,4);
+ $cnt++;
+ }
+ //compare to last level and open or close new divs if needed
+ if($cnt > $lvl){
+ $ret .= "</p>\n";
+ for ($i=0; $i< $cnt - $lvl; $i++){
+ $ret .= '<div class="quote">';
+ }
+ $ret .= "\n<p>";
+ }elseif($cnt < $lvl){
+ $ret .= "\n</p>";
+ for ($i=0; $i< $lvl - $cnt; $i++){
+ $ret .= "</div>\n";
+ }
+ $ret .= "<p>\n";
+ }elseif(empty($line)){
+ $ret .= "</p>\n<p>";
+ }
+ //keep rest of line but trim left whitespaces
+ $ret .= ltrim($line)."\n";
+ //remember level
+ $lvl = $cnt;
+ }
+
+ //close remaining divs
+ $ret .= "</p>\n";
+ for ($i=0; $i< $lvl; $i++){
+ $ret .= "</div>\n";
+ }
+ $ret .= "<p>\n";
+
+ return "$ret";
+}
+
+function tableformat($block) {
+ $block = trim($block);
+ $lines = split("\n",$block);
+ $ret = "";
+ //build a row array
+ $rows = array();
+ for($r=0; $r < count($lines); $r++){
+ $line = $lines[$r];
+ //remove last seperator and trailing whitespace
+ $line = preg_replace('/[\|\^]\s*$/', '', $line);
+ $c = -1; //prepare colcounter)
+ for($chr=0; $chr < strlen($line); $chr++){
+ if($line[$chr] == '^'){
+ $c++;
+ $rows[$r][$c]['head'] = true;
+ $rows[$r][$c]['data'] = '';
+ }elseif($line[$chr] == '|'){
+ $c++;
+ $rows[$r][$c]['head'] = false;
+ $rows[$r][$c]['data'] = '';
+ }else{
+ $rows[$r][$c]['data'].= $line[$chr];
+ }
+ }
+ }
+
+ //build table
+ $ret .= "</p>\n<table class=\"inline\">\n";
+ for($r=0; $r < count($rows); $r++){
+ $ret .= " <tr>\n";
+
+ for ($c=0; $c < count($rows[$r]); $c++){
+ $cspan=1;
+ $data = trim($rows[$r][$c]['data']);
+ $head = $rows[$r][$c]['head'];
+
+ //join cells if next is empty
+ while($c < count($rows[$r])-1 && $rows[$r][$c+1]['data'] == ''){
+ $c++;
+ $cspan++;
+ }
+ if($cspan > 1){
+ $cspan = 'colspan="'.$cspan.'"';
+ }else{
+ $cspan = '';
+ }
+
+ if ($head) {
+ $ret .= " <th class=\"inline\" $cspan>$data</th>\n";
+ } else {
+ $ret .= " <td class=\"inline\" $cspan>$data</td>\n";
+ }
+ }
+ $ret .= " </tr>\n";
+ }
+ $ret .= "</table>\n<p>";
+
+ return $ret;
+}
+
+function listformat($block){
+ //remove 1st newline
+ $block = substr($block,1);
+ //unescape
+ $block = str_replace('\\"','"',$block);
+
+//dbg($block);
+
+ //walk line by line
+ $ret='';
+ $lst=0;
+ $lvl=0;
+ $enc=0;
+ $lines = split("\n",$block);
+
+ //build an item array
+ $cnt=0;
+ $items = array();
+ foreach ($lines as $line){
+ //get intendion level
+ $lvl = 0;
+ $lvl += floor(strspn($line,' ')/2);
+ $lvl += strspn($line,"\t");
+ //remove indents
+ $line = preg_replace('/^[ \t]+/','',$line);
+ //get type of list
+ (substr($line,0,1) == '-') ? $type='ol' : $type='ul';
+ // remove bullet and following spaces
+ $line = preg_replace('/^[*\-]\s*/','',$line);
+ //add item to the list
+ $items[$cnt]['level'] = $lvl;
+ $items[$cnt]['type'] = $type;
+ $items[$cnt]['text'] = $line;
+ //increase counter
+ $cnt++;
+ }
+
+ $level = 0;
+ $opens = array();
+
+ foreach ($items as $item){
+ if( $item['level'] > $level ){
+ //open new list
+ $ret .= "\n<".$item['type'].">\n";
+ array_push($opens,$item['type']);
+ }elseif( $item['level'] < $level ){
+ //close last item
+ $ret .= "</li>\n";
+ for ($i=0; $i<($level - $item['level']); $i++){
+ //close higher lists
+ $ret .= '</'.array_pop($opens).">\n</li>\n";
+ }
+ }elseif($item['type'] != $opens[count($opens)-1]){
+ //close last list and open new
+ $ret .= '</'.array_pop($opens).">\n</li>\n";
+ $ret .= "\n<".$item['type'].">\n";
+ array_push($opens,$item['type']);
+ }else{
+ //close last item
+ $ret .= "</li>\n";
+ }
+
+ //remember current level and type
+ $level = $item['level'];
+
+ //print item
+ $ret .= '<li class="level'.$item['level'].'">';
+ $ret .= '<span class="li">'.$item['text'].'</span>';
+ }
+
+ //close remaining items and lists
+ while ($open = array_pop($opens)){
+ $ret .= "</li>\n";
+ $ret .= '</'.$open.">\n";
+ }
+ return "</p>\n".$ret."\n<p>";
+}
+
+function preformat($text,$type,$option=''){
+ global $conf;
+ //unescape
+ $text = str_replace('\\"','"',$text);
+
+ if($type == 'php' && !$conf['phpok']) $type='file';
+ if($type == 'html' && !$conf['htmlok']) $type='file';
+
+ switch ($type){
+ case 'php':
+ ob_start();
+ eval($text);
+ $text = ob_get_contents();
+ ob_end_clean();
+ break;
+ case 'html':
+ break;
+ case 'nowiki':
+ $text = htmlspecialchars($text);
+ break;
+ case 'file':
+ $text = htmlspecialchars($text);
+ $text = "</p>\n<pre class=\"file\">".$text."</pre>\n<p>";
+ break;
+ case 'code':
+ if(empty($option)){
+ $text = htmlspecialchars($text);
+ $text = '<pre class="code">'.$text.'</pre>';
+ }else{
+ //strip leading blank line
+ $text = preg_replace('/^\s*?\n/','',$text);
+ //use geshi for highlighting
+ require_once("inc/geshi.php");
+ $geshi = new GeSHi($text, strtolower($option), "inc/geshi");
+ $geshi->enable_classes();
+ $geshi->set_header_type(GESHI_HEADER_PRE);
+ $geshi->set_overall_class('code');
+ $geshi->set_link_target($conf['target']['extern']);
+ $text = $geshi->parse_code();
+ }
+ $text = "</p>\n".$text."\n<p>";
+ break;
+ case 'block':
+ $text = substr($text,1); //remove 1st newline
+ $lines = split("\n",$text); //break into lines
+ $text = '';
+ foreach($lines as $line){
+ $text .= substr($line,2)."\n"; //remove indents
+ }
+ $text = htmlspecialchars($text);
+ $text = "</p>\n<pre class=\"pre\">".$text."</pre>\n<p>";
+ break;
+ }
+ return $text;
+}
+
+function mediaformat($text){
+ global $conf;
+
+ //unescape
+ $text = str_replace('\\"','"',$text);
+
+ // format RSS
+ if(substr($text,0,4) == 'rss>'){
+ return format_rss(substr($text,4));
+ }
+
+ //handle normal media stuff
+ $link = array();
+ $link['name'] = $text;
+ $link = format_link_media($link);
+ return format_link_build($link);
+}
+
+?>
diff --git a/inc/search.php b/inc/search.php
new file mode 100644
index 000000000..bb941a3f3
--- /dev/null
+++ b/inc/search.php
@@ -0,0 +1,301 @@
+<?
+
+require_once("inc/common.php");
+
+/**
+ * This function recurses into a given base directory
+ * and calls the supplied function for each file and directory
+ */
+function search(&$data,$base,$func,$opts,$dir='',$lvl=1){
+ $dirs = array();
+ $files = array();
+
+ //read in directories and files
+ $dh = @opendir($base.'/'.$dir);
+ if(!$dh) return;
+ while(($file = readdir($dh)) !== false){
+ if(preg_match('/^\./',$file)) continue; //skip hidden files and upper dirs
+ if(is_dir($base.'/'.$dir.'/'.$file)){
+ $dirs[] = $dir.'/'.$file;
+ continue;
+ }
+ $files[] = $dir.'/'.$file;
+ }
+ closedir($dh);
+ sort($files);
+ sort($dirs);
+
+ //give directories to userfunction then recurse
+ foreach($dirs as $dir){
+ if ($func($data,$base,$dir,'d',$lvl,$opts)){
+ search($data,$base,$func,$opts,$dir,$lvl+1);
+ }
+ }
+ //now handle the files
+ foreach($files as $file){
+ $func($data,$base,$file,'f',$lvl,$opts);
+ }
+}
+
+/**
+ * The following functions are userfunctions to use with the search
+ * function above. This function is called for every found file or
+ * directory. When a directory is given to the function it has to
+ * decide if this directory should be traversed (true) or not (false)
+ * The function has to accept the following parameters:
+ *
+ * &$data - Reference to the result data structure
+ * $base - Base usually $conf['datadir']
+ * $file - current file or directory relative to $base
+ * $type - Type either 'd' for directory or 'f' for file
+ * $lvl - Current recursion depht
+ * $opts - option array as given to search()
+ *
+ * return values for files are ignored
+ *
+ * All functions should check the ACL for document READ rights
+ * namespaces (directories) are NOT checked as this would break
+ * the recursion (You can have an nonreadable dir over a readable
+ * one deeper nested)
+ */
+
+/**
+ * This function build the browsable index of pages
+ *
+ * $opts['ns'] is the current namespace
+ */
+function search_index(&$data,$base,$file,$type,$lvl,$opts){
+ $return = true;
+
+ if($type == 'd' && !preg_match('#^'.$file.'(/|$)#','/'.$opts['ns'])){
+ //add but don't recurse
+ $return = false;
+ }elseif($type == 'f' && !preg_match('#\.txt$#',$file)){
+ //don't add
+ return false;
+ }
+
+ //check ACL
+ $id = pathID($file);
+ if($type=='f' && auth_quickaclcheck($id) < AUTH_READ){
+ return false;
+ }
+
+ $data[]=array( 'id' => $id,
+ 'type' => $type,
+ 'level' => $lvl );
+ return $return;
+}
+
+/**
+ * This function lists all namespaces
+ */
+function search_namespaces(&$data,$base,$file,$type,$lvl,$opts){
+ if($type == 'f') return true; //nothing to do on files
+
+ $id = pathID($file);
+ $data[]=array( 'id' => $id,
+ 'type' => $type,
+ 'level' => $lvl );
+ return true;
+}
+
+/**
+ * This function lists all mediafiles in a namespace
+ */
+function search_media(&$data,$base,$file,$type,$lvl,$opts){
+ //we do nothing with directories
+ if($type == 'd') return false;
+
+ $info = array();
+ $info['id'] = pathID($file);
+
+ //check ACL for namespace (we have no ACL for mediafiles)
+ if(auth_quickaclcheck(getNS($info['id']).':*') < AUTH_READ){
+ return false;
+ }
+
+ $info['file'] = basename($file);
+ $info['size'] = filesize($base.'/'.$file);
+ if(preg_match("/\.(jpe?g|gif|png)$/",$file)){
+ $info['isimg'] = true;
+ $info['info'] = getimagesize($base.'/'.$file);
+ }else{
+ $info['isimg'] = false;
+ }
+ $data[] = $info;
+
+ return false;
+}
+
+/**
+ * This function just lists documents (for RSS namespace export)
+ */
+function search_list(&$data,$base,$file,$type,$lvl,$opts){
+ //we do nothing with directories
+ if($type == 'd') return false;
+ if(preg_match('#\.txt$#',$file)){
+ //check ACL
+ $id = pathID($file);
+ if(auth_quickaclcheck($id) < AUTH_READ){
+ return false;
+ }
+ $data[]['id'] = $id;;
+ }
+ return false;
+}
+
+/**
+ * Quicksearch for searching matching pagenames
+ *
+ * $opts['query'] is the search query
+ */
+function search_pagename(&$data,$base,$file,$type,$lvl,$opts){
+ //we do nothing with directories
+ if($type == 'd') return true;
+ //only search txt files
+ if(!preg_match('#\.txt$#',$file)) return true;
+
+ //simple stringmatching
+ if(strpos($file,$opts['query']) !== false){
+ //check ACL
+ $id = pathID($file);
+ if(auth_quickaclcheck($id) < AUTH_READ){
+ return false;
+ }
+ $data[]['id'] = $id;
+ }
+
+ return true;
+}
+
+/**
+ * Search for backlinks to a given page
+ *
+ * $opts['ns'] namespace of the page
+ * $opts['name'] name of the page without namespace
+ */
+function search_backlinks(&$data,$base,$file,$type,$lvl,$opts){
+ //we do nothing with directories
+ if($type == 'd') return true;;
+ //only search txt files
+ if(!preg_match('#\.txt$#',$file)) return true;;
+
+ //get text
+ $text = io_readfile($base.'/'.$file);
+
+ //absolute search id
+ $sid = cleanID($opts['ns'].':'.$opts['name']);
+
+ //construct current namespace
+ $cid = pathID($file);
+ $cns = getNS($cid);
+
+ //check ACL
+ if(auth_quickaclcheck($cid) < AUTH_READ){
+ return false;
+ }
+
+ //match all links
+ //FIXME may be incorrect because of code blocks
+ // CamelCase isn't supported, too
+ preg_match_all('#\[\[(.+?)\]\]#si',$text,$matches,PREG_SET_ORDER);
+ foreach($matches as $match){
+ //get ID from link and discard most non wikilinks
+ list($mid) = split('\|',$match[1],2);
+ if(preg_match("#^(https?|telnet|gopher|file|wais|ftp|ed2k|irc)://#",$mid)) continue;
+ if(preg_match("#\w+>#",$mid)) continue;
+ $mns = getNS($mid);
+ //namespace starting with "." - prepend current namespace
+ if(strpos($mns,'.')===0){
+ $mid = $cns.":".substr($mid,1);
+ }
+ if($mns===false){
+ //no namespace in link? add current
+ $mid = "$cns:$mid";
+ }
+ $mid = cleanID($mid);
+
+ if ($mid == $sid){
+ $data[]['id'] = $cid;
+ break;
+ }
+ }
+}
+
+/**
+ * Fulltextsearch
+ *
+ * $opts['query'] is the search query
+ */
+function search_fulltext(&$data,$base,$file,$type,$lvl,$opts){
+ //we do nothing with directories
+ if($type == 'd') return true;;
+ //only search txt files
+ if(!preg_match('#\.txt$#',$file)) return true;;
+
+ //check ACL
+ $id = pathID($file);
+ if(auth_quickaclcheck($id) < AUTH_READ){
+ return false;
+ }
+
+ //get text
+ $text = io_readfile($base.'/'.$file);
+
+ //create regexp from queries
+ $qpreg = preg_split('/\s+/',preg_quote($opts['query'],'#'));
+ $qpreg = '('.join('|',$qpreg).')';
+
+ //do the fulltext search
+ $matches = array();
+ if($cnt = preg_match_all('#'.$qpreg.'#si',$text,$matches)){
+ //this is not the best way for snippet generation but the fastest I could find
+ //split query and only use the first token
+ $q = preg_split('/\s+/',$opts['query'],2);
+ $q = $q[0];
+ $p = strpos(strtolower($text),$q);
+ $f = $p - 100;
+ $l = strlen($q) + 200;
+ if($f < 0) $f = 0;
+ $snippet = '<span class="search_sep"> ... </span>'.
+ htmlspecialchars(substr($text,$f,$l)).
+ '<span class="search_sep"> ... </span>';
+ $snippet = preg_replace('#'.$qpreg.'#si','<span class="search_hit">\\1</span>',$snippet);
+
+ $data[] = array(
+ 'id' => $id,
+ 'count' => $cnt,
+ 'snippet' => $snippet,
+ );
+ }
+
+ return true;
+}
+
+/**
+ * Callback sort function for use with usort to sort the data
+ * structure created by search_fulltext. Sorts descending by count
+ */
+function sort_search_fulltext($a,$b){
+ if($a['count'] > $b['count']){
+ return -1;
+ }elseif($a['count'] < $b['count']){
+ return 1;
+ }else{
+ return strcmp($a['id'],$b['id']);
+ }
+}
+
+/**
+ * translates a document path to an ID
+ */
+function pathID($path){
+ $id = str_replace('/',':',$path);
+ $id = preg_replace('#\.txt$#','',$id);
+ $id = preg_replace('#^:+#','',$id);
+ $id = preg_replace('#:+$#','',$id);
+ return $id;
+}
+
+?>
diff --git a/includes/footer.html b/includes/footer.html
new file mode 100644
index 000000000..76003b8b2
--- /dev/null
+++ b/includes/footer.html
@@ -0,0 +1,40 @@
+<div align="center" class="footerinc">
+ <a target="_blank" href="feed.php" title="Recent changes RSS feed"><img src="<?=getBaseURL()?>images/button-rss.png" width="80" height="15" alt="Recent changes RSS feed" border="0" /></a>
+
+ <a target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/2.0/" rel="license" title="Creative Commons License"><img src="<?=getBaseURL()?>images/button-cc.gif" width="80" height="15" alt="Creative Commons License" border="0" /></a>
+
+ <a target="_blank" href="https://www.paypal.com/xclick/business=andi%40splitbrain.org&amp;item_name=DokuWiki+Donation&amp;no_shipping=1&amp;no_note=1&amp;tax=0&amp;currency_code=EUR&amp;lc=US" title="Donate"><img src="<?=getBaseURL()?>images/button-donate.gif" alt="Donate" border="0" /></a>
+
+ <a target="_blank" href="http://www.php.net" title="Powered by PHP"><img src="<?=getBaseURL()?>images/button-php.gif" width="80" height="15" alt="Powered by PHP" border="0" /></a>
+
+ <a target="_blank" href="http://validator.w3.org/check/referer" title="Valid XHTML 1.0"><img src="<?=getBaseURL()?>images/button-xhtml.png" width="80" height="15" alt="Valid XHTML 1.0" border="0" /></a>
+
+ <a target="_blank" href="http://jigsaw.w3.org/css-validator/check/referer" title="Valid CSS"><img src="<?=getBaseURL()?>images/button-css.png" width="80" height="15" alt="Valid CSS" border="0" /></a>
+
+ <a target="_blank" href="http://www.splitbrain.org/dokuwiki/wiki:dokuwiki" title="Driven by DokuWiki"><img src="<?=getBaseURL()?>images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" border="0" /></a>
+
+<!--
+
+<rdf:RDF xmlns="http://web.resource.org/cc/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<Work rdf:about="">
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
+ <license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/" />
+</Work>
+
+<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/">
+ <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <permits rdf:resource="http://web.resource.org/cc/Distribution" />
+ <requires rdf:resource="http://web.resource.org/cc/Notice" />
+ <requires rdf:resource="http://web.resource.org/cc/Attribution" />
+ <prohibits rdf:resource="http://web.resource.org/cc/CommercialUse" />
+ <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
+</License>
+
+</rdf:RDF>
+
+-->
+</div>
+<script language="javascript" type="text/javascript" src="/js/awstats_misc_tracker.js"></script>
diff --git a/index.php b/index.php
new file mode 100644
index 000000000..69fd001d2
--- /dev/null
+++ b/index.php
@@ -0,0 +1,3 @@
+<?
+header("Location: doku.php");
+?>
diff --git a/interwiki/amazon.de.gif b/interwiki/amazon.de.gif
new file mode 100644
index 000000000..f52c1c581
--- /dev/null
+++ b/interwiki/amazon.de.gif
Binary files differ
diff --git a/interwiki/amazon.gif b/interwiki/amazon.gif
new file mode 100644
index 000000000..f52c1c581
--- /dev/null
+++ b/interwiki/amazon.gif
Binary files differ
diff --git a/interwiki/amazon.uk.gif b/interwiki/amazon.uk.gif
new file mode 100644
index 000000000..f52c1c581
--- /dev/null
+++ b/interwiki/amazon.uk.gif
Binary files differ
diff --git a/interwiki/bug.gif b/interwiki/bug.gif
new file mode 100644
index 000000000..3432b8d57
--- /dev/null
+++ b/interwiki/bug.gif
Binary files differ
diff --git a/interwiki/doku.gif b/interwiki/doku.gif
new file mode 100644
index 000000000..f092ed1d1
--- /dev/null
+++ b/interwiki/doku.gif
Binary files differ
diff --git a/interwiki/google.gif b/interwiki/google.gif
new file mode 100644
index 000000000..fb39f6152
--- /dev/null
+++ b/interwiki/google.gif
Binary files differ
diff --git a/interwiki/meatball.gif b/interwiki/meatball.gif
new file mode 100644
index 000000000..7ac545436
--- /dev/null
+++ b/interwiki/meatball.gif
Binary files differ
diff --git a/interwiki/sb.gif b/interwiki/sb.gif
new file mode 100644
index 000000000..e272a29b7
--- /dev/null
+++ b/interwiki/sb.gif
Binary files differ
diff --git a/interwiki/wiki.gif b/interwiki/wiki.gif
new file mode 100644
index 000000000..e8dc5d274
--- /dev/null
+++ b/interwiki/wiki.gif
Binary files differ
diff --git a/interwiki/wp.gif b/interwiki/wp.gif
new file mode 100644
index 000000000..ca853b8c9
--- /dev/null
+++ b/interwiki/wp.gif
Binary files differ
diff --git a/interwiki/wpde.gif b/interwiki/wpde.gif
new file mode 100644
index 000000000..ca853b8c9
--- /dev/null
+++ b/interwiki/wpde.gif
Binary files differ
diff --git a/interwiki/wpmeta.gif b/interwiki/wpmeta.gif
new file mode 100644
index 000000000..ca853b8c9
--- /dev/null
+++ b/interwiki/wpmeta.gif
Binary files differ
diff --git a/lang/.htaccess b/lang/.htaccess
new file mode 100644
index 000000000..2ca129b12
--- /dev/null
+++ b/lang/.htaccess
@@ -0,0 +1,3 @@
+## no access to the lang directory
+order allow,deny
+deny from all
diff --git a/lang/da/diff.txt b/lang/da/diff.txt
new file mode 100644
index 000000000..832524a79
--- /dev/null
+++ b/lang/da/diff.txt
@@ -0,0 +1,4 @@
+======Forskelle======
+
+Dette viser dig forskellene i mellem den valgte version og den nuvrende version. Gul er linier der findes i den gamle version, og grn er linier der findes i den nuvrende version.
+
diff --git a/lang/da/edit.txt b/lang/da/edit.txt
new file mode 100644
index 000000000..702ad9151
--- /dev/null
+++ b/lang/da/edit.txt
@@ -0,0 +1,2 @@
+Editer denne side og tryk p knappen **''[Gem]''**. Se [[wiki:formatering|Formaterings tips]] for Wiki syntaks. Ret venligst kun denne side hvis du kan **forbedre** den. Brug venligst [[wiki:sandkassen]] til at teste fr du retter i en rigtig side. Husk ogs at bruge **''[Preview]''** fr du gemmer siden.
+
diff --git a/lang/da/editrev.txt b/lang/da/editrev.txt
new file mode 100644
index 000000000..2b6a3c1de
--- /dev/null
+++ b/lang/da/editrev.txt
@@ -0,0 +1,2 @@
+**Du har hentet en gammel version af denne side!** Hvis du gemmer denne side s vil du overskrive den nuvrende version af siden med denne gamle version. Brug venligst kun denne funktion til at fjerne [[wiki:hrvrk]].
+----
diff --git a/lang/da/lang.php b/lang/da/lang.php
new file mode 100644
index 000000000..8a0fd3610
--- /dev/null
+++ b/lang/da/lang.php
@@ -0,0 +1,56 @@
+<?
+$lang['encoding'] = 'iso-8859-15';
+$lang['locales'] = array(
+ 'dan',
+ 'da_DK',
+ 'da',
+ 'danish',
+ );
+
+$lang['btn_edit'] = 'Editer denne side';
+$lang['btn_search'] = 'Sg';
+$lang['btn_save'] = 'Gem';
+$lang['btn_preview']= 'Preview';
+$lang['btn_top'] = 'Tilbage til toppen';
+$lang['btn_revs'] = 'Gamle versioner';
+$lang['btn_recent'] = 'Nye ndringer';
+$lang['btn_upload'] = 'Upload';
+$lang['btn_cancel'] = 'Fortryd';
+
+$lang['txt_upload'] = 'Vlg fil til upload';
+$lang['txt_filename'] = 'Indtast wiki navn (valgfri)';
+
+$lang['mediaselect'] = 'Vlg mediafil';
+$lang['fileupload'] = 'Upload mediafil';
+$lang['uploadsucc'] = 'Upload var en success';
+$lang['uploadfail'] = 'Upload fejlede';
+
+$lang['hits'] = 'Hits';
+$lang['quickhits'] = 'Passende sidenavne';
+$lang['toc'] = 'Indholdsfortegnelse';
+$lang['current'] = 'nuvrende';
+$lang['diff'] = 'vis forskelle i forhold til nuvrende version';
+$lang['line'] = 'Linie';
+$lang['breadcrumb'] = 'Sti';
+$lang['lastmod'] = 'Sidst ndret';
+
+$lang['mail_newpage'] = '[DokuWiki] side tilfjet:';
+$lang['mail_changed'] = '[DokuWiki] side ndret:';
+
+$lang['qb_bold'] = 'Fed text';
+$lang['qb_italic'] = 'Skr text';
+$lang['qb_underl'] = 'Understreget text';
+$lang['qb_code'] = 'Skrivemaskine text';
+$lang['qb_h1'] = 'Level 1 overskrift';
+$lang['qb_h2'] = 'Level 2 overskrift';
+$lang['qb_h3'] = 'Level 3 overskrift';
+$lang['qb_h4'] = 'Level 4 overskrift';
+$lang['qb_h5'] = 'Level 5 overskrift';
+$lang['qb_link'] = 'Intern link';
+$lang['qb_extlink'] = 'Extern link';
+$lang['qb_hr'] = 'Horizontal linie';
+$lang['qb_ol'] = 'Nummereret liste element';
+$lang['qb_ul'] = 'Unordnet liste element';
+$lang['qb_media'] = 'Tilfj billeder og andre filer';
+
+?>
diff --git a/lang/da/mailtext.txt b/lang/da/mailtext.txt
new file mode 100644
index 000000000..568fa9cf4
--- /dev/null
+++ b/lang/da/mailtext.txt
@@ -0,0 +1,15 @@
+En side i din DokuWiki blev ndret eller tilfjet. Her er detajlerne:
+
+Dato: @DATE@
+Browser: @BROWSER@
+IP-Adresse: @IPADDRESS@
+Hostnavn: @HOSTNAME@
+Gammel version: @OLDPAGE@
+Ny version: @NEWPAGE@
+
+@DIFF@
+
+
+--
+Denne email blev genereret af DokuWiki p denne adresse:
+@DOKUWIKIURL@
diff --git a/lang/da/newpage.txt b/lang/da/newpage.txt
new file mode 100644
index 000000000..c2b5a9677
--- /dev/null
+++ b/lang/da/newpage.txt
@@ -0,0 +1,3 @@
+======Denne side existerer ikke (endnu)======
+
+Du har fulgt et link til en side der ikke existerer (endnu). Du kan oprette denne side ved at trykke p knappen **''[Editer denne side]''**.
diff --git a/lang/da/norev.txt b/lang/da/norev.txt
new file mode 100644
index 000000000..4857aeedb
--- /dev/null
+++ b/lang/da/norev.txt
@@ -0,0 +1,4 @@
+======Den valgte version findes ikke======
+
+Den valgte version findes ikke??? Tryk p knappen **''[Gamle versioner]''** for at se en liste af gamle versioner af denne side.
+
diff --git a/lang/da/preview.txt b/lang/da/preview.txt
new file mode 100644
index 000000000..7a030c95e
--- /dev/null
+++ b/lang/da/preview.txt
@@ -0,0 +1,4 @@
+======Preview======
+
+Dette er et preview af hvordan siden vil se ud. Husk: Det er //**IKKE**// gemt endnu! Hvis det ser godt ud, s tryk p knappen **''[Gem]''**
+
diff --git a/lang/da/read.txt b/lang/da/read.txt
new file mode 100644
index 000000000..23cfe21b0
--- /dev/null
+++ b/lang/da/read.txt
@@ -0,0 +1,2 @@
+Denne side kan kun lses. Du kan se sourcekoden, men ikke gemme ndringer i den. Hvis du mener at dette er en fejl, s skriv det venligst p [[wiki:fejl-siden]].
+
diff --git a/lang/da/recent.txt b/lang/da/recent.txt
new file mode 100644
index 000000000..7dbb14789
--- /dev/null
+++ b/lang/da/recent.txt
@@ -0,0 +1,5 @@
+======Nye ndringer======
+
+Flgende sider er blevet ndret for nylig.
+
+
diff --git a/lang/da/revisions.txt b/lang/da/revisions.txt
new file mode 100644
index 000000000..6514f3eb3
--- /dev/null
+++ b/lang/da/revisions.txt
@@ -0,0 +1,5 @@
+======Gamle versioner======
+
+For at skifte tilbage til en gammel version, vlg den ved at trykke p den nedenunder. Nr siden er hentet, tryk p **'' [Editer denne side] ''** og gem den.
+Brug venligst //**kun**// denne funktion til at fjerne hrvrk.
+
diff --git a/lang/da/searchpage.txt b/lang/da/searchpage.txt
new file mode 100644
index 000000000..c3d6b7254
--- /dev/null
+++ b/lang/da/searchpage.txt
@@ -0,0 +1,5 @@
+======Sg======
+
+Resultaterne af din sgning kan du finde nedenunder. Hvis resultaterne ikke indeholder det du sgte efter kan du oprette en ny side med samme navn som sgningen ved at trykke p knappen **''[Editer denne side]''** i toppen til venstre.
+
+=====Resultater=====
diff --git a/lang/da/showrev.txt b/lang/da/showrev.txt
new file mode 100644
index 000000000..50b8d3d9d
--- /dev/null
+++ b/lang/da/showrev.txt
@@ -0,0 +1,2 @@
+**Dette er en gammel version af siden!**
+----
diff --git a/lang/de/backlinks.txt b/lang/de/backlinks.txt
new file mode 100644
index 000000000..46bb2829a
--- /dev/null
+++ b/lang/de/backlinks.txt
@@ -0,0 +1,5 @@
+====== Backlinks ======
+
+Dies ist eine Liste der Seiten, die zurck zur momentanen Seite linken. CamelCase
+Links werden dabei jedoch nicht beachtet.
+
diff --git a/lang/de/conflict.txt b/lang/de/conflict.txt
new file mode 100644
index 000000000..8bb61c5e6
--- /dev/null
+++ b/lang/de/conflict.txt
@@ -0,0 +1,11 @@
+====== Eine neuere Version existiert ======
+
+Eine neuere Version des Dokuments, das du bearbeitet hast, existiert. Das
+heit, dass jemand anderes das Dokument whrend deiner Bearbeitung gespeichert
+hat.
+
+Untersuche die untenstehenden Unterschiede zwischen der aktuellen und deiner
+Version des Dokuments und entscheide dann, ob du deine Version des Dokuments
+wirklich speichern mchtest. Whle ''Speichern'' zum Sichern oder ''Abbrechen'',
+um die neuere Version beizubehalten.
+
diff --git a/lang/de/denied.txt b/lang/de/denied.txt
new file mode 100644
index 000000000..83a8b35a1
--- /dev/null
+++ b/lang/de/denied.txt
@@ -0,0 +1,5 @@
+====== Zugang verweigert ======
+
+Du hast nicht die bentigten Rechte, um weiterzumachen. Vielleicht musst
+du dich erst einloggen?
+
diff --git a/lang/de/diff.txt b/lang/de/diff.txt
new file mode 100644
index 000000000..1f49468c8
--- /dev/null
+++ b/lang/de/diff.txt
@@ -0,0 +1,6 @@
+======Unterschiede======
+
+Hier werden die Unterschiede zwischen der gewhlten und der aktuellen Version
+gezeigt.
+
+
diff --git a/lang/de/edit.txt b/lang/de/edit.txt
new file mode 100644
index 000000000..ae0aa7eda
--- /dev/null
+++ b/lang/de/edit.txt
@@ -0,0 +1,2 @@
+Nach dem Bearbeiten den ''Speichern'' Knopf drcken. Siehe [[wiki:syntax]] zur Wiki Syntax.
+
diff --git a/lang/de/editrev.txt b/lang/de/editrev.txt
new file mode 100644
index 000000000..9e61d3c82
--- /dev/null
+++ b/lang/de/editrev.txt
@@ -0,0 +1,2 @@
+**Eine ltere Version des Dokuments wurde geladen!** Beim Speichern wird eine neue Version des Dokuments mit diesem Inhalt erstellt.
+---- \ No newline at end of file
diff --git a/lang/de/index.txt b/lang/de/index.txt
new file mode 100644
index 000000000..8e4fca2c1
--- /dev/null
+++ b/lang/de/index.txt
@@ -0,0 +1,4 @@
+====== bersicht ======
+
+Dies ist eine bersicht ber alle vorhandenen Seiten und [[doku>wiki:namespaces|Namensrume]].
+
diff --git a/lang/de/lang.php b/lang/de/lang.php
new file mode 100644
index 000000000..037a7fef5
--- /dev/null
+++ b/lang/de/lang.php
@@ -0,0 +1,102 @@
+<?
+$lang['encoding'] = 'iso-8859-15';
+$lang['locales'] = array(
+ 'deu',
+ 'de@euro',
+ 'de_DE@euro',
+ 'de',
+ 'de_DE',
+ 'ge',
+ 'german',
+ );
+
+$lang['btn_edit'] = 'Diese Seite bearbeiten';
+$lang['btn_source'] = 'Zeige Quelltext';
+$lang['btn_show'] = 'Seite anzeigen';
+$lang['btn_create'] = 'Seite anlegen';
+$lang['btn_search'] = 'Suche';
+$lang['btn_save'] = 'Speichern';
+$lang['btn_preview']= 'Vorschau';
+$lang['btn_top'] = 'Nach oben';
+$lang['btn_revs'] = 'ltere Versionen';
+$lang['btn_recent'] = 'Letzte nderungen';
+$lang['btn_upload'] = 'Hochladen';
+$lang['btn_cancel'] = 'Abbrechen';
+$lang['btn_index'] = 'bersicht';
+$lang['btn_secedit']= 'Bearbeiten';
+$lang['btn_login'] = 'Einloggen';
+$lang['btn_logout'] = 'Ausloggen';
+
+$lang['loggedinas'] = 'Eingeloggt als';
+$lang['user'] = 'Benutzername';
+$lang['pass'] = 'Passwort';
+$lang['fullname'] = 'Voller Name';
+$lang['email'] = 'E-Mail';
+$lang['register'] = 'Registrieren';
+$lang['badlogin'] = 'Nutzername oder Passwort sind falsch.';
+
+$lang['regmissing'] = 'Alle Felder mssen ausgefllt werden';
+$lang['reguexists'] = 'Der Nutzername existiert leider schon.';
+$lang['regsuccess'] = 'Der neue Nutzer wurde angelegt. Das Passwort wurde per Mail versandt.';
+$lang['regmailfail']= 'Offenbar ist ein Fehler beim Versenden der Passwortmail aufgetreten. Bitte wende dich an den Wiki-Admin.';
+$lang['regbadmail'] = 'Die angegebene Mail-Adresse scheint ungltig zu sein. Falls dies ein Fehler ist, wende dich bitte an den Wiki-Admin.';
+$lang['regpwmail'] = 'Dein DokuWiki Passwort';
+$lang['reghere'] = 'Du hast noch keinen Account? Hier anmelden';
+
+$lang['txt_upload'] = 'Datei zum Hochladen auswhlen';
+$lang['txt_filename'] = 'Wikinamen eingeben (optional)';
+$lang['lockedby'] = 'Momentan gesperrt von';
+$lang['lockexpire'] = 'Sperre luft ab am';
+$lang['willexpire'] = 'Deine Sperre zur Bearbeitung dieser Seite luft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, solltest du sie durch einen Klick auf den Vorschau-Knopf verlngern.';
+
+$lang['notsavedyet'] = 'Nicht gespeicherte nderungen gehen verloren!\nWeitermachen?';
+$lang['rssfailed'] = 'Es ist ein Fehler beim Laden des Feeds aufgetreten: ';
+$lang['nothingfound']= 'Nichts gefunden.';
+
+
+$lang['mediaselect'] = 'Dateiauswahl';
+$lang['fileupload'] = 'Datei hochladen';
+$lang['uploadsucc'] = 'Datei wurde erfolgreich hochgeladen';
+$lang['uploadfail'] = 'Hochladen fehlgeschlagen. Keine Berechtigung?';
+$lang['uploadwrong'] = 'Hochladen verweigert. Diese Dateiendung ist nicht erlaubt.';
+$lang['namespaces'] = 'Namensrume';
+$lang['mediafiles'] = 'Vorhandene Dateien in';
+
+$lang['hits'] = 'Treffer';
+$lang['quickhits'] = 'Passende Seitennamen';
+$lang['toc'] = 'Inhaltsverzeichnis';
+$lang['current'] = 'aktuell';
+$lang['yours'] = 'Deine Version';
+$lang['diff'] = 'Zeige Unterschiede zu aktueller Version';
+$lang['line'] = 'Zeile';
+$lang['breadcrumb'] = 'Spur';
+$lang['lastmod'] = 'Zuletzt gendert';
+$lang['deleted'] = 'gelscht';
+$lang['created'] = 'angelegt';
+$lang['restored'] = 'alte Version wieder hergestellt';
+$lang['summary'] = 'Zusammenfassung';
+
+$lang['mail_newpage'] = '[DokuWiki] Neue Seite:';
+$lang['mail_changed'] = '[DokuWiki] Seite geaendert:';
+
+$lang['nosmblinks'] = 'Das Verlinken von Windows Freigaben funktioniert nur im Microsoft Internet Explorer.\nDer Link kann jedoch durch Kopieren und Einfgen verwendet werden.';
+
+$lang['qb_alert'] = 'Bitte gib den zu formatierenden Text ein.\nDieser wird am Ende des Dokuments eingefgt.';
+$lang['qb_bold'] = 'Fetter Text';
+$lang['qb_italic'] = 'Kursiver Text';
+$lang['qb_underl'] = 'Unterstrichener Text';
+$lang['qb_code'] = 'Code Text';
+$lang['qb_h1'] = 'Level 1 berschrift';
+$lang['qb_h2'] = 'Level 2 berschrift';
+$lang['qb_h3'] = 'Level 3 berschrift';
+$lang['qb_h4'] = 'Level 4 berschrift';
+$lang['qb_h5'] = 'Level 5 berschrift';
+$lang['qb_link'] = 'Interner Link';
+$lang['qb_extlink'] = 'Externer Link';
+$lang['qb_hr'] = 'Horizontale Linie';
+$lang['qb_ol'] = 'Numerierter Listenpunkt';
+$lang['qb_ul'] = 'Listenpunkt';
+$lang['qb_media'] = 'Bilder und andere Dateien hinzufgen';
+$lang['qb_sig'] = 'Unterschrift einfgen';
+
+?>
diff --git a/lang/de/locked.txt b/lang/de/locked.txt
new file mode 100644
index 000000000..f6c2c402e
--- /dev/null
+++ b/lang/de/locked.txt
@@ -0,0 +1,5 @@
+====== Seite gesperrt ======
+
+Diese Seite ist momentan von einem anderen Nutzer gesperrt. Du musst
+warten, bis dieser mit dem Bearbeiten fertig ist oder die Sperre abluft.
+
diff --git a/lang/de/login.txt b/lang/de/login.txt
new file mode 100644
index 000000000..375e884ce
--- /dev/null
+++ b/lang/de/login.txt
@@ -0,0 +1,5 @@
+====== Einloggen ======
+
+Du bist momentan nicht eingeloggt. Gib deine Nutzerdaten in das unten stehende
+Formular ein. Du musst Cookies eingeschaltet haben, um dich einzuloggen.
+
diff --git a/lang/de/mailtext.txt b/lang/de/mailtext.txt
new file mode 100644
index 000000000..b86ecbca2
--- /dev/null
+++ b/lang/de/mailtext.txt
@@ -0,0 +1,15 @@
+Eine Seite in deinem DokuWiki wurde gendert oder neu angelegt. Hier sind die Details:
+
+Datum : @DATE@
+Browser : @BROWSER@
+IP-Adresse : @IPADDRESS@
+Hostname : @HOSTNAME@
+Alte Version: @OLDPAGE@
+Neue Version: @NEWPAGE@
+
+@DIFF@
+
+
+--
+Diese Mail kommt vom DokuWiki auf
+@DOKUWIKIURL@
diff --git a/lang/de/newpage.txt b/lang/de/newpage.txt
new file mode 100644
index 000000000..bbb33c300
--- /dev/null
+++ b/lang/de/newpage.txt
@@ -0,0 +1,7 @@
+======Dieses Thema existiert noch nicht======
+
+Du bist einem Link zu einer Seite gefolgt, die noch nicht existiert.
+Du kannst die Seite selbst anlegen, indem du auf den ''Diese Seite bearbeiten''
+Knopf drckst.
+
+
diff --git a/lang/de/norev.txt b/lang/de/norev.txt
new file mode 100644
index 000000000..c78afc49f
--- /dev/null
+++ b/lang/de/norev.txt
@@ -0,0 +1,5 @@
+======Version existiert nicht======
+
+Die angegebene Version des Dokuments wurde nicht gefunden. Benutze den ''ltere Versionen'' Knopf,
+um eine Liste aller verfgbaren Versionen dieses Dokuments zu erhalten.
+
diff --git a/lang/de/password.txt b/lang/de/password.txt
new file mode 100644
index 000000000..c51569781
--- /dev/null
+++ b/lang/de/password.txt
@@ -0,0 +1,10 @@
+Hallo @FULLNAME@!
+
+Hier sind deine Nutzerdaten fr @TITLE@ auf @DOKUWIKIURL@
+
+Benutzername: @LOGIN@
+Passwort : @PASSWORD@
+
+--
+Diese Mail kommt vom DokuWiki auf
+@DOKUWIKIURL@
diff --git a/lang/de/preview.txt b/lang/de/preview.txt
new file mode 100644
index 000000000..7e326bec7
--- /dev/null
+++ b/lang/de/preview.txt
@@ -0,0 +1,5 @@
+======Vorschau======
+
+Dies ist eine Vorschau, wie dein Text aussehen wird. Achtung: Der Text wurde noch **nicht gespeichert**!
+
+
diff --git a/lang/de/read.txt b/lang/de/read.txt
new file mode 100644
index 000000000..9e4f325b7
--- /dev/null
+++ b/lang/de/read.txt
@@ -0,0 +1,2 @@
+Diese Seiten kann man nur lesen. Du kannst dir den Quelltext ansehen, aber nicht ndern. Wenn du glaubst, dass das falsch ist, kontaktiere den Administrator.
+
diff --git a/lang/de/recent.txt b/lang/de/recent.txt
new file mode 100644
index 000000000..97b28a113
--- /dev/null
+++ b/lang/de/recent.txt
@@ -0,0 +1,5 @@
+======Letzte nderungen======
+
+Die folgenden Seiten wurden zuletzt gendert.
+
+
diff --git a/lang/de/register.txt b/lang/de/register.txt
new file mode 100644
index 000000000..85abf19cf
--- /dev/null
+++ b/lang/de/register.txt
@@ -0,0 +1,7 @@
+====== Als neuer Nutzer registrieren ======
+
+Bitte flle alle Felder aus, um einen neuen Nutzer-Account in diesem
+Wiki anzulegen. Stelle sicher, dass du eine **gltige E-Mail Adresse**
+angibst - dein Passwort wird an diese Adresse gesendet. Der Nutzername
+sollte ein gltiger [[doku>wiki:pagename|Wiki Seitenname]] sein.
+
diff --git a/lang/de/revisions.txt b/lang/de/revisions.txt
new file mode 100644
index 000000000..7ee2b25e1
--- /dev/null
+++ b/lang/de/revisions.txt
@@ -0,0 +1,5 @@
+======ltere Versionen======
+
+Dies sind ltere Versionen des gewhlten Dokuments. Um zu einer lteren Version zurckzukehren, whle die entsprechende
+Version aus, klicke auf ''Diese Seite bearbeiten'' und speichere.
+
diff --git a/lang/de/searchpage.txt b/lang/de/searchpage.txt
new file mode 100644
index 000000000..e3666996d
--- /dev/null
+++ b/lang/de/searchpage.txt
@@ -0,0 +1,9 @@
+======Suche======
+
+Unten findest du die Ergebnisse deiner Suche. Falls du nicht gefunden hast, wonach du
+gesucht hast, kannst du eine Seite mit dem Namen deiner Suche anlegen, indem du auf den
+''Diese Seite bearbeiten'' Knopf drckst.
+
+=====Ergebnisse=====
+
+
diff --git a/lang/de/showrev.txt b/lang/de/showrev.txt
new file mode 100644
index 000000000..5b456e79f
--- /dev/null
+++ b/lang/de/showrev.txt
@@ -0,0 +1,2 @@
+**Dies ist eine alte Version des Dokuments!**
+----
diff --git a/lang/de/wordblock.txt b/lang/de/wordblock.txt
new file mode 100644
index 000000000..fb09b4d0e
--- /dev/null
+++ b/lang/de/wordblock.txt
@@ -0,0 +1,7 @@
+======SPAM blockiert======
+
+Deine nderungen wurden nicht gespeichert, da sie ein oder mehrere nicht
+erlaubte Wrter enthielten. Falls du versucht hast, das Wiki zu Spammen --
+bser Hund! Wenn du glaubst, dein Eintrag wurde zu Unrecht blockiert, kontaktiere
+bitte den Administrator des Wikis.
+
diff --git a/lang/en/backlinks.txt b/lang/en/backlinks.txt
new file mode 100644
index 000000000..751de9c21
--- /dev/null
+++ b/lang/en/backlinks.txt
@@ -0,0 +1,5 @@
+====== Backlinks ======
+
+This is a list of pages that seem to link back to the current page. Note that CamelCase links are
+not detected as backlinks.
+
diff --git a/lang/en/conflict.txt b/lang/en/conflict.txt
new file mode 100644
index 000000000..197bbd6e3
--- /dev/null
+++ b/lang/en/conflict.txt
@@ -0,0 +1,9 @@
+====== A newer version exists ======
+
+A newer version of the document you edited exists. This happens when another
+user changed the document while you were editing it.
+
+Examine the differences shown below thoroughly, then decide which version to
+keep. If you choose ''save'', your version will be saved. Hit ''cancel'' to
+keep the current version.
+
diff --git a/lang/en/denied.txt b/lang/en/denied.txt
new file mode 100644
index 000000000..c8844a06f
--- /dev/null
+++ b/lang/en/denied.txt
@@ -0,0 +1,4 @@
+======Permission Denied======
+
+Sorry, you don't have enough rights to continue. Perhaps you forgot to login?
+
diff --git a/lang/en/diff.txt b/lang/en/diff.txt
new file mode 100644
index 000000000..b56efc866
--- /dev/null
+++ b/lang/en/diff.txt
@@ -0,0 +1,5 @@
+======Differences======
+
+This shows you the differences between the selected revision and the current
+version of the page.
+
diff --git a/lang/en/edit.txt b/lang/en/edit.txt
new file mode 100644
index 000000000..da651d1c7
--- /dev/null
+++ b/lang/en/edit.txt
@@ -0,0 +1,5 @@
+Edit the page and hit ''Save''. See [[wiki:syntax]] for
+Wiki syntax. Please edit the page only if you can **improve** it. If you
+want to test some things, learn to make your first steps on the
+[[wiki:playground]].
+
diff --git a/lang/en/editrev.txt b/lang/en/editrev.txt
new file mode 100644
index 000000000..d2b158047
--- /dev/null
+++ b/lang/en/editrev.txt
@@ -0,0 +1,2 @@
+**You've loaded an old revision of the document!** If you save it, you will create a new version with this data.
+---- \ No newline at end of file
diff --git a/lang/en/index.txt b/lang/en/index.txt
new file mode 100644
index 000000000..e3b5cd153
--- /dev/null
+++ b/lang/en/index.txt
@@ -0,0 +1,4 @@
+====== Index ======
+
+This is an index over all available pages ordered by [[doku>wiki:namespaces|namespaces]].
+
diff --git a/lang/en/lang.php b/lang/en/lang.php
new file mode 100644
index 000000000..48ef0eb9e
--- /dev/null
+++ b/lang/en/lang.php
@@ -0,0 +1,98 @@
+<?
+$lang['encoding'] = 'iso-8859-15';
+$lang['locales'] = array(
+ 'eng',
+ 'en_US',
+ 'en',
+ 'english',
+ );
+
+$lang['btn_edit'] = 'Edit this page';
+$lang['btn_source'] = 'Show pagesource';
+$lang['btn_show'] = 'Show page';
+$lang['btn_create'] = 'Create this page';
+$lang['btn_search'] = 'Search';
+$lang['btn_save'] = 'Save';
+$lang['btn_preview']= 'Preview';
+$lang['btn_top'] = 'Back to top';
+$lang['btn_revs'] = 'Old revisions';
+$lang['btn_recent'] = 'Recent changes';
+$lang['btn_upload'] = 'Upload';
+$lang['btn_cancel'] = 'Cancel';
+$lang['btn_index'] = 'Index';
+$lang['btn_secedit']= 'Edit';
+$lang['btn_login'] = 'Login';
+$lang['btn_logout'] = 'Logout';
+
+$lang['loggedinas'] = 'Logged in as';
+$lang['user'] = 'Username';
+$lang['pass'] = 'Password';
+$lang['fullname'] = 'Full name';
+$lang['email'] = 'E-Mail';
+$lang['register'] = 'Register';
+$lang['badlogin'] = 'Sorry, username or password was wrong.';
+
+$lang['regmissing'] = 'Sorry, you must fill in all fields.';
+$lang['reguexists'] = 'Sorry, a user with this login already exists.';
+$lang['regsuccess'] = 'The user was created. The password was sent by mail.';
+$lang['regmailfail']= 'Looks like there was an error on sending the password mail. Please contact the admin!';
+$lang['regbadmail'] = 'The given email address looks invalid - if you think this is an error, contact the admin';
+$lang['regpwmail'] = 'Your DokuWiki password';
+$lang['reghere'] = 'You don\'t have an account yet? Just get one';
+
+$lang['txt_upload'] = 'Select file to upload';
+$lang['txt_filename'] = 'Enter wikiname (optional)';
+$lang['lockedby'] = 'Currently locked by';
+$lang['lockexpire'] = 'Lock expires at';
+$lang['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.';
+
+$lang['notsavedyet'] = 'There are unsaved changes, that will be lost.\nReally continue?';
+$lang['rssfailed'] = 'An error occured while fetching this feed: ';
+$lang['nothingfound']= 'Nothing was found.';
+
+$lang['mediaselect'] = 'Mediafile Selection';
+$lang['fileupload'] = 'Mediafile Upload';
+$lang['uploadsucc'] = 'Upload successful';
+$lang['uploadfail'] = 'Upload failed. Maybe wrong permissions?';
+$lang['uploadwrong'] = 'Upload denied. This file extension is forbidden';
+$lang['namespaces'] = 'Namespaces';
+$lang['mediafiles'] = 'Available files in';
+
+$lang['hits'] = 'Hits';
+$lang['quickhits'] = 'Matching pagenames';
+$lang['toc'] = 'Table of Contents';
+$lang['current'] = 'current';
+$lang['yours'] = 'Your Version';
+$lang['diff'] = 'show differences to current version';
+$lang['line'] = 'Line';
+$lang['breadcrumb'] = 'Trace';
+$lang['lastmod'] = 'Last modified';
+$lang['deleted'] = 'removed';
+$lang['created'] = 'created';
+$lang['restored'] = 'old revision restored';
+$lang['summary'] = 'Edit summary';
+
+$lang['mail_newpage'] = '[DokuWiki] page added:';
+$lang['mail_changed'] = '[DokuWiki] page changed:';
+
+$lang['nosmblinks'] = 'Linking to Windows shares only works in Microsoft Internet Explorer.\nYou still can copy and paste the link.';
+
+$lang['qb_alert'] = 'Please enter the text you want to format.\nIt will be appended to the end of the document.';
+$lang['qb_bold'] = 'Bold Text';
+$lang['qb_italic'] = 'Italic Text';
+$lang['qb_underl'] = 'Underlined Text';
+$lang['qb_code'] = 'Code Text';
+$lang['qb_h1'] = 'Level 1 Headline';
+$lang['qb_h2'] = 'Level 2 Headline';
+$lang['qb_h3'] = 'Level 3 Headline';
+$lang['qb_h4'] = 'Level 4 Headline';
+$lang['qb_h5'] = 'Level 5 Headline';
+$lang['qb_link'] = 'Internal Link';
+$lang['qb_extlink'] = 'External Link';
+$lang['qb_hr'] = 'Horizontal Rule';
+$lang['qb_ol'] = 'Ordered List Item';
+$lang['qb_ul'] = 'Unordered List Item';
+$lang['qb_media'] = 'Add Images and other files';
+$lang['qb_sig'] = 'Insert Signature';
+
+?>
diff --git a/lang/en/locked.txt b/lang/en/locked.txt
new file mode 100644
index 000000000..1c745d3ee
--- /dev/null
+++ b/lang/en/locked.txt
@@ -0,0 +1,4 @@
+====== Page locked ======
+
+This page is currently locked for editing by another user. You have to wait
+until this user finishes editing or the lock expires.
diff --git a/lang/en/login.txt b/lang/en/login.txt
new file mode 100644
index 000000000..d108cf739
--- /dev/null
+++ b/lang/en/login.txt
@@ -0,0 +1,5 @@
+====== Login ======
+
+You are currently not logged in! Enter your authentication credentials below to log in.
+You need to have cookies enabled to log in.
+
diff --git a/lang/en/mailtext.txt b/lang/en/mailtext.txt
new file mode 100644
index 000000000..3f701da79
--- /dev/null
+++ b/lang/en/mailtext.txt
@@ -0,0 +1,16 @@
+A page in your DokuWiki was added or changed. Here are the details:
+
+Date : @DATE@
+Browser : @BROWSER@
+IP-Address : @IPADDRESS@
+Hostname : @HOSTNAME@
+Old Revision: @OLDPAGE@
+New Revision: @NEWPAGE@
+Edit Summary: @SUMMARY@
+
+@DIFF@
+
+
+--
+This mail was generated by DokuWiki at
+@DOKUWIKIURL@
diff --git a/lang/en/newpage.txt b/lang/en/newpage.txt
new file mode 100644
index 000000000..9cba1e6c1
--- /dev/null
+++ b/lang/en/newpage.txt
@@ -0,0 +1,3 @@
+======This topic does not exist yet======
+
+You've followed a link to a topic that doesn't exist yet. You can create it by using the ''Edit this page'' button. \ No newline at end of file
diff --git a/lang/en/norev.txt b/lang/en/norev.txt
new file mode 100644
index 000000000..df7068a6c
--- /dev/null
+++ b/lang/en/norev.txt
@@ -0,0 +1,4 @@
+======No such revision======
+
+The specified revision doesn't exist. Use the ''Old revisions'' button for a list of old revisions of this document.
+
diff --git a/lang/en/password.txt b/lang/en/password.txt
new file mode 100644
index 000000000..45b88cf8a
--- /dev/null
+++ b/lang/en/password.txt
@@ -0,0 +1,10 @@
+Hi @FULLNAME@!
+
+Here is your userdata for @TITLE@ at @DOKUWIKIURL@
+
+Login : @LOGIN@
+Password : @PASSWORD@
+
+--
+This mail was generated by DokuWiki at
+@DOKUWIKIURL@
diff --git a/lang/en/preview.txt b/lang/en/preview.txt
new file mode 100644
index 000000000..8e32201a8
--- /dev/null
+++ b/lang/en/preview.txt
@@ -0,0 +1,4 @@
+======Preview======
+
+This is a preview of how your text will look like. Remember: It is **not saved** yet!
+
diff --git a/lang/en/read.txt b/lang/en/read.txt
new file mode 100644
index 000000000..84decc49e
--- /dev/null
+++ b/lang/en/read.txt
@@ -0,0 +1,2 @@
+This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong.
+
diff --git a/lang/en/recent.txt b/lang/en/recent.txt
new file mode 100644
index 000000000..c776c59e7
--- /dev/null
+++ b/lang/en/recent.txt
@@ -0,0 +1,5 @@
+======Recent Changes======
+
+The following pages were changed recently.
+
+
diff --git a/lang/en/register.txt b/lang/en/register.txt
new file mode 100644
index 000000000..d3b0311c5
--- /dev/null
+++ b/lang/en/register.txt
@@ -0,0 +1,6 @@
+====== Register as new user ======
+
+Fill in all the information below to create a new account in this wiki.
+Make sure you supply a **valid e-mail address** - your new password will
+be sent to it. The login name should be a valid [[doku>wiki:pagename|pagename]].
+
diff --git a/lang/en/revisions.txt b/lang/en/revisions.txt
new file mode 100644
index 000000000..b367a4554
--- /dev/null
+++ b/lang/en/revisions.txt
@@ -0,0 +1,4 @@
+======Old Revisions======
+
+These are the older revisons of the current document. To revert to an old revision, select it from below, click ''Edit this page'' and save it.
+
diff --git a/lang/en/searchpage.txt b/lang/en/searchpage.txt
new file mode 100644
index 000000000..4272d5f26
--- /dev/null
+++ b/lang/en/searchpage.txt
@@ -0,0 +1,6 @@
+======Search======
+
+You can find the results of your search below. If you didn't find what you were looking for, you can create
+a new page named after your query by using the ''Edit this page'' button.
+
+=====Results===== \ No newline at end of file
diff --git a/lang/en/showrev.txt b/lang/en/showrev.txt
new file mode 100644
index 000000000..9108273df
--- /dev/null
+++ b/lang/en/showrev.txt
@@ -0,0 +1,2 @@
+**This is an old revision of the document!**
+----
diff --git a/lang/en/wordblock.txt b/lang/en/wordblock.txt
new file mode 100644
index 000000000..f3a1518df
--- /dev/null
+++ b/lang/en/wordblock.txt
@@ -0,0 +1,6 @@
+======SPAM blocked======
+
+Your changes were **not** saved because it contains one or more blocked words.
+If you tried to spam the Wiki -- Bad dog! If you think this is an error, contact
+the administrator of this Wiki.
+
diff --git a/lang/es/diff.txt b/lang/es/diff.txt
new file mode 100644
index 000000000..33d8fb401
--- /dev/null
+++ b/lang/es/diff.txt
@@ -0,0 +1,5 @@
+======Diferencias======
+
+Muestra las diferencias entre la revision seleccionada y la
+versin actual de esta pgina.
+
diff --git a/lang/es/edit.txt b/lang/es/edit.txt
new file mode 100644
index 000000000..8ac7ab7c5
--- /dev/null
+++ b/lang/es/edit.txt
@@ -0,0 +1,5 @@
+Edita la pgina y pulsa ''Guardar''. Mira [[wiki:syntax]] para
+sintaxis Wiki. Por favor edita la pgina solo si puedes **mejorarla**. Si quieres
+testear algunas cosas aprende a dar tus primeros pasos en el
+[[wiki:playground]].
+
diff --git a/lang/es/editrev.txt b/lang/es/editrev.txt
new file mode 100644
index 000000000..f1dcb6fb1
--- /dev/null
+++ b/lang/es/editrev.txt
@@ -0,0 +1,2 @@
+**Has cargado una revisin vieja del documento!** Si la guardas crears una versin actual nueva con estos datos.
+---- \ No newline at end of file
diff --git a/lang/es/index.txt b/lang/es/index.txt
new file mode 100644
index 000000000..2b598905a
--- /dev/null
+++ b/lang/es/index.txt
@@ -0,0 +1,4 @@
+====== Indice ======
+
+Este es un ndice sobre todas las pginas disponibles ordenado por [[doku>wiki:namespaces|namespaces]].
+
diff --git a/lang/es/lang.php b/lang/es/lang.php
new file mode 100644
index 000000000..a8c2dd655
--- /dev/null
+++ b/lang/es/lang.php
@@ -0,0 +1,58 @@
+<?
+$lang['encoding'] = 'iso-8859-15';
+$lang['locales'] = array(
+ 'esp',
+ 'es',
+ 'es_ES@euro',
+ 'es_ES',
+ 'spanish',
+ );
+
+$lang['btn_edit'] = 'Edita esta pgina';
+$lang['btn_search'] = 'Buscar';
+$lang['btn_save'] = 'Guardar';
+$lang['btn_preview']= 'Previsualizacin';
+$lang['btn_top'] = 'Subir';
+$lang['btn_revs'] = 'Revisiones viejas';
+$lang['btn_recent'] = 'Cambios recientes';
+$lang['btn_upload'] = 'Cargar';
+$lang['btn_cancel'] = 'Cancelar';
+$lang['btn_index'] = 'Indice';
+
+$lang['txt_upload'] = 'Selecciona el fichero a cargar';
+$lang['txt_filename'] = 'Escribe el wikiname (opcional)';
+
+$lang['mediaselect'] = 'Seleccin Mediafile';
+$lang['fileupload'] = 'Subida de Mediafile';
+$lang['uploadsucc'] = 'Carga satisfactoria';
+$lang['uploadfail'] = 'La subida ha fallado. Puede ser por permisos equivocados?';
+
+$lang['hits'] = 'Hits';
+$lang['quickhits'] = 'Matching pagenames';
+$lang['toc'] = 'Tabla de Contenidos';
+$lang['current'] = 'actual';
+$lang['diff'] = 'muestra diferencias a la versin actual';
+$lang['line'] = 'Lnea';
+$lang['breadcrumb'] = 'Traza';
+$lang['lastmod'] = 'ltima modificacin';
+
+$lang['mail_newpage'] = '[DokuWiki] pgina aadida:';
+$lang['mail_changed'] = '[DokuWiki] pgina cambiada:';
+
+$lang['qb_bold'] = 'Texto Negrita';
+$lang['qb_italic'] = 'Texto Itlica';
+$lang['qb_underl'] = 'Texto Subrayado';
+$lang['qb_code'] = 'Texto de Cdigo';
+$lang['qb_h1'] = 'Titulo 1';
+$lang['qb_h2'] = 'Titulo 2';
+$lang['qb_h3'] = 'Titulo 3';
+$lang['qb_h4'] = 'Titulo 4';
+$lang['qb_h5'] = 'Titulo 5';
+$lang['qb_link'] = 'Enlace Interno';
+$lang['qb_extlink'] = 'Enlace Externo';
+$lang['qb_hr'] = 'Lnea horizontal';
+$lang['qb_ol'] = 'Item de Lista Ordenada';
+$lang['qb_ul'] = 'Item de Lista Desordenada';
+$lang['qb_media'] = 'Aadir Imgenes otros ficheros';
+
+?>
diff --git a/lang/es/mailtext.txt b/lang/es/mailtext.txt
new file mode 100644
index 000000000..c30df34b9
--- /dev/null
+++ b/lang/es/mailtext.txt
@@ -0,0 +1,15 @@
+Se ha cambiado o aadido una pagina en el DokuWiki-Manuales. Aqui estn los detalles
+
+Fecha : @DATE@
+Navegador : @BROWSER@
+Direccin-IP : @IPADDRESS@
+Nombre de Host : @HOSTNAME@
+Revision Vieja : @OLDPAGE@
+Revision Nueva : @NEWPAGE@
+
+@DIFF@
+
+
+--
+Este email ha sido generado por DokuWiki en
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/lang/es/newpage.txt b/lang/es/newpage.txt
new file mode 100644
index 000000000..dbee2119e
--- /dev/null
+++ b/lang/es/newpage.txt
@@ -0,0 +1,3 @@
+======Este tema no existe todava======
+
+Has seguido un enlace a un tema que no existe todava. Puedes crearlo usando el botn ''Edita esta pgina''. \ No newline at end of file
diff --git a/lang/es/norev.txt b/lang/es/norev.txt
new file mode 100644
index 000000000..9b8b15d11
--- /dev/null
+++ b/lang/es/norev.txt
@@ -0,0 +1,4 @@
+======No existe esta revision======
+
+La revision especificada no existe. Usa el botn ''Revisiones antiguas'' para una lista de revisiones antiguas de este documento.
+
diff --git a/lang/es/preview.txt b/lang/es/preview.txt
new file mode 100644
index 000000000..d9e89f1bc
--- /dev/null
+++ b/lang/es/preview.txt
@@ -0,0 +1,4 @@
+======Previsualizacin======
+
+Esto es una previsualizacin de cmo aparecer tu texto. Recuerda: **no est guardado** todava!
+
diff --git a/lang/es/read.txt b/lang/es/read.txt
new file mode 100644
index 000000000..694dc568a
--- /dev/null
+++ b/lang/es/read.txt
@@ -0,0 +1 @@
+Esta pgina es de solo lectura. Puedes ver la fuente pero no puedes cambiarla. Pregunta a tu administrador si crees que esto est mal.
diff --git a/lang/es/recent.txt b/lang/es/recent.txt
new file mode 100644
index 000000000..248c52894
--- /dev/null
+++ b/lang/es/recent.txt
@@ -0,0 +1,5 @@
+======Cambios Recientes======
+
+Las siguientes pginas han sido modificadas recientemente.
+
+
diff --git a/lang/es/revisions.txt b/lang/es/revisions.txt
new file mode 100644
index 000000000..fd5dff898
--- /dev/null
+++ b/lang/es/revisions.txt
@@ -0,0 +1,4 @@
+======Revisiones Antiguas======
+
+Estas son revisiones ms antiguas del documento actual. Para volver a una revisin antigua seleccionala de abajo, pulsa ''Edita esta pgina'' y gurdala.
+
diff --git a/lang/es/searchpage.txt b/lang/es/searchpage.txt
new file mode 100644
index 000000000..02f5043a6
--- /dev/null
+++ b/lang/es/searchpage.txt
@@ -0,0 +1,6 @@
+======Bsqueda======
+
+Puedes encontrar los resultados de tu bsqueda debajo. Si no has encontrado lo que buscabas, puedes crear
+una nueva pgina tras tu consulta utilizando el botn ''Edita esta pgina''.
+
+=====Resultados===== \ No newline at end of file
diff --git a/lang/es/showrev.txt b/lang/es/showrev.txt
new file mode 100644
index 000000000..e7ab4dec6
--- /dev/null
+++ b/lang/es/showrev.txt
@@ -0,0 +1,2 @@
+**Esta es una revisin vieja del documento!**
+----
diff --git a/lang/es/wordblock.txt b/lang/es/wordblock.txt
new file mode 100644
index 000000000..0e8c4d63b
--- /dev/null
+++ b/lang/es/wordblock.txt
@@ -0,0 +1,6 @@
+======SPAM bloqueado======
+
+Tus cambios **no** se han guardado porque contienen una o ms palabras prohibidas .
+Si has intentado spammear el Wiki -- Perro malo! Si crees que es un error contacta
+con el administrador de este Wiki.
+
diff --git a/lang/eu/diff.txt b/lang/eu/diff.txt
new file mode 100644
index 000000000..aacdc956e
--- /dev/null
+++ b/lang/eu/diff.txt
@@ -0,0 +1,5 @@
+======Aldaketak======
+
+Aukeratutako berrikuspenaren eta egungo bertsioaren arteko
+aldaketak aurkezten ditu.
+
diff --git a/lang/eu/edit.txt b/lang/eu/edit.txt
new file mode 100644
index 000000000..4a62c7d5e
--- /dev/null
+++ b/lang/eu/edit.txt
@@ -0,0 +1,3 @@
+Egin aldaketak eta ''Gorde'' pultsatu. Begiratu [[wiki:syntax]] Wiki-aren
+sintaxiarentzat. Mesedez aldaketak orrialdea **hobetzeko** bakarrik egin itzazu.
+Probak egin nahi badituzu, ikas ezazu [[wiki:playground]] erabiltzen.
diff --git a/lang/eu/editrev.txt b/lang/eu/editrev.txt
new file mode 100644
index 000000000..a1061fe49
--- /dev/null
+++ b/lang/eu/editrev.txt
@@ -0,0 +1,2 @@
+**Dokumentuaren berrikuspen zahar bat ireki duzu!** Gordetzen baduzu bertsio berri bat sortuko duzu datu hauekin.
+---- \ No newline at end of file
diff --git a/lang/eu/index.txt b/lang/eu/index.txt
new file mode 100644
index 000000000..4e6468e8c
--- /dev/null
+++ b/lang/eu/index.txt
@@ -0,0 +1,4 @@
+====== Aurkibidea ======
+
+[[doku>wiki:namespaces|namespaces]] bitartez ordenatutako aurkibidea da hau.
+
diff --git a/lang/eu/lang.php b/lang/eu/lang.php
new file mode 100644
index 000000000..f1464f83b
--- /dev/null
+++ b/lang/eu/lang.php
@@ -0,0 +1,85 @@
+<?
+$lang['encoding'] = 'iso-8859-15';
+$lang['locales'] = array(
+ 'eusk',
+ 'eu',
+ 'eu_ES@euro',
+ 'eu_ES',
+ 'euskara',
+ );
+
+$lang['btn_edit'] = 'Aldatu orri hau';
+$lang['btn_source'] = 'Kodea ikusi';
+$lang['btn_show'] = 'Orria ikusi';
+$lang['btn_create'] = 'Sortu orri hau';
+$lang['btn_search'] = 'Bilatu';
+$lang['btn_save'] = 'Gorde';
+$lang['btn_preview']= 'Aurreikuspena';
+$lang['btn_top'] = 'Itzuli gora';
+$lang['btn_revs'] = 'Aurreikuspen zaharrak';
+$lang['btn_recent'] = 'Arestiko aldaketak';
+$lang['btn_upload'] = 'Ireki';
+$lang['btn_cancel'] = 'Ezeztatu';
+$lang['btn_index'] = 'Aurkibidea';
+$lang['btn_secedit']= 'Aldatu';
+$lang['btn_login'] = 'Login';
+$lang['btn_logout'] = 'Atera';
+
+$lang['loggedinas'] = 'Logged in as';
+$lang['user'] = 'Erabiltzailea';
+$lang['pass'] = 'Pasahitza';
+$lang['fullname'] = 'Izen Deiturak';
+$lang['email'] = 'E-Maila';
+$lang['register'] = 'Erregistratu';
+$lang['badlogin'] = 'Barkatu, prozesuak huts egin du; saiatu berriz';
+
+$lang['regmissing'] = 'Barkatu, hutsune guztiak bete behar dituzu.';
+$lang['reguexists'] = 'Barkatu, izen bereko erabiltzailea existitzen da.';
+$lang['regsuccess'] = 'Erabiltzailea sortu da. Pasahitza mailez bidaliko zaizu.';
+$lang['regmailfail']= 'Badirudi arazoren bat egon dela pasahitza mailez bidaltzeko orduan. Administratzailearekin harremanetan jarri!';
+$lang['regbadmail'] = 'Emandako helbidea ez da zuzena - jarri harremanetan administratzailearekin hau akats bat dela uste baduzu';
+$lang['regpwmail'] = 'Zure DokuWiki pasahitza';
+$lang['reghere'] = 'Oraindik ez duzu konturik? Eginzazu bat!';
+
+$lang['txt_upload'] = 'Ireki nahi den fitxategia aukeratu';
+$lang['txt_filename'] = 'Idatzi wikiname-a (aukerazkoa)';
+
+$lang['mediaselect'] = 'Aukeratu Mediafile-a';
+$lang['fileupload'] = 'Igo Mediafile-a';
+$lang['uploadsucc'] = 'Igoera arrakastatsua';
+$lang['uploadfail'] = 'Igoerak huts egin du. Baimen arazoengatik agian?';
+
+$lang['hits'] = 'Hits';
+$lang['quickhits'] = 'Matching pagenames';
+$lang['toc'] = 'Eduki Taula';
+$lang['current'] = 'egungoa';
+$lang['diff'] = 'egungo bertsioarekin dituen aldaketak aurkezten ditu';
+$lang['line'] = 'Marra';
+$lang['breadcrumb'] = 'Traza';
+$lang['lastmod'] = 'Azken aldaketa';
+$lang['deleted'] = 'ezabatua';
+$lang['created'] = 'sortua';
+$lang['restored'] = 'berrikuspen zaharra berrezarria';
+$lang['summary'] = 'Edit summary';
+
+$lang['mail_newpage'] = '[DokuWiki] gehitutako orria:';
+$lang['mail_changed'] = '[DokuWiki] aldatutako orria:';
+
+$lang['qb_bold'] = 'Letra beltzez';
+$lang['qb_italic'] = 'Letra italiarrez';
+$lang['qb_underl'] = 'Azpimarratua';
+$lang['qb_code'] = 'Kodea';
+$lang['qb_h1'] = 'Izenburua 1';
+$lang['qb_h2'] = 'Izenburua 2';
+$lang['qb_h3'] = 'Izenburua 3';
+$lang['qb_h4'] = 'Izenburua 4';
+$lang['qb_h5'] = 'Izenburua 5';
+$lang['qb_link'] = 'Barruko Lotura';
+$lang['qb_extlink'] = 'Kanpoko Lotura';
+$lang['qb_hr'] = 'Horizontal Marra';
+$lang['qb_ol'] = 'Zerrenda ordenatuko gaia';
+$lang['qb_ul'] = 'Zerrenda desordenatuko gaia';
+$lang['qb_media'] = 'Irudiak/Fitxategiak gehitu';
+$lang['qb_sig'] = 'Insert Signature';
+
+?>
diff --git a/lang/eu/mailtext.txt b/lang/eu/mailtext.txt
new file mode 100644
index 000000000..77c9a5bd4
--- /dev/null
+++ b/lang/eu/mailtext.txt
@@ -0,0 +1,15 @@
+DokuWiki-Eskuliburuetan orriren bat aldatu edo gehitu da. Hemen dituzu xehetasunak
+
+Data : @DATE@
+Nabigatzailea : @BROWSER@
+IP-Helbidea : @IPADDRESS@
+Host izena : @HOSTNAME@
+Berrikuspen zaharra : @OLDPAGE@
+Berrikuspen berria : @NEWPAGE@
+
+@DIFF@
+
+
+--
+Email hau DokuWiki erabiliz sortu da;
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/lang/eu/newpage.txt b/lang/eu/newpage.txt
new file mode 100644
index 000000000..b7a552202
--- /dev/null
+++ b/lang/eu/newpage.txt
@@ -0,0 +1,3 @@
+======Gai hau ez da existitzen oraindik======
+
+Existitzen ez duen gai batera doan lotura bat jarraitu duzu. Zuk zeuk sortu dezakezu ''Sortu orri hau'' erabiliz. \ No newline at end of file
diff --git a/lang/eu/norev.txt b/lang/eu/norev.txt
new file mode 100644
index 000000000..f46398652
--- /dev/null
+++ b/lang/eu/norev.txt
@@ -0,0 +1,4 @@
+======Berrikuspen hau ez da existitzen======
+
+Zehaztutako berrikuspena ez da existitzen. Erabili ''Berrikuspen zaharrak'' dokumentu honen berrikuspen zaharren zerrenda bat ikusi ahal izateko.
+
diff --git a/lang/eu/preview.txt b/lang/eu/preview.txt
new file mode 100644
index 000000000..6bdb3c1dc
--- /dev/null
+++ b/lang/eu/preview.txt
@@ -0,0 +1,4 @@
+======Aurreikuspena======
+
+Hau zure testuaren aurrekispen bat besterik ez da. Gogoratu: **ez dago gordeta** oraindik!
+
diff --git a/lang/eu/read.txt b/lang/eu/read.txt
new file mode 100644
index 000000000..9e72b101a
--- /dev/null
+++ b/lang/eu/read.txt
@@ -0,0 +1 @@
+Orri hau irakurtzekoa bakarrik da. Jatorria ikusi dezakezu baina ezin duzu aldatu. Administratzaileari galde egin hau gaizki dagoela uste baduzu.
diff --git a/lang/eu/recent.txt b/lang/eu/recent.txt
new file mode 100644
index 000000000..95ac5384b
--- /dev/null
+++ b/lang/eu/recent.txt
@@ -0,0 +1,5 @@
+======Arestiko Aldaketak======
+
+Ondorengo orriak oraintsu aldatuak izan dira:
+
+
diff --git a/lang/eu/revisions.txt b/lang/eu/revisions.txt
new file mode 100644
index 000000000..286433e9b
--- /dev/null
+++ b/lang/eu/revisions.txt
@@ -0,0 +1,4 @@
+======Berrikuspen zaharrak======
+
+Hauek egungo dokumentua baino zaharragoak diren berrikuspenak dira. Hauetako bertsio batetara itzultzeko aukera ezazu behetik, pultsatu ''Sortu orri hau'' eta gorde.
+
diff --git a/lang/eu/searchpage.txt b/lang/eu/searchpage.txt
new file mode 100644
index 000000000..b44cabf13
--- /dev/null
+++ b/lang/eu/searchpage.txt
@@ -0,0 +1,9 @@
+======Bilaketa======
+
+Puedes encontrar los resultados de tu bsqueda debajo. Si no has encontrado lo que buscabas, puedes crear
+una nueva pgina tras tu consulta utilizando el botn ''Edita esta pgina''.
+
+Emaitzak ondorengo aurkiketan bilatu ditzakezu. Bilatzen zabiltzana aurkitu ez baduzu, zuk zeuk sortu
+dezakezu orri berri bat bilaketa ostean ''Sortu orri hau'' erabiliz.
+
+=====Aurkiketak===== \ No newline at end of file
diff --git a/lang/eu/showrev.txt b/lang/eu/showrev.txt
new file mode 100644
index 000000000..dfd929c4d
--- /dev/null
+++ b/lang/eu/showrev.txt
@@ -0,0 +1,2 @@
+**Hau dokumentuaren berrikuspen zahar bat da!**
+----
diff --git a/lang/eu/wordblock.txt b/lang/eu/wordblock.txt
new file mode 100644
index 000000000..f14731684
--- /dev/null
+++ b/lang/eu/wordblock.txt
@@ -0,0 +1,5 @@
+======SPAMaren aurkako babesa======
+
+Zure aldaketak **ez** dira gorde aurrez debekatutako hitzak erabili dituzulako.
+Wiki-a spammeatzen saitu bazara... -- Aiss osobuko! (VS). Hau akats bat dela uste
+baduzu jarri arremanetan Wiki-aren administratzailearekin.
diff --git a/lang/fi/backlinks.txt b/lang/fi/backlinks.txt
new file mode 100644
index 000000000..712b3ec3b
--- /dev/null
+++ b/lang/fi/backlinks.txt
@@ -0,0 +1,3 @@
+====== Linkitykset ======
+Tss lista tlle sivuille linkittvist sivuista. Huomaa, ett WikiSanalinkkej ei havaita
+tss yhteydess.
diff --git a/lang/fi/conflict.txt b/lang/fi/conflict.txt
new file mode 100644
index 000000000..793740635
--- /dev/null
+++ b/lang/fi/conflict.txt
@@ -0,0 +1,6 @@
+====== On olemassa uudempi versio ======
+Sinun muokkaamastasi dokumentintista on olemassa uudempi versio. Nin ky, kun toinen kyttj
+muuttaa dokumenttia sill aikaa, kun sin olit muokkaamassa sit.
+
+Tutki alla nkyvt eroavaisuudet kunnolla ja pt mik versio silytetn. Jos valitse talenna
+sinun versiosi tallennetaan. Valitse ''peru'' pitksesi tmnhetkisen version.
diff --git a/lang/fi/denied.txt b/lang/fi/denied.txt
new file mode 100644
index 000000000..2a17aa788
--- /dev/null
+++ b/lang/fi/denied.txt
@@ -0,0 +1,2 @@
+======Lupa evtty======
+Sinulla ei ole tarpeeksi valtuuksia jatkaa. Ehk unohdit kirjautua sisn?
diff --git a/lang/fi/diff.txt b/lang/fi/diff.txt
new file mode 100644
index 000000000..ca8940fd3
--- /dev/null
+++ b/lang/fi/diff.txt
@@ -0,0 +1,2 @@
+======Erot======
+Tm nytt erot valitun ja nykyisen version kesken tst sivusta.
diff --git a/lang/fi/edit.txt b/lang/fi/edit.txt
new file mode 100644
index 000000000..a3dd9998f
--- /dev/null
+++ b/lang/fi/edit.txt
@@ -0,0 +1,2 @@
+Muokkaa sivua ja paina ''Tallenna''. Katso [[wiki:syntax]] nhdksesi Wikisyntaksi. Muuta sivua
+vain jos voit **parantaa** sit. Jos haluat kokeilla Wiki hyv paikka siihen on [[wiki:playground]].
diff --git a/lang/fi/editrev.txt b/lang/fi/editrev.txt
new file mode 100644
index 000000000..1aa794128
--- /dev/null
+++ b/lang/fi/editrev.txt
@@ -0,0 +1,2 @@
+**Olet ladannut vanhan version dokumentista** Jos tallennat tulee tst uusin versio dokumentista.
+----
diff --git a/lang/fi/index.txt b/lang/fi/index.txt
new file mode 100644
index 000000000..f724bd0da
--- /dev/null
+++ b/lang/fi/index.txt
@@ -0,0 +1,3 @@
+====== hakemisto ======
+Tm on hakemisto kaikista saatavilla olevista sivuista jrjestettyn
+[[doku>wiki:namespace|nimiavaruuksittain]].
diff --git a/lang/fi/lang.php b/lang/fi/lang.php
new file mode 100644
index 000000000..93e97a40a
--- /dev/null
+++ b/lang/fi/lang.php
@@ -0,0 +1,99 @@
+<?
+$lang['encoding'] = 'iso-8859-15';
+$lang['locales'] = array(
+ 'fin',
+ 'fi_FI@euro',
+ 'fi',
+ 'finnish',
+ );
+
+$lang['btn_edit'] = 'Muokkaa tt sivua';
+$lang['btn_source'] = 'Nyt sivun lhdekoodi';
+$lang['btn_show'] = 'Nyt sivu';
+$lang['btn_create'] = 'Luo tm sivu';
+$lang['btn_search'] = 'Etsi';
+$lang['btn_save'] = 'Tallenna';
+$lang['btn_preview']= 'Esikatselu';
+$lang['btn_top'] = 'Takaisin yls';
+$lang['btn_revs'] = 'Vanhat versiot';
+$lang['btn_recent'] = 'Viimeiset muutokset';
+$lang['btn_upload'] = 'Lhet tiedosto';
+$lang['btn_cancel'] = 'Peru';
+$lang['btn_index'] = 'Hakemisto';
+$lang['btn_secedit']= 'Muokkaa';
+$lang['btn_login'] = 'Kirjaudu sisn';
+$lang['btn_logout'] = 'Kirjaudu ulos';
+
+$lang['loggedinas'] = 'Kirjautunut nimell';
+$lang['user'] = 'Kyttjnimi';
+$lang['pass'] = 'Salasana';
+$lang['fullname'] = 'Kokonimi';
+$lang['email'] = 'Shkposti';
+$lang['register'] = 'Rekisteridy';
+$lang['badlogin'] = 'Anteeksi, kyttjnimi tai salasana oli vr.';
+
+$lang['regmissing'] = 'Anteeksi, sinun tytyy tytt kaikki kentt.';
+$lang['reguexists'] = 'Anteeksi, kyttj tll kyttjnimell on jo olemassa';
+$lang['regsuccess'] = 'Kyttj luotiin ja salasana lhetettiin shkpostilla';
+$lang['regmailfail']= 'Nytt silt, ett tuli virheit salasanan lhettmisess
+shkpostiin. Ota yhteys yllpitjn!';
+$lang['regbadmail'] = 'Antamasi shkposti nytt epkelvolta. Jos pidt tt virheen ota yhteys yllpitjn.';
+$lang['regpwmail'] = 'Sinun DokuWiki salasanasi';
+$lang['reghere'] = 'Sinulla ei ole viel kyttjtili? Hanki sellainen';
+
+$lang['txt_upload'] = 'Valitse tiedosto lhetettvksi';
+$lang['txt_filename'] = 'Syt wikinimi (valinnainen)';
+$lang['lockedby'] = 'Tll hetkell tiedoston on lukinnnut';
+$lang['lockexpire'] = 'Lukitus pttyy';
+$lang['willexpire'] = 'Sinun lukitus tmn sivun muokkaukseen pttyy minuutin kuluttua.\nRistiriitojen vlttmiseksi paina esikatselu-nappia nollataksesi lukitusajan.';
+
+$lang['notsavedyet'] = 'Dokumentissa on tallentamattomia muutoksia, jotka hvivt.\n Haluatko varmasti jatkaa?';
+$lang['rssfailed'] = 'Virhe tapahtui noudettaessa tt sytett: ';
+$lang['nothingfound']= 'Mitn ei lydetty.';
+
+$lang['mediaselect'] = 'Mediatiedoston valinta';
+$lang['fileupload'] = 'Mediatiedoston lhetys';
+$lang['uploadsucc'] = 'Tiedoston lhetys onnistui';
+$lang['uploadfail'] = 'Tiedoston lhetys eponnistui. Ehk vrt oikeudet?';
+$lang['uploadwrong'] = 'Tiedoston lhetys evtty. Tm tiedostopte on kielletty';
+$lang['namespaces'] = 'Nimiavaruudet';
+$lang['mediafiles'] = 'Tarjolla olevat tiedostot';
+
+$lang['hits'] = 'Osumia';
+$lang['quickhits'] = 'Sopivat sivunimet';
+$lang['toc'] = 'Sisllysluettelo';
+$lang['current'] = 'nykyinen';
+$lang['yours'] = 'Sinun versiosi';
+$lang['diff'] = 'nyt eroavaisuudet nykyiseen versioon';
+$lang['line'] = 'Viiva';
+$lang['breadcrumb'] = 'Jljet';
+$lang['lastmod'] = 'Viimeksi muutettu';
+$lang['deleted'] = 'poistettu';
+$lang['created'] = 'luotu';
+$lang['restored'] = 'vanhat versiot palautettu';
+$lang['summary'] = 'Yhteenveto muokkauksesta';
+
+$lang['mail_newpage'] = '[DokuWiki] sivu listty:';
+$lang['mail_changed'] = '[DokuWiki] sivu muutettu:';
+
+$lang['nosmblinks'] = 'Linkit windows-jakoihin toimivat vain Microsof Internet Explorerilla.\nVoit silti kopioida ja liitt linkin.';
+
+$lang['qb_alert'] = 'Syt teksti jonka haluat muotoilla.\nSe listn dokumentin loppuun.';
+$lang['qb_bold'] = 'Lihavoitu teksti';
+$lang['qb_italic'] = 'Kursivoitu teksti';
+$lang['qb_underl'] = 'Alleviivattu teksti';
+$lang['qb_code'] = 'Kooditeksti';
+$lang['qb_h1'] = 'Taso 1 otsikko';
+$lang['qb_h2'] = 'Taso 2 otsikko';
+$lang['qb_h3'] = 'Taso 3 otsikko';
+$lang['qb_h4'] = 'Taso 4 otsikko';
+$lang['qb_h5'] = 'Taso 5 otsikko';
+$lang['qb_link'] = 'Sisinen linkki';
+$lang['qb_extlink'] = 'Ulkoinen linkki';
+$lang['qb_hr'] = 'Vaakaeroitin';
+$lang['qb_ol'] = 'Jrjestetyn listan osa ';
+$lang['qb_ul'] = 'Epjrjestetyn listan osa';
+$lang['qb_media'] = 'Lis kuvia ja muita tiedostoja';
+$lang['qb_sig'] = 'Lis allekirjoitus';
+
+?>
diff --git a/lang/fi/locked.txt b/lang/fi/locked.txt
new file mode 100644
index 000000000..eb1ddb647
--- /dev/null
+++ b/lang/fi/locked.txt
@@ -0,0 +1,3 @@
+====== Sivu lukittu ======
+Tm sivu on tll hetkell lukittuna, koska se on toisen kyttjn muokkauksessa. Joudut
+odottamaan, kunnes hn lopettaa muokkauksen, tai kunnes lukko aukeaa.
diff --git a/lang/fi/login.txt b/lang/fi/login.txt
new file mode 100644
index 000000000..3b034c9b3
--- /dev/null
+++ b/lang/fi/login.txt
@@ -0,0 +1,3 @@
+====== Sisnkirjautuminen ======
+Et ole tll hetkell kirjautunut sisn!. Anna kyttjtunnus ja salasana alle, kirjautuaksesi
+sisn. Muista ett cookiet pit olla pll, jotta sisnkirjautuminen onnistuu.
diff --git a/lang/fi/mailtext.txt b/lang/fi/mailtext.txt
new file mode 100644
index 000000000..ac479d7a9
--- /dev/null
+++ b/lang/fi/mailtext.txt
@@ -0,0 +1,16 @@
+DokuWikiisi listtiin tai siell muutettiin sivua. Tss yksityiskohdat
+
+Pivmr : @DATE@
+Selain : @BROWSER@
+IP-Osoite : @IPADDRESS@
+Isntnimi : @HOSTNAME@
+Vanha versio : @OLDPAGE@
+Uusi versio : @NEWPAGE@
+Yhteenveto muokkauksesta : @SUMMARY@
+
+@DIFF@
+
+
+--
+Tmn postin generoi DokuWiki
+@DOKUWIKIURL@
diff --git a/lang/fi/newpage.txt b/lang/fi/newpage.txt
new file mode 100644
index 000000000..2af790f44
--- /dev/null
+++ b/lang/fi/newpage.txt
@@ -0,0 +1,3 @@
+======Tt otsikkoa ei viel ole======
+
+Olet seurannut linkki otsikkoon jota ei viel ole. Voit luoda tmn kyttmll ''Luo tm sivu'' -nappia.
diff --git a/lang/fi/norev.txt b/lang/fi/norev.txt
new file mode 100644
index 000000000..3bffd7912
--- /dev/null
+++ b/lang/fi/norev.txt
@@ -0,0 +1,2 @@
+======Ei tllist versiota======
+Kyseist versiota ei ole. Kyt ''Vanha versio''-nappia nhdksesi listan tmn dokumentin vanhoista versioista
diff --git a/lang/fi/password.txt b/lang/fi/password.txt
new file mode 100644
index 000000000..c9809ea1c
--- /dev/null
+++ b/lang/fi/password.txt
@@ -0,0 +1,10 @@
+Hi @FULLNAME@!
+
+Tss kyttjtietosi sivulla @TITLE@ osoitteessa @DOKUWIKIURL@
+
+Kyttjtunnus : @LOGIN@
+Salasana : @PASSWORD@
+
+--
+Tmn postin generoi DokuWiki
+@DOKUWIKIURL@
diff --git a/lang/fi/preview.txt b/lang/fi/preview.txt
new file mode 100644
index 000000000..517df084b
--- /dev/null
+++ b/lang/fi/preview.txt
@@ -0,0 +1,2 @@
+======Esikatselu======
+Tm on esikatselu milt tekstisi tulee nyttmn. Muista tt **ei ole tallennettu** viel!
diff --git a/lang/fi/read.txt b/lang/fi/read.txt
new file mode 100644
index 000000000..e7e8a3112
--- /dev/null
+++ b/lang/fi/read.txt
@@ -0,0 +1 @@
+Tm sivu on vain luettavissa. Voit katsoa sen lhdekoodia, mutta ei muuttaa sit. Kysy yllpitjlt jos pidt tt vryyten.
diff --git a/lang/fi/recent.txt b/lang/fi/recent.txt
new file mode 100644
index 000000000..ebd2c2e18
--- /dev/null
+++ b/lang/fi/recent.txt
@@ -0,0 +1,3 @@
+======Viimeiset muutokset======
+Seuraavat sivut ovat muuttunuut viimeaikoina.
+
diff --git a/lang/fi/register.txt b/lang/fi/register.txt
new file mode 100644
index 000000000..ff0d3bab3
--- /dev/null
+++ b/lang/fi/register.txt
@@ -0,0 +1,4 @@
+====== Rekisteri uusi kyttj ======
+Tyt alla olevat tiedot tehdksesi uusi kyttjtili thn wikiin. Muista antaa **toimiva
+shkpostiosoite**, sill salasanasi lhetetn sinne. Kyttjnimi pit olla mys kyp
+[[doku>wiki:pagename|sivunimi]].
diff --git a/lang/fi/revisions.txt b/lang/fi/revisions.txt
new file mode 100644
index 000000000..d5df70a51
--- /dev/null
+++ b/lang/fi/revisions.txt
@@ -0,0 +1,3 @@
+======Vanha versio======
+Nm ovat vanhoja versioita nykyisest dokumentista. Jos haluat palauttaa vanhan version
+valitse se alhaalta, paina ''Muokkaa tt sivua'' ja tallenna se.
diff --git a/lang/fi/searchpage.txt b/lang/fi/searchpage.txt
new file mode 100644
index 000000000..175fd04c6
--- /dev/null
+++ b/lang/fi/searchpage.txt
@@ -0,0 +1,4 @@
+======Etsi======
+Lydt etsinnn tulokset alta. Jos et lytnyt etsimsi voit luoda uuden sivun tiedustelusi pohjalta kyttmll ''Muokkaa tt sivua'' -napilla.
+
+=====Tulokset=====
diff --git a/lang/fi/showrev.txt b/lang/fi/showrev.txt
new file mode 100644
index 000000000..3aef6f1ad
--- /dev/null
+++ b/lang/fi/showrev.txt
@@ -0,0 +1,2 @@
+**Tm on vanha versio dokumentista!**
+----
diff --git a/lang/fi/wordblock.txt b/lang/fi/wordblock.txt
new file mode 100644
index 000000000..2ea2d15c5
--- /dev/null
+++ b/lang/fi/wordblock.txt
@@ -0,0 +1,3 @@
+======SPMMI torjuttu======
+Muutoksiasi **ei** talletettu, koska ne pitivt sislln yhden tai useampia epkelpoja sanoja.
+Jos yritit spmmt Wiki, hpe! Jos pidt tt virheen ota yhtett wikin yllpitjn.
diff --git a/lang/fr/backlinks.txt b/lang/fr/backlinks.txt
new file mode 100644
index 000000000..975cf1423
--- /dev/null
+++ b/lang/fr/backlinks.txt
@@ -0,0 +1,4 @@
+====== Pages pointant sur la page en cours (backlinks) ======
+
+Ceci est la liste de pages qui pointent sur la page en cours.
+Notez bien que les liens "CamelCase" ne sont pas dectects comme des backlinks.
diff --git a/lang/fr/conflict.txt b/lang/fr/conflict.txt
new file mode 100644
index 000000000..4bbe0fb75
--- /dev/null
+++ b/lang/fr/conflict.txt
@@ -0,0 +1,9 @@
+====== Une version plus rcente existe dj ======
+
+Une version plus rcente du document que vous avez dit existe dj. Cel arrive
+lorsqu'un autre utilisateur sauve le document pendant que vous l'ditez.
+
+Examinez attentivement les diffrences ci-dessous, et dcidez quelle version
+conserver. Si vous choisissez ''Sauver'', votre version sera sauve. Cliquez
+sur ''Annuler'' pour conserver la version actuelle.
+
diff --git a/lang/fr/denied.txt b/lang/fr/denied.txt
new file mode 100644
index 000000000..3866625e3
--- /dev/null
+++ b/lang/fr/denied.txt
@@ -0,0 +1,3 @@
+======Autorisation refuse======
+
+Dsol, vous n'avez pas les droits pour continuer. Peut-tre avez-vous oubli de vous identifier ?
diff --git a/lang/fr/diff.txt b/lang/fr/diff.txt
new file mode 100644
index 000000000..d786c3362
--- /dev/null
+++ b/lang/fr/diff.txt
@@ -0,0 +1,5 @@
+====== Diffrences ======
+
+Cette page vous donne les diffrences entre la rvision choisie
+et la version actuelle de la page.
+
diff --git a/lang/fr/edit.txt b/lang/fr/edit.txt
new file mode 100644
index 000000000..1333a598c
--- /dev/null
+++ b/lang/fr/edit.txt
@@ -0,0 +1,6 @@
+Modifiez cette page et cliquez sur ''Sauver''. Voyez le [[wiki:syntax|Guide
+de la mise en page (en anglais)]] pour une aide propos du format. Veuillez ne
+modifier cette page que si vous pouvez l'**amliorer**. Si vous
+souhaitez faire des tests, faites vos premiers pas dans le
+[[wiki:playground|bac sable]].
+
diff --git a/lang/fr/editrev.txt b/lang/fr/editrev.txt
new file mode 100644
index 000000000..db9144038
--- /dev/null
+++ b/lang/fr/editrev.txt
@@ -0,0 +1,3 @@
+**Vous affichez une ancienne rvision du document!** Si vous le sauvez
+vous crerez une nouvelle version avec ce contenu.
+----
diff --git a/lang/fr/index.txt b/lang/fr/index.txt
new file mode 100644
index 000000000..5b7de9e68
--- /dev/null
+++ b/lang/fr/index.txt
@@ -0,0 +1,5 @@
+====== Index ======
+
+Voici un index de toutes les pages disponibles, tries par
+[[doku>wiki:namespace|catgorie]].
+
diff --git a/lang/fr/lang.php b/lang/fr/lang.php
new file mode 100644
index 000000000..7fbc4ab67
--- /dev/null
+++ b/lang/fr/lang.php
@@ -0,0 +1,96 @@
+<?
+$lang['encoding'] = 'iso-8859-15';
+$lang['locales'] = array(
+ 'fr_FR@euro',
+ 'fr_FR',
+ 'fr',
+ 'fra',
+ 'french',
+ );
+
+$lang['btn_edit'] = 'Editer cette page';
+$lang['btn_source'] = 'Montrer le source de la page';
+$lang['btn_show'] = 'Montrer la page';
+$lang['btn_create'] = 'Crer cette page';
+$lang['btn_search'] = 'Rechercher';
+$lang['btn_save'] = 'Sauver';
+$lang['btn_preview']= 'Apercu';
+$lang['btn_top'] = 'Haut de page';
+$lang['btn_revs'] = 'Anciennes rvisions';
+$lang['btn_recent'] = 'Derniers changements';
+$lang['btn_upload'] = 'Envoyer';
+$lang['btn_cancel'] = 'Annuler';
+$lang['btn_index'] = 'Index';
+$lang['btn_secedit']= 'Editer';
+$lang['btn_login'] = 'Connexion';
+$lang['btn_logout'] = 'Dconnexion';
+
+$lang['loggedinas'] = 'Connect en tant que';
+$lang['user'] = 'Utilisateur';
+$lang['pass'] = 'Mot de passe';
+$lang['fullname'] = 'Nom complet';
+$lang['email'] = 'Adresse mail';
+$lang['register'] = 'S\'enregistrer';
+$lang['badlogin'] = 'L\'utilisateur ou le mot de passe est incorrect.';
+
+$lang['regmailfail'] = 'Il semble y avoir un problme l\'envoi du mail. Contactez l\'administrateur.';
+$lang['regbadmail'] = 'L\'adresse mail semble incorrecte - Si vous pensez que c\'est une erreur, contactez l\'administrateur.';
+$lang['regpwmail'] = 'Votre mot de passe DokuWiki';
+$lang['reghere'] = 'Vous n\'avez pas encore de compte ? Enregistrez-vous ici.';
+
+$lang['txt_upload'] = 'Slectionnez un fichier envoyer';
+$lang['txt_filename'] = 'Donnez un "wikiname" (optionnel)';
+$lang['lockedby'] = 'Actuellement bloqu par';
+$lang['lockexpire'] = 'Le blocage expire ';
+$lang['willexpire'] = 'Votre blocage pour modifier cette page expire dans une minute.\nPour viter les conflits, utiliser le bouton Apercu pour rinitialiser le minuteur.';
+
+$lang['notsavedyet'] = 'Les changements non enregistrs seront perdus.\nVoulez-vous vraiment continuer ?';
+$lang['rssfailed'] = 'Une erreur s\'est produite en cherchant ce champ : ';
+$lang['nothingfound']= 'Pas de rponse.';
+
+$lang['mediaselect'] = 'Slection de fichier';
+$lang['fileupload'] = 'Envoi de fichier';
+$lang['uploadsucc'] = 'Envoi russi.';
+$lang['uploadfail'] = 'L\'envoi n\'a pas russi. Veuillez contacter l\'administrateur';
+$lang['uploadwrong'] = 'Envoi refus. Cette extension de fichier est interdite';
+$lang['namespaces'] = 'Catgories';
+$lang['mediafiles'] = 'Fichiers disponibles dans';
+
+$lang['hits'] = 'Occurrences trouves';
+$lang['quickhits'] = 'Pages trouves';
+$lang['toc'] = 'Table des matires';
+$lang['current'] = 'version actuelle';
+$lang['yours'] = 'votre version';
+$lang['diff'] = 'diffrences avec la version actuelle';
+$lang['line'] = 'Ligne';
+$lang['breadcrumb'] = 'Piste';
+$lang['lastmod'] = 'Dernire modification';
+$lang['deleted'] = 'efface';
+$lang['created'] = 'cre';
+$lang['restored'] = 'ancienne rvision restaure';
+$lang['summary'] = 'Rsum des modifications';
+
+$lang['mail_newpage'] = '[DokuWiki] page ajoute :';
+$lang['mail_changed'] = '[DokuWiki] page change :';
+
+$lang['nosmblinks'] = 'Les liens vers les disques partags de Windows ne fonctionnent qu\'avec Microsoft Internet Explorer.\nVou pouvez toujours faire un copier/coller du lien.';
+
+$lang['qb_alert'] = 'SVP, entrer le texte que vous souhaitez formater.\nIl sera ajout la fin du document.';
+$lang['qb_bold'] = 'Gras';
+$lang['qb_italic'] = 'Italique';
+$lang['qb_underl'] = 'Soulign';
+$lang['qb_code'] = 'Code';
+$lang['qb_h1'] = 'En-tte 1';
+$lang['qb_h2'] = 'En-tte 2';
+$lang['qb_h3'] = 'En-tte 3';
+$lang['qb_h4'] = 'En-tte 4';
+$lang['qb_h5'] = 'En-tte 5';
+$lang['qb_link'] = 'Lien interne';
+$lang['qb_extlink'] = 'Lien externe';
+$lang['qb_hr'] = 'Ligne horizontale';
+$lang['qb_ol'] = 'Liste numrote';
+$lang['qb_ul'] = 'Liste libre';
+$lang['qb_media'] = 'Ajouter des images et autres fichiers';
+$lang['qb_sig'] = 'Insrer une signature';
+
+?>
diff --git a/lang/fr/locked.txt b/lang/fr/locked.txt
new file mode 100644
index 000000000..f6acc7e98
--- /dev/null
+++ b/lang/fr/locked.txt
@@ -0,0 +1,4 @@
+====== Page bloque ======
+
+Cette page est actuellement bloque pour dition par un autre utilisateur.
+Vous devez attendre que l'autre utilisateur ait termin ou que la blocage de la page expire.
diff --git a/lang/fr/login.txt b/lang/fr/login.txt
new file mode 100644
index 000000000..16cce4f47
--- /dev/null
+++ b/lang/fr/login.txt
@@ -0,0 +1,4 @@
+====== Connexion ======
+
+Vous n'tes pas connect! Entrez vos identifiants ci-dessous pour vous connecter.
+Votre navigateur doit accepter les cookies pour pouvoir vous connecter.
diff --git a/lang/fr/mailtext.txt b/lang/fr/mailtext.txt
new file mode 100644
index 000000000..40fe41d37
--- /dev/null
+++ b/lang/fr/mailtext.txt
@@ -0,0 +1,16 @@
+Une page dans votre Wiki a t ajoute ou modifie. Voici les dtails
+
+Date : @DATE@
+Browser : @BROWSER@
+Adresse IP : @IPADDRESS@
+Nom d'hte : @HOSTNAME@
+Ancienne Rvision : @OLDPAGE@
+Nouvelle Rvision : @NEWPAGE@
+Rsum : @SUMMARY@
+
+@DIFF@
+
+
+--
+Ce message a t gnr par DokuWiki
+@DOKUWIKIURL@
diff --git a/lang/fr/newpage.txt b/lang/fr/newpage.txt
new file mode 100644
index 000000000..58aca8f6f
--- /dev/null
+++ b/lang/fr/newpage.txt
@@ -0,0 +1,4 @@
+====== Ce sujet n'existe pas encore ======
+
+Vous avez suivi un lien vers un sujet qui n'existe pas encore.
+Vous pouvez le crer l'aide du bouton ''Editer cette page''.
diff --git a/lang/fr/norev.txt b/lang/fr/norev.txt
new file mode 100644
index 000000000..409539c4e
--- /dev/null
+++ b/lang/fr/norev.txt
@@ -0,0 +1,5 @@
+====== Rvision non trouve ======
+
+La rvision demande n'existe pas. Utilisez le bouton 'Anciennes rvisions'
+pour une liste des rvisions de ce document.
+
diff --git a/lang/fr/password.txt b/lang/fr/password.txt
new file mode 100644
index 000000000..f872aedce
--- /dev/null
+++ b/lang/fr/password.txt
@@ -0,0 +1,10 @@
+Bonjour @FULLNAME@ !
+
+Voici vos identifiants pour @TITLE@ sur @DOKUWIKIURL@
+
+Utilisateur : @LOGIN@
+Mot de passe : @PASSWORD@
+
+--
+Ce mail a t envoy par DokuWiki de
+@DOKUWIKIURL@
diff --git a/lang/fr/preview.txt b/lang/fr/preview.txt
new file mode 100644
index 000000000..e42794950
--- /dev/null
+++ b/lang/fr/preview.txt
@@ -0,0 +1,5 @@
+====== Aperu ======
+
+Ceci est un aperu de votre document. Attention : Il n'est **pas encore
+sauv** !
+
diff --git a/lang/fr/read.txt b/lang/fr/read.txt
new file mode 100644
index 000000000..1a8ca17da
--- /dev/null
+++ b/lang/fr/read.txt
@@ -0,0 +1,3 @@
+Cette page est en lecture seule. Vous pouvez en voir la source mais pas la
+modifier. Contactez votre administrateur si vous souhaitez l'diter.
+
diff --git a/lang/fr/recent.txt b/lang/fr/recent.txt
new file mode 100644
index 000000000..3911cd552
--- /dev/null
+++ b/lang/fr/recent.txt
@@ -0,0 +1,5 @@
+====== Derniers changements ======
+
+Les pages suivantes ont t changes rcemment.
+
+
diff --git a/lang/fr/register.txt b/lang/fr/register.txt
new file mode 100644
index 000000000..e2304bfc8
--- /dev/null
+++ b/lang/fr/register.txt
@@ -0,0 +1,5 @@
+====== S'enregistrer comme nouvel utilisateur ======
+
+Remplissez toutes les informations ci-dessous pour vous crer un compte sur ce Wiki.
+Assurez-vous de fournir une **adresse mail valide** car votre mot de passe sera envoy cette adresse.
+Le nom d'utilisateur doit tre un [[doku>wiki:pagename|nom de page]] valide.
diff --git a/lang/fr/revisions.txt b/lang/fr/revisions.txt
new file mode 100644
index 000000000..6e8a24e1a
--- /dev/null
+++ b/lang/fr/revisions.txt
@@ -0,0 +1,6 @@
+====== Anciennes Rvisions ======
+
+Voici les anciennes rvisions du document en cours. Pour revenir une
+ancienne rvision, slectionnez-l ci-dessous, cliquez sur le bouton ''Editer
+cette page'' et sauvez-la.
+
diff --git a/lang/fr/searchpage.txt b/lang/fr/searchpage.txt
new file mode 100644
index 000000000..b4cbc55b6
--- /dev/null
+++ b/lang/fr/searchpage.txt
@@ -0,0 +1,6 @@
+====== Recherche ======
+
+Voici les rsultats de votre recherche. Si vous n'avez pas trouv ce que vous cherchiez, vous pouvez crer
+cette nouvelle page en cliquant sur le bouton ''Crer cette page''.
+
+===== Rsultats =====
diff --git a/lang/fr/showrev.txt b/lang/fr/showrev.txt
new file mode 100644
index 000000000..136ff35c9
--- /dev/null
+++ b/lang/fr/showrev.txt
@@ -0,0 +1,3 @@
+**Ceci est une ancienne rvision du document!** Cliquez sur le titre pour voir
+la dernire version.
+----
diff --git a/lang/fr/wordblock.txt b/lang/fr/wordblock.txt
new file mode 100644
index 000000000..ace1af829
--- /dev/null
+++ b/lang/fr/wordblock.txt
@@ -0,0 +1,6 @@
+====== Changement bloqu ======
+
+Vos changements n'ont **pas t sauvs** car ils contiennent un ou plusieurs
+mots bloqus. Si vous avez essay de spammer le Wiki -- mauvaise ide! Si vous
+pensez que c'est une erreur, contactez l'administrateur de ce Wiki.
+
diff --git a/lang/nl/backlinks.txt b/lang/nl/backlinks.txt
new file mode 100644
index 000000000..50d2f5007
--- /dev/null
+++ b/lang/nl/backlinks.txt
@@ -0,0 +1,4 @@
+====== Backlinks ======
+
+Dit is een lijst van pagina's die terug lijken te wijzen naar de huidige pagina. Let op: KameelLetter links worden niet gezien als backlinks.
+
diff --git a/lang/nl/conflict.txt b/lang/nl/conflict.txt
new file mode 100644
index 000000000..d3813c14c
--- /dev/null
+++ b/lang/nl/conflict.txt
@@ -0,0 +1,5 @@
+====== Er bestaat een nieuwere versie ======
+
+Er bestaat een nieuwere versie van het document dat je aan het aanpassen bent. Dit komt voor als een andere gebruiker het document aanpast toen jij hem aan het aanpassen was.
+
+Bekijk de verschillen die beneden weergegeven worden uitvoerig, beslis dan welke versie je wilt bewaren. Klik op ''opslaan'' om jouw versie te bewaren. Klik op ''annuleren'' om de huidige versie te bewaren.
diff --git a/lang/nl/denied.txt b/lang/nl/denied.txt
new file mode 100644
index 000000000..8bc5b4a47
--- /dev/null
+++ b/lang/nl/denied.txt
@@ -0,0 +1,3 @@
+======Toegang geweigerd======
+
+Sorry: je hebt niet voldoende rechten om verder te gaan. Misschien ben je vergeten in te loggen?
diff --git a/lang/nl/diff.txt b/lang/nl/diff.txt
new file mode 100644
index 000000000..f9e13bc84
--- /dev/null
+++ b/lang/nl/diff.txt
@@ -0,0 +1,3 @@
+======Verschillen======
+
+Dit geeft de verschillen weer tussen de geselecteerde revisie en de huidige revisie van de pagina.
diff --git a/lang/nl/edit.txt b/lang/nl/edit.txt
new file mode 100644
index 000000000..954afcaa3
--- /dev/null
+++ b/lang/nl/edit.txt
@@ -0,0 +1 @@
+Pas de pagina aan en klik op ''Opslaan''. Zie [[wiki:syntax]] voor de Wiki syntax. Pas alleen de pagina aan als je hem ook kan **verbeteren**. Als je wat wilt testen probeer dan de [[wiki:playground]].
diff --git a/lang/nl/editrev.txt b/lang/nl/editrev.txt
new file mode 100644
index 000000000..5cabeff57
--- /dev/null
+++ b/lang/nl/editrev.txt
@@ -0,0 +1,2 @@
+**Je hebt een oude revisie van het document geladen!** Als je nu opslaat wordt dit de nieuwe revisie en gaan de oude wijzigingen verloren.
+----
diff --git a/lang/nl/index.txt b/lang/nl/index.txt
new file mode 100644
index 000000000..ed17e4e4a
--- /dev/null
+++ b/lang/nl/index.txt
@@ -0,0 +1,4 @@
+====== Index ======
+
+Dit is een index pagina van alle beschikbare pagina's geordend op [[doku>wiki:namespaces|namespaces]].
+
diff --git a/lang/nl/lang.php b/lang/nl/lang.php
new file mode 100644
index 000000000..e356351bc
--- /dev/null
+++ b/lang/nl/lang.php
@@ -0,0 +1,99 @@
+<?
+$lang['encoding'] = 'utf-8';
+$lang['locales'] = array(
+ 'nld',
+ 'nl_NL@euro',
+ 'nl_NL',
+ 'nl',
+ 'dutch',
+ );
+
+$lang['btn_edit'] = 'Pagina aanpassen';
+$lang['btn_source'] = 'Toon pagina broncode';
+$lang['btn_show'] = 'Toon pagina';
+$lang['btn_create'] = 'Maak deze pagina aan';
+$lang['btn_search'] = 'Zoeken';
+$lang['btn_save'] = 'Opslaan';
+$lang['btn_preview']= 'Voorbeeld';
+$lang['btn_top'] = 'Terug naar boven';
+$lang['btn_revs'] = 'Oude revisies';
+$lang['btn_recent'] = 'Recente aanpassingen';
+$lang['btn_upload'] = 'Upload';
+$lang['btn_cancel'] = 'Annuleren';
+$lang['btn_index'] = 'Index';
+$lang['btn_secedit']= 'Aanpassen';
+$lang['btn_login'] = 'Inloggen';
+$lang['btn_logout'] = 'Uitloggen';
+
+$lang['loggedinas'] = 'Ingelogd als';
+$lang['user'] = 'Gebruikersnaam';
+$lang['pass'] = 'Wachtwoord';
+$lang['fullname'] = 'Volledige naam';
+$lang['email'] = 'E-mail';
+$lang['register'] = 'Registreren';
+$lang['badlogin'] = 'Sorry: de gebruikersnaam of het wachtwoord klopt niet.';
+
+$lang['regmissing'] = 'Sorry: je moet alle velden invullen.';
+$lang['reguexists'] = 'Sorry: er bestaat al een gebruiker met deze loginnaam.';
+$lang['regsuccess'] = 'De gebruiker is aangemaakt. Het wachtwoord is per e-mail verzonden.';
+$lang['regmailfail']= 'Het lijkt erop dat het sturen van de wachtwoordmail mislukt is. Neem a.u.b. contact op met de beheerder!';
+$lang['regbadmail'] = 'Het opgegeven e-mailadres lijkt ongeldig - als je denkt dat dit niet klopt neem dan contact op met de beheerder.';
+$lang['regpwmail'] = 'Je DokuWiki wachtwoord';
+$lang['reghere'] = 'Je hebt nog geen account? Vraag er eentje aan';
+
+$lang['txt_upload'] = 'Selecteer een bestand om te uploaden';
+$lang['txt_filename'] = 'Vul wiki-naam in (optioneel)';
+$lang['lockedby'] = 'Momenteel in gebruik door';
+$lang['lockexpire'] = 'Exclusief gebruiksrecht vervalt o';
+$lang['willexpire'] = 'Je exclusieve gebruiksrecht voor het aanpassen van deze pagina verloopt over een minuut.\nOm problemen te voorkomen klik op de Preview knop om de exclusieve gebruiksrechten te verlengen.';
+
+$lang['notsavedyet'] = 'Er zijn op dit moment wijzigingen die nog niet zijn opgeslagen, deze zullen verloren gaan.\nWeet je zeker dat je wilt doorgaan?';
+$lang['rssfailed'] = 'Er is een fout opgetreden bij het ophalen van de feed: ';
+$lang['nothingfound']= 'Er werd niets gevonden.';
+
+$lang['mediaselect'] = 'Mediafile selectie';
+$lang['fileupload'] = 'Mediafile upload';
+$lang['uploadsucc'] = 'Upload geslaagd';
+$lang['uploadfail'] = 'Upload mislukt. Misschien verkeerde permissies?';
+$lang['uploadwrong'] = 'Upload mislukt. Deze file-extensie is verboden';
+$lang['namespaces'] = 'Namespaces';
+$lang['mediafiles'] = 'Beschikbare bestanden in';
+
+$lang['hits'] = 'Hits';
+$lang['quickhits'] = 'Overeenkomende pagina namen';
+$lang['toc'] = 'Inhoudsopgave';
+$lang['current'] = 'huidige';
+$lang['yours'] = 'Jouw versie';
+$lang['diff'] = 'toon verschillen met huidige revisie';
+$lang['line'] = 'Regel';
+$lang['breadcrumb'] = 'Pad';
+$lang['lastmod'] = 'Laatst gewijzigd';
+$lang['deleted'] = 'verwijderd';
+$lang['created'] = 'aangemaakt';
+$lang['restored'] = 'oude revisie hersteld';
+$lang['summary'] = 'Samenvatting aanpassen';
+
+$lang['mail_newpage'] = '[DokuWiki] pagina toegevoegd:';
+$lang['mail_changed'] = '[DokuWiki] pagina aangepast:';
+
+$lang['nosmblinks'] = 'Linken naar Windows shares werkt alleen in Microsoft Internet Explorer.\nJe kan de link wel kopiren en plakken.';
+
+$lang['qb_alert'] = 'Voer de tekst in die je wilt opmaken.\nDe tekst wordt toegevoegd aan het eind van het document.';
+$lang['qb_bold'] = 'Vette tekst';
+$lang['qb_italic'] = 'Cursieve tekst';
+$lang['qb_underl'] = 'Onderstreepte tekst';
+$lang['qb_code'] = 'Code tekst';
+$lang['qb_h1'] = 'Niveau 1 kop';
+$lang['qb_h2'] = 'Niveau 2 kop';
+$lang['qb_h3'] = 'Niveau 3 kop';
+$lang['qb_h4'] = 'Niveau 4 kop';
+$lang['qb_h5'] = 'Niveau 5 kop';
+$lang['qb_link'] = 'Interne link';
+$lang['qb_extlink'] = 'Externe link';
+$lang['qb_hr'] = 'Horizontale lijn';
+$lang['qb_ol'] = 'Geordende lijst item';
+$lang['qb_ul'] = 'Ongeordende lijst item';
+$lang['qb_media'] = 'Voeg plaatjes en andere bestanden toe';
+$lang['qb_sig'] = 'Handtekening invoegen';
+
+?>
diff --git a/lang/nl/locked.txt b/lang/nl/locked.txt
new file mode 100644
index 000000000..ad3a9c965
--- /dev/null
+++ b/lang/nl/locked.txt
@@ -0,0 +1,5 @@
+====== Pagina in exclusief gebruik ======
+
+Deze pagina wordt momenteel aangepast door een andere gebruiker. Je moet
+wachten tot de gebruiker klaar is met aanpassen of totdat het gebruiksrecht
+vervalt.
diff --git a/lang/nl/login.txt b/lang/nl/login.txt
new file mode 100644
index 000000000..1e939569d
--- /dev/null
+++ b/lang/nl/login.txt
@@ -0,0 +1,4 @@
+====== Login ======
+
+Je bent op dit moment niet ingelogd! Voeg je login-gegevens hieronder in om in te loggen.
+Je browser moet cookies accepteren om in te kunnen loggen.
diff --git a/lang/nl/mailtext.txt b/lang/nl/mailtext.txt
new file mode 100644
index 000000000..558fc6ed4
--- /dev/null
+++ b/lang/nl/mailtext.txt
@@ -0,0 +1,16 @@
+Er is een pagina in je DokuWiki toegevoegd of gewijzigd. Hier zijn de details
+
+Datum : @DATE@
+Browser : @BROWSER@
+IP-Adres : @IPADDRESS@
+Hostname : @HOSTNAME@
+Oude revisie : @OLDPAGE@
+Nieuwe revisie: @NEWPAGE@
+Samenvatting : @SUMMARY@
+
+@DIFF@
+
+
+--
+Deze mail werd gegenereerd door DokuWiki op
+@DOKUWIKIURL@
diff --git a/lang/nl/newpage.txt b/lang/nl/newpage.txt
new file mode 100644
index 000000000..1de0ec89b
--- /dev/null
+++ b/lang/nl/newpage.txt
@@ -0,0 +1,3 @@
+======Dit onderwerp bestaat nog niet======
+
+Je hebt een link gevolgd naar een onderwerp dat nog niet betaat. Je kan hem aanmaken door op de ''Pagina aanpassen'' te klikken.
diff --git a/lang/nl/norev.txt b/lang/nl/norev.txt
new file mode 100644
index 000000000..842da1d08
--- /dev/null
+++ b/lang/nl/norev.txt
@@ -0,0 +1,4 @@
+======Revisie bestaat niet======
+
+De opgegeven revisie bestaat niet. Klik op ''Oude revisies'' voor een lijst van oude revisies van dit document.
+
diff --git a/lang/nl/password.txt b/lang/nl/password.txt
new file mode 100644
index 000000000..dee1dba89
--- /dev/null
+++ b/lang/nl/password.txt
@@ -0,0 +1,10 @@
+Hallo @FULLNAME@!
+
+Hier is je gebruikersinformatie for @TITLE@ op @DOKUWIKIURL@
+
+Gebruikersnaam: @LOGIN@
+Wachtwoord : @PASSWORD@
+
+--
+Deze mail werd gegenereerd door DokuWiki op
+@DOKUWIKIURL@
diff --git a/lang/nl/preview.txt b/lang/nl/preview.txt
new file mode 100644
index 000000000..680b89427
--- /dev/null
+++ b/lang/nl/preview.txt
@@ -0,0 +1,4 @@
+======Preview======
+
+Dit is een preview van de tekst zoals hij er uit komt te zien. Let op: het is nog **niet** opgeslagen!
+
diff --git a/lang/nl/read.txt b/lang/nl/read.txt
new file mode 100644
index 000000000..fc0763f8e
--- /dev/null
+++ b/lang/nl/read.txt
@@ -0,0 +1,2 @@
+Deze pagina is niet beschrijfbaar. Je kan alleen de broncode bekijken maar niks veranderen. Neem contact op met de beheerder als je denkt dat dit niet klopt.
+
diff --git a/lang/nl/recent.txt b/lang/nl/recent.txt
new file mode 100644
index 000000000..5213a7ce8
--- /dev/null
+++ b/lang/nl/recent.txt
@@ -0,0 +1,3 @@
+======Recente wijzigingen======
+
+De volgende pagina's zijn recentelijk aangepast.
diff --git a/lang/nl/register.txt b/lang/nl/register.txt
new file mode 100644
index 000000000..279863698
--- /dev/null
+++ b/lang/nl/register.txt
@@ -0,0 +1,5 @@
+====== Registreer als nieuwe gebruiker ======
+
+Vul alle informatie hieronder in om een nieuw account voor deze wiki aan te maken.
+Zorg dat je een **geldig e-mailadres** opgeeft - je nieuwe wachtwoord wordt hierheen gezonden. De gebruikersnaam moet een geldige [[doku>wiki:pagename|pagename]] zijn.
+
diff --git a/lang/nl/revisions.txt b/lang/nl/revisions.txt
new file mode 100644
index 000000000..8b3564123
--- /dev/null
+++ b/lang/nl/revisions.txt
@@ -0,0 +1,4 @@
+======Oude revisies======
+
+Dit zijn de oude revisies van het document. Om terug te keren naar een oude revisie selecteer hem hieronder en klik op de ''Pagina aanpassen'' en vervolgens op ''Opslaan''.
+
diff --git a/lang/nl/searchpage.txt b/lang/nl/searchpage.txt
new file mode 100644
index 000000000..7d793fa16
--- /dev/null
+++ b/lang/nl/searchpage.txt
@@ -0,0 +1,5 @@
+======Zoeken======
+
+Hieronder vind je de resultaten van de zoekopdracht. Als je niks gevonden hebt kun je een nieuwe pagina maken met als naam je zoekopdracht. Klik hiervoor op ''Pagina aanpassen''.
+
+=====Resultaten=====
diff --git a/lang/nl/showrev.txt b/lang/nl/showrev.txt
new file mode 100644
index 000000000..e1eada22d
--- /dev/null
+++ b/lang/nl/showrev.txt
@@ -0,0 +1,2 @@
+**Dit is een oude revisie van het document!**
+----
diff --git a/lang/nl/wordblock.txt b/lang/nl/wordblock.txt
new file mode 100644
index 000000000..7ecad3346
--- /dev/null
+++ b/lang/nl/wordblock.txt
@@ -0,0 +1,6 @@
+======SPAM geblokkeerd======
+
+Je wijzigingen zijn niet opgeslagen omdat ze een of meer geblokkeerde worden
+bevatten. Als je probeerde de Wiki te spammen -- Vieze hond! Als je denkt dat
+dit een fout is neem dan contact op met de beheerder van dit Wiki.
+
diff --git a/lang/no/backlinks.txt b/lang/no/backlinks.txt
new file mode 100644
index 000000000..074814cbc
--- /dev/null
+++ b/lang/no/backlinks.txt
@@ -0,0 +1,3 @@
+======Tilbakelinker======
+
+Dette er en fortegnelse over sider som ser ut til linke tilbake til den aktuelle siden. Husk at CamelCase-linker ikke blir oppdaget som tilbakelinker.
diff --git a/lang/no/conflict.txt b/lang/no/conflict.txt
new file mode 100644
index 000000000..e5746e81b
--- /dev/null
+++ b/lang/no/conflict.txt
@@ -0,0 +1,6 @@
+======Det fins en nyere versjon======
+
+Det fins en nyere versjon av dokumentet du har redigert. Dette kan skje nr en annen bruker redigerer dokumentet samtidig med deg.
+
+Legg nye merke til forskjellene som vises under, og velg deretter hvilken versjon du vil beholde. Om du velger ''**Lagre**'', s kommer din versjon til lagres. Velg ''**Avbryt**'' for beholde den nyeste versjonen (ikke din).
+
diff --git a/lang/no/denied.txt b/lang/no/denied.txt
new file mode 100644
index 000000000..3e7d4d547
--- /dev/null
+++ b/lang/no/denied.txt
@@ -0,0 +1,4 @@
+======Tilgang nektet======
+
+Dessverre har du ikke tilgang til fortsette. Kanskje du har glemt logge deg inn?
+
diff --git a/lang/no/diff.txt b/lang/no/diff.txt
new file mode 100644
index 000000000..ca90c340c
--- /dev/null
+++ b/lang/no/diff.txt
@@ -0,0 +1,4 @@
+======Forskjeller======
+
+Her vises forskjeller mellom den valgte versjonen og den nvrende versjonen av dokumentet.
+
diff --git a/lang/no/edit.txt b/lang/no/edit.txt
new file mode 100644
index 000000000..7abfc19c3
--- /dev/null
+++ b/lang/no/edit.txt
@@ -0,0 +1,2 @@
+Rediger siden og klikk p ''**Lagre**''. Se [[wiki:syntax]] for Wikisyntaks. Rediger bare siden hvis du kan **forbedre** sidens innhold. Hvis du vil teste ut hvordan saker og ting fungerer, kan du gjre det p [[wiki:playground|lekeplassen]].
+
diff --git a/lang/no/editrev.txt b/lang/no/editrev.txt
new file mode 100644
index 000000000..398ff1424
--- /dev/null
+++ b/lang/no/editrev.txt
@@ -0,0 +1,2 @@
+**Du har hentet en tidligere versjon av dokumentet!** Hvis du lagrer den tidligere versjonen s kommer du til lage en ny og aktiv versjon med dette innholdet.
+----
diff --git a/lang/no/index.txt b/lang/no/index.txt
new file mode 100644
index 000000000..79808e8a9
--- /dev/null
+++ b/lang/no/index.txt
@@ -0,0 +1,4 @@
+====== Indeks ======
+
+Dette er en indeks eller en fortegnelse over alle tilgjengelige sider, sortert etter [[doku>wiki:namespaces|wikinavn]].
+
diff --git a/lang/no/lang.php b/lang/no/lang.php
new file mode 100644
index 000000000..bc747a06a
--- /dev/null
+++ b/lang/no/lang.php
@@ -0,0 +1,100 @@
+<?
+$lang['encoding'] = 'iso-8859-15';
+$lang['locales'] = array(
+ 'norwegian',
+ 'nor',
+ 'no',
+ 'no_NO',
+ 'no',
+ 'norsk',
+ );
+
+$lang['btn_edit'] = 'Rediger denne siden';
+$lang['btn_source'] = 'Vis kildetekst';
+$lang['btn_show'] = 'Vis siden';
+$lang['btn_create'] = 'Lag denne siden';
+$lang['btn_search'] = 'Sk';
+$lang['btn_save'] = 'Lagre';
+$lang['btn_preview']= 'Forhndsvis';
+$lang['btn_top'] = 'Til starten av siden';
+$lang['btn_revs'] = 'Historikk';
+$lang['btn_recent'] = 'Siste nytt';
+$lang['btn_upload'] = 'Last opp';
+$lang['btn_cancel'] = 'Avbryt';
+$lang['btn_index'] = 'Indeks';
+$lang['btn_secedit']= 'Rediger';
+$lang['btn_login'] = 'Logg inn';
+$lang['btn_logout'] = 'Logg ut';
+
+$lang['loggedinas'] = 'Innlogget som';
+$lang['user'] = 'Brukernavn';
+$lang['pass'] = 'Passord';
+$lang['fullname'] = 'Navn';
+$lang['email'] = 'E-post';
+$lang['register'] = 'Registrer';
+$lang['badlogin'] = 'Ugyldig brukernavn og/eller passord.';
+
+$lang['regmissing'] = 'Vennligst fyll ut alle felt.';
+$lang['reguexists'] = 'Det fins allerede en bruker med det brukernavnet.';
+$lang['regsuccess'] = 'Brukerkonto er laget og passordet er blitt sendt via e-post.';
+$lang['regmailfail']= 'En feil oppstod da passordet ditt skulle sendes via e-post. Vennligst kontakt administratoren!';
+$lang['regbadmail'] = 'Den angitte e-postadressen ser ut til vre ugyldig - vennligst kontakt administratoren om du anser dette som feilaktig';
+$lang['regpwmail'] = 'Ditt DokuWikipassord';
+$lang['reghere'] = 'Har du ikke konto enn? Skaff deg en';
+
+$lang['txt_upload'] = 'Velg fil som du vil laste opp';
+$lang['txt_filename'] = 'Angi wikinavn (ikke obligatorisk)';
+$lang['lockedby'] = 'Stengt av';
+$lang['lockexpire'] = 'La avstengningen opphre';
+$lang['willexpire'] = 'Din redigeringsls for dette dokumentet kommer snart til opphre.\nFor unng versjonskonflikter br du forhndsgranske ditt dokument for forlenge redigeringslsen.';
+
+$lang['notsavedyet'] = 'Det fins endringer som ikke er lagret.\nEr du sikker p at du vil fortsette?';
+$lang['rssfailed'] = 'En feil oppstod da denne RSS-kilden skulle hentes: ';
+$lang['nothingfound']= 'Ingen data.';
+
+$lang['mediaselect'] = 'Valg av mediadokument';
+$lang['fileupload'] = 'Mediafil lastet opp';
+$lang['uploadsucc'] = 'Overfringen var vellykket';
+$lang['uploadfail'] = 'Overfringen var mislykket, feil rettigheter?';
+$lang['uploadwrong'] = 'Overfringen ble nektet. Denne filendelsen er ikke tillatt.';
+$lang['namespaces'] = 'Wikinavn';
+$lang['mediafiles'] = 'Tilgjengelige filer ';
+
+$lang['hits'] = 'Treff';
+$lang['quickhits'] = 'Matchende wikinavn';
+$lang['toc'] = 'Innholdsfortegnelse';
+$lang['current'] = 'aktuell';
+$lang['yours'] = 'Din versjon';
+$lang['diff'] = 'vis forskjeller med aktuell versjon';
+$lang['line'] = 'Rad';
+$lang['breadcrumb'] = 'Spor';
+$lang['lastmod'] = 'Sist oppdatert';
+$lang['deleted'] = 'slettet';
+$lang['created'] = 'lagret';
+$lang['restored'] = 'tidligere versjon er gjenopprettet';
+$lang['summary'] = 'Redigeringskommentar';
+
+$lang['mail_newpage'] = '[DokuWiki] side har blitt lagt til:';
+$lang['mail_changed'] = '[DokuWiki] side har blitt oppdatert:';
+
+$lang['nosmblinks'] = 'Lenker til Windowsressurser fungerer bare med Microsofts Internet Explorer.\nDu kan klippe og lime inn lenker hvis du anvender en annen nettleser enn MSIE..';
+
+$lang['qb_alert'] = 'Vennligst angi den teksten du vil formattere.\nDen vil bli lagt til p slutten av dokumentet.';
+$lang['qb_bold'] = 'Fet tekst';
+$lang['qb_italic'] = 'Kursiv tekst';
+$lang['qb_underl'] = 'Understreket tekst';
+$lang['qb_code'] = 'Kodetekst';
+$lang['qb_h1'] = 'Niv 1 Rubrikk';
+$lang['qb_h2'] = 'Niv 2 Rubrikk';
+$lang['qb_h3'] = 'Niv 3 Rubrikk';
+$lang['qb_h4'] = 'Niv 4 Rubrikk';
+$lang['qb_h5'] = 'Niv 5 Rubrikk';
+$lang['qb_link'] = 'Intern lenke';
+$lang['qb_extlink'] = 'Ekstern lenke';
+$lang['qb_hr'] = 'Horisontal strek';
+$lang['qb_ol'] = 'Punkt for sortert punktliste';
+$lang['qb_ul'] = 'Punkt for usortert punktliste';
+$lang['qb_media'] = 'Legg til bilder og andre filer';
+$lang['qb_sig'] = 'Fy til signatur';
+
+?>
diff --git a/lang/no/locked.txt b/lang/no/locked.txt
new file mode 100644
index 000000000..110ec49d0
--- /dev/null
+++ b/lang/no/locked.txt
@@ -0,0 +1,3 @@
+======Dokumentet er lst======
+
+Dette dokumentet er for tiden lst for redigering av en annen bruker. Du m vente til denne brukeren er ferdig med sin redigering, eller til dokumentlsen opphrer gjelde.
diff --git a/lang/no/login.txt b/lang/no/login.txt
new file mode 100644
index 000000000..0fdb51b98
--- /dev/null
+++ b/lang/no/login.txt
@@ -0,0 +1,4 @@
+======Logg inn======
+
+Du er ikke innlogget! Angi ditt brukernavn og passord nedenfor for logge inn. Sttte for skalte "cookies" m vre aktivert i din nettleser for at du skal kunne logge inn.
+
diff --git a/lang/no/mailtext.txt b/lang/no/mailtext.txt
new file mode 100644
index 000000000..9e1854287
--- /dev/null
+++ b/lang/no/mailtext.txt
@@ -0,0 +1,16 @@
+En side i din DokuWiki har blitt lagt til eller blitt endret. Info om endringen:
+
+Dato : @DATE@
+Nettleser : @BROWSER@
+IP-adresse : @IPADDRESS@
+Vertsnavn : @HOSTNAME@
+Tidligere versjon : @OLDPAGE@
+Aktuell versjon : @NEWPAGE@
+Redigeringskommentar : @SUMMARY@
+
+@DIFF@
+
+
+--
+Denne meldingen ble laget av DokuWiki
+@DOKUWIKIURL@
diff --git a/lang/no/newpage.txt b/lang/no/newpage.txt
new file mode 100644
index 000000000..6a13658c6
--- /dev/null
+++ b/lang/no/newpage.txt
@@ -0,0 +1,3 @@
+======Det fins ikke noe innhold======
+
+Du har klikket p en lenke til et emne som ikke fins enn. Du kan skape det gjennom klikke p ''**Rediger denne siden**''.
diff --git a/lang/no/norev.txt b/lang/no/norev.txt
new file mode 100644
index 000000000..482829e1d
--- /dev/null
+++ b/lang/no/norev.txt
@@ -0,0 +1,4 @@
+======Det fins ingen slik versjon======
+
+Den angitte versjonen fins ikke. Anvend ''**Historikk**'' for en oversikt over de versjoner som fins av dette dokumentet.
+
diff --git a/lang/no/password.txt b/lang/no/password.txt
new file mode 100644
index 000000000..1c92b4479
--- /dev/null
+++ b/lang/no/password.txt
@@ -0,0 +1,10 @@
+Hei @FULLNAME@!
+
+Her er dine brukeropplysninger for @TITLE@ p @DOKUWIKIURL@
+
+Brukernavn : @LOGIN@
+Passord : @PASSWORD@
+
+--
+Denne beskjeden ble skapt av DokuWiki
+@DOKUWIKIURL@
diff --git a/lang/no/preview.txt b/lang/no/preview.txt
new file mode 100644
index 000000000..d96517bce
--- /dev/null
+++ b/lang/no/preview.txt
@@ -0,0 +1,4 @@
+======Forhndsvisning======
+
+Dette er en forhndsvisning av hvordan din tekst kommer til se ut nr den blir vist. Husk at den er **ikke lagret** enn!
+
diff --git a/lang/no/read.txt b/lang/no/read.txt
new file mode 100644
index 000000000..c7e23c600
--- /dev/null
+++ b/lang/no/read.txt
@@ -0,0 +1,2 @@
+Denne siden er skrivebesyttet. Du kan se p den, men ikke endre den. Kontakt administratoren hvis du mener at du br kunne endre siden.
+
diff --git a/lang/no/recent.txt b/lang/no/recent.txt
new file mode 100644
index 000000000..062abd4bb
--- /dev/null
+++ b/lang/no/recent.txt
@@ -0,0 +1,5 @@
+======Siste nytt======
+
+Flgende sider/dokumenter har nylig blitt oppdatert.
+
+
diff --git a/lang/no/register.txt b/lang/no/register.txt
new file mode 100644
index 000000000..294a3f8c1
--- /dev/null
+++ b/lang/no/register.txt
@@ -0,0 +1,4 @@
+======Registrer deg som bruker======
+
+Angi all informasjon som det blir spurt om nedenfor for skape en ny brukerkonto for denne wiki. Vr spesielt nye med angi en **gyldig e-postadresse** - ditt passord vil bli sendt til den e-postadressen du angir. Brukernavnet m vre gyldig [[doku>wiki:pagename|pagename]].
+
diff --git a/lang/no/revisions.txt b/lang/no/revisions.txt
new file mode 100644
index 000000000..0b8504281
--- /dev/null
+++ b/lang/no/revisions.txt
@@ -0,0 +1,4 @@
+======Historikk======
+
+Her vises tidligere versjoner av dokumentet. For sette dette dokumentet tilbake til en tidligere versjon kan du velge den nskede versjonen nedenfor, klikke p ''Edit this page'' og lagre dokumentet.
+
diff --git a/lang/no/searchpage.txt b/lang/no/searchpage.txt
new file mode 100644
index 000000000..3a26b0eb8
--- /dev/null
+++ b/lang/no/searchpage.txt
@@ -0,0 +1,5 @@
+======Sk======
+
+Du ser resultatet av dette sket nedenfor. Hvis du ikke finner det du leter etter, s kan du skape en ny side med samme navn som ditt sk ved klikke p ''**Lag denne siden**''-knappen.
+
+=====Resultat=====
diff --git a/lang/no/showrev.txt b/lang/no/showrev.txt
new file mode 100644
index 000000000..8d1635da1
--- /dev/null
+++ b/lang/no/showrev.txt
@@ -0,0 +1,2 @@
+**Dette er en gammel revisjon av dokumentet!**
+----
diff --git a/lang/no/wordblock.txt b/lang/no/wordblock.txt
new file mode 100644
index 000000000..7e731f8d0
--- /dev/null
+++ b/lang/no/wordblock.txt
@@ -0,0 +1,4 @@
+======Ordsperre======
+
+Dine endringer har **ikke** blitt lagret p grunn av at de inneholder ett eller flere ord som er sperret. Hvis du har forskt lagre sppel, eller skalt ''spam'' -- Fy deg! Hvis du anser denne beskjeden som feilaktig kan du kontakte administratoren til denne wikien.
+
diff --git a/lang/pl/backlinks.txt b/lang/pl/backlinks.txt
new file mode 100644
index 000000000..06015b7c8
--- /dev/null
+++ b/lang/pl/backlinks.txt
@@ -0,0 +1,5 @@
+====== Odnonik z innych stron ======
+
+Poniej znajduje si lista stron, ktre zawieraj odnoniki na aktualn stron.
+Odnoniki **//PisaneRazem//** zostay pominite.
+
diff --git a/lang/pl/conflict.txt b/lang/pl/conflict.txt
new file mode 100644
index 000000000..e086f47f6
--- /dev/null
+++ b/lang/pl/conflict.txt
@@ -0,0 +1,9 @@
+====== Istnieje nowsza wersja strony ======
+
+Istnieje nowsza wersja edytowanej strony.
+Prawdopodobnie kto zmieni t stron w trakcie Twojej pracy.
+
+Przegldnij dokadnie ponisze rnice i zdecyduj, ktr wersj zatrzyma.
+Jeli naciniesz ''zapisz'' to Twoja wersja zostanie zapisana.
+Jeli naciniesz ''anuluj'' to zostanie wybrana stara wersja strony.
+
diff --git a/lang/pl/denied.txt b/lang/pl/denied.txt
new file mode 100644
index 000000000..28e0c5d7c
--- /dev/null
+++ b/lang/pl/denied.txt
@@ -0,0 +1,5 @@
+====== Brak dostpu ======
+
+Nie masz wystarczajcych uprawnie.
+Zaloguj si!
+
diff --git a/lang/pl/diff.txt b/lang/pl/diff.txt
new file mode 100644
index 000000000..71d72a477
--- /dev/null
+++ b/lang/pl/diff.txt
@@ -0,0 +1,4 @@
+====== Rnice ======
+
+Poniej podano rnice midzy wybran wersj a wersj aktualn.
+
diff --git a/lang/pl/edit.txt b/lang/pl/edit.txt
new file mode 100644
index 000000000..ba5716d02
--- /dev/null
+++ b/lang/pl/edit.txt
@@ -0,0 +1,5 @@
+Zredaguj t stron i nacinij ''zapisz''.
+
+Na stronie [[wiki:syntax]] znajduje si opis skadni wiki.
+Jeli chcesz powiczy zajrzyj na stron [[wiki:playground]].
+
diff --git a/lang/pl/editrev.txt b/lang/pl/editrev.txt
new file mode 100644
index 000000000..cef535bba
--- /dev/null
+++ b/lang/pl/editrev.txt
@@ -0,0 +1,3 @@
+**Edytujesz nieaktualn wersj strony!**
+Jeli j zapiszesz to stanie si ona wersj aktualn.
+---- \ No newline at end of file
diff --git a/lang/pl/index.txt b/lang/pl/index.txt
new file mode 100644
index 000000000..eea3847ae
--- /dev/null
+++ b/lang/pl/index.txt
@@ -0,0 +1,4 @@
+====== Indeks ======
+
+Indeks wszystkich dostpnych stron pogrupowanych wedug [[doku>wiki:namespaces|katalogw]].
+
diff --git a/lang/pl/lang.php b/lang/pl/lang.php
new file mode 100644
index 000000000..6b629dca8
--- /dev/null
+++ b/lang/pl/lang.php
@@ -0,0 +1,98 @@
+<?
+$lang['encoding'] = 'iso-8859-2';
+$lang['locales'] = array(
+ 'pl',
+ 'pl_pl',
+ 'pl',
+ 'polish',
+ );
+
+$lang['btn_edit'] = 'Edytuj stron';
+$lang['btn_source'] = 'Poka rdo strony';
+$lang['btn_show'] = 'Poka stron';
+$lang['btn_create'] = 'Utwrz stron';
+$lang['btn_search'] = 'Szukaj';
+$lang['btn_save'] = 'Zapisz';
+$lang['btn_preview']= 'Podgld';
+$lang['btn_top'] = 'Do gry';
+$lang['btn_revs'] = 'Poprzednie wersje';
+$lang['btn_recent'] = 'Ostatnie zmiany';
+$lang['btn_upload'] = 'Wylij';
+$lang['btn_cancel'] = 'Anuluj';
+$lang['btn_index'] = 'Indeks';
+$lang['btn_secedit']= 'Edytuj';
+$lang['btn_login'] = 'Zaloguj';
+$lang['btn_logout'] = 'Wyloguj';
+
+$lang['loggedinas'] = 'Zalogowany/a jako';
+$lang['user'] = 'Uytkownik';
+$lang['pass'] = 'Haso';
+$lang['fullname'] = 'Imi i nazwisko';
+$lang['email'] = 'E-mail';
+$lang['register'] = 'Zarejestruj';
+$lang['badlogin'] = 'Nazwa uytkownika lub haso s nieprawidowe.';
+
+$lang['regmissing'] = 'Wypenij wszystkie pola.';
+$lang['reguexists'] = 'Uytkownik o tej nazwie ju istnieje.';
+$lang['regsuccess'] = 'Utworzono uytkownika. Haso zostao przesane poczt.';
+$lang['regmailfail']= 'Wystpi bd przy wysyaniu hasa poczt!';
+$lang['regbadmail'] = 'Adres e-mail jest nieprawidowym!';
+$lang['regpwmail'] = 'Twoje haslo do DokuWiki'; /* no diacritics in mail subject */
+$lang['reghere'] = 'Nie masz jeszcze konta? Zdobd je';
+
+$lang['txt_upload'] = 'Wybierz plik do wysania';
+$lang['txt_filename'] = 'Nazwa pliku (opcjonalnie)';
+$lang['lockedby'] = 'Aktualnie zablokowane przez';
+$lang['lockexpire'] = 'Blokada wygasa';
+$lang['willexpire'] = 'Za minut Twoja blokada tej strony wyganie.\nW celu uniknicia konfliktw wywietl podgld aby odnowi blokad.';
+
+$lang['notsavedyet'] = 'Nie zapisane zmiany zostan utracone.\nCzy na pewno kontynuowa?';
+$lang['rssfailed'] = 'Wystpi bd przy pobieraniu tych danych: ';
+$lang['nothingfound']= 'Nic nie znaleziono.';
+
+$lang['mediaselect'] = 'Wysyanie pliku';
+$lang['fileupload'] = 'Wysyanie pliku';
+$lang['uploadsucc'] = 'Wysyanie powiodo si!';
+$lang['uploadfail'] = 'Bd wysyania. Czy prawa do katalogw s poprawne?';
+$lang['uploadwrong'] = 'Wysyanie zabronione. Nie mona wysa plikw z takim rozszerzeniem';
+$lang['namespaces'] = 'Katalogi';
+$lang['mediafiles'] = 'Dostpne pliki';
+
+$lang['hits'] = 'trafie';
+$lang['quickhits'] = 'Pasujce hasa';
+$lang['toc'] = 'Spis treci';
+$lang['current'] = 'aktualna';
+$lang['yours'] = 'Twoja wersja';
+$lang['diff'] = 'Poka rnic midzy wersjami';
+$lang['line'] = 'Linia';
+$lang['breadcrumb'] = 'cieka';
+$lang['lastmod'] = 'ostatnio zmieniane';
+$lang['deleted'] = 'usunito';
+$lang['created'] = 'stworzono';
+$lang['restored'] = 'przywrcono poprzedni wersj';
+$lang['summary'] = 'Opis zmian';
+
+$lang['mail_newpage'] = 'Strona dodana:';
+$lang['mail_changed'] = 'Strona zmieniona:';
+
+$lang['nosmblinks'] = 'Odnoniki do zasobw sieci Windows dziaaj tylko w przegldarce Internet Explorer.\n Moesz skopiowa odnonik.';
+
+$lang['qb_alert'] = 'Wpisz tekst, ktry chcesz sformatowa.\nBdzie on doczony na koniec strony.';
+$lang['qb_bold'] = 'Pogrubienie';
+$lang['qb_italic'] = 'Pochylenie';
+$lang['qb_underl'] = 'Podkrelenie';
+$lang['qb_code'] = 'Kod';
+$lang['qb_h1'] = 'Nagwek 1 stopnia';
+$lang['qb_h2'] = 'Nagwek 2 stopnia';
+$lang['qb_h3'] = 'Nagwek 3 stopnia';
+$lang['qb_h4'] = 'Nagwek 4 stopnia';
+$lang['qb_h5'] = 'Nagwek 5 stopnia';
+$lang['qb_link'] = 'Odnonik wewntrzny';
+$lang['qb_extlink'] = 'Odnonik zewntrzny';
+$lang['qb_hr'] = 'Linia pozioma';
+$lang['qb_ol'] = 'Numeracja';
+$lang['qb_ul'] = 'Wypunktowanie';
+$lang['qb_media'] = 'Dodaj obrazek lub inny plik';
+$lang['qb_sig'] = 'Wstaw podpis';
+
+?>
diff --git a/lang/pl/locked.txt b/lang/pl/locked.txt
new file mode 100644
index 000000000..587c4ea8d
--- /dev/null
+++ b/lang/pl/locked.txt
@@ -0,0 +1,5 @@
+====== Strona zablokowana ======
+
+Ta strona jest zablokowana do edycji przez innego uytkownika.
+Musisz zaczeka a uytkownik zakoczy redagowanie lub jego blokada wyganie.
+
diff --git a/lang/pl/login.txt b/lang/pl/login.txt
new file mode 100644
index 000000000..0377c0d7a
--- /dev/null
+++ b/lang/pl/login.txt
@@ -0,0 +1,5 @@
+====== Logowanie ======
+
+Wprowad nazw uytkownika i haso poniej aby si zalogowa.
+Twoja przegldarka musi mie wczon obsug ciasteczek (cookies).
+
diff --git a/lang/pl/mailtext.txt b/lang/pl/mailtext.txt
new file mode 100644
index 000000000..29e6a3367
--- /dev/null
+++ b/lang/pl/mailtext.txt
@@ -0,0 +1,18 @@
+Strona w Twoim DokuWiki zostaa dodana lub zmieniona.
+Szczegy poniej.
+
+Data : @DATE@
+Uytkownik : @BROWSER@
+Adres IP : @IPADDRESS@
+Komputer : @HOSTNAME@
+Stara wersja : @OLDPAGE@
+Nowa wersja : @NEWPAGE@
+Opis zmian : @SUMMARY@
+
+@DIFF@
+
+
+--
+
+List zosta wygenerowany przez DokuWiki pod adresem
+@DOKUWIKIURL@
diff --git a/lang/pl/newpage.txt b/lang/pl/newpage.txt
new file mode 100644
index 000000000..1985a0350
--- /dev/null
+++ b/lang/pl/newpage.txt
@@ -0,0 +1,5 @@
+====== Ta strona jeszcze nie istnieje ======
+
+Jeste na stronie, ktra jeszcze nie istnieje.
+Moesz utworzy t stron klikajc ''utwrz stron''.
+
diff --git a/lang/pl/norev.txt b/lang/pl/norev.txt
new file mode 100644
index 000000000..4f43aa806
--- /dev/null
+++ b/lang/pl/norev.txt
@@ -0,0 +1,5 @@
+====== Nie ma takiej wersji ======
+
+Nie ma takiej wersji.
+Kliknij przycisk ''poprzednie wersje'', eby wywietli list wszystkich wersji tej strony.
+
diff --git a/lang/pl/password.txt b/lang/pl/password.txt
new file mode 100644
index 000000000..4d8693ea1
--- /dev/null
+++ b/lang/pl/password.txt
@@ -0,0 +1,11 @@
+Witam @FULLNAME@!
+
+Dane uytkownika dla @TITLE@ pod adresem @DOKUWIKIURL@
+
+Uytkownik : @LOGIN@
+Haso : @PASSWORD@
+
+--
+
+List zosta wygenerowany przez DokuWiki pod adresem
+@DOKUWIKIURL@
diff --git a/lang/pl/preview.txt b/lang/pl/preview.txt
new file mode 100644
index 000000000..6f6083b4e
--- /dev/null
+++ b/lang/pl/preview.txt
@@ -0,0 +1,5 @@
+====== Podgld ======
+
+To jest podgld edytowanej strony.
+Pamitaj, e ta strona **nie** jest jeszcze zapisana!
+
diff --git a/lang/pl/read.txt b/lang/pl/read.txt
new file mode 100644
index 000000000..25dc04a9b
--- /dev/null
+++ b/lang/pl/read.txt
@@ -0,0 +1,3 @@
+Ta strona jest tylko do odczytu.
+Moesz wywietli rda tej strony ale nie moesz ich zmieni.
+
diff --git a/lang/pl/recent.txt b/lang/pl/recent.txt
new file mode 100644
index 000000000..619265b3c
--- /dev/null
+++ b/lang/pl/recent.txt
@@ -0,0 +1,4 @@
+====== Ostatnie zmiany ======
+
+Ponisze strony zostay ostatnio zmienione.
+
diff --git a/lang/pl/register.txt b/lang/pl/register.txt
new file mode 100644
index 000000000..1a7f5fae3
--- /dev/null
+++ b/lang/pl/register.txt
@@ -0,0 +1,6 @@
+====== Rejestracja nowego uytkownika ======
+
+Wypenij wszystkie pola formularza aby stworzy nowe konto w tym wiki.
+Upewnij si, e podae/a **waciwy adres e-mail**, poniewa nowe haso zostanie do Ciebie przesane poczt.
+Nazwa uytkownika powinna by zgodna z formatem z [[doku>wiki:pagename|nazwy strony]].
+
diff --git a/lang/pl/revisions.txt b/lang/pl/revisions.txt
new file mode 100644
index 000000000..935baf412
--- /dev/null
+++ b/lang/pl/revisions.txt
@@ -0,0 +1,5 @@
+====== Poprzednie wersje ======
+
+Poniej znajduj si poprzednie wersje tej strony.
+Aby przywrci poprzedni wersj wybierz j, rozpocznij edycj a potem zapisz.
+
diff --git a/lang/pl/searchpage.txt b/lang/pl/searchpage.txt
new file mode 100644
index 000000000..c967ad1ee
--- /dev/null
+++ b/lang/pl/searchpage.txt
@@ -0,0 +1,9 @@
+====== Wyszukiwanie ======
+
+Wyniki wyszukiwania znajduj si poniej.
+Jeeli nie znalaze/a tego czego szukasz,
+moesz utworzy stron o nazwie odpowiadajcej
+szukanemu hasu klikajc ''utwrz stron''.
+
+===== Wyniki =====
+
diff --git a/lang/pl/showrev.txt b/lang/pl/showrev.txt
new file mode 100644
index 000000000..43e826ed5
--- /dev/null
+++ b/lang/pl/showrev.txt
@@ -0,0 +1,2 @@
+**To jest stara wersja strony!**
+----
diff --git a/lang/pl/wordblock.txt b/lang/pl/wordblock.txt
new file mode 100644
index 000000000..353aca036
--- /dev/null
+++ b/lang/pl/wordblock.txt
@@ -0,0 +1,5 @@
+====== Blokowanie niewaciwych treci ======
+
+Twoje zmiany **nie** zostay zapisane poniewa zawieraj niedozwolone sowa.
+Jeli prbowae/a umieci niewaciwe treci to wstyd si!
+
diff --git a/lang/pt/backlinks.txt b/lang/pt/backlinks.txt
new file mode 100644
index 000000000..a8e8870d5
--- /dev/null
+++ b/lang/pt/backlinks.txt
@@ -0,0 +1,7 @@
+====== Backlinks ======
+
+Esta uma lista de todos os documentos que apresentam ligaes ao documento corrente.
+
+**Nota**: As ligaes do tipo CamelCase no so detectadas como sendo um //backlink//.
+
+-----
diff --git a/lang/pt/conflict.txt b/lang/pt/conflict.txt
new file mode 100644
index 000000000..b07dcd4f2
--- /dev/null
+++ b/lang/pt/conflict.txt
@@ -0,0 +1,12 @@
+====== Conflito de Edio ======
+
+**Ateno**: Existe uma verso mais recente do que a verso usada no comeo da sua edio.
+Isto acontece quando outra pessoa editou este documento entretanto e j gravou as alteraes efectuadas.
+
+Por favor, examine todas as diferenas mostradas abaixo com ateno, e decida qual a verso que dever ser tornada a mais actual:
+ * Se escolher <Gravar> a sua verso ser sobreposta verso editada pela outra pessoa, que ser perdida.
+ * Se escolher <Cancelar> a verso editada pela outra pessoa ser a verso final, e a sua ser perdida.
+
+**Nota**: Sem que efectue a consolidao das alteraes de ambas as revises ao documento ir sempre perder uma das verses.
+
+----
diff --git a/lang/pt/denied.txt b/lang/pt/denied.txt
new file mode 100644
index 000000000..e6e4900e9
--- /dev/null
+++ b/lang/pt/denied.txt
@@ -0,0 +1,5 @@
+====== Permisso Negada ======
+
+No possui direitos e permisses suficientes para continuar. Por acaso, no se esqueceu de entrar em sesso?
+
+----
diff --git a/lang/pt/diff.txt b/lang/pt/diff.txt
new file mode 100644
index 000000000..8f62971bd
--- /dev/null
+++ b/lang/pt/diff.txt
@@ -0,0 +1,5 @@
+====== Diferenas ======
+
+Esta pgina mostra as diferenas entre a reviso do documento que escolheu e a verso actual.
+
+----
diff --git a/lang/pt/edit.txt b/lang/pt/edit.txt
new file mode 100644
index 000000000..7eb8e62ea
--- /dev/null
+++ b/lang/pt/edit.txt
@@ -0,0 +1,8 @@
+Edite o documento e clique no boto <Gravar>.\\
+Reveja a [[wiki:syntax | sintaxe]] das regras de formatao do texto.
+
+Por favor, altere o contedo deste documento apenas quando puder **melhor-lo**.\\
+Se pretende testar os seus conhecimentos no uso deste motor Wiki, realize os seus testes no [[wiki:playground | Recreio]].
+
+----
+
diff --git a/lang/pt/editrev.txt b/lang/pt/editrev.txt
new file mode 100644
index 000000000..3899d257d
--- /dev/null
+++ b/lang/pt/editrev.txt
@@ -0,0 +1,5 @@
+**Ateno**: Carregou uma reviso antiga do documento!
+
+Se gravar esta reviso ir criar uma nova verso actual do documento com este contedo, que substituir a verso actual.
+
+----
diff --git a/lang/pt/index.txt b/lang/pt/index.txt
new file mode 100644
index 000000000..350a30108
--- /dev/null
+++ b/lang/pt/index.txt
@@ -0,0 +1,6 @@
+====== ndice ======
+
+Este ndice mostra todos os documentos disponveis neste site Wiki, [[doku>wiki:namespaces | agrupados]] por assunto.
+
+----
+
diff --git a/lang/pt/lang.php b/lang/pt/lang.php
new file mode 100644
index 000000000..284f023a6
--- /dev/null
+++ b/lang/pt/lang.php
@@ -0,0 +1,99 @@
+<?
+$lang['encoding'] = 'iso-8859-15';
+$lang['locales'] = array(
+ 'prt',
+ 'pt_PT@euro',
+ 'pt_PT',
+ 'pt',
+ 'portuguese',
+ );
+
+$lang['btn_edit'] = 'Editar Pgina';
+$lang['btn_source'] = 'Ver em bruto';
+$lang['btn_show'] = 'Ver Pgina';
+$lang['btn_create'] = 'Criar Pgina';
+$lang['btn_search'] = 'Pesquisar';
+$lang['btn_save'] = 'Gravar';
+$lang['btn_preview'] = 'Prever';
+$lang['btn_top'] = 'Voltar ao topo';
+$lang['btn_revs'] = 'Revises';
+$lang['btn_recent'] = 'Alt. Recentes';
+$lang['btn_upload'] = 'Upload';
+$lang['btn_cancel'] = 'Cancelar';
+$lang['btn_index'] = 'ndice';
+$lang['btn_secedit'] = 'Editar';
+$lang['btn_login'] = 'Entrar em sesso';
+$lang['btn_logout'] = 'Sair da sesso';
+
+$lang['loggedinas'] = 'Est em sesso como';
+$lang['user'] = 'Utilizador';
+$lang['pass'] = 'Senha';
+$lang['fullname'] = 'Nome completo';
+$lang['email'] = 'e-mail';
+$lang['register'] = 'Inscrever-se';
+$lang['badlogin'] = 'O utilizador invlido ou senha invlida.';
+
+$lang['regmissing'] = 'Por favor, preencha todos os campos.';
+$lang['reguexists'] = 'Este utilizador j est inscrito. Por favor escolha outro nome de utilizador.';
+$lang['regsuccess'] = 'O utilizador foi criado. A senha ser enviada para o endereo de correio electrnico usado na inscrio.';
+$lang['regmailfail'] = 'Houve um erro no envio da senha por e-mail. Por favor, contacte o administrador!';
+$lang['regbadmail'] = 'O endereo de correio electrnico invlido. Se o endereo est correcto, e isto um erro, por favor, contacte o administrador!';
+$lang['regpwmail'] = 'A sua senha DokuWiki';
+$lang['reghere'] = 'Para se inscrever, clique em .';
+
+$lang['txt_upload'] = 'Escolha ficheiro para upload';
+$lang['txt_filename'] = 'Insira o nome wiki (opcional)';
+$lang['lockedby'] = 'Bloqueado por';
+$lang['lockexpire'] = 'Expira em';
+$lang['willexpire'] = 'O bloqueio de edio para este documento ir expirar num minuto.\nPara evitar conflitos de edio, clique no boto <Prever> para re-iniciar o temporizador de bloqueio.';
+
+$lang['notsavedyet'] = 'Existem alteraes no gravadas, que sero perdidas se continuar.\nDeseja realmente continuar?';
+$lang['rssfailed'] = 'Ocorreu um erro neste canal RSS: ';
+$lang['nothingfound'] = 'Nada foi encontrado.';
+
+$lang['mediaselect'] = 'Seleco de ficheiros';
+$lang['fileupload'] = 'Carregamento de ficheiros';
+$lang['uploadsucc'] = 'Carregamento com sucesso';
+$lang['uploadfail'] = 'Falhou o carregamento. Talvez por no ter permisses?';
+$lang['uploadwrong'] = 'Carregamento negado. Esta extenso est proibida.';
+$lang['namespaces'] = 'Grupos';
+$lang['mediafiles'] = 'Ficheiros disponveis em';
+
+$lang['hits'] = 'Resultados';
+$lang['quickhits'] = 'Documentos encontrados';
+$lang['toc'] = 'Tabela de Contedos';
+$lang['current'] = 'Actual';
+$lang['yours'] = 'A sua verso';
+$lang['diff'] = 'mostrar diferenas com a verso actual';
+$lang['line'] = 'Linha';
+$lang['breadcrumb'] = 'Visitou';
+$lang['lastmod'] = 'Modificado em';
+$lang['deleted'] = 'Documento automaticamente removido.';
+$lang['created'] = 'Criao deste novo documento.';
+$lang['restored'] = 'Verso anterior restaurada.';
+$lang['summary'] = 'Sumrio da Edio';
+
+$lang['mail_newpage'] = '[DokuWiki] documento adicionado:';
+$lang['mail_changed'] = '[DokuWiki] documento modificado:';
+
+$lang['nosmblinks'] = 'Ligao a pastas Windows partilhadas apenas funciona com o Microsoft Internet Explorer.\nPode no entanto copiar e colar o link.';
+
+$lang['qb_alert'] = 'Por favor, insira o texto que deseja formatar.\nSer acrescentado ao fim do documento.';
+$lang['qb_bold'] = 'Bold Text';
+$lang['qb_italic'] = 'Text Itlico';
+$lang['qb_underl'] = 'Text Sublinhado';
+$lang['qb_code'] = 'Text Cdigo';
+$lang['qb_h1'] = 'Cabealho Nvel 1';
+$lang['qb_h2'] = 'Cabealho Nvel 2';
+$lang['qb_h3'] = 'Cabealho Nvel 3';
+$lang['qb_h4'] = 'Cabealho Nvel 4';
+$lang['qb_h5'] = 'Cabealho Nvel 5';
+$lang['qb_link'] = 'Ligao Interna';
+$lang['qb_extlink'] = 'Ligao Externa';
+$lang['qb_hr'] = 'Barra Horizontal';
+$lang['qb_ol'] = 'Item numa Lista Ordenada';
+$lang['qb_ul'] = 'Item numa Lista No Ordenada';
+$lang['qb_media'] = 'Incluir imagens e outros ficheiros';
+$lang['qb_sig'] = 'Inserir Assinatura';
+
+?>
diff --git a/lang/pt/locked.txt b/lang/pt/locked.txt
new file mode 100644
index 000000000..3b4ca7c13
--- /dev/null
+++ b/lang/pt/locked.txt
@@ -0,0 +1,6 @@
+====== Pgina em Edio ======
+
+Esta pgina est bloqueada por outro utilizador, que se encontra a edit-la neste momento.\\
+Ter que aguardar que o utilizador termine a edio e grava as alteraes ou ento que temporizador de bloqueio expire.
+
+----
diff --git a/lang/pt/login.txt b/lang/pt/login.txt
new file mode 100644
index 000000000..c6c658943
--- /dev/null
+++ b/lang/pt/login.txt
@@ -0,0 +1,8 @@
+====== Sesso ======
+
+No est actualmente em sesso!\\
+Introduza as suas credenciais de autenticao para entrar em sesso.
+
+**Nota**: Precisa de ter //cookies// activos no seu browser.
+
+----
diff --git a/lang/pt/mailtext.txt b/lang/pt/mailtext.txt
new file mode 100644
index 000000000..a3df1a686
--- /dev/null
+++ b/lang/pt/mailtext.txt
@@ -0,0 +1,18 @@
+Um documento no site Wiki @DOKUWIKIURL@ foi criado ou modificado.
+
+Aqui esto os detalhes:
+
+Data : @DATE@
+Browser : @BROWSER@
+Endereo IP : @IPADDRESS@
+Hostname : @HOSTNAME@
+Documento Ant.: @OLDPAGE@
+Documento Novo: @NEWPAGE@
+
+@DIFF@
+
+
+
+----
+
+Esta mensagem foi gerada automaticamente pelo motor DokuWiki.
diff --git a/lang/pt/newpage.txt b/lang/pt/newpage.txt
new file mode 100644
index 000000000..9fd395da6
--- /dev/null
+++ b/lang/pt/newpage.txt
@@ -0,0 +1,7 @@
+====== Documento Inexistente ======
+
+Acaba de tentar aceder a um documento que ainda no existe.
+
+Pode criar o contedo deste novo documento aps clicar no boto <Editar Pgina>.
+
+----
diff --git a/lang/pt/norev.txt b/lang/pt/norev.txt
new file mode 100644
index 000000000..0cd30d0a4
--- /dev/null
+++ b/lang/pt/norev.txt
@@ -0,0 +1,7 @@
+====== Reviso Inexistente ======
+
+A reviso especificada no existe.
+
+Clique no boto <Revises> para aceder lista de revises deste documento.
+
+----
diff --git a/lang/pt/password.txt b/lang/pt/password.txt
new file mode 100644
index 000000000..d989eb555
--- /dev/null
+++ b/lang/pt/password.txt
@@ -0,0 +1,12 @@
+Ol, @FULLNAME@!
+
+Efectuou a inscrio no WikiSite @TITLE@, em @DOKUWIKIURL@.
+
+Aqui esto as suas credenciais de autenticao:
+
+Utilizador : @LOGIN@
+Senha : @PASSWORD@
+
+----
+
+Esta mensagem foi gerada pelo DokuWiki, em @DOKUWIKIURL@.
diff --git a/lang/pt/preview.txt b/lang/pt/preview.txt
new file mode 100644
index 000000000..5db4e3e69
--- /dev/null
+++ b/lang/pt/preview.txt
@@ -0,0 +1,8 @@
+====== Previso ======
+
+Esta a previso de como ir ficar o contedo do documento se clicar no boto <Gravar>.
+
+**Ateno**: O documento ainda no se encontra gravado.\\
+ necessrio clicar no boto <Gravar> para efectivar as modificaes que tenha realizado.
+
+----
diff --git a/lang/pt/read.txt b/lang/pt/read.txt
new file mode 100644
index 000000000..f132abcff
--- /dev/null
+++ b/lang/pt/read.txt
@@ -0,0 +1,5 @@
+**Ateno**: Este documento apenas de leitura.\\
+Pode ver o documento em bruto mas no pode gravar qualquer alterao.\\ \\
+Informe-se com o administrador deste Wiki se achar que isto no est correcto.
+
+----
diff --git a/lang/pt/recent.txt b/lang/pt/recent.txt
new file mode 100644
index 000000000..deba58f9a
--- /dev/null
+++ b/lang/pt/recent.txt
@@ -0,0 +1,5 @@
+====== Alteraes Recentes ======
+
+Os seguintes documentos foram alterados recentemente.
+
+----
diff --git a/lang/pt/register.txt b/lang/pt/register.txt
new file mode 100644
index 000000000..ed23d7511
--- /dev/null
+++ b/lang/pt/register.txt
@@ -0,0 +1,8 @@
+====== Inscrio ======
+
+Por favor, preencha todos os campos com a informao correspondente, para poder criar uma nova conta neste SiteWiki.
+
+**Nota**: O nome de utilizador deve cumprir as mesmas regras de noemao de documentos Wiki vlidos.\\
+**Ateno**: Verifique que o endereo de correio electrnico que preencheu vlido, pois a sua senha ser enviada por e-mail.
+
+----
diff --git a/lang/pt/revisions.txt b/lang/pt/revisions.txt
new file mode 100644
index 000000000..ca3a7ee6e
--- /dev/null
+++ b/lang/pt/revisions.txt
@@ -0,0 +1,11 @@
+====== Revises ======
+
+Estas so as revises ao documento corrente.\\
+Para reverter o documento para uma destas revises:
+ * Escolha a reviso do documento da lista abaixo;
+ * Clique depois no boto <Editar Pgina>;
+ * Faa as alteraes que veja necessrias - opcional;
+ * Grava a reviso antiga como sendo a reviso actual do documento.
+Aps a gravao, o documento da verso actual ser substitudo pelo documento da reviso escolhida.
+
+----
diff --git a/lang/pt/searchpage.txt b/lang/pt/searchpage.txt
new file mode 100644
index 000000000..9d7a2a639
--- /dev/null
+++ b/lang/pt/searchpage.txt
@@ -0,0 +1,7 @@
+====== Pesquisa ======
+
+Pode encontrar os resultados da sua pesquisa na seco mais abaixo.
+
+Se no encontrou o que procurava, pode criar uma nova pgina com o nome da pergunta, usando o boto <Editar Pgina>.
+
+===== Resultados =====
diff --git a/lang/pt/showrev.txt b/lang/pt/showrev.txt
new file mode 100644
index 000000000..b2e92d973
--- /dev/null
+++ b/lang/pt/showrev.txt
@@ -0,0 +1,3 @@
+**Ateno**: Esta uma verso antiga do documento!
+
+----
diff --git a/lang/pt/wordblock.txt b/lang/pt/wordblock.txt
new file mode 100644
index 000000000..27506e147
--- /dev/null
+++ b/lang/pt/wordblock.txt
@@ -0,0 +1,7 @@
+====== Bloquear SPAM ======
+
+As suas alteraes foram **bloqueadas**, porque contm uma ou mais palavras consideradas abusivas (SPAM).
+
+Se pensa que isto no est correcto, por favor contacte o administrador deste site Wiki.
+
+----
diff --git a/lang/ru/backlinks.txt b/lang/ru/backlinks.txt
new file mode 100644
index 000000000..200fb65be
--- /dev/null
+++ b/lang/ru/backlinks.txt
@@ -0,0 +1,5 @@
+====== ======
+
+ , . ,
+ (CamelCase) .
+
diff --git a/lang/ru/conflict.txt b/lang/ru/conflict.txt
new file mode 100644
index 000000000..bd5fb6854
--- /dev/null
+++ b/lang/ru/conflict.txt
@@ -0,0 +1,9 @@
+====== ======
+
+ , .
+
+ .
+
+ ,
+ . '''',
+. '''' .
diff --git a/lang/ru/diff.txt b/lang/ru/diff.txt
new file mode 100644
index 000000000..d7a3a1c75
--- /dev/null
+++ b/lang/ru/diff.txt
@@ -0,0 +1,5 @@
+============
+
+
+ .
+
diff --git a/lang/ru/edit.txt b/lang/ru/edit.txt
new file mode 100644
index 000000000..0ebdac77a
--- /dev/null
+++ b/lang/ru/edit.txt
@@ -0,0 +1,7 @@
+ ''''. [[wiki:syntax]]
+ Wiki. , ,
+ **** .
+-, :
+[[wiki:playground]].
+
+
diff --git a/lang/ru/editrev.txt b/lang/ru/editrev.txt
new file mode 100644
index 000000000..b375e6544
--- /dev/null
+++ b/lang/ru/editrev.txt
@@ -0,0 +1,3 @@
+** !** ,
+ .
+---- \ No newline at end of file
diff --git a/lang/ru/index.txt b/lang/ru/index.txt
new file mode 100644
index 000000000..a00ea8d23
--- /dev/null
+++ b/lang/ru/index.txt
@@ -0,0 +1,4 @@
+====== ======
+
+ , ([[doku>wiki:namespaces|namespaces]]).
+
diff --git a/lang/ru/lang.php b/lang/ru/lang.php
new file mode 100644
index 000000000..9ab25fa06
--- /dev/null
+++ b/lang/ru/lang.php
@@ -0,0 +1,83 @@
+<?
+$lang['encoding'] = 'iso-8859-5';
+$lang['locales'] = array(
+ 'rus',
+ 'ru_RU',
+ 'ru',
+ 'russian',
+ );
+
+$lang['btn_edit'] = ' ';
+$lang['btn_source'] = ' ';
+$lang['btn_show'] = ' ';
+$lang['btn_create'] = ' ';
+$lang['btn_search'] = '';
+$lang['btn_save'] = '';
+$lang['btn_preview']= '';
+$lang['btn_top'] = '';
+$lang['btn_revs'] = ' ';
+$lang['btn_recent'] = ' ';
+$lang['btn_upload'] = '';
+$lang['btn_cancel'] = '';
+$lang['btn_index'] = '';
+$lang['btn_secedit']= '';
+$lang['btn_login'] = '';
+$lang['btn_relogin']= '';
+
+$lang['loggedinas'] = ' ';
+
+$lang['txt_upload'] = ' ';
+$lang['txt_filename'] = ' wikiname ()';
+$lang['lockedby'] = ' ';
+$lang['lockexpire'] = ' ';
+$lang['willexpire'] = ' .\n , .';
+
+$lang['notsavedyet'] = ' .\n ?';
+$lang['rssfailed'] = ' feed-: ';
+$lang['nothingfound']= ' .';
+
+$lang['mediaselect'] = ' -';
+$lang['fileupload'] = ' -';
+$lang['uploadsucc'] = ' ';
+$lang['uploadfail'] = ' . ?';
+$lang['namespaces'] = ' ';
+$lang['mediafiles'] = ' ';
+
+$lang['hits'] = '';
+$lang['quickhits'] = ' ';
+$lang['toc'] = ' ';
+$lang['current'] = '';
+$lang['yours'] = ' ';
+$lang['diff'] = ' ';
+$lang['line'] = '';
+$lang['breadcrumb'] = '';
+$lang['lastmod'] = ' ';
+$lang['deleted'] = '';
+$lang['created'] = '';
+$lang['restored'] = ' ';
+$lang['summary'] = ' ';
+
+
+$lang['mail_newpage'] = ' [DokuWiki] :';
+$lang['mail_changed'] = ' [DokuWiki] :';
+
+$lang['nosmblinks'] = ' Windows Microsoft Internet Explorer.\n copy and paste .';
+
+$lang['qb_alert'] = ', , .\n .';
+$lang['qb_bold'] = ' ';
+$lang['qb_italic'] = ' ';
+$lang['qb_underl'] = '';
+$lang['qb_code'] = ' ';
+$lang['qb_h1'] = ' 1';
+$lang['qb_h2'] = ' 2';
+$lang['qb_h3'] = ' 3';
+$lang['qb_h4'] = ' 4';
+$lang['qb_h5'] = ' 5';
+$lang['qb_link'] = ' ';
+$lang['qb_extlink'] = ' ';
+$lang['qb_hr'] = ' ';
+$lang['qb_ol'] = ' ';
+$lang['qb_ul'] = ' ';
+$lang['qb_media'] = ' ';
+
+?>
diff --git a/lang/ru/locked.txt b/lang/ru/locked.txt
new file mode 100644
index 000000000..1772b1b44
--- /dev/null
+++ b/lang/ru/locked.txt
@@ -0,0 +1,5 @@
+====== ======
+
+
+.
+ .
diff --git a/lang/ru/mailtext.txt b/lang/ru/mailtext.txt
new file mode 100644
index 000000000..9e3525052
--- /dev/null
+++ b/lang/ru/mailtext.txt
@@ -0,0 +1,16 @@
+ DokuWiki . :
+
+ : @DATE@
+ : @BROWSER@
+IP- : @IPADDRESS@
+ : @HOSTNAME@
+ : @OLDPAGE@
+ : @NEWPAGE@
+ : @SUMMARY@
+
+@DIFF@
+
+
+--
+ DokuWiki
+@DOKUWIKIURL@
diff --git a/lang/ru/newpage.txt b/lang/ru/newpage.txt
new file mode 100644
index 000000000..2ec589927
--- /dev/null
+++ b/lang/ru/newpage.txt
@@ -0,0 +1,4 @@
+====== ======
+
+ , .
+ , '' ''.
diff --git a/lang/ru/norev.txt b/lang/ru/norev.txt
new file mode 100644
index 000000000..d2b8d6425
--- /dev/null
+++ b/lang/ru/norev.txt
@@ -0,0 +1,5 @@
+====== ======
+
+ . '' '',
+ .
+
diff --git a/lang/ru/preview.txt b/lang/ru/preview.txt
new file mode 100644
index 000000000..a5c1ab3e6
--- /dev/null
+++ b/lang/ru/preview.txt
@@ -0,0 +1,4 @@
+============
+
+ , . : ** !**
+
diff --git a/lang/ru/read.txt b/lang/ru/read.txt
new file mode 100644
index 000000000..cfd1d8a93
--- /dev/null
+++ b/lang/ru/read.txt
@@ -0,0 +1,3 @@
+ . ,
+ . , , .
+
diff --git a/lang/ru/recent.txt b/lang/ru/recent.txt
new file mode 100644
index 000000000..91dfa0961
--- /dev/null
+++ b/lang/ru/recent.txt
@@ -0,0 +1,5 @@
+====== ======
+
+ .
+
+
diff --git a/lang/ru/revisions.txt b/lang/ru/revisions.txt
new file mode 100644
index 000000000..5b6285fe2
--- /dev/null
+++ b/lang/ru/revisions.txt
@@ -0,0 +1,4 @@
+====== ======
+
+ .
+ , , '' '' .
diff --git a/lang/ru/searchpage.txt b/lang/ru/searchpage.txt
new file mode 100644
index 000000000..fae7fd814
--- /dev/null
+++ b/lang/ru/searchpage.txt
@@ -0,0 +1,7 @@
+============
+
+ . , ,
+ , . ,
+ '' ''.
+
+========== \ No newline at end of file
diff --git a/lang/ru/showrev.txt b/lang/ru/showrev.txt
new file mode 100644
index 000000000..a51c51c69
--- /dev/null
+++ b/lang/ru/showrev.txt
@@ -0,0 +1,2 @@
+** !** , .
+---- \ No newline at end of file
diff --git a/lang/ru/wordblock.txt b/lang/ru/wordblock.txt
new file mode 100644
index 000000000..74886b155
--- /dev/null
+++ b/lang/ru/wordblock.txt
@@ -0,0 +1,7 @@
+======SPAM ======
+
+ ,
+ .
+, Wiki.
+
+
diff --git a/lang/sv/backlinks.txt b/lang/sv/backlinks.txt
new file mode 100644
index 000000000..e4e47df4a
--- /dev/null
+++ b/lang/sv/backlinks.txt
@@ -0,0 +1,4 @@
+======Tillbakalnkar======
+
+Detta r en frteckning ver sidor som verkar lnka tillbaka till den aktuella
+sidan. Var god notera att CamelCase-lnkar inte upptcks som tillbakalnkar.
diff --git a/lang/sv/conflict.txt b/lang/sv/conflict.txt
new file mode 100644
index 000000000..486793025
--- /dev/null
+++ b/lang/sv/conflict.txt
@@ -0,0 +1,7 @@
+======Det finns en senare version======
+
+Det finns en senare version av dokumentet du har redigerat. Detta kan hnda nr en annan anvndare redigerar dokumentet samtidigt som dig.
+
+Granska skillnaderna som visas nedan noga, och vlj sedan vilken version du vill behlla. Om du vljer ''**Spara**'', s kommer din version att sparas. Vlj ''**Avbryt**'' fr att behlla den senare versionen (inte din).
+
+A newer version of the document you edited exists. This happens when another user changed the document while you were editing it.
diff --git a/lang/sv/denied.txt b/lang/sv/denied.txt
new file mode 100644
index 000000000..2e1db0390
--- /dev/null
+++ b/lang/sv/denied.txt
@@ -0,0 +1,4 @@
+======tkomst nekad======
+
+Tyvrr har du inte behrighet att fortstta. Kanske har du glmt att logga in?
+
diff --git a/lang/sv/diff.txt b/lang/sv/diff.txt
new file mode 100644
index 000000000..35e72f5a2
--- /dev/null
+++ b/lang/sv/diff.txt
@@ -0,0 +1,4 @@
+======Skillnader======
+
+Hr visas skillnader mellan den valda versionen och den nuvarande versionen av dokumentet.
+
diff --git a/lang/sv/edit.txt b/lang/sv/edit.txt
new file mode 100644
index 000000000..b86c2c404
--- /dev/null
+++ b/lang/sv/edit.txt
@@ -0,0 +1,2 @@
+Redigera sidan och klicka ''**Spara**''. Se [[wiki:syntax]] fr Wikisyntax. Redidgera bara sidan om du kan **frbttra** dess innehll. Om du vill testa hur saker och ting fungerar, gr det p [[wiki:playground|lekplatsen]].
+
diff --git a/lang/sv/editrev.txt b/lang/sv/editrev.txt
new file mode 100644
index 000000000..1d0397a23
--- /dev/null
+++ b/lang/sv/editrev.txt
@@ -0,0 +1,3 @@
+**Du har hmtat en tidigare version av dokumentet!** Om du sparar den tidigare
+versionen s kommer du att skapa en ny och aktiv version med detta innehll.
+----
diff --git a/lang/sv/index.txt b/lang/sv/index.txt
new file mode 100644
index 000000000..57b27f38b
--- /dev/null
+++ b/lang/sv/index.txt
@@ -0,0 +1,4 @@
+====== Index ======
+
+Detta r ett index eller en frteckning ver alla tillgngliga sidor, sorterad efter [[doku>wiki:namespaces|wikinamn]].
+
diff --git a/lang/sv/lang.php b/lang/sv/lang.php
new file mode 100644
index 000000000..01bab9598
--- /dev/null
+++ b/lang/sv/lang.php
@@ -0,0 +1,98 @@
+<?
+$lang['encoding'] = 'iso-8859-15';
+$lang['locales'] = array(
+ 'swe',
+ 'sv_SE',
+ 'sv',
+ 'swedish',
+ );
+
+$lang['btn_edit'] = 'Redigera den hr sidan';
+$lang['btn_source'] = 'Visa sidklla';
+$lang['btn_show'] = 'Visa sida';
+$lang['btn_create'] = 'Skapa den hr sidan';
+$lang['btn_search'] = 'Sk';
+$lang['btn_save'] = 'Spara';
+$lang['btn_preview']= 'Frhandsgranska';
+$lang['btn_top'] = 'Till brjan av sidan';
+$lang['btn_revs'] = 'Historik';
+$lang['btn_recent'] = 'Senaste nytt';
+$lang['btn_upload'] = 'Ladda upp';
+$lang['btn_cancel'] = 'Avbryt';
+$lang['btn_index'] = 'Index';
+$lang['btn_secedit']= 'Redigera';
+$lang['btn_login'] = 'Logga in';
+$lang['btn_logout'] = 'Logga ut';
+
+$lang['loggedinas'] = 'Inloggad som';
+$lang['user'] = 'Anvndarnamn';
+$lang['pass'] = 'Lsenord';
+$lang['fullname'] = 'Namn';
+$lang['email'] = 'E-post';
+$lang['register'] = 'Registrera';
+$lang['badlogin'] = 'Ogiltigt anvndarnamn och/eller lsenord.';
+
+$lang['regmissing'] = 'Var god fyll i alla flt.';
+$lang['reguexists'] = 'Det finns redan en anvndare med det anvndarnamnet.';
+$lang['regsuccess'] = 'Anvndarkontot skapat, lsenordet har skickats via e-post.';
+$lang['regmailfail']= 'Ett fel uppstod nr ditt lsenord skulle skickas via e-post. Var god kontakta administratren!';
+$lang['regbadmail'] = 'Den angivna e-postadressen verkar vara ogiltig - om du anser detta felaktigt, var god kontakta administratren';
+$lang['regpwmail'] = 'Ditt DokuWikilsenord';
+$lang['reghere'] = 'Har du inte ett konto n? Skaffa ett';
+
+$lang['txt_upload'] = 'Vlj fil att ladda upp';
+$lang['txt_filename'] = 'Ange wikinamn (ej obligatoriskt)';
+$lang['lockedby'] = 'Lst av';
+$lang['lockexpire'] = 'Ls upphr att glla';
+$lang['willexpire'] = 'Ditt redigeringsls fr detta dokument kommer snart att upphra.\nFr att undvika versionskonflikter br du frhandsgranska ditt dokument fr att frlnga redigeringslset.';
+
+$lang['notsavedyet'] = 'Det finns ndringar som inte r sparade.\nr du sker p att du vill fortstta?';
+$lang['rssfailed'] = 'Ett fel uppstod nr denna RSS-klla skulle hmtas: ';
+$lang['nothingfound']= 'Inget data.';
+
+$lang['mediaselect'] = 'Val av mediadokument';
+$lang['fileupload'] = 'Mediafile Upload';
+$lang['uploadsucc'] = 'verfringen lyckades';
+$lang['uploadfail'] = 'verfringen misslyckades, fel rttigheter?';
+$lang['uploadwrong'] = 'verfringen nekad. Den filndelsen r inte tillten';
+$lang['namespaces'] = 'Wikinamn';
+$lang['mediafiles'] = 'Tillgngliga filer ';
+
+$lang['hits'] = 'Trffar';
+$lang['quickhits'] = 'Matchande wikinamn';
+$lang['toc'] = 'Innehllsfrteckning';
+$lang['current'] = 'aktuell';
+$lang['yours'] = 'Din version';
+$lang['diff'] = 'visa skillnader mot aktuell version';
+$lang['line'] = 'Rad';
+$lang['breadcrumb'] = 'Spr';
+$lang['lastmod'] = 'Senast uppdaterad';
+$lang['deleted'] = 'raderat';
+$lang['created'] = 'skapat';
+$lang['restored'] = 'tidigare version terskapad';
+$lang['summary'] = 'Redigeringskommentar';
+
+$lang['mail_newpage'] = '[DokuWiki] sida har lagts till:';
+$lang['mail_changed'] = '[DokuWiki] sida har uppdaterats:';
+
+$lang['nosmblinks'] = 'Lnkning till Windowsresurser fungerar bara med Microsofts Internet Explorer.\nDu kan klippa och klistra in lnken om du anvnder en annan webblsare n MSIE..';
+
+$lang['qb_alert'] = 'Var god ange den text du vill formattera.\nDen kommer att lggas till i slutet av dokumentet.';
+$lang['qb_bold'] = 'Fet text';
+$lang['qb_italic'] = 'Kursiv text';
+$lang['qb_underl'] = 'Understruken text';
+$lang['qb_code'] = 'Kodtext';
+$lang['qb_h1'] = 'Niv 1 Rubrik';
+$lang['qb_h2'] = 'Niv 2 Rubrik';
+$lang['qb_h3'] = 'Niv 3 Rubrik';
+$lang['qb_h4'] = 'Niv 4 Rubrik';
+$lang['qb_h5'] = 'Niv 5 Rubrik';
+$lang['qb_link'] = 'Intern Lnk';
+$lang['qb_extlink'] = 'Extern Lnk';
+$lang['qb_hr'] = 'Horizontal Rule';
+$lang['qb_ol'] = 'Punkt fr sorterad punktlista';
+$lang['qb_ul'] = 'Punkt fr osorterad punktlista';
+$lang['qb_media'] = 'Lgg till bilder och andra filer';
+$lang['qb_sig'] = 'Infoga signatur';
+
+?>
diff --git a/lang/sv/locked.txt b/lang/sv/locked.txt
new file mode 100644
index 000000000..105b5fd55
--- /dev/null
+++ b/lang/sv/locked.txt
@@ -0,0 +1,3 @@
+======Dokumentet r lst======
+
+Detta dokument r fr nrvarande lst fr redigering av en annan anvndare. Du mste vnta tills den anvndaren r klar med sin redigering, eller tills dess att dokumentlset upphr att glla.
diff --git a/lang/sv/login.txt b/lang/sv/login.txt
new file mode 100644
index 000000000..3db0f55a5
--- /dev/null
+++ b/lang/sv/login.txt
@@ -0,0 +1,4 @@
+======Logga in======
+
+Du r inte inloggad! Ange ditt anvndarnamn och lsenord i formulret nedan fr att logga in. Std fr s k "cookies" mste vara aktiverat i din webblsare fr att du skall kunna logga in.
+
diff --git a/lang/sv/mailtext.txt b/lang/sv/mailtext.txt
new file mode 100644
index 000000000..5c593cba4
--- /dev/null
+++ b/lang/sv/mailtext.txt
@@ -0,0 +1,16 @@
+En sida i din DokuWiki har lagts till eller ndrats; uppgifter om frndringen:
+
+Datum : @DATE@
+Webblsare : @BROWSER@
+IP-adress : @IPADDRESS@
+Vrdnamn : @HOSTNAME@
+Tidigare version : @OLDPAGE@
+Aktuell version : @NEWPAGE@
+Redigeringskommentar : @SUMMARY@
+
+@DIFF@
+
+
+--
+Detta meddelande har skapats av DokuWiki
+@DOKUWIKIURL@
diff --git a/lang/sv/newpage.txt b/lang/sv/newpage.txt
new file mode 100644
index 000000000..b11d11740
--- /dev/null
+++ b/lang/sv/newpage.txt
@@ -0,0 +1,3 @@
+======Det finns inget innehll======
+
+Du har fljt en lnk till ett mne som inte finns n. Du kan skapa det genom att klicka p ''**Redigera den hr sidan**''.
diff --git a/lang/sv/norev.txt b/lang/sv/norev.txt
new file mode 100644
index 000000000..a13d71638
--- /dev/null
+++ b/lang/sv/norev.txt
@@ -0,0 +1,5 @@
+======Det finns ingen sdan version======
+
+Den angivna versionen finns inte. Anvnd ''**Historik**'' fr en frteckning
+ver de versioner som finns av detta dokument.
+
diff --git a/lang/sv/password.txt b/lang/sv/password.txt
new file mode 100644
index 000000000..5c8106538
--- /dev/null
+++ b/lang/sv/password.txt
@@ -0,0 +1,10 @@
+Hej @FULLNAME@!
+
+Hr r dina anvndaruppgifter fr @TITLE@ p @DOKUWIKIURL@
+
+Anvndarnamn : @LOGIN@
+Lsenord : @PASSWORD@
+
+--
+Detta meddelande har skapats av DokuWiki
+@DOKUWIKIURL@
diff --git a/lang/sv/preview.txt b/lang/sv/preview.txt
new file mode 100644
index 000000000..f5f6a2145
--- /dev/null
+++ b/lang/sv/preview.txt
@@ -0,0 +1,4 @@
+======Frhandsgranskning======
+
+Detta r en frhandstitt av hur din text kommer att se ut nr den visas. Kom ihg: Den r **inte sparad** n!
+
diff --git a/lang/sv/read.txt b/lang/sv/read.txt
new file mode 100644
index 000000000..8b0d31fd7
--- /dev/null
+++ b/lang/sv/read.txt
@@ -0,0 +1,3 @@
+Denna sida r skrivskyddad. Du kan titta p den, men inte ndra den. Kontakta
+administratren om du anser att du br kunna ndra sidan.
+
diff --git a/lang/sv/recent.txt b/lang/sv/recent.txt
new file mode 100644
index 000000000..d42bce30e
--- /dev/null
+++ b/lang/sv/recent.txt
@@ -0,0 +1,5 @@
+======Senaste nytt======
+
+Fljande sidor/dokument har nyligen uppdaterats.
+
+
diff --git a/lang/sv/register.txt b/lang/sv/register.txt
new file mode 100644
index 000000000..a426df5b1
--- /dev/null
+++ b/lang/sv/register.txt
@@ -0,0 +1,4 @@
+======Registrera dig som anvndare======
+
+Ange all information som efterfrgas i formulret nedan fr att skapa ett nytt anvndarkonto fr denna wiki. Var srskilt noga med att ange en **giltig e-postadress** - ditt lsenord kommer att skickas till den e-postadress du anger. Anvndarnamnet skall vara ett giltigt [[doku>wiki:pagename|pagename]].
+
diff --git a/lang/sv/revisions.txt b/lang/sv/revisions.txt
new file mode 100644
index 000000000..cc04b1e85
--- /dev/null
+++ b/lang/sv/revisions.txt
@@ -0,0 +1,4 @@
+======Historik======
+
+Hr visas tidigare versioner av detta dokument. Fr att terstlla detta dokument till en tidigare version, vlj den nskvrda versionen nedan, klicka p ''Edit this page'' och spara sedan dokumentet.
+
diff --git a/lang/sv/searchpage.txt b/lang/sv/searchpage.txt
new file mode 100644
index 000000000..90504632c
--- /dev/null
+++ b/lang/sv/searchpage.txt
@@ -0,0 +1,5 @@
+======Sk======
+
+Du ser resultatet av skningen hr nedanfr. Om du inte hittar det du letar efter, s kan du skapa en ny sida med samma namn som ditt skvilkor genom att klicka p ''**Skapa den hr sidan**''-knappen.
+
+=====Resultat===== \ No newline at end of file
diff --git a/lang/sv/showrev.txt b/lang/sv/showrev.txt
new file mode 100644
index 000000000..9108273df
--- /dev/null
+++ b/lang/sv/showrev.txt
@@ -0,0 +1,2 @@
+**This is an old revision of the document!**
+----
diff --git a/lang/sv/wordblock.txt b/lang/sv/wordblock.txt
new file mode 100644
index 000000000..b3d6bcaec
--- /dev/null
+++ b/lang/sv/wordblock.txt
@@ -0,0 +1,4 @@
+======Ordsprr======
+
+Dina ndringar har **inte** sparats p grund av att de innehller ett eller flera ord som sprrats. Om du har frskt att spara skrp, s k ''spam'' -- Fyyy p dig! Om du anser att detta meddelande r felaktigt, kontakta wikins administratr.
+
diff --git a/lang/tw/backlinks.txt b/lang/tw/backlinks.txt
new file mode 100644
index 000000000..9f69c26f7
--- /dev/null
+++ b/lang/tw/backlinks.txt
@@ -0,0 +1,5 @@
+====== 可返回的連結(Backlinks) ======
+
+這裡是可返回原先頁面的清單。 注意: CamelCase 詞彙的連結並不會被偵測為可返回的連結。
+
+
diff --git a/lang/tw/conflict.txt b/lang/tw/conflict.txt
new file mode 100644
index 000000000..9e47d16ed
--- /dev/null
+++ b/lang/tw/conflict.txt
@@ -0,0 +1,7 @@
+====== 有一個更新的版本已存在 ======
+
+有一個您所編輯的更新版本已經存在了。\\
+這狀況之所以會發生:乃是因為當您正在編修它的時候,而其他使用者已變更這份文件。\\
+請檢驗以下的差異,然後決定要用哪一份。\\
+若您選擇「''儲存''」,那您的版本就會被存下來了。而「取消」則會保留為現在這版本。
+
diff --git a/lang/tw/denied.txt b/lang/tw/denied.txt
new file mode 100644
index 000000000..ec906867d
--- /dev/null
+++ b/lang/tw/denied.txt
@@ -0,0 +1,4 @@
+======拒絕尚未授權======
+
+很抱歉您權限不夠以致無法繼續。或許您忘了先登入您的帳號嗎?
+
diff --git a/lang/tw/diff.txt b/lang/tw/diff.txt
new file mode 100644
index 000000000..c0c57b1dc
--- /dev/null
+++ b/lang/tw/diff.txt
@@ -0,0 +1,4 @@
+======差異處======
+
+這裡會顯示出所選的版次與目前版次的差異處。
+
diff --git a/lang/tw/edit.txt b/lang/tw/edit.txt
new file mode 100644
index 000000000..a5d3aae79
--- /dev/null
+++ b/lang/tw/edit.txt
@@ -0,0 +1,2 @@
+提示:編修本頁並按「''儲存''」即可。 點一下 [[wiki:syntax]] 即可馬上查閱 Wiki 語法。若您覺得可讓本文品質「**更好**」的話,那就請繼續吧 :) \\
+   但若只想練習或測試東西的話,那麼請先多利用 [[wiki:playground]] 來試煉您的身手吧。 \ No newline at end of file
diff --git a/lang/tw/editrev.txt b/lang/tw/editrev.txt
new file mode 100644
index 000000000..b344e0772
--- /dev/null
+++ b/lang/tw/editrev.txt
@@ -0,0 +1,2 @@
+**您目前載入的是本份文件的舊版!!** 若存檔的話,那這些資料就會被存成另一份了喔。
+----
diff --git a/lang/tw/index.txt b/lang/tw/index.txt
new file mode 100644
index 000000000..b73d35970
--- /dev/null
+++ b/lang/tw/index.txt
@@ -0,0 +1,4 @@
+====== 索引頁 ======
+
+目前您所看到的是用 [[doku>wiki:namespaces|namespaces]] 來排序目前所有可用的頁面清單。\\
+請直接按您想要的頁面或者用「檢視頁面」來檢視目前所在頁面
diff --git a/lang/tw/lang.old.php b/lang/tw/lang.old.php
new file mode 100644
index 000000000..78cf7795e
--- /dev/null
+++ b/lang/tw/lang.old.php
@@ -0,0 +1,99 @@
+<?
+//$lang['encoding'] = 'iso-8859-15'
+$lang['encoding'] = 'UTF-8';
+$lang['locales'] = array(
+ 'UTF-8',
+ 'zh_TW',
+ 'tw',
+ 'chinese(traditional)',
+ );
+
+$lang['btn_edit'] = 'Edit this page';
+$lang['btn_source'] = 'Show pagesource';
+$lang['btn_show'] = 'Show page';
+$lang['btn_create'] = 'Create this page';
+$lang['btn_search'] = 'Search';
+$lang['btn_save'] = 'Save';
+$lang['btn_preview']= 'Preview';
+$lang['btn_top'] = 'Back to top';
+$lang['btn_revs'] = 'Old revisons';
+$lang['btn_recent'] = 'Recent changes';
+$lang['btn_upload'] = 'Upload';
+$lang['btn_cancel'] = 'Cancel';
+$lang['btn_index'] = 'Index';
+$lang['btn_secedit']= 'Edit';
+$lang['btn_login'] = 'Login';
+$lang['btn_logout'] = 'Logout';
+
+$lang['loggedinas'] = 'Logged in as';
+$lang['user'] = 'Username';
+$lang['pass'] = 'Password';
+$lang['fullname'] = 'Full name';
+$lang['email'] = 'E-Mail';
+$lang['register'] = 'Register';
+$lang['badlogin'] = 'Sorry username or password were wrong.';
+
+$lang['regmissing'] = 'Sorry you must fill in all fields.';
+$lang['reguexists'] = 'Sorry a user with this login already exists.';
+$lang['regsuccess'] = 'The user was created. The password was sent by mail.';
+$lang['regmailfail']= 'Looks like there was an error on sending the password mail. Please contact the admin!';
+$lang['regbadmail'] = 'The given email address looks invalid - if you think this is an error contact the admin';
+$lang['regpwmail'] = 'Your DokuWiki password';
+$lang['reghere'] = 'You don\'t have an account yet? Just get one';
+
+$lang['txt_upload'] = 'Select file to upload';
+$lang['txt_filename'] = 'Enter wikiname (optional)';
+$lang['lockedby'] = 'Currently locked by';
+$lang['lockexpire'] = 'Lock expires at';
+$lang['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.';
+
+$lang['notsavedyet'] = 'There are unsaved changes that will be lost.\nReally continue?';
+$lang['rssfailed'] = 'An error occured while fetching this feed: ';
+$lang['nothingfound']= 'Nothing was found.';
+
+$lang['mediaselect'] = 'Mediafile Selection';
+$lang['fileupload'] = 'Mediafile Upload';
+$lang['uploadsucc'] = 'Upload successful';
+$lang['uploadfail'] = 'Upload failed. Maybe wrong permissions?';
+$lang['uploadwrong'] = 'Upload denied. This file extension is forbidden';
+$lang['namespaces'] = 'Namespaces';
+$lang['mediafiles'] = 'Available files in';
+
+$lang['hits'] = 'Hits';
+$lang['quickhits'] = 'Matching pagenames';
+$lang['toc'] = 'Table of Contents';
+$lang['current'] = 'current';
+$lang['yours'] = 'Your Version';
+$lang['diff'] = 'show differences to current version';
+$lang['line'] = 'Line';
+$lang['breadcrumb'] = 'Trace';
+$lang['lastmod'] = 'Last modified';
+$lang['deleted'] = 'removed';
+$lang['created'] = 'created';
+$lang['restored'] = 'old revision restored';
+$lang['summary'] = 'Edit summary';
+
+$lang['mail_newpage'] = '[DokuWiki] page added:';
+$lang['mail_changed'] = '[DokuWiki] page changed:';
+
+$lang['nosmblinks'] = 'Linking to Windows shares only works in Microsoft Internet Explorer.\nYou still can copy and paste the link.';
+
+$lang['qb_alert'] = 'Please enter the text you want to format.\nIt will be appended to the end of the document.';
+$lang['qb_bold'] = 'Bold Text';
+$lang['qb_italic'] = 'Italic Text';
+$lang['qb_underl'] = 'Underlined Text';
+$lang['qb_code'] = 'Code Text';
+$lang['qb_h1'] = 'Level 1 Headline';
+$lang['qb_h2'] = 'Level 2 Headline';
+$lang['qb_h3'] = 'Level 3 Headline';
+$lang['qb_h4'] = 'Level 4 Headline';
+$lang['qb_h5'] = 'Level 5 Headline';
+$lang['qb_link'] = 'Internal Link';
+$lang['qb_extlink'] = 'External Link';
+$lang['qb_hr'] = 'Horizontal Rule';
+$lang['qb_ol'] = 'Ordered List Item';
+$lang['qb_ul'] = 'Unordered List Item';
+$lang['qb_media'] = 'Add Images and other files';
+$lang['qb_sig'] = 'Insert Signature';
+
+?>
diff --git a/lang/tw/lang.php b/lang/tw/lang.php
new file mode 100644
index 000000000..7ad3d646a
--- /dev/null
+++ b/lang/tw/lang.php
@@ -0,0 +1,109 @@
+<?
+/* Description: Chinese(Traditional) language file
+ * Author: chinsan <chinsan@mail2000.com.tw>
+ */
+$lang['encoding'] = 'UTF-8';
+$lang['locales'] = array(
+ 'UTF-8',
+ 'zh_TW.UTF-8',
+ 'tw',
+ 'chinese(traditional)',
+ );
+
+$lang['btn_edit'] = '編修本頁';
+$lang['btn_source'] = '顯示頁面來源';
+$lang['btn_show'] = '顯示頁面';
+$lang['btn_create'] = '建立此頁';
+$lang['btn_search'] = '搜尋';
+$lang['btn_save'] = '儲存';
+$lang['btn_preview']= '預覽';
+$lang['btn_top'] = '回到頁頂';
+$lang['btn_revs'] = '舊版';
+$lang['btn_recent'] = '最近更新';
+$lang['btn_upload'] = '上傳';
+$lang['btn_cancel'] = '取消';
+$lang['btn_index'] = '索引頁';
+$lang['btn_secedit']= '改這段';
+$lang['btn_login'] = '登入';
+$lang['btn_logout'] = '登出';
+
+$lang['loggedinas'] = '登入為';
+$lang['user'] = '帳號';
+$lang['pass'] = '密碼';
+$lang['fullname'] = '暱稱';
+$lang['email'] = 'E-Mail';
+$lang['register'] = '註冊';
+$lang['badlogin'] = '很抱歉,您的使用者名稱或密碼可能錯誤';
+
+$lang['regmissing'] = '很抱歉,所有的欄位都要填哦';
+$lang['reguexists'] = '很抱歉,已有人註冊該帳號了喔';
+$lang['regsuccess'] = '使用者已建立,密碼也以 email 寄出到您信箱了。';
+$lang['regmailfail']= '寄出密碼信似乎發生錯誤,請跟管理者聯絡!';
+$lang['regbadmail'] = '您給的 email 似乎不對,如果您認為是正確的,請與管理者聯絡。';
+$lang['regpwmail'] = 'Your DokuWiki Password';
+$lang['reghere'] = '您還沒有帳號對吧?來註冊一個吧。';
+
+$lang['txt_upload'] = '選擇要上傳的檔案';
+$lang['txt_filename'] = '輸入 wikiname (optional)';
+$lang['lockedby'] = '目前已被下列人員鎖定';
+$lang['lockexpire'] = '預計解除鎖定於';
+$lang['willexpire'] = '您目前編輯這頁的鎖定將會在一分鐘內解除。\若要避免發生意外,請按「預覽」鍵來重新設定鎖定狀態';
+
+$lang['notsavedyet'] = '有尚未儲存的變更將會遺失。\n真的要繼續嗎?';
+$lang['rssfailed'] = '當抓取它處餵送過來的資料時發生錯誤: ';
+$lang['nothingfound']= '沒找到任何結果。';
+
+$lang['mediaselect'] = '選擇影音檔';
+$lang['fileupload'] = '上傳影音檔';
+$lang['uploadsucc'] = '上傳成功';
+$lang['uploadfail'] = '上傳失敗。或許權限設定錯誤了嗎?';
+$lang['uploadwrong'] = '拒絕上傳。該檔案類型不被支援。';
+$lang['namespaces'] = 'Namespaces';
+$lang['mediafiles'] = '可用的檔案有';
+
+$lang['hits'] = '個符合';
+$lang['quickhits'] = '符合的頁面名稱';
+$lang['toc'] = '本頁目錄';
+$lang['current'] = '目前版本';
+$lang['yours'] = '您的版本';
+$lang['diff'] = '顯示跟目前版本的差異';
+$lang['line'] = '行';
+$lang['breadcrumb'] = '目前的足跡';
+$lang['lastmod'] = '上一次變更';
+$lang['deleted'] = '移除';
+$lang['created'] = '建立';
+$lang['restored'] = '已恢復為舊版';
+$lang['summary'] = '編輯摘要';
+
+$lang['mail_newpage'] = '[DokuWiki] 增加的頁面:';
+$lang['mail_changed'] = '[DokuWiki] 變更的頁面:';
+
+$lang['nosmblinks'] = '只有在 Microsoft IE 下才能執行「連結到 Windows shares」。\n不過您仍可拷貝、複製這連結';
+
+$lang['qb_alert'] = '請輸入想要格式化的文字,\n這會附加到文件的結尾。';
+$lang['qb_bold'] = '粗體';
+$lang['qb_italic'] = '斜體';
+$lang['qb_underl'] = '底線';
+$lang['qb_code'] = '程式碼';
+$lang['qb_h1'] = 'H1 標題';
+$lang['qb_h2'] = 'H2 標題';
+$lang['qb_h3'] = 'H3 標題';
+$lang['qb_h4'] = 'H4 標題';
+$lang['qb_h5'] = 'H5 標題';
+$lang['qb_link'] = 'WIKI內部連結';
+$lang['qb_extlink'] = '連結外部URL';
+$lang['qb_hr'] = '水平線';
+$lang['qb_ol'] = '項目表(數字)';
+$lang['qb_ul'] = '項目表(符號)';
+$lang['qb_media'] = '加入圖片或檔案';
+$lang['qb_sig'] = '插入簽名';
+
+$lang['txt_insert'] = '放入日曆';
+$lang['qb_calendar'] = '放入一個日曆';
+$lang['btn_insert'] = '產生日曆';
+$lang['txt_toinsert'] = '這將會被放入';
+$lang['txt_clickhere'] = '按這就會幫您自動放好了';
+$lang['txt_year'] = '年份';
+$lang['txt_month'] = '月份';
+$lang['arr_daysofweek']= array('日','一','二','三','四','五','六');
+?>
diff --git a/lang/tw/locked.txt b/lang/tw/locked.txt
new file mode 100644
index 000000000..16a06e802
--- /dev/null
+++ b/lang/tw/locked.txt
@@ -0,0 +1,3 @@
+====== 頁面目前是鎖定狀態中 ======
+
+本頁目前正由其他使用者編修中,您必須先等到他完成或者鎖定狀態自動解除。
diff --git a/lang/tw/login.txt b/lang/tw/login.txt
new file mode 100644
index 000000000..8ae05a29f
--- /dev/null
+++ b/lang/tw/login.txt
@@ -0,0 +1,6 @@
+====== 登入 ======
+
+您尚未登入,請輸入您的使用者名稱跟密碼。
+另外,瀏覽器需要打開 cookies 設定以進行登入。
+
+
diff --git a/lang/tw/mailtext.txt b/lang/tw/mailtext.txt
new file mode 100644
index 000000000..f4234103c
--- /dev/null
+++ b/lang/tw/mailtext.txt
@@ -0,0 +1,15 @@
+bz DokuWiki sWBܰʹL@FCHUOӸ`ơG
+
+ : @DATE@
+s : @BROWSER@
+IP-Address : @IPADDRESS@
+W : @HOSTNAME@
+ª : @OLDPAGE@
+s : @NEWPAGE@
+sKn : @SUMMARY@
+
+@DIFF@
+
+
+--
+oʫHO @DOKUWIKIURL@ DokuWiki ۰ʲ
diff --git a/lang/tw/newpage.txt b/lang/tw/newpage.txt
new file mode 100644
index 000000000..bd38f5586
--- /dev/null
+++ b/lang/tw/newpage.txt
@@ -0,0 +1,3 @@
+====== 目前尚未有該主題喔 ======
+
+您目前到的這主題尚未建立頁面。但也可以用 「''建立此頁''」來建立。 \ No newline at end of file
diff --git a/lang/tw/norev.txt b/lang/tw/norev.txt
new file mode 100644
index 000000000..a8b6b9e1a
--- /dev/null
+++ b/lang/tw/norev.txt
@@ -0,0 +1,4 @@
+======很抱歉,並無該版次的======
+
+該版次的文件並不存在。請用 「''舊版''」 鍵來檢視目前該文件的所有舊版次。
+
diff --git a/lang/tw/password.txt b/lang/tw/password.txt
new file mode 100644
index 000000000..724e6b32f
--- /dev/null
+++ b/lang/tw/password.txt
@@ -0,0 +1,9 @@
+ @FULLNAME@!
+
+o̬Ozb @TITLE@(@DOKUWIKIURL@) ϥΪ̸
+
+ϥΪ̦W: @LOGIN@
+ KX: @PASSWORD@
+
+--
+oʫHO @DOKUWIKIURL@ DokuWiki ۰ʲ͡C
diff --git a/lang/tw/preview.txt b/lang/tw/preview.txt
new file mode 100644
index 000000000..5e4e946d3
--- /dev/null
+++ b/lang/tw/preview.txt
@@ -0,0 +1,4 @@
+======預覽======
+
+以下是預覽該文件的狀態。請記住:**它還沒被儲存喔**!
+
diff --git a/lang/tw/read.txt b/lang/tw/read.txt
new file mode 100644
index 000000000..364f4adea
--- /dev/null
+++ b/lang/tw/read.txt
@@ -0,0 +1,3 @@
+本頁是唯讀的,可以看是怎麼寫的,但不能更動它。如這是誤判,請向管理員詢問。
+
+
diff --git a/lang/tw/recent.txt b/lang/tw/recent.txt
new file mode 100644
index 000000000..a884d3a1d
--- /dev/null
+++ b/lang/tw/recent.txt
@@ -0,0 +1,5 @@
+======最近更新======
+
+以下的頁面是最近才更新的:
+
+
diff --git a/lang/tw/register.txt b/lang/tw/register.txt
new file mode 100644
index 000000000..e398a698f
--- /dev/null
+++ b/lang/tw/register.txt
@@ -0,0 +1,6 @@
+====== 註冊新使用者 ======
+
+請填以下欄位的資料來註冊 wiki 帳號,\\
+還有請確定您有提供一個 **合法的 e-mail 地址** - 也就是您的新密碼會被寄到那。\\
+而登錄的使用者名稱應該是合法的。 [[doku>wiki:pagename|pagename]].
+
diff --git a/lang/tw/revisions.txt b/lang/tw/revisions.txt
new file mode 100644
index 000000000..3ec5b32c3
--- /dev/null
+++ b/lang/tw/revisions.txt
@@ -0,0 +1,3 @@
+======舊版======
+
+以下是該文件的舊版本。如要回復成想要的某個舊版次,就點下它,然後按「編修本頁」,並存檔起來就可以了。 \ No newline at end of file
diff --git a/lang/tw/searchpage.txt b/lang/tw/searchpage.txt
new file mode 100644
index 000000000..930033578
--- /dev/null
+++ b/lang/tw/searchpage.txt
@@ -0,0 +1,5 @@
+======搜尋精靈======
+
+提示:您可以在下列找到您的搜尋結果。若沒找到妳想找的東西,那麼可以在妳查詢之後用「建立此頁」來建立新的頁面哦。
+
+=====搜尋結果===== \ No newline at end of file
diff --git a/lang/tw/showrev.txt b/lang/tw/showrev.txt
new file mode 100644
index 000000000..35b6aa59f
--- /dev/null
+++ b/lang/tw/showrev.txt
@@ -0,0 +1,2 @@
+**這是本文件的舊版了喔!**
+----
diff --git a/lang/tw/wordblock.txt b/lang/tw/wordblock.txt
new file mode 100644
index 000000000..3f249bc93
--- /dev/null
+++ b/lang/tw/wordblock.txt
@@ -0,0 +1,5 @@
+====== 拒絕垃圾資料(SPAM blocked) ======
+
+您的變更並**不會**被存起來,因為它包含了一些被限制的字眼。若您還試著要丟垃圾資料到 Wiki 的話,
+-- Bad dog! 不過,若您認為這是誤判,那麼請與這個 Wiki 的管理員(Admin)談。
+
diff --git a/media.php b/media.php
new file mode 100644
index 000000000..522557de0
--- /dev/null
+++ b/media.php
@@ -0,0 +1,167 @@
+<?php
+ini_set('short_open_tag',"1");
+require_once("conf/dokuwiki.php");
+require_once("inc/common.php");
+require_once("lang/en/lang.php");
+require_once("lang/".$conf['lang']."/lang.php");
+setCorrectLocale();
+require_once("inc/html.php");
+require_once("inc/search.php");
+require_once("inc/format.php");
+require_once("inc/auth.php");
+
+header('Content-Type: text/html; charset='.$lang['encoding']);
+
+$NS = $_REQUEST['ns'];
+$NS = cleanID($NS);
+
+if(auth_quickaclcheck("$NS:*") >= AUTH_UPLOAD){
+ $uploadok = true;
+ //create the given namespace (just for beautification)
+ $mdir = $conf['mediadir'].'/'.str_replace(':','/',$NS);
+ umask($conf['dmask']);
+ io_mkdir_p($mdir);
+ umask($conf['umask']);
+}else{
+ $uploadok = false;
+}
+
+if($_FILES['upload']['tmp_name'] && $uploadok){
+ media_upload($NS);
+}
+
+//start output
+html_head();
+?>
+<body>
+ <?html_msgarea()?>
+ <h1><?=$lang['mediaselect']?></h1>
+
+ <div class="mediaselect">
+ <div class="mediaselect-left">
+ <?=media_html_namespaces()?>
+ </div>
+ <div class="mediaselect-right">
+ <?
+ print media_html_media($NS);
+ if($uploadok){
+ print media_html_uploadform($NS);
+ }
+ ?>
+ </div>
+ </div>
+
+</body>
+</html>
+<?
+/**********************************************/
+
+function media_upload($NS){
+ global $conf;
+ global $lang;
+
+ // get file
+ $id = $_POST['id'];
+ $file = $_FILES['upload'];
+ // get id
+ if(empty($id)) $id = $file['name'];
+ $id = cleanID($NS.':'.$id);
+ // get filename
+ $fn = str_replace(':','/',$id);
+ $fn = $conf['mediadir'].'/'.$fn;
+ // prepare directory
+ io_makeFileDir($fn);
+
+ umask($conf['umask']);
+ if(preg_match('/\.'.$conf['uploadtypes'].'$/i',$fn)){
+ if (move_uploaded_file($file['tmp_name'], $fn)) {
+ msg($lang['uploadsucc'],1);
+ return true;
+ }else{
+ msg($lang['uploadfail'],-1);
+ }
+ }else{
+ msg($lang['uploadwrong'],-1);
+ }
+ return false;
+}
+
+function media_html_uploadform($ns){
+ global $lang;
+?>
+ <div class="uploadform">
+ <form action="<?=$_SERVER['PHP_SELF']?>" name="upload" method="post" enctype="multipart/form-data">
+ <?=$lang['txt_upload']?>:<br />
+ <input type="file" name="upload" class="edit" onchange="suggestWikiname();" />
+ <input type="hidden" name="ns" value="<?=htmlspecialchars($ns)?>" /><br />
+ <?=$lang['txt_filename']?>:<br />
+ <input type="text" name="id" class="edit" />
+ <input type="submit" class="button" value="<?=$lang['btn_upload']?>" accesskey="s" />
+ </form>
+ </div>
+<?
+}
+
+function media_html_media($ns){
+ global $conf;
+ global $lang;
+ $dir = str_replace(':','/',$ns);
+
+ print '<b>'.$lang['mediafiles'].'</b>';
+ print ' <code>'.$ns.':</code>';
+
+ $data = array();
+ search($data,$conf['mediadir'],'search_media',array(),$dir);
+
+ if(!count($data)){
+ print '<div style="text-align:center; margin:2em;">';
+ print $lang['nothingfound'];
+ print '</div>';
+ return;
+ }
+
+ print '<ul>';
+ foreach($data as $item){
+ print '<li>';
+ print '<a href="javascript:mediaSelect(\''.$item['id'].'\')">';
+ print $item['file'];
+ print '</a>';
+ if($item['isimg']){
+ print ' ('.$item['info'][0].'&#215;'.$item['info'][1];
+ print ' '.filesize_h($item['size']).')<br />';
+
+ # build thumbnail
+ $link=array();
+ $link['name']=$item['id'];
+ if($item['info'][0]>120) $link['name'] .= '?120';
+ $link = format_link_media($link);
+ print $link['name'];
+
+ }else{
+ print ' ('.filesize_h($item['size']).')';
+ }
+ print '</li>';
+ }
+ print '</ul>';
+}
+
+function media_html_namespaces(){
+ global $conf;
+ global $lang;
+
+ $data = array();
+ #add default namespace
+ print '<b><a href="'.getBaseURL().'media.php?ns=">'.$lang['namespaces'].'</a></b>';
+ search($data,$conf['mediadir'],'search_namespaces',array());
+ print html_buildlist($data,'idx',media_html_list_namespaces);
+}
+
+function media_html_list_namespaces($item){
+ $ret = '';
+ $ret .= '<a href="'.getBaseURL().'media.php?ns='.$item['id'].'" class="idx_dir">';
+ $ret .= $item['id'];
+ $ret .= '</a>';
+ return $ret;
+}
+
+?>
diff --git a/media/.htaccess b/media/.htaccess
new file mode 100644
index 000000000..ebf9a69e8
--- /dev/null
+++ b/media/.htaccess
@@ -0,0 +1,9 @@
+## The following directives should enhance security in the media
+## directory. However they are reported to make some trouble with
+## Apache2 and/or when PHP is used as CGI.
+## They are not really needed anymore as the upload mechanism
+## now is controlled through $conf['uploadtypes'] - but you may want
+## to try if they work for you. Some more security is always nice :-)
+
+# php_value engine off
+# AddType text/plain .php .phtml .php3 .html .htm .shtml
diff --git a/pngbehavior.htc b/pngbehavior.htc
new file mode 100644
index 000000000..5ce2d5d75
--- /dev/null
+++ b/pngbehavior.htc
@@ -0,0 +1,53 @@
+// this is an ugly fix to make Internet Explorer work with transparent
+// PNG images - do your self a favour and use a real browser!
+
+<public:component>
+<public:attach event="onpropertychange" onevent="propertyChanged()" />
+<script>
+
+var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";
+var realSrc;
+var blankSrc = "images/blank.gif";
+
+if (supported) fixImage();
+
+function propertyChanged() {
+ if (!supported) return;
+
+ var pName = event.propertyName;
+ if (pName != "src") return;
+ // if not set to blank
+ if ( ! new RegExp(blankSrc).test(src))
+ fixImage();
+};
+
+function fixImage() {
+ // get src
+ var src = element.src;
+
+ // check for real change
+ if (src == realSrc) {
+ element.src = blankSrc;
+ return;
+ }
+
+ if ( ! new RegExp(blankSrc).test(src)) {
+ // backup old src
+ realSrc = src;
+ }
+
+ // test for png
+ if ( /\.png$/.test( realSrc.toLowerCase() ) ) {
+ // set blank image
+ element.src = blankSrc;
+ // set filter
+ element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
+ }
+ else {
+ // remove filter
+ element.runtimeStyle.filter = "";
+ }
+}
+
+</script>
+</public:component>
diff --git a/print.css b/print.css
new file mode 100644
index 000000000..514d48fa4
--- /dev/null
+++ b/print.css
@@ -0,0 +1,211 @@
+
+body {
+ font: 12pt "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
+ background-color: White;
+ color: Black;
+}
+
+table {
+ font-size: 100%;
+ padding:0;
+ margin:0;
+}
+
+tr,td,th {padding:0; margin:0;}
+
+img {border:0}
+
+a {
+ color:#000000;
+ text-decoration:none;
+}
+
+
+div.meta {
+ clear:both;
+ margin-top: 1em;
+ font-size:70%;
+ text-align:right;
+}
+
+div.breadcrumbs{
+ display:none;
+}
+
+div.secedit{
+ display:none;
+}
+
+/* --------------------- Text formating -------------------------------- */
+
+/* external link */
+a.urlextern:after {
+ content: " [" attr(href) "]";
+ font-size: 90%;
+}
+
+/* interwiki link */
+a.interwiki:after {
+ content: " [" attr(href) "]";
+ font-size: 90%;
+}
+
+/* email link */
+a.mail:after {
+ content: " [" attr(href) "]";
+ font-size: 90%;
+}
+
+/* existing wikilink */
+a.wikilink1 {text-decoration:underline }
+
+/* the document */
+div.page {
+ text-align: justify;
+}
+
+/* general headline setup */
+h1, h2, h3, h4, h5 {
+ color: Black;
+ background-color: transparent;
+ font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
+ font-size: 100%;
+ font-weight: normal;
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: 0;
+ margin-bottom: 1em;
+ padding-left: 0;
+ padding-right: 0;
+ padding-top: 0.5em;
+ padding-bottom: 0;
+ border-bottom: 1px solid #000000;
+ clear:left;
+}
+
+/* special headlines */
+h1 {font-size: 160%; font-weight: bold;}
+h2 {font-size: 150%; }
+h3 {font-size: 140%; border-bottom: none; font-weight: bold;}
+h4 {font-size: 120%; border-bottom: none; font-weight: bold;}
+h5 {font-size: 100%; border-bottom: none; font-weight: bold;}
+
+/* embedded images */
+img.media {
+ margin: 3px;
+}
+
+img.medialeft {
+ border: 0;
+ float: left;
+ margin: 0 1.5em 0 0;
+}
+
+img.mediaright {
+ border: 0;
+ float: right;
+ margin: 0 0 0 1.5em;
+}
+
+/* unordered lists */
+ul {
+ line-height: 1.5em;
+ list-style-type: square;
+ margin: 0 0 1.0em 1.5em;
+ padding: 0;
+
+}
+
+/* ordered lists */
+ol {
+ line-height: 1.5em;
+ margin: 0 0 1.0em 1.5em;
+ padding: 0;
+ font-weight: bold;
+}
+
+/* the list items overriding the ol definition */
+span.li {
+ font-weight: normal;
+}
+
+/* code blocks by indention */
+pre.pre {
+ font-size: 8pt;
+ padding: 0.5em;
+ border: 1px dashed #000000;
+ color: Black;
+ overflow: visible;
+}
+
+/* code blocks by code tag */
+pre.code {
+ font-size: 8pt;
+ padding: 0.5em;
+ border: 1px dashed #000000;
+ color: Black;
+ overflow: visible;
+}
+
+/* inline code words */
+code {
+ font-size: 120%;
+}
+
+/* code blocks by file tag */
+pre.file {
+ font-size: 8pt;
+ padding: 0.5em;
+ border: 1px dotted #000000;
+ color: Black;
+ overflow: visible;
+}
+
+/* footnotes */
+div.footnotes{
+ clear:both;
+ border-top: 1px solid #000000;
+ padding-left: 1em;
+ margin-top: 1em;
+}
+
+div.fn{
+ font-size:90%;
+}
+
+a.fn_top{
+ vertical-align:super;
+ font-size:80%;
+}
+
+a.fn_bot{
+ vertical-align:super;
+ font-size:80%;
+ font-weight:bold;
+}
+
+/* ---------- inline tables ------------------- */
+
+table.inline {
+ font-size: 80%;
+ background-color: #ffffff;
+ border-spacing: 0px;
+ border-collapse: collapse;
+}
+
+th.inline{
+ padding: 3px;
+ border: 1px solid #000000;
+ border-bottom: 2px solid #000000;
+ text-align: left;
+}
+
+td.inline{
+ padding: 3px;
+ border: 1px solid #000000;
+ text-align: left;
+}
+
+
+
+.toc, .footerinc, .header, .bar, .user {display:none}
diff --git a/script.js b/script.js
new file mode 100644
index 000000000..bce1b3225
--- /dev/null
+++ b/script.js
@@ -0,0 +1,368 @@
+/**
+ * Some of these scripts were taken from wikipedia.org and were modified for DokuWiki
+ */
+
+/**
+ * Some browser detection
+ */
+var clientPC = navigator.userAgent.toLowerCase(); // Get client info
+var is_gecko = ((clientPC.indexOf('gecko')!=-1) && (clientPC.indexOf('spoofer')==-1)
+ && (clientPC.indexOf('khtml') == -1) && (clientPC.indexOf('netscape/7.0')==-1));
+var is_safari = ((clientPC.indexOf('AppleWebKit')!=-1) && (clientPC.indexOf('spoofer')==-1));
+var is_khtml = (navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled ));
+if (clientPC.indexOf('opera')!=-1) {
+ var is_opera = true;
+ var is_opera_preseven = (window.opera && !document.childNodes);
+ var is_opera_seven = (window.opera && document.childNodes);
+}
+
+
+/**
+ * This function escapes some special chars
+ */
+function escapeQuotes(text) {
+ var re=new RegExp("'","g");
+ text=text.replace(re,"\\'");
+ re=new RegExp('"',"g");
+ text=text.replace(re,'&quot;');
+ re=new RegExp("\\n","g");
+ text=text.replace(re,"\\n");
+ return text;
+}
+
+/**
+ * This function generates the actual toolbar buttons with localized text
+ * we use it to avoid creating the toolbar where javascript is not enabled
+ */
+function formatButton(imageFile, speedTip, tagOpen, tagClose, sampleText, accessKey) {
+ speedTip=escapeQuotes(speedTip);
+ tagOpen=escapeQuotes(tagOpen);
+ tagClose=escapeQuotes(tagClose);
+ sampleText=escapeQuotes(sampleText);
+
+ document.write("<a ");
+ if(accessKey){
+ document.write("accesskey=\""+accessKey+"\" ");
+ speedTip = speedTip+' [ALT+'+accessKey.toUpperCase()+']';
+ }
+ document.write("href=\"javascript:insertTags");
+ document.write("('"+tagOpen+"','"+tagClose+"','"+sampleText+"');\">");
+
+ document.write("<img width=\"24\" height=\"24\" src=\""+
+ baseURL+imageFile+"\" border=\"0\" alt=\""+
+ speedTip+"\" title=\""+speedTip+"\">");
+ document.write("</a>");
+ return;
+}
+
+/**
+ * This function generates the actual toolbar buttons with localized text
+ * we use it to avoid creating the toolbar where javascript is not enabled
+ */
+function insertButton(imageFile, speedTip, value, accessKey) {
+ speedTip=escapeQuotes(speedTip);
+ value=escapeQuotes(value);
+
+ document.write("<a ");
+ if(accessKey){
+ document.write("accesskey=\""+accessKey+"\" ");
+ speedTip = speedTip+' [ALT+'+accessKey.toUpperCase()+']';
+ }
+ document.write("href=\"javascript:insertAtCarret");
+ document.write("(document.editform.wikitext,'"+value+"');\">");
+
+ document.write("<img width=\"24\" height=\"24\" src=\""+
+ baseURL+imageFile+"\" border=\"0\" alt=\""+
+ speedTip+"\" title=\""+speedTip+"\">");
+ document.write("</a>");
+ return;
+}
+
+/**
+ * This adds a button for the MediaSelection Popup
+ */
+function mediaButton(imageFile, speedTip, accessKey, namespace) {
+ speedTip=escapeQuotes(speedTip);
+ document.write("<a ");
+ if(accessKey){
+ document.write("accesskey=\""+accessKey+"\" ");
+ }
+ document.write("href=\"javascript:void(window.open('"+baseURL+"media.php?ns="+
+ namespace+"','mediaselect','width=600,height=320,left=70,top=50,scrollbars=yes'));\">");
+ document.write("<img width=\"24\" height=\"24\" src=\""+
+ baseURL+imageFile+"\" border=\"0\" alt=\""+
+ speedTip+"\" title=\""+speedTip+"\">");
+ document.write("</a>");
+ return;
+}
+
+/**
+ * apply tagOpen/tagClose to selection in textarea, use sampleText instead
+ * of selection if there is none copied and adapted from phpBB
+ */
+function insertTags(tagOpen, tagClose, sampleText) {
+ var txtarea = document.editform.wikitext;
+ // IE
+ if(document.selection && !is_gecko) {
+ var theSelection = document.selection.createRange().text;
+ if(!theSelection) { theSelection=sampleText;}
+ txtarea.focus();
+ if(theSelection.charAt(theSelection.length - 1) == " "){// exclude ending space char, if any
+ theSelection = theSelection.substring(0, theSelection.length - 1);
+ document.selection.createRange().text = tagOpen + theSelection + tagClose + " ";
+ } else {
+ document.selection.createRange().text = tagOpen + theSelection + tagClose;
+ }
+ // Mozilla
+ } else if(txtarea.selectionStart || txtarea.selectionStart == '0') {
+ var startPos = txtarea.selectionStart;
+ var endPos = txtarea.selectionEnd;
+ var scrollTop=txtarea.scrollTop;
+ var myText = (txtarea.value).substring(startPos, endPos);
+ if(!myText) { myText=sampleText;}
+ if(myText.charAt(myText.length - 1) == " "){ // exclude ending space char, if any
+ subst = tagOpen + myText.substring(0, (myText.length - 1)) + tagClose + " ";
+ } else {
+ subst = tagOpen + myText + tagClose;
+ }
+ txtarea.value = txtarea.value.substring(0, startPos) + subst +
+ txtarea.value.substring(endPos, txtarea.value.length);
+ txtarea.focus();
+
+ var cPos=startPos+(tagOpen.length+myText.length+tagClose.length);
+ txtarea.selectionStart=cPos;
+ txtarea.selectionEnd=cPos;
+ txtarea.scrollTop=scrollTop;
+
+ // All others
+ } else {
+ var copy_alertText=alertText;
+ var re1=new RegExp("\\$1","g");
+ var re2=new RegExp("\\$2","g");
+ copy_alertText=copy_alertText.replace(re1,sampleText);
+ copy_alertText=copy_alertText.replace(re2,tagOpen+sampleText+tagClose);
+ var text;
+ if (sampleText) {
+ text=prompt(copy_alertText);
+ } else {
+ text="";
+ }
+ if(!text) { text=sampleText;}
+ text=tagOpen+text+tagClose;
+ //append to the end
+ txtarea.value += "\n"+text;
+
+ // in Safari this causes scrolling
+ if(!is_safari) {
+ txtarea.focus();
+ }
+
+ }
+ // reposition cursor if possible
+ if (txtarea.createTextRange) txtarea.caretPos = document.selection.createRange().duplicate();
+}
+
+
+/*
+ * Insert the selected filename and close the window
+ *
+ * @see http://www.alexking.org/index.php?content=software/javascript/content.php
+ */
+function mediaSelect(file){
+ insertAtCarret(opener.document.editform.wikitext,'{{'+file+'}}');
+ window.close();
+}
+
+/*
+ * Insert the given value at the current cursor position
+ *
+ * @see http://www.alexking.org/index.php?content=software/javascript/content.php
+ */
+function insertAtCarret(field,value){
+ //IE support
+ if (document.selection) {
+ field.focus();
+ if(opener == null){
+ sel = document.selection.createRange();
+ }else{
+ sel = opener.document.selection.createRange();
+ }
+ sel.text = value;
+ //MOZILLA/NETSCAPE support
+ }else if (field.selectionStart || field.selectionStart == '0') {
+ var startPos = field.selectionStart;
+ var endPos = field.selectionEnd;
+ var scrollTop = field.scrollTop;
+ field.value = field.value.substring(0, startPos)
+ + value
+ + field.value.substring(endPos, field.value.length);
+
+ field.focus();
+ var cPos=startPos+(value.length);
+ field.selectionStart=cPos;
+ field.selectionEnd=cPos;
+ field.scrollTop=scrollTop;
+ } else {
+ field.value += "\n"+value;
+ }
+ // reposition cursor if possible
+ if (field.createTextRange) field.caretPos = document.selection.createRange().duplicate();
+}
+
+/**
+ * For the upload Dialog. Prefills the wikiname.
+ */
+function suggestWikiname(){
+ var file = document.upload.upload.value;
+
+ file = file.substr(file.lastIndexOf('/')+1);
+ file = file.substr(file.lastIndexOf('\\')+1);
+
+ document.upload.id.value = file;
+}
+
+/**
+ * This prints the switch to toggle the Table of Contents
+ */
+function showTocToggle(show,hide) {
+ if(document.getElementById) {
+ document.writeln('<span class=\'toctoggle\'><a href="javascript:toggleToc()" class="toc">' +
+ '<span id="showlink" style="display:none;">' + show + '</span>' +
+ '<span id="hidelink">' + hide + '</span>'
+ + '</a></span>');
+ }
+}
+
+/**
+ * This toggles the visibility of the Table of Contents
+ */
+function toggleToc() {
+ var toc = document.getElementById('tocinside');
+ var showlink=document.getElementById('showlink');
+ var hidelink=document.getElementById('hidelink');
+ if(toc.style.display == 'none') {
+ toc.style.display = tocWas;
+ hidelink.style.display='';
+ showlink.style.display='none';
+ } else {
+ tocWas = toc.style.display;
+ toc.style.display = 'none';
+ hidelink.style.display='none';
+ showlink.style.display='';
+
+ }
+}
+
+/**
+ * Sizecontrol inspired by TikiWiki. This displays the buttons.
+ */
+function showSizeCtl(){
+ if(document.getElementById) {
+ var textarea = document.getElementById('wikitext');
+ var hgt = getCookie('DokuWikisizeCtl');
+ if(hgt == null){
+ textarea.style.height = '300px';
+ }else{
+ textarea.style.height = hgt;
+ }
+ document.writeln('<a href="javascript:sizeCtl(100)"><img src="'+baseURL+'images/larger.png" width="20" height="20" border="0"></a>');
+ document.writeln('<a href="javascript:sizeCtl(-100)"><img src="'+baseURL+'images/smaller.png" width="20" height="20" border="0"></a>');
+ }
+}
+
+/**
+ * This sets the vertical size of the editbox
+ */
+function sizeCtl(val){
+ var textarea = document.getElementById('wikitext');
+ var height = parseInt(textarea.style.height.substr(0,textarea.style.height.length-2));
+ height += val;
+ textarea.style.height = height+'px';
+
+ var now = new Date();
+ fixDate(now);
+ now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000); //expire in a year
+ setCookie('DokuWikisizeCtl',textarea.style.height,now);
+}
+
+
+/**
+ * global var used for not saved yet warning
+ */
+var textChanged = false;
+
+function svchk(){
+ if(textChanged){
+ return confirm(notSavedYet);
+ }else{
+ return true;
+ }
+}
+
+/**
+ * global variable for the locktimer
+ */
+var locktimerID;
+
+/**
+ * This starts a timer to remind the user of an expiring lock
+ * Accepts the delay in seconds and a text to display.
+ */
+function init_locktimer(delay,txt){
+ txt = escapeQuotes(txt);
+ locktimerID = self.setTimeout("locktimer('"+txt+"')", delay*1000);
+}
+
+/**
+ * This stops the timer and displays a message about the expiring lock
+ */
+function locktimer(txt){
+ clearTimeout(locktimerID);
+ alert(txt);
+}
+
+/*
+ * This sets a cookie by JavaScript
+ *
+ * @see http://www.webreference.com/js/column8/functions.html
+ */
+function setCookie(name, value, expires, path, domain, secure) {
+ var curCookie = name + "=" + escape(value) +
+ ((expires) ? "; expires=" + expires.toGMTString() : "") +
+ ((path) ? "; path=" + path : "") +
+ ((domain) ? "; domain=" + domain : "") +
+ ((secure) ? "; secure" : "");
+ document.cookie = curCookie;
+}
+
+/*
+ * This reads a cookie by JavaScript
+ *
+ * @see http://www.webreference.com/js/column8/functions.html
+ */
+function getCookie(name) {
+ var dc = document.cookie;
+ var prefix = name + "=";
+ var begin = dc.indexOf("; " + prefix);
+ if (begin == -1) {
+ begin = dc.indexOf(prefix);
+ if (begin != 0) return null;
+ } else
+ begin += 2;
+ var end = document.cookie.indexOf(";", begin);
+ if (end == -1)
+ end = dc.length;
+ return unescape(dc.substring(begin + prefix.length, end));
+}
+
+/*
+ * This is needed for the cookie functions
+ *
+ * @see http://www.webreference.com/js/column8/functions.html
+ */
+function fixDate(date) {
+ var base = new Date(0);
+ var skew = base.getTime();
+ if (skew > 0)
+ date.setTime(date.getTime() - skew);
+}
diff --git a/smileys/delete.gif b/smileys/delete.gif
new file mode 100644
index 000000000..d668348b9
--- /dev/null
+++ b/smileys/delete.gif
Binary files differ
diff --git a/smileys/fixme.gif b/smileys/fixme.gif
new file mode 100644
index 000000000..b66ea99d6
--- /dev/null
+++ b/smileys/fixme.gif
Binary files differ
diff --git a/smileys/icon_arrow.gif b/smileys/icon_arrow.gif
new file mode 100644
index 000000000..2880055cc
--- /dev/null
+++ b/smileys/icon_arrow.gif
Binary files differ
diff --git a/smileys/icon_biggrin.gif b/smileys/icon_biggrin.gif
new file mode 100644
index 000000000..d3527723c
--- /dev/null
+++ b/smileys/icon_biggrin.gif
Binary files differ
diff --git a/smileys/icon_confused.gif b/smileys/icon_confused.gif
new file mode 100644
index 000000000..0c49e0698
--- /dev/null
+++ b/smileys/icon_confused.gif
Binary files differ
diff --git a/smileys/icon_cool.gif b/smileys/icon_cool.gif
new file mode 100644
index 000000000..cead0306c
--- /dev/null
+++ b/smileys/icon_cool.gif
Binary files differ
diff --git a/smileys/icon_cry.gif b/smileys/icon_cry.gif
new file mode 100644
index 000000000..7d54b1f99
--- /dev/null
+++ b/smileys/icon_cry.gif
Binary files differ
diff --git a/smileys/icon_doubt.gif b/smileys/icon_doubt.gif
new file mode 100644
index 000000000..fd7903b19
--- /dev/null
+++ b/smileys/icon_doubt.gif
Binary files differ
diff --git a/smileys/icon_doubt2.gif b/smileys/icon_doubt2.gif
new file mode 100644
index 000000000..eb4b70b66
--- /dev/null
+++ b/smileys/icon_doubt2.gif
Binary files differ
diff --git a/smileys/icon_eek.gif b/smileys/icon_eek.gif
new file mode 100644
index 000000000..5d3978106
--- /dev/null
+++ b/smileys/icon_eek.gif
Binary files differ
diff --git a/smileys/icon_evil.gif b/smileys/icon_evil.gif
new file mode 100644
index 000000000..ab1aa8e12
--- /dev/null
+++ b/smileys/icon_evil.gif
Binary files differ
diff --git a/smileys/icon_exclaim.gif b/smileys/icon_exclaim.gif
new file mode 100644
index 000000000..6e50e2eec
--- /dev/null
+++ b/smileys/icon_exclaim.gif
Binary files differ
diff --git a/smileys/icon_frown.gif b/smileys/icon_frown.gif
new file mode 100644
index 000000000..d2ac78c04
--- /dev/null
+++ b/smileys/icon_frown.gif
Binary files differ
diff --git a/smileys/icon_fun.gif b/smileys/icon_fun.gif
new file mode 100644
index 000000000..a8bb8a303
--- /dev/null
+++ b/smileys/icon_fun.gif
Binary files differ
diff --git a/smileys/icon_idea.gif b/smileys/icon_idea.gif
new file mode 100644
index 000000000..a40ae0d7e
--- /dev/null
+++ b/smileys/icon_idea.gif
Binary files differ
diff --git a/smileys/icon_kaddi.gif b/smileys/icon_kaddi.gif
new file mode 100644
index 000000000..1410f7f1e
--- /dev/null
+++ b/smileys/icon_kaddi.gif
Binary files differ
diff --git a/smileys/icon_lol.gif b/smileys/icon_lol.gif
new file mode 100644
index 000000000..374ba150f
--- /dev/null
+++ b/smileys/icon_lol.gif
Binary files differ
diff --git a/smileys/icon_mrgreen.gif b/smileys/icon_mrgreen.gif
new file mode 100644
index 000000000..b54cd0f94
--- /dev/null
+++ b/smileys/icon_mrgreen.gif
Binary files differ
diff --git a/smileys/icon_neutral.gif b/smileys/icon_neutral.gif
new file mode 100644
index 000000000..4f311567e
--- /dev/null
+++ b/smileys/icon_neutral.gif
Binary files differ
diff --git a/smileys/icon_question.gif b/smileys/icon_question.gif
new file mode 100644
index 000000000..9d072265b
--- /dev/null
+++ b/smileys/icon_question.gif
Binary files differ
diff --git a/smileys/icon_razz.gif b/smileys/icon_razz.gif
new file mode 100644
index 000000000..29da2a2fc
--- /dev/null
+++ b/smileys/icon_razz.gif
Binary files differ
diff --git a/smileys/icon_redface.gif b/smileys/icon_redface.gif
new file mode 100644
index 000000000..ad7628320
--- /dev/null
+++ b/smileys/icon_redface.gif
Binary files differ
diff --git a/smileys/icon_rolleyes.gif b/smileys/icon_rolleyes.gif
new file mode 100644
index 000000000..d7f5f2f4b
--- /dev/null
+++ b/smileys/icon_rolleyes.gif
Binary files differ
diff --git a/smileys/icon_sad.gif b/smileys/icon_sad.gif
new file mode 100644
index 000000000..d2ac78c04
--- /dev/null
+++ b/smileys/icon_sad.gif
Binary files differ
diff --git a/smileys/icon_silenced.gif b/smileys/icon_silenced.gif
new file mode 100644
index 000000000..448399b2b
--- /dev/null
+++ b/smileys/icon_silenced.gif
Binary files differ
diff --git a/smileys/icon_smile.gif b/smileys/icon_smile.gif
new file mode 100644
index 000000000..7b1f6d304
--- /dev/null
+++ b/smileys/icon_smile.gif
Binary files differ
diff --git a/smileys/icon_smile2.gif b/smileys/icon_smile2.gif
new file mode 100644
index 000000000..769639d32
--- /dev/null
+++ b/smileys/icon_smile2.gif
Binary files differ
diff --git a/smileys/icon_surprised.gif b/smileys/icon_surprised.gif
new file mode 100644
index 000000000..cb2142431
--- /dev/null
+++ b/smileys/icon_surprised.gif
Binary files differ
diff --git a/smileys/icon_twisted.gif b/smileys/icon_twisted.gif
new file mode 100644
index 000000000..502fe247e
--- /dev/null
+++ b/smileys/icon_twisted.gif
Binary files differ
diff --git a/smileys/icon_wink.gif b/smileys/icon_wink.gif
new file mode 100644
index 000000000..d14828804
--- /dev/null
+++ b/smileys/icon_wink.gif
Binary files differ
diff --git a/style.css b/style.css
new file mode 100644
index 000000000..0bdfdcb77
--- /dev/null
+++ b/style.css
@@ -0,0 +1,666 @@
+
+body {
+ font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
+ background-color: White;
+ color: Black;
+ margin: 0;
+ padding: 0;
+}
+
+div.clearer {clear: both; line-height: 0; height: 0;}
+
+table {
+ font-size: 100%;
+ padding:0;
+ margin:0;
+}
+
+tr,td,th {padding:0; margin:0;}
+
+img {border:0}
+
+p {padding:0; margin: 0 0 1.0em 0;}
+
+hr {
+ border: 0px;
+ border-top: 1px solid #8cacbb;
+ text-align:center;
+ height: 0px;
+}
+
+form {
+ border: none;
+ margin: 0;
+ display: inline;
+}
+
+label {
+ display: block;
+ text-align: right;
+ font-weight: bold;
+}
+
+label input {
+ width: 50%;
+}
+
+fieldset {
+ width: 300px;
+ text-align: center;
+ border: 1px solid #8cacbb;
+ padding: 0.5em;
+}
+
+
+a {
+ color:#436976;
+ text-decoration:none;
+}
+a:hover {
+ color:#000000;
+ text-decoration:underline;
+}
+
+textarea.edit {
+ font-family:monospace;
+ border: 1px solid #8cacbb;
+ color: Black;
+ background-color: white;
+ font-size:14px;
+ padding: 3px;
+ width:100%;
+}
+
+input.edit {
+ font-size: 100%;
+ border: 1px solid #8cacbb;
+ height: 22px ! important;
+ max-height: 22px ! important;
+ min-height: 22px ! important;
+ color: Black;
+ background-color: white;
+ vertical-align: middle;
+ padding: 1px;
+ display: inline;
+}
+
+input.button {
+ border: 1px solid #8cacbb;
+ color: Black;
+ background-color: white;
+ vertical-align: middle;
+ text-decoration:none;
+ font-size: 100%;
+ cursor: pointer;
+ height: 22px ! important;
+ max-height: 22px ! important;
+ min-height: 22px ! important;
+ margin: 1px;
+ display: inline;
+}
+
+div.secedit input.button {
+ border: 1px solid #8cacbb;
+ color: Black;
+ background-color: white;
+ vertical-align: middle;
+ text-decoration:none;
+ margin: 0px;
+ padding: 0px;
+ font-size: 10px;
+ cursor: pointer;
+ height: 15px;
+ max-height: 15px ! important;
+ min-height: 15px ! important;
+ float:right;
+ display: inline;
+}
+
+div.meta {
+ clear: both;
+ margin-top: 1em;
+ color:#436976;
+ font-size:70%;
+ text-align:right;
+}
+
+div.user {
+ float:left;
+}
+
+div.preview{
+ background:#f7f9fa;
+ margin-left:2em;
+ padding: 4px;
+ border: 1px dashed #000000;
+}
+
+div.breadcrumbs{
+ background-color: #f5f5f5;
+ font-size:80%;
+ color: #666666;
+ padding-left: 4px;
+}
+
+span.user{
+ color: #cccccc;
+ font-size: 90%;
+}
+
+div.error{
+ background: transparent url(images/error.png) 0.5em 0px no-repeat;
+ background-color: #ff6666;
+ font-size: 90%;
+ margin: 0px;
+ padding-left: 3em;
+ height: 16px;
+}
+
+div.info{
+ background: transparent url(images/info.png) 0.5em 0px no-repeat;
+ background-color: #ffff66;
+ font-size: 90%;
+ margin: 0;
+ padding-left: 3em;
+ height: 16px;
+}
+
+div.success{
+ background: transparent url(images/thumbup.gif) 0.5em 0px no-repeat;
+ background-color: #66ff66;
+ font-size: 90%;
+ margin: 0;
+ padding-left: 3em;
+ height: 16px;
+}
+
+/* ---------------------------- Diff rendering --------------------------*/
+table.diff { background:white; }
+td.diff-blockheader {font-weight:bold}
+td.diff-header {
+ border-bottom: 1px solid #8cacbb;
+ font-size:120%;
+}
+td.diff-addedline {
+ background:#ddffdd;
+ font-family: monospace;
+ font-size: 100%;
+}
+td.diff-deletedline {
+ background:#ffffbb;
+ font-family: monospace;
+ font-size: 100%;
+}
+td.diff-context {
+ background:#f7f9fa;
+ font-family: monospace;
+ font-size: 100%;
+}
+span.diffchange { color: red; }
+
+
+
+/* --------------------- Text formatting -------------------------------- */
+
+/* external link */
+a.urlextern{
+ background: transparent url(images/link_icon.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+ color:#436976;
+ text-decoration:none;
+}
+a.urlextern:visited {
+ color:Purple;
+}
+a.urlextern:hover {
+ text-decoration:underline;
+}
+
+/* windows share */
+a.windows{
+ background: transparent url(images/windows.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+ color:#436976;
+ text-decoration:none;
+}
+a.windows:visited {
+ color:Purple;
+}
+a.windows:hover {
+ text-decoration:underline;
+}
+
+/* interwiki link */
+a.interwiki{
+ background: transparent url(images/interwiki.png) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+ color:#436976;
+ text-decoration:none;
+}
+a.interwiki:visited {
+ color:Purple;
+}
+a.interwiki:hover {
+ text-decoration:underline;
+}
+
+/* link to some embedded media */
+a.media {
+ color:#436976;
+ text-decoration:none;
+}
+a.media:hover {
+ color:#436976;
+ text-decoration:underline
+}
+
+/* embedded images */
+img.media {
+ margin: 3px;
+}
+
+img.medialeft {
+ border: 0;
+ float: left;
+ margin: 0 1.5em 0 0;
+}
+
+img.mediaright {
+ border: 0;
+ float: right;
+ margin: 0 0 0 1.5em;
+}
+
+/* email link */
+a.mail {
+ background: transparent url(images/mail_icon.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+ color:#436976;
+ text-decoration:none;
+}
+a.mail:hover {
+ text-decoration:underline;
+}
+
+/* existing wikipage */
+a.wikilink1:link { color:#009900; text-decoration:none }
+a.wikilink1:visited { color:#009900; text-decoration:none }
+a.wikilink1:hover { color:#009900; text-decoration:underline }
+
+/* not exisitng wikipage */
+a.wikilink2:link { color:#FF3300; text-decoration:none }
+a.wikilink2:visited { color:#FF3300; text-decoration:none }
+a.wikilink2:hover { color:#FF3300; text-decoration:underline }
+
+acronym {
+ cursor: help;
+ border-bottom: 1px dotted #000;
+}
+
+/* the document */
+div.page {
+ margin-top: 4px;
+ margin-left: 1em;
+ margin-right: 2em;
+ text-align: justify;
+}
+
+/* general headline setup */
+h1, h2, h3, h4, h5 {
+ color: Black;
+ background-color: transparent;
+ font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
+ font-size: 100%;
+ font-weight: normal;
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: 0;
+ margin-bottom: 1em;
+ padding-left: 0;
+ padding-right: 0;
+ padding-top: 0.5em;
+ padding-bottom: 0;
+ border-bottom: 1px solid #8cacbb;
+ clear: left;
+}
+
+/* special headlines */
+h1 {font-size: 160%; margin-left: 0px; font-weight: bold;}
+h2 {font-size: 150%; margin-left: 20px;}
+h3 {font-size: 140%; margin-left: 40px; border-bottom: none; font-weight: bold;}
+h4 {font-size: 120%; margin-left: 60px; border-bottom: none; font-weight: bold;}
+h5 {font-size: 100%; margin-left: 80px; border-bottom: none; font-weight: bold;}
+
+/* indent different sections */
+div.level1 {margin-left: 3px;}
+div.level2 {margin-left: 23px;}
+div.level3 {margin-left: 43px;}
+div.level4 {margin-left: 63px;}
+div.level5 {margin-left: 83px;}
+
+/* unordered lists */
+ul {
+ line-height: 1.5em;
+ list-style-type: square;
+ margin: 0.5em 0 0.5em 1.5em;
+ padding: 0;
+ list-style-image: url(images/bullet.gif);
+}
+
+/* ordered lists */
+ol {
+ line-height: 1.5em;
+ margin: 0.5em 0 0.5em 1.5em;
+ padding: 0;
+ color: #638c9c;
+ font-weight: bold;
+ list-style-image: none;
+}
+
+/* the list items overriding the ol definition */
+span.li {
+ color: #000000;
+ font-weight: normal;
+}
+
+.quote {
+ border-left: 2px solid #8cacbb;
+ padding-left: 3px;
+}
+
+/* code blocks by indention */
+pre.pre {
+ font-size: 120%;
+ padding: 0.5em;
+ border: 1px dashed #8cacbb;
+ color: Black;
+ background-color: #f7f9fa;
+ overflow: auto;
+}
+
+/* code blocks by code tag */
+pre.code {
+ font-size: 120%;
+ padding: 0.5em;
+ border: 1px dashed #8cacbb;
+ color: Black;
+ background-color: #f7f9fa;
+ overflow: auto;
+}
+
+/* code highlighting is at bottom of file */
+
+/* inline code words */
+code {
+ font-size: 120%;
+}
+
+/* code blocks by file tag */
+pre.file {
+ font-size: 120%;
+ padding: 0.5em;
+ border: 1px dashed #8cacbb;
+ color: Black;
+ background-color: #dee7ec;
+ overflow: auto;
+}
+
+/* footnotes */
+div.footnotes{
+ clear:both;
+ border-top: 1px solid #8cacbb;
+ padding-left: 1em;
+ margin-top: 1em;
+}
+
+div.fn{
+ font-size:90%;
+}
+
+a.fn_top{
+ vertical-align:super;
+ font-size:80%;
+}
+
+a.fn_bot{
+ vertical-align:super;
+ font-size:80%;
+ font-weight:bold;
+}
+
+/* inline tables */
+table.inline {
+ background-color: #ffffff;
+ border-spacing: 0px;
+ border-collapse: collapse;
+}
+
+th.inline{
+ padding: 3px;
+ border: 1px solid #8cacbb;
+ background-color: #dee7ec;
+ text-align: left;
+}
+
+td.inline{
+ padding: 3px;
+ border: 1px solid #8cacbb;
+ text-align: left;
+}
+
+
+/* ---------- table of contents ------------------- */
+
+div.toc {
+ margin-left: 2em;
+ margin-top: 1.2em;
+ margin-bottom: 0;
+ float:right;
+ width: 200px;
+ font-size: 80%;
+ clear:both;
+}
+
+div.tocheader {
+ padding: 3px;
+ border: 1px solid #8cacbb;
+ background-color: #dee7ec;
+ text-align: left;
+ font-weight:bold;
+ margin-bottom: 2px;
+}
+
+#tocinside {
+ border: 1px solid #8cacbb;
+ background-color: #ffffff;
+ text-align: left;
+ padding-top: 0.5em;
+ padding-bottom: 0.7em;
+}
+
+ul.toc {
+ list-style-type: none;
+ list-style-image: none;
+ line-height: 1.2em;
+ margin: 0;
+ padding: 0;
+ padding-left: 1em;
+}
+
+ul.toc li {
+ background: transparent url(images/tocdot2.gif) 0 0.6em no-repeat;
+ padding-left:0.4em;
+}
+
+a.toc {
+ color: #436976;
+ text-decoration:none;
+}
+
+a.toc:hover {
+ color: #000000;
+ text-decoration:underline;
+}
+
+/* --------------- search result formating --------------- */
+.search_result{
+ margin-bottom: 6px;
+ padding-left: 30px;
+ padding-right: 10px;
+}
+
+.search_snippet{
+ color: #999999;
+ font-size: 12px;
+ margin-left: 20px;
+}
+
+.search_sep{
+ color: #000000;
+}
+
+.search_hit{
+ color: #000000;
+ background: #FFFF99;
+}
+
+div.search_quickresult{
+ margin-bottom: 15px;
+ padding-bottom: 5px;
+ border-bottom: 1px dashed #8cacbb;
+ margin-left: 30px;
+ padding-right: 10px;
+}
+
+div.search_quickhits {
+ margin-left: 1em;
+ float:left;
+ background: transparent url(images/bullet.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 8px;
+ width: 30%;
+}
+
+/* debug */
+pre.dbg{
+ background-color:#ffffff;
+ font-size: 120%;
+}
+
+/* Tableless Headers and Footers */
+/* Thanks to "moraes" <moraes@tipos.com.br> */
+
+.header {
+ height:35px;
+ padding:3px 0 2px 2px;
+}
+
+.pagename {
+ height:25px;
+ float:left;
+ font-size:200%;
+ font-weight:bolder;
+ color:#DEE7EC;
+ text-align:left;
+ vertical-align:middle;
+ padding:1px 0 0 1px;
+}
+
+.pagename a:link, .pagename a:visited {
+ color:#436976;
+ text-decoration:none;
+}
+
+.pagename a:hover, .pagename a:active {
+ color:#FF9933;
+}
+
+.logo {
+ float:right;
+ font-size:220%;
+ font-weight:bolder;
+ text-align:right;
+ vertical-align:middle;
+}
+
+.logo a:link, .logo a:visited, .logo a:hover, .logo a:active {
+ color:#dee7ec;
+ text-decoration:none;
+ font-variant:small-caps;
+ letter-spacing:2pt;
+}
+
+.bar {
+ height:25px;
+ border-top:1px solid #8CACBB;
+ border-bottom:1px solid #8CACBB;
+ background:#DEE7EC;
+ padding:2px;
+ margin:0;
+}
+
+.bar-left {
+ float:left;
+ width:50%;
+}
+
+.bar-right {
+ float:right;
+ width:50%;
+ text-align:right;
+}
+
+#bar_bottom {
+ margin-bottom:3px;
+}
+
+.mediaselect-left {
+ float:left;
+ padding: 0.5em;
+ height:230px;
+ overflow:auto;
+}
+
+.mediaselect-right {
+ float:right;
+ border-left: 1px solid #8cacbb;
+ padding: 0.5em;
+ width:350px;
+ height:230px;
+ overflow:auto;
+}
+
+div.uploadform {
+ margin-top: 0.5em;
+ border-top: 1px solid #8cacbb;
+}
+
+.footerinc a img {
+ opacity: 0.5;
+}
+
+.footerinc a:hover img {
+ opacity: 1;
+}
+
+/* syntax highlighting code */
+.code .br0 { color: #66cc66; }
+.code .co1 { color: #808080; font-style: italic; }
+.code .co2 { color: #808080; font-style: italic; }
+.code .coMULTI { color: #808080; font-style: italic; }
+.code .es0 { color: #000099; font-weight: bold; }
+.code .kw1 { color: #b1b100; }
+.code .kw2 { color: #000000; font-weight: bold; }
+.code .kw3 { color: #000066; }
+.code .kw4 { color: #993333; }
+.code .kw5 { color: #0000ff; }
+.code .me0 { color: #006600; }
+.code .nu0 { color: #cc66cc; }
+.code .re0 { color: #0000ff; }
+.code .re1 { color: #0000ff; }
+.code .re2 { color: #0000ff; }
+.code .re4 { color: #009999; }
+.code .sc0 { color: #00bbdd; }
+.code .sc1 { color: #ddbb00; }
+.code .sc2 { color: #009900; }
+.code .st0 { color: #ff0000; }
+