From 14a960ac7b3d7345965a419e81ee8afcb88b8953 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 4 Nov 2009 19:53:01 +0000 Subject: [PATCH] MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup --- lib/typo3/class.t3lib_cs.php | 1 - lib/typo3/class.t3lib_div.php | 1 - mod/wiki/TODO.txt | 4 +- mod/wiki/admin.php | 4 +- mod/wiki/backuplib.php | 20 +- mod/wiki/confirmlock.php | 9 +- mod/wiki/db/access.php | 4 +- mod/wiki/db/install.php | 2 +- mod/wiki/db/upgrade.php | 6 +- mod/wiki/ewiki/README | 528 +++++++++--------- mod/wiki/ewiki/README.de | 422 +++++++------- mod/wiki/ewiki/ewiki.php | 142 ++--- mod/wiki/ewiki/fragments/auth.php | 5 +- mod/wiki/ewiki/fragments/binary.php | 1 - mod/wiki/ewiki/fragments/calendar.css | 2 +- mod/wiki/ewiki/fragments/htaccess | 2 +- mod/wiki/ewiki/fragments/mkhuge | 2 +- mod/wiki/ewiki/fragments/nuke_mod_wiki_index | 2 +- .../fragments/strip_wonderful_slashes.php | 4 +- mod/wiki/ewiki/fragments/wiki_format.inc | 4 +- mod/wiki/ewiki/plugins/aview/backlinks.php | 5 +- mod/wiki/ewiki/plugins/aview/downloads.php | 10 +- mod/wiki/ewiki/plugins/email_protect.php | 8 +- .../ewiki/plugins/feature/imgresize_gd.php | 3 +- mod/wiki/ewiki/plugins/init.php | 6 +- mod/wiki/ewiki/plugins/jump.php | 7 +- mod/wiki/ewiki/plugins/lib/mime_magic.php | 115 ++-- mod/wiki/ewiki/plugins/markup/footnotes.php | 9 +- mod/wiki/ewiki/plugins/moodle/diff.php | 14 +- mod/wiki/ewiki/plugins/moodle/downloads.php | 18 +- mod/wiki/ewiki/plugins/moodle/f_fixhtml.php | 6 +- .../plugins/moodle/moodle_binary_store.php | 22 +- .../ewiki/plugins/moodle/moodle_highlight.php | 8 +- .../plugins/moodle/moodle_rescue_html.php | 10 +- .../ewiki/plugins/moodle/moodle_wikidump.php | 110 ++-- mod/wiki/ewiki/plugins/moodle/sitemap.php | 54 +- mod/wiki/ewiki/plugins/moodle/wantedpages.php | 18 +- mod/wiki/ewiki/plugins/notify.php | 3 +- mod/wiki/ewiki/plugins/page/orphanedpages.php | 8 +- mod/wiki/ewiki/plugins/page/pageindex.php | 4 +- mod/wiki/ewiki/plugins/patchsaving.php | 9 +- mod/wiki/ewiki/plugins/pluginloader.php | 1 - mod/wiki/ewiki/plugins/spages.php | 4 +- mod/wiki/ewikimoodlelib.php | 2 +- mod/wiki/filter.php | 8 +- mod/wiki/index.php | 2 +- mod/wiki/lib.php | 34 +- mod/wiki/mod_form.php | 2 +- mod/wiki/overridelock.php | 4 +- mod/wiki/restorelib.php | 20 +- mod/wiki/test.php | 1 - mod/wiki/version.php | 4 +- mod/wiki/view.php | 2 +- 53 files changed, 841 insertions(+), 855 deletions(-) diff --git a/lib/typo3/class.t3lib_cs.php b/lib/typo3/class.t3lib_cs.php index 918aaa420c..a596cb72c5 100644 --- a/lib/typo3/class.t3lib_cs.php +++ b/lib/typo3/class.t3lib_cs.php @@ -25,7 +25,6 @@ * Class for conversion between charsets. * * Typo Id: class.t3lib_cs.php 3439 2008-03-16 19:16:51Z flyguide $ - * Moodle $Id$ * * @author Kasper Skaarhoj * @author Martin Kutschker diff --git a/lib/typo3/class.t3lib_div.php b/lib/typo3/class.t3lib_div.php index 1b9dbb17de..984f5212d9 100644 --- a/lib/typo3/class.t3lib_div.php +++ b/lib/typo3/class.t3lib_div.php @@ -28,7 +28,6 @@ * Contains the reknown class "t3lib_div" with general purpose functions * * Typo Id: class.t3lib_div.php 3797 2008-06-11 06:39:13Z stucki $ - * Moodle $Id$ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj * XHTML compliant * Usage counts are based on search 22/2 2003 through whole source including tslib/ diff --git a/mod/wiki/TODO.txt b/mod/wiki/TODO.txt index 66c885653c..d40862b929 100644 --- a/mod/wiki/TODO.txt +++ b/mod/wiki/TODO.txt @@ -16,7 +16,7 @@ Unassigned or not ready: - Wiki HTML: http://moodle.org/mod/forum/discuss.php?d=8920 - http://moodle.org/mod/forum/discuss.php?d=7768#36954 - Image Thumbnails http://moodle.org/mod/forum/discuss.php?d=8351 - - + + ewiki Preparation: - Current Version: 1.01d diff --git a/mod/wiki/admin.php b/mod/wiki/admin.php index 8dd35e12bb..b297e78ad1 100644 --- a/mod/wiki/admin.php +++ b/mod/wiki/admin.php @@ -132,7 +132,7 @@ default: break; } } - + $PAGE->navbar->add(get_string("administration","wiki")); $PAGE->set_title($wiki_entry->pagename); $PAGE->set_focuscontrol($focus); @@ -370,4 +370,4 @@ echo $OUTPUT->footer(); exit; -?> + diff --git a/mod/wiki/backuplib.php b/mod/wiki/backuplib.php index 78b2d12a2a..7953c09f70 100644 --- a/mod/wiki/backuplib.php +++ b/mod/wiki/backuplib.php @@ -1,4 +1,4 @@ -get_record('wiki', array('id'=>$wiki)); } - + //Start mod fwrite ($bf,start_tag("MOD",3,true)); //Print assignment data @@ -68,16 +68,16 @@ fwrite ($bf,full_tag("REVERTCHANGES",4,false,$wiki->revertchanges)); fwrite ($bf,full_tag("INITIALCONTENT",4,false,$wiki->initialcontent)); fwrite ($bf,full_tag("TIMEMODIFIED",4,false,$wiki->timemodified)); - + //backup entries and pages if (backup_userdata_selected($preferences,'wiki',$wiki->id)) { $status = backup_wiki_entries($bf,$preferences,$wiki->id, $preferences->mods["wiki"]->userinfo); $status = backup_wiki_files_instance($bf,$preferences,$wiki->id); } - + //End mod fwrite ($bf,end_tag("MOD",3,true)); - + return $status; } @@ -171,12 +171,12 @@ } return $status; } - + function backup_wiki_files_instance($bf,$preferences,$instanceid) { global $CFG, $DB; - + $status = true; - + //First we check to moddata exists and create it as necessary //in temp/backup/$backup_code dir $status = check_and_create_moddata_dir($preferences->backup_unique_code); @@ -240,4 +240,4 @@ return $result; } -?> + diff --git a/mod/wiki/confirmlock.php b/mod/wiki/confirmlock.php index 4cc68ca708..9647f9b9f7 100644 --- a/mod/wiki/confirmlock.php +++ b/mod/wiki/confirmlock.php @@ -1,8 +1,8 @@ set_url($CFG->wwwroot.'/mod/wiki/confirmlock.php'); -header('Content-Type: text/plain'); +header('Content-Type: text/plain'); $lockid = optional_param('lockid', 0, PARAM_INT); @@ -27,9 +27,8 @@ if($lockid == 0) { if($lock=$DB->get_record('wiki_locks', array('id'=>$lockid))) { $lock->lockedseen=time(); $DB->update_record('wiki_locks',$lock); - print 'ok'; + print 'ok'; } else { print 'cancel'; // Tells user their lock has been cancelled. } -?> \ No newline at end of file diff --git a/mod/wiki/db/access.php b/mod/wiki/db/access.php index 25e84fd840..654d246ab9 100644 --- a/mod/wiki/db/access.php +++ b/mod/wiki/db/access.php @@ -1,4 +1,4 @@ - CAP_ALLOW ) ), - + 'mod/wiki:overridelock' => array( 'riskbitmask' => 0, diff --git a/mod/wiki/db/install.php b/mod/wiki/db/install.php index fe37656ce8..c8fe08e75d 100644 --- a/mod/wiki/db/install.php +++ b/mod/wiki/db/install.php @@ -1,4 +1,4 @@ - + diff --git a/mod/wiki/ewiki/README b/mod/wiki/ewiki/README index 342ed1369c..7b6f5f1a16 100644 --- a/mod/wiki/ewiki/README +++ b/mod/wiki/ewiki/README @@ -4,7 +4,7 @@ ErfurtWiki - a fast, user-friendly, highly configurable Wiki engine in PHP README -¯¯¯¯¯¯ +������ This is the documentation for ewiki. I tries to describe nearly everything, but therefore has now grown to long to be read at once. However it is often sufficient to just read the first few paragraphs to set it up (plugins can be @@ -246,7 +246,7 @@ read this file in hypertext format. What is this? -¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������� This is a WikiWikiWeb engine implemented in the PHP web scripting language. A WikiWiki is a web site which can be edited by everybody who visits it (most commonly without requiring that user to register @@ -260,7 +260,7 @@ text for inclusion in your pages` body/content area. Why "ErfurtWiki"? -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������� My home town (Btw, Erfurt is next to Weimar.de) and really that's just a name (you're allowed to rename, extend it and to finally ship it GPLifyed). You'll soon see the internal name is "ewiki", @@ -269,7 +269,7 @@ and it is also sometimes called 'EmbeddableWiki'. If you asked - Why you should I use it? - - It is contained within a single file. It does not require 20 other + - It is contained within a single file. It does not require 20 other files to lie around between your own scripts. - It does not impose a pre-defined layout, and you do not need @@ -284,7 +284,7 @@ If you asked - Why you should I use it? WikiAlternatives -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +���������������� If you don't like ewiki, then try at least one of these: * PhpWiki has a more complete approach than this WikiWare, @@ -306,7 +306,7 @@ If you don't like ewiki, then try at least one of these: * coWiki - completely OOP and the source code layout is great; looks very featureful, but is more a CMS than a Wiki (authentication bloat) and has also a little weird markup, - but better check it out yourself on http://cowiki.org/ + but better check it out yourself on http://cowiki.org/ * And of course there are Wikis in other scripting languages (and yes, there is still demand for an implementation in assembler or C !!) @@ -319,9 +319,9 @@ If you don't like ewiki, then try at least one of these: Authors -¯¯¯¯¯¯¯ -current maintainer: Mario Salzer icq95596825 (+Yah,Jab) -main contributor: Andy Fundinger from http://burgiss.com/ +������� +current maintainer: Mario Salzer icq95596825 (+Yah,Jab) +main contributor: Andy Fundinger from http://burgiss.com/ For the complete list of authors and contributors please see the CREDITS file. @@ -333,8 +333,8 @@ contribution (yep, that is not measured in lines of source code). Project Pages -¯¯¯¯¯¯¯¯¯¯¯¯¯ -official freshmeat project page: +������������� +official freshmeat project page: - http://freshmeat.net/projects/ewiki demo site: @@ -349,7 +349,7 @@ mailing list archive Obtaining Support -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������� Getting support for problems with ewiki is possible, but please read this README first. The author is thankful for BugReports, and of course would like to know were this documentation is not detailed enough and fails to @@ -368,7 +368,7 @@ soon as your problems are solved). License -¯¯¯¯¯¯¯ +������� This "program" is "distributed" as "Public Domain". Public Domain is like "FreeWare", but a bit more free ;-> You can think of it as the GPL without being bound to the GPL. I didn't want to @@ -384,7 +384,7 @@ downloaded separately (mime_magic.php, rendering_phpwiki12.php). Known Bugs -¯¯¯¯¯¯¯¯¯¯ +���������� Currently none. But this note is just here to encourage you to visit http://erfurtwiki.sourceforge.net/?BugReports @@ -398,7 +398,7 @@ http://erfurtwiki.sourceforge.net/?BugReports HowTo -¯¯¯¯¯ +����� the ewiki script requires: - Webserver (Apache, Nanoweb, ...) @@ -414,13 +414,13 @@ get this running). Integration with yoursite.php -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������������������� For the next few paragraphs the "yoursite.php" refers to whatever files and/or scripts belong to your already existing website. This hypothetical script should at least output the tags around the output from ewiki. The most simple script to accomplish this could look like this (see also example-2.php): - + - + [1] The first two commands open a connection to your MySQL database, usually one saves the result of mysql_connect() in a variable named $db or so, but as PHP does not depend on it if there is only one @@ -461,7 +461,7 @@ string but does not output that one itself. Creating a "config.php" - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������� Instead of including the plain "ewiki.php" script as shown in the example above, many people may find it more useful to include() a more customized Wiki yoursite. @@ -506,7 +506,7 @@ string but does not output that one itself. Generation of a "monsterwiki.php" script - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������������������������� ewiki over the time grow larger, and nowadays isn't anymore the single script it once was. The distribution ships with over hundreds of extension plugins. But nevertheless it is still possible to build @@ -517,7 +517,7 @@ string but does not output that one itself. the plugins). - You could still just include() the "ewiki.php" script into yoursite and delete everything else the ewiki tarball contained. - + However, it is also possible to MERGE all wanted plugins and the core script together to built a customized (feature enhanced) Wiki script from it. All you needed to do was: @@ -561,13 +561,13 @@ string but does not output that one itself. loading it twice is once too much). StaticPages (read about "spages" plugin) can also be included, if - you first convert them into ordinary ["page"] plugins using the + you first convert them into ordinary ["page"] plugins using the 'mkpageplugin' commandline tool. What to do if images don't work - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������������� The first example, as well as the "example-2.php" have problems with binary content, because: the is output before the 'ewiki.php' library was loaded and got the chance to output pictures. @@ -606,11 +606,11 @@ string but does not output that one itself. Supplying the WikiPageName -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +�������������������������� If you just call ewiki_page() as shown in the first example, it will try to get the name of the requested WikiPage either from the $_SERVER["PATH_INFO"] variable or from one of the GET-variables '?id=' -or '?name=' or '?page=' or '?file=' (available as $_REQUEST["name"]). +or '?name=' or '?page=' or '?file=' (available as $_REQUEST["name"]). If yoursite.php however uses another way or another varname to receive the WikiPageName you can just give it as first parameter: @@ -622,7 +622,7 @@ example-4.php shows how this can be used to list a second WikiPage mod_rewrite or PATH_INFO - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ If you dedicate a complete directory for your wiki, you should keep in mind, that some of the generated URLs contain slashes (for example "edit/WikiPage"), and will look like subdirectories and thus @@ -646,7 +646,7 @@ example-4.php shows how this can be used to list a second WikiPage use with the 404 trick - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������� Once I implemented a way to run a web server below another one (actually Nanoweb below Apache, for more details see http://nanoweb.si.kz/), because the Apache on one of my providers @@ -675,7 +675,7 @@ example-4.php shows how this can be used to list a second WikiPage ewiki.php. The $url from the above example could also be used as $id - parameter to ewiki_page(). + parameter to ewiki_page(). It should be noted, that some Apache implementations are garbaging POST requests in case of a triggered 404 error - but you can simply @@ -692,7 +692,7 @@ example-4.php shows how this can be used to list a second WikiPage Security considerations -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������������� ewiki was developed using a PHP5 interpreter, but with limitations of PHP4.3 in mind. There are huge differences (a rather instable, bug-prone and still unfinished language) across the 4.x versions of PHP. The 4.0 series is not @@ -705,11 +705,11 @@ providers. Some for example enforce users to run their scripts in so called Other still use pre-4.3 settings for the PHP interpreter (the Win4 php.ini still is outdated). So take care, and adjust settings using .htaccess` php_option for Apache servers. - + PHP settings (register_globals) - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������������� Because ewiki was developed on later PHP versions (at least 4.3), it heavily uses the $_REQUEST array and assumes a deactivated "register_globals" setting in php.ini @@ -735,7 +735,7 @@ php_option for Apache servers. The two modes of operation (_protected_mode and _flat_real_mode) - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� While this wiki was originally developed as a real wiki, many people use it for different things now, like private HomePages, easy CMS on commercial web sites. @@ -763,7 +763,7 @@ php_option for Apache servers. simple usage restrictions via wrappers -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +�������������������������������������� The easiest way to cripple a Wiki setup to be browseable-only for the larger public, and to allow only a small subset of users to edit pages is to write two wrapper scripts around the ewiki.php library. @@ -800,7 +800,7 @@ they'll work for you! PhpWiki compatibility -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +��������������������� The MySQL database table is partially compatible to PhpWiki versions 1.2.x, but not with the current PhpWiki 1.3.x versions. There is however now the db_phpwiki13 plugin which allows to access those (rw). @@ -808,7 +808,7 @@ db_phpwiki13 plugin which allows to access those (rw). Transition from another WikiWare - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������������� If you choosed ewiki to replace an already existing wiki script on your site, you should first think about, that the syntax/WikiMarkup isn't equal across all Wikis. There are a few markup extension @@ -824,7 +824,7 @@ db_phpwiki13 plugin which allows to access those (rw). EWIKI_PAGE_INDEX is not found in the db). There is a "plugins/db_phpwiki13.php" which may be useful in first - trying ewiki, but it is not recommended to use it for daily work. + trying ewiki, but it is not recommended to use it for daily work. Speaking of PhpWiki you could also use the "tools/t_convertdb.php" to import (and markup convert) all pages from PhpWiki to the ewiki database format. @@ -840,9 +840,9 @@ db_phpwiki13 plugin which allows to access those (rw). Internals -¯¯¯¯¯¯¯¯¯ +��������� The MySQL database table structure is to a certain degree compatible -with that of the well known »PHPWiki« v1.2.x (you only need to change +with that of the well known �PHPWiki� v1.2.x (you only need to change EWIKI_DB_TABLE_NAME to "wiki" to use it). This is the MySQL statement which creates our database table (you can find it at the bottom of the "ewiki.php" script): @@ -900,7 +900,7 @@ to implement the flat file based "database backend". ewiki_ functions -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +���������������� Some of the core functions of ewiki.php can be used separate from the others and some of them were designed to be replaced by different implementations. @@ -982,13 +982,13 @@ or more scripts into one program). Is just a ewiki_script() wrapper, but can additionally distinguish between binary download and upload URLs, which could be utilized by (database external) plain file storages (see plugins/binary_store). - + ewiki_binary() -------------- Gets called automatically for requests with the ?binary= trailer which is used to reference cached and uploaded images (or not - yet cached ones). + yet cached ones). ewiki_author() @@ -1041,7 +1041,7 @@ or more scripts into one program). produces the click-through links for inclusion on other dynamic pages, allows overlapping of page chunk ranges. - + ewiki_in_array($value, &$array, $dn=0) -------------------------------------- Case-insensitive variant of PHPs` in_array(), returns the $value if @@ -1137,7 +1137,7 @@ or more scripts into one program). $GLOBALS pollution -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������������ At least the ewiki_page() function produces variables in the global namespace. Of course they also were named to not interfere with anything from yoursite.php: @@ -1176,7 +1176,7 @@ with anything from yoursite.php: $ewiki_auth_user - Is set by ewiki_auth_user() whenever it successfully authenticates a user in _PROTECTED_MODE. This variable is then used as reliable state setting, which affects - permission granting. + permission granting. $ewiki_ring - Holds the permission level ('ring') of the currently authenticated user (or else will be unset). This value @@ -1212,11 +1212,11 @@ with anything from yoursite.php: $ewiki_script - Was a global var for a short period of time, but now is a subentry in $ewiki_config. - + EWIKI_ constants -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +���������������� This chapter explains some of the constants and how you can utilize them to tweak some of ewiki's behaviour. @@ -1276,7 +1276,7 @@ ewiki by pre-defining one of the following constants). If you do not set this constant, it will be guessed by the ewiki_script_url() funciton, what often works but may be suboptimal and could also lead to security problems. - + EWIKI_DB_TABLE_NAME Sets the name of the MySQL database table name to be created @@ -1382,7 +1382,7 @@ ewiki by pre-defining one of the following constants). If a not logged-in user however re-saves the page this flag won't be set anymore, so you should be careful about that. {{edit ewiki.php and define(_DB_F_HTML with 8+16) to change}} - + EWIKI_RESCUE_HTML Was replaced by "plugins/markup_rescuehtml.php", which now allows for certain 'safe' HTML tags within the wiki source to be used. @@ -1459,7 +1459,7 @@ ewiki by pre-defining one of the following constants). EWIKI_DB_F_BINARY Used for cached/uploaded images. Prevents a page from getting shown. - + EWIKI_DB_F_DISABLED If set will prevent the page from being shown. Not useful. You could more easily unset the TEXT flag to disable page view. @@ -1588,7 +1588,7 @@ ewiki by pre-defining one of the following constants). Note that the renderer relies only on some unique string to detect binary references, but the database functions in fact depend upon "://" to return image sizes on "FIND" calls. - + EWIKI_ACCEPT_BINARY Allows users to upload arbitrary binary files through the image upload function. You should now rather use the downloads plugin, which adds @@ -1640,7 +1640,7 @@ ewiki by pre-defining one of the following constants). you, which version you are running currently. Major releases have a version number like 'R1.00a', while testing and unstable releases have another number appended 'R1.00a7'. - + See the tools/ subdir for a small utility to change the mentioned flags in the ewiki database table. @@ -1648,7 +1648,7 @@ in the ewiki database table. $ewiki_config array -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������������� As it turned out not all configuration settings are as everlasting that they can be constants (this mainly applies to "look&feel"-settings). So some of the above mentioned EWIKI_ constants can now be overridden by @@ -1725,7 +1725,7 @@ before the 'ewiki.php' script gets included(). internal coding explained -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������������������� This section is to explain some of the coding style of ewiki, and how some things work. While many parts of ewiki carry good source code comments, it is always difficult to quickly understand larger scripts like the ewiki one @@ -1734,7 +1734,7 @@ by just reading it. how ewiki operates - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������ ewiki_page() - decodes the $id and $action from the GET or POST parameters - tries to load the page from ewiki_database() @@ -1780,7 +1780,7 @@ by just reading it. - page plugins return html output, which usually is hardcoded as strings into them - provide some interactivity - + ewiki_$action_plugins_*() - activate on pages with special registered $action's - provide some interactivity (for page editing for example) @@ -1788,7 +1788,7 @@ by just reading it. used variables - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� Variables in ewiki often have similar names, and are also regularily passed by reference from one function to another (so it is in fact the same variable). @@ -1835,13 +1835,13 @@ by just reading it. Tweaking -¯¯¯¯¯¯¯¯ +�������� (this part of the README is also just a collection of random notes) Just using the wiki source transformation -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������������������������������� The ewiki_format function was designed to be used independently from the ewiki database. @@ -1871,7 +1871,7 @@ stuff). Contributed by Frank Luithle. Customizing ewiki_format() -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +�������������������������� There are various markup extension plugins available for ewiki, which allow you to use BBCode or the syntax of another WikiWare. But if you have a closer look at $ewiki_config (the defaults are in 'ewiki.php' @@ -1903,7 +1903,7 @@ Please see the section on "ewiki_format() internals" on how to write a Customization using CSS -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������������� There are now some interesting ways to style ewiki output, just read on. Please note, that it in your stylesheets you just write ".wiki" and @@ -1917,7 +1917,7 @@ lots of class names with minus dashes instead of underscores.) user style classes in pages -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +��������������������������� The plugins/markup_css allows you to use CSS classes and style definitions in WikiPages. With the double at @@ followed by a css classname or command you start styling a paragraph or parts of the text. @@ -1938,7 +1938,7 @@ like @@color:#ff0000; will work, while specifying font names may not always. rendered page content -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +��������������������� If you are not interested in walking around the "ewiki.php" script when you want to tune how the output looks, you should try to utilize the (few) CSS classes ewiki defines (it does not include @@ -1954,12 +1954,12 @@ even one color setting or tag): .indent // to specify a different space-indentation - + pages enclosed in style classes -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������������������������� The most powerful way to style the content ewiki includes into your site is to use the generic style class names which enclose every page that comes from ewiki: @@ -1999,7 +1999,7 @@ widespread.) plugin output styling -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +��������������������� There often appear special 'pieces' within a rendered page that ewiki returns, because not everything in the returned html code belongs to the requested pages` content. @@ -2054,7 +2054,7 @@ different naming scheme. Idea Collection -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +��������������� Here we'll note some tricks, on how to do this and that. Some of the following paragraphs also explain workarounds for currently lacking features. @@ -2062,7 +2062,7 @@ features. Multiple Wikis / InterWiki feature abuse - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������������������������� Other WikiWare provides means to have multiple namespaces in a wiki, what if fact is contrary to the original Wiki idea suggesting a single flat namespace. ewiki does not support SubWikis or alike, to @@ -2082,7 +2082,7 @@ features. $ewiki_config["interwiki"]["office"] = "/wiki/office/?id="; $ewiki_config["interwiki"]["tech"] = "http://tech.company.com/?id="; $ewiki_config["interwiki"]["our-www"] = "http://www.company.com/"; - + The last one is an example, on how to use the InterWiki feature to generate references to arbitrary web documents, with a simple syntax like "[our-www:/customers/pub/rules.html]" - it's somehow standard to @@ -2101,14 +2101,14 @@ features. Explanations -¯¯¯¯¯¯¯¯¯¯¯¯ +������������ The next few paragraphs shall enlight more detailed how some things are handled in ewiki (and why it is that way). Binary and Text content -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������������� Because I'd like to keep it small (see also the "Everything in one script" paragraph) ewiki also creates just one database table. Differently from other Wikis this one has the 'flags' setting for @@ -2134,7 +2134,7 @@ throughout the code to separate between _DB_F_BINARY and _DB_F_TEXT content. Image Uploading - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������� The currently most important use for the BINARY flag and image functions is to upload images with the small form below every page edit box. @@ -2158,7 +2158,7 @@ throughout the code to separate between _DB_F_BINARY and _DB_F_TEXT content. Images Caching - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� Images are usually redirected through EWIKI_SCRIPT_BINARY, and ewiki tries to save them inside the database as with uploaded images. So most of the facts from the previous paragraph apply to this function @@ -2177,7 +2177,7 @@ throughout the code to separate between _DB_F_BINARY and _DB_F_TEXT content. Image WikiMarkup - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������� Usually one writes image references using square brackets around the url of an image: [http://www.example.com/pics/image.png] or: [internal://md5md5md5md5md5md5md5md5md5md5md5md5.png] @@ -2211,7 +2211,7 @@ throughout the code to separate between _DB_F_BINARY and _DB_F_TEXT content. binary_store, direct access - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������������� While storing the binary data together with text pages in the same database is most often a good thing and suits most sites, there exists also a workaround/hack to keep this binary data in plain @@ -2231,7 +2231,7 @@ throughout the code to separate between _DB_F_BINARY and _DB_F_TEXT content. Arbitrary Binary Content - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ Set the EWIKI_ACCEPT_BINARY constant, if you'd like to allow any binary file to be uploaded and saved in the database using the image upload function. Uploaded files will show up as ordinary (except @@ -2243,7 +2243,7 @@ throughout the code to separate between _DB_F_BINARY and _DB_F_TEXT content. $action and $id -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +��������������� Inside of ewiki.php you'll see many occurrences of variables named $id and $action. The $id refers to the current page, which usually is a string like ThisPage, ThatPage, OrAnotherPage. @@ -2268,7 +2268,7 @@ example (the "view" gets mandatory in such cases). ewiki URLs - ¯¯¯¯¯¯¯¯¯¯ + ���������� "$action/$id" is most commonly appended as "GET parameter" to an ewiki URL, after a string like "?id=" or "?page=" - you've already noticed that! @@ -2302,12 +2302,12 @@ example (the "view" gets mandatory in such cases). Everything in one script -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������������������ I think its handy to have one script for one task, and as ewiki is not intended to be used as portal script I think it's senseless to have always thousands of libs/scripts surrounding it. -However as time went on, it turned out, that it would either slow down +However as time went on, it turned out, that it would either slow down the core 'library' when everything was included into it, or that there couldn't be much further development at some point. @@ -2332,7 +2332,7 @@ inside ewiki. database plugins -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +���������������� The ewiki.php core script contains a database request function which is tailored to a MySQL database. However that function is already prepared to chain to another "database abstraction" function if desired. @@ -2340,7 +2340,7 @@ to chain to another "database abstraction" function if desired. MySQL support - ¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������� The first implemented, and still most recommended way to use ewiki is with a MySQL (3.21 or later) database. RDBMS work more reliably and of course much faster than any other of the ewiki @@ -2361,7 +2361,7 @@ to chain to another "database abstraction" function if desired. plugins/db_flat_files - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������� If you don't have access to a MySQL database, then just include() this plugin to save your wiki pages into simple text files (editable, often called "flat files") inside a dedicated subdirectory. You @@ -2375,7 +2375,7 @@ to chain to another "database abstraction" function if desired. Usually "/tmp" will work, but this one is purged on every boot; and therefore you should create a new sub directory (" mkdir ./pages ") where all files go into. This newly created subdir must be made - »world-writeable« using the command "chmod 777 ./pages", because the + �world-writeable� using the command "chmod 777 ./pages", because the WebServers user id counts when accessing it. Usually you can do both from within your ftp client (the commands @@ -2418,7 +2418,7 @@ to chain to another "database abstraction" function if desired. | created: 1046532697 | lastmodified: 1046532697 | refs: \nErfurtWiki\nNewestPages\n - | + | | !! WikiSourceContent | ... @@ -2452,7 +2452,7 @@ to chain to another "database abstraction" function if desired. plugins/db_fast_files - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������� NOTE: The db_fast_files has been merged into db_flat_files, so both formats can be read now - at the same time! Updated or new pages will however always be written in the file format determined by @@ -2488,7 +2488,7 @@ to chain to another "database abstraction" function if desired. plugins/db_any - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� If you use a relational SQL database other than MySQL, then you may want to give this plugin a try. It itself provides a wrapper for the PHP database access wrapper libraries ADOdb, PEAR::DB and @@ -2521,13 +2521,13 @@ to chain to another "database abstraction" function if desired. plugins/db_adodb - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������� obsoleted by plugins/db_any plugins/db_dba - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� including() this plugin enables ewiki to store the WikiPages in the Berkeley DB file given with the EWIKI_DBA constant. Your PHP binary must be compiled with either the "dba" or the "dbm" extension to use @@ -2597,7 +2597,7 @@ to chain to another "database abstraction" function if desired. plugins/binary_store - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������� Is a hack into the ewiki core, which will store binary/uploaded files outside of the default ewiki database (as plain files in a data directory). @@ -2616,7 +2616,7 @@ to chain to another "database abstraction" function if desired. database, however it has the drawback that only the main ewiki script can handle this transparently and all admin tools/ fail to deal with the stored plain data files (no backup support and so on). - + By setting the EWIKI_DB_STORE_URL constant correctly (corresponding to your wiki setup and where you store the data files, compare with EWIKI_DB_STORE_DIRECTORY) you can make ewiki create URLs directly @@ -2631,14 +2631,14 @@ to chain to another "database abstraction" function if desired. core enhancements -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������� Some really cool features are put into extension plugins, and the most important, recommended and most often used ones are listed in this section: plugins/patchsaving - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������� If two users concurrently edit a page, then only the first saving attempt will succeed; which the second user is told by the "This page version was already saved" failure message. @@ -2652,7 +2652,7 @@ important, recommended and most often used ones are listed in this section: plugins/notify - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� This plugin enables users to get notified, whenever someone changes a watched page. To enable 'watching' one must just place an email address into the page with following syntax: @@ -2671,7 +2671,7 @@ important, recommended and most often used ones are listed in this section: plugins/jump - ¯¯¯¯¯¯¯¯¯¯¯¯ + ������������ Introduces magic markup for page redirection (switching to another page). Possible notations are: @@ -2689,7 +2689,7 @@ important, recommended and most often used ones are listed in this section: plugins/email_protect - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������� This plugin 'ciphers' all valid email addresses inside a WikiPage for protection against automated spambots. Additionally it throws fake/trap email addresses to spam spammers databases :> @@ -2702,7 +2702,7 @@ important, recommended and most often used ones are listed in this section: plugins/spages (StaticPages) - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������������� The "StaticPages"-plugin allows ewiki to access files in a given directory. If these files are in text format, ewiki will parse them as WikiPages. But if you put files with an extension .html, .htm or @@ -2710,9 +2710,9 @@ important, recommended and most often used ones are listed in this section: be returned as is from ewiki_page() - the .php files will of course get executed and their output is returned. - The basename of the files in the directories to be used by spages + The basename of the files in the directories to be used by spages will make up the WikiPageName with which the files will be - accessible. + accessible. Any given directory (see on top of plugins/spages.php) will be read recursively. So files in a subdirectory will get available as a @@ -2752,7 +2752,7 @@ important, recommended and most often used ones are listed in this section: plugins/pluginloader - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������� The pluginloader plugin automatically loads ["action"] and ["page"] plugins, whenever necessary. This allows to skip dozens of include() statements within the config.php (which most always just @@ -2764,7 +2764,7 @@ important, recommended and most often used ones are listed in this section: plugins/init - ¯¯¯¯¯¯¯¯¯¯¯¯ + ������������ Handles database initialization using the distributed standard Wiki files from './init-pages'. Unlike the ewiki-builtin function to perform that task, this plugin first outputs informational notes @@ -2775,7 +2775,7 @@ important, recommended and most often used ones are listed in this section: plugins/feature/appendonly - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� This plugin (a family of) implements the actual support for the _DB_F_APPENDONLY page flag. When the flag is set, and this plugin active, then ordinary users can further only append text to the @@ -2809,7 +2809,7 @@ important, recommended and most often used ones are listed in this section: plugins/feature/imgresize_gd - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������������� Was extracted from the core during the R1.00f development releases. Automatically rescales uploaded images, if they are larger than EWIKI_IMAGE_MAXSIZE. @@ -2821,7 +2821,7 @@ important, recommended and most often used ones are listed in this section: plugins/feature/imgresize_magick - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������������� Rescales uploaded images via the ImageMagick utility "mogrify", which is usually only available on UNIX systems. It should however be fairly simple to make this plugin work with some other image @@ -2830,7 +2830,7 @@ important, recommended and most often used ones are listed in this section: plugins/feature/spellcheck - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� Turns the [preview] button below every page edit box into a spellcheck function. @@ -2841,7 +2841,7 @@ important, recommended and most often used ones are listed in this section: action/ plugins -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +��������������� Action plugins are those, that can be activated ON individual pages. And usually are shown as links below a page. The ewiki-builtin EditThisPage, BackLinks and PageInfo are ["action"] plugins for example. @@ -2849,15 +2849,15 @@ BackLinks and PageInfo are ["action"] plugins for example. plugins/action/diff - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������� Enables to view the differences between two saved page versions (what changes somebody has done to the page), but it is rather stupid and guessworking in how it does so. - + plugins/action/translation - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� This plugin adds a link to the GoogleLanguageTools or AltaVista BabelFish, which then remotely translated the current page into the users preferred language. It has support to detect the lang @@ -2866,7 +2866,7 @@ BackLinks and PageInfo are ["action"] plugins for example. plugins/like_pages - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������ LikePages is a search feature of WardsWiki, which scans for WikiPages whose name is somewhat similar to the one of the current page (the pagename must be made up of the same WikiWordParts so a @@ -2875,13 +2875,13 @@ BackLinks and PageInfo are ["action"] plugins for example. plugins/action/raw - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������ Can be used to download the unrendered Wiki source of a page. plugins related to hypertext links -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +���������������������������������� The linking/ plugin group deals with how links inside the Wiki will look and work. Some of them are would also fall the "core enhancements" group, while others are just handy or for link beatification. @@ -2889,7 +2889,7 @@ others are just handy or for link beatification. plugins/linking/tcn - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������� ewiki evaluates the Accept-Language HTTP header modern browser send with each request. This plugin now automatically brings up a variant of the current requested page if it finds a match in @@ -2913,7 +2913,7 @@ others are just handy or for link beatification. plugins/linking/plural - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������� This plugin tries to alias plural and singular page names against each other. That is, "WikiPage" will be shown, whenever "WikiPages" was requested (and vice versa). @@ -2921,7 +2921,7 @@ others are just handy or for link beatification. plugins/linking/autolinking - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������������� The autolinking plugin allows to have automatic links inside the Wiki for words which exist in the database, but are no real WikiWords. This is made possible by the companion StaticPage @@ -2932,7 +2932,7 @@ others are just handy or for link beatification. plugins/linking/link_css - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ Adds CSS classes to the links generated by the Wiki page formatting kernel, which then allow you to colorize (or to otherwise change appearance of links) via a style sheet. @@ -2940,7 +2940,7 @@ others are just handy or for link beatification. plugins/linking/link_icons - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� The link_icons plugin prepends icon s before registered link types, like the link_css plugin adds class="..." attributes to the html formatted links in every page. @@ -2948,14 +2948,14 @@ others are just handy or for link beatification. plugins/linking/link_target_blank - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������������������� Adds 'target="blank"' to link tags , which will result in most browsers opening pages in a new window. plugins/linking/linkexcerpts - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������������� Adds a short preview text (with ) to every link of a page. This however requires multiple additonal database accesses (slower) and could enlarge delivered .html page sizes dramatically. @@ -2963,7 +2963,7 @@ others are just handy or for link beatification. plugins/linking/linkdatabase - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������������� Is a page plugin, which provides a nearly compliant implementation of the page and link structure export function known from the UseMod WikiWare and MeatBall:LinkDatabase. This is useful for contributing @@ -2972,7 +2972,7 @@ others are just handy or for link beatification. plugins/linking/instanturls - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������������� Allows to specify URL abbreviations on one or more summary pages. This can be done using a table or a definition list to assign each URL a title, which then can be used on other pages as square @@ -2987,14 +2987,14 @@ others are just handy or for link beatification. plugins/linking/titlefix - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ Allows to swap [title|PageName] in square brackers [Page|title], because that can easily be detected, if the page already exists. plugins/interwiki/intermap - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� This plugin (in fact only a general include) extends the list of known InterWiki: prefixes with a more complete set merged from MoinMoin and PhpWiki's interwiki.map. The links are rather @@ -3004,28 +3004,28 @@ others are just handy or for link beatification. appearance/ tweaks -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������������ There are various plugin hooks within ewiki, which allow to mangle text strings and data immediately before it would be returned as output. plugins/appearance/listpages_br - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������������� This plugin will produce
separated lists (for SearchPages, PageIndex, MostVisitedPages, and so on). plugins/appearance/listpages_ul - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������������� Creates real
    lists (WordIndex, CreatedPages, ...) instead of the · ones, ewiki core would usually return. plugins/listpages_tbl - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������� The listpages_tbl plugin outputs a table instead of the ordinary page lists (PageIndex, UpdatedPages, ...). You need to edit its source to set colours to fit your site layout. @@ -3033,7 +3033,7 @@ strings and data immediately before it would be returned as output. plugins/appearance/fancy_list_dict - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������������������� The WordIndex and PageIndex plugins (unlike the other page list returning ones like SearchPages and UpdatedPages) can utlize this plugin to output a pretty dictionary like listing of pages. @@ -3041,7 +3041,7 @@ strings and data immediately before it would be returned as output. plugins/appearance/title_calendar - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������������������� Changes the titles of calendar plugin entries in the database into a more readable format for page lists (PageIndex, PowerSearch, UpdatedPages, and so on). @@ -3049,7 +3049,7 @@ strings and data immediately before it would be returned as output. page plugins -¯¯¯¯¯¯¯¯¯¯¯¯ +������������ The page plugins provide additional "generated/internal" pages, which have a standard WikiWordPageName and can thus be referenced easily from within ordingary WikiPages. But they are of course uneditable (because their @@ -3064,7 +3064,7 @@ them regardless if they're needed or not, how it currently is done). plugins/page/powersearch - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ This plugins provides a (probably) better search function with the default page name "PowerSearch". It tries to guess a value, which tells something about how good a page matches @@ -3075,13 +3075,13 @@ them regardless if they're needed or not, how it currently is done). plugins/page/pageindex - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������� Lists all pages found in the database alphabetically. plugins/page/wordindex - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������� Lists the word parts of all wiki pages, but requires the powersearch plugin to be present, because the result is redirected to there as usually many of the listed words belong to multiple @@ -3090,7 +3090,7 @@ them regardless if they're needed or not, how it currently is done). plugins/page/imagegallery - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������� Outputs a page containing all cached/uploaded images. The images are currently not rescaled to fit on the page; this work is left to the browser. @@ -3099,14 +3099,14 @@ them regardless if they're needed or not, how it currently is done). plugins/page/aboutplugins - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������� Lists all registered plugins (mpi, page, action, task/core). The name refers to the "about:plugins" page present in recent browsers. - + plugins/page/orphanedpages - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� Shows up a list of pages, that exist, but are not linked from any other pages. These is often also called dead pages. @@ -3117,20 +3117,20 @@ them regardless if they're needed or not, how it currently is done). plugins/page/wantedpages - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ Returns a list of pages to which QuestionMarkLinks? currently exist. plugins/page/since_updates - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� Provides a list of pages with actualization times. plugins/page/textupload - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������� The virtual TextUpload plugin allows to insert new WikiPages by uploading text files. It can convert from various formats into Wiki content, including some proprietary Office file formats, if one of @@ -3141,33 +3141,33 @@ them regardless if they're needed or not, how it currently is done). plugins/page/wikidump - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������� Allows to download a gzipped tarball containing all readily rendered pages as .html files and also images. plugins/page/interwikimap - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������� Shows up the currently in use InterWikiMap. plugins/page/hitcounter - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������� Sums up the individual {hits} count of all pages and returns the overall count. plugins/page/scandisk - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������� Presents an unserious statistic. plugins/page/wikinews - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������� Returns the most recently added pages in an overview, that incorporates a small fragment from the content of those newly added pages. @@ -3175,39 +3175,39 @@ them regardless if they're needed or not, how it currently is done). plugins/page/wikiuserlogin - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� Allows to set a free-form username, which then would be stored into the database whenever a page was edited. plugins/page/randompage - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������� Shows up a randomly choosen page from the database. plugins/page/fortune - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������� Calls the Unix /usr/games/fortune program and prints out returned content. plugins/page/ewikilog - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������� Allows to review the content of the 'ewiki.log' file. plugins/page/phpinfo - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������� Shows the settings of your PHP interpreter. plugins/page/README - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������� Can parse the distributed README file and make a hypertext presentation from it, for easier reading of the Wiki documentation. It is printed in
     text, but with WikiLinking enabled (which
    @@ -3217,17 +3217,17 @@ them regardless if they're needed or not, how it currently is done).
     
     
              plugins/page/wikiuserlogin
    -         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    +         ��������������������������
              Allows to post a username (Note: this one does not do any sort of
              real authentication), which is saved in the http client as cookie,
              but can afterwards be evaluated as $ewiki_author, so the according
              field in the database entries contains a bit more than just
              the IP address when a changed page gets saved.
    -        
    +
     
     
     markup plugins
    -¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    +��������������
     The ewiki rendering core is rather fast and consolidated, that was the goal.
     However if you ever happen to need more functionality, this can be added
     easily by the use of plugins.
    @@ -3238,7 +3238,7 @@ used WikiWare.
     
     
              Other WikiWares markup
    -         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    +         ����������������������
              The WikiWorld still lacks a unified markup (and thus also the
              interchangeablity that made html THE standard it today is), and
              while ewiki usues nearly MeatBall:WikiMarkupStandard, you may want
    @@ -3263,7 +3263,7 @@ used WikiWare.
     
     
              plugins/markup/css
    -         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    +         ������������������
              CSS markup allows you to assign visual styles (or semantic CSS
              class names) to a block of text (paragraph) or to pieces of text.
              @@ is used to start a styled area. The @@ must be immediately
    @@ -3282,7 +3282,7 @@ used WikiWare.
     
     
              plugins/markup/css_singleat
    -         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    +         ���������������������������
              This plugin allows you (like the markup_css plugin) to attach CSS
              classes to a paragraph of text with just a single @ character:
     
    @@ -3292,7 +3292,7 @@ used WikiWare.
     
     
              plugins/markup/footnotes
    -         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    +         ������������������������
              Introduces the ability to generate footnotes by placing an
              explanation into double curly brackets {{footnote text}}.
     
    @@ -3309,7 +3309,7 @@ used WikiWare.
     
     
              plugins/markup/asciitbl
    -         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    +         �����������������������
              Allows to use ASCII-Art tables as outputed by lynx and other
              console programs inside of WikiPages, which eases life, when
              dealing with multiline table cell content.
    @@ -3317,7 +3317,7 @@ used WikiWare.
     
     
              plugins/markup_complextbl
    -         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    +         �������������������������
              ewiki allows you to use tables with the || | characters in the wiki
              page source. However the html code for the table layout is
              hardcoded and cannot be changed on a per-page basis.
    @@ -3338,7 +3338,7 @@ used WikiWare.
     
     
              plugins/markup/htmltbl
    -         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    +         ����������������������
              Provides a block escape to use the standard html  code
              instead of the limited pipe syntax provided by ewiki. It will parse
              for  and 
    tags and strip any not registered attributes to @@ -3351,7 +3351,7 @@ used WikiWare. plugins/markup_rescuehtml - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������� Allows to use some 'safe' HTML tags within the WikiPage. This plugin replaces the previous EWIKI_RESCUE_HTML constant. @@ -3372,7 +3372,7 @@ used WikiWare. .................................................................. : The code of this module is covered by the GPL license, as it : : was copied verbatim from the PhpWiki project. : - ·································································· + ������������������������������������������������������������������ @@ -3388,7 +3388,7 @@ used WikiWare. mpi -¯¯¯ +��� The so called "mpi" plugins can be embedded into pages, and produce their output there. They are loaded on demand (only if it appears that they should be invoked), but it is possible to include() the individual files regardless @@ -3414,7 +3414,7 @@ create a link inside of the page using the syntax mpi_backlinks - ¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������� Prints a list of BackLinks to the current page (the same as when clicking on the title of a page or on the BackLinks action link). @@ -3423,13 +3423,13 @@ create a link inside of the page using the syntax mpi_multimedia - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� Allows to multimedia files into a page. mpi_syndicate - ¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������� Embeds remote RSS feeds (abbrv. for "ReallySimpleSyndication" or "RichSiteSummary") into the current page. It caches the fetched data for quite some time in a pre-parsed _BINARY database entry. @@ -3437,28 +3437,28 @@ create a link inside of the page using the syntax mpi_insert - ¯¯¯¯¯¯¯¯¯¯ + ���������� Allows to insert another readily rendered WikiPage into the current one, usually inside of a . mpi_localsitemap - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������� Is a mix of BackLinks and LinkTree features, and prints the tree of pages backreferencing to the current one. visual extensions -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������� The hook following plugins utilize is called "append-view". It allows to put content below a pages contents (after the action links). plugins/aview/backlinks - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������� Adds the list of BackLinks (references from others to the current page) to the current page below it (this list is also available, when a user clicks on the title of a page). @@ -3466,7 +3466,7 @@ content below a pages contents (after the action links). plugins/aview/linktree - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������� Prints the possible (shortest) paths to the FrontPage (determined by the EWIKI_PAGE_INDEX constant) starting from the current one below. Calculations and database access required by this plugin @@ -3476,49 +3476,49 @@ content below a pages contents (after the action links). plugins/aview/toc - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������� Analyzes a pages headlines and generates a list of contents box from it, which is inserted as float box on top of it then. Use the following CSS selector to style it: - .wiki .page-toc { + .wiki .page-toc { ... } plugins/aview/posts - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������� Allows to add separate comment pages, which will then always be displayed below the current one, but remain editable as standalone pages. (So the page they are appended to could be marked as _READONLY). - + plugins/aview/threads - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������� Allows to group the pages created using the "posts" plugin into threads. plugins/aview/subpages - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������� Adds the list of pages, which appear to be SubPages of the current one, below it. plugins/aview/downloads - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������� Shows the uploaded files, which appear to belong to the current page (individual pages can be treated as upload sections). plugins/aview/imgappend - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������� Prints an image uploading box below every page, which allows to append an image without prior clicking EditThisPage (the image will be automatically appended to the bottom of the page). @@ -3526,7 +3526,7 @@ content below a pages contents (after the action links). plugins/aview/piclogocntrl - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� This plugin allows users to select a logo graphic which will be made available for use in the site template as $ewiki_config["page_logo"]. Configureable through the internal @@ -3535,21 +3535,21 @@ content below a pages contents (after the action links). plugins/aview/aedit_pageimage - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������������� This plugin allows users to select a page image graphic, and is a mix of the aview/piclogocntrl and page/imagegallery plugins. - + plugins/aview/control2 - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������� Shows examplarily how to replace the standard "action-links" box, and adds it on top of the page (including the page title). plugins/aview/aedit_authorname - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������������ Adds a text field below the edit/ box, which allows to set the AuthorName which then will get stored, when the page is saved. This name is then also stored client-side as cookie for @@ -3564,7 +3564,7 @@ content below a pages contents (after the action links). plugins/aview/aedit_deletebutton.js - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������������������� Adds a JavsScript snippet to allow users to quickly mark a page for deleterequest, by inserting the link to "DeleteMe" into the contents, when editing it. @@ -3572,7 +3572,7 @@ content below a pages contents (after the action links). page filters -¯¯¯¯¯¯¯¯¯¯¯¯ +������������ A few plugin hooks exist to completely rework generate page output. These are often used to insert content into the otherwise readily rendered .html pages (some of the above aview plugins do so, too). @@ -3580,7 +3580,7 @@ pages (some of the above aview plugins do so, too). plugins/filter/f_fixhtml - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ Is a minimal tag balancer (a highly simplified HTML tidy) and can work around various html code problems that the ewiki_format() html rendering function has. It is for example specialized to @@ -3590,7 +3590,7 @@ pages (some of the above aview plugins do so, too). plugins/filter/search_highlight - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������������� Evaluates the Referer header sent by many browsers to detect if a visitor came from a search engine (even the internal PowerSearch or SearchPages ones) and highlights the searched words in the @@ -3599,13 +3599,13 @@ pages (some of the above aview plugins do so, too). plugins/filter/fun_chef - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������� Borg, Borg, Borg! plugins/filter/fun_upsidedown - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������������� Transforms a pages content using letter transformation to make them readibly from upside down with certain fonts. This however is a bit tricky for html pages and thus will always wrongly @@ -3614,13 +3614,13 @@ pages (some of the above aview plugins do so, too). plugins/filter/fun_wella - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ Adds a little CSS to make text swirrling on both sides. plugins/filter/fun_screamomatic - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������������� Detects if someone entered a FULL LINE OF YELLING into a page when editing it, and then sets a persistent cookie. That cookie will result in all pages contents to be converted into uppercase @@ -3629,23 +3629,23 @@ pages (some of the above aview plugins do so, too). plugins/filter/f_msiepng - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ Converts .png references in the WhateverX code required by - all current IE versions to display .png images according to the + all current IE versions to display .png images according to the specification (which currently only an IE external plugin can handle correctly). BloatWiki extensions -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +�������������������� ewiki slowly evolves into a well-bloated portal software, and some plugins already extend it far beyond the scope of an ordinary Wiki. plugins/module/calendar - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������� The calendar plugin enables you to add an editable calendar to every WikiPage. It is not a fully integral part of ewiki, and needs additional calls from yoursite.php to integrate nicely into your @@ -3700,7 +3700,7 @@ already extend it far beyond the scope of an ordinary Wiki. plugins/module/downloads - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ From the very beginning the ewiki core supported uploading image files into the database. As time and discussions went on, there came the idea to allow arbitrary binary files to be inserted too. @@ -3748,7 +3748,7 @@ already extend it far beyond the scope of an ordinary Wiki. plugins/module/tour - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������� Provides a shortened view of the current page and all linked ones (even the backlinked ones). This eases navigation and page content "scanning" (getting a quick overview). @@ -3757,7 +3757,7 @@ already extend it far beyond the scope of an ordinary Wiki. utility code -¯¯¯¯¯¯¯¯¯¯¯¯ +������������ The plugins/lib/ directory contains code and functionality, which often is required by some of the other plugins (they depend on it then), but which was too specialized to get part of the ewiki.php core script. @@ -3768,7 +3768,7 @@ categories. plugins/lib/cache - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������� This plugin stores readily rendered Wiki page content (already in html format) either into a dedicated directory, or into specially named _BINARY wiki database entries. This then allows to satisfy @@ -3784,7 +3784,7 @@ categories. plugins/lib/speed - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������� Evaluates the "conditional HTTP request headers" to tell a client if it could reuse its existing cache entry for a requested page. This is believed to reduce traffic and also speed up some @@ -3795,14 +3795,14 @@ categories. always sends. However this will only work, if you disable EWIKI_NOCACHE - but - then some browsers will never see updated pages, if they were + then some browsers will never see updated pages, if they were misconfigured to not refetch pages, once they got into the internal browser cache. (But on the other hand, that is users fault ;) plugins/lib/mime_magic - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������� Implements the mime_magic feature absent from some (older and misconfigured current) PHP interpreter versions (check your phpinfo and /etc/mime.types). @@ -3814,21 +3814,21 @@ categories. .................................................................. : The data of this plugin is covered by the GNU General Public : : License. : - ·································································· + ������������������������������������������������������������������ plugins/lib/navbar - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������ Provides a configureable menu for the contents of your Wiki for inclusion in your site template, which changes depending on which site area you're currently inside (determined partially by the linktree plugin). - + plugins/lib/protmode - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������� Is an extension package (currently in development) with various helper functions for ProtectedMode plugins. Especailly useful in conjunction with the auth-liveuser framework. @@ -3836,14 +3836,14 @@ categories. plugins/lib/save_storevars - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������������������� An example script on how to store additional vars into page entries of the ewiki database (session like). admin/ plugins -¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +�������������� Collects plugins for ewiki / database administration. Often these depend upon $ewiki_ring==0 (superuser authentication level in EWIKI_PROTECTED_MODE), otherwise refuse to work for security reasons (some functions are however @@ -3855,7 +3855,7 @@ directory (integrated database tools). control - ¯¯¯¯¯¯¯ + ������� Allows changing per-page settings, and adds a easily accessible "page control" action link below every page. @@ -3871,14 +3871,14 @@ directory (integrated database tools). SearchAndReplace - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������� Is a powerful text/content replacement tool. It features regular expression matching, but can also be used as any other simple string replace-all tool. SearchCache - ¯¯¯¯¯¯¯¯¯¯¯ + ����������� This tool is intended to create 'shadow pages' (or 'ghost pages') for ewiki internal/generated pages (the ["page"] plugins), which usually weren't found by the PageSearch and PowerSearch. This @@ -3890,20 +3890,20 @@ directory (integrated database tools). other plugins -¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������� These plugins actually implement some stuff, one usually should do inside of the yoursite.php ewiki wrapper script. plugins/debug/ - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� Eventually contains debug plugins. plugins/auth/ - ¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������� Contains various (example and ready to use) plugins for the ewiki_auth() interfaces. This directory contains its own README.auth, which describes the _PROTECTED_MODE, the _auth API and @@ -3912,7 +3912,7 @@ of the yoursite.php ewiki wrapper script. plugins/auth-liveuser/ - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������������� Contains the more advanced authentication and permission plugin bundle for chaining ewiki with the PEAR LiveUser authentication framework. There is detailed documentation within the README in @@ -3921,7 +3921,7 @@ of the yoursite.php ewiki wrapper script. separate "extra" tarball -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������������������ There are a few plugins and extensions, which are not packaged into the distributed ewiki tarball for size reasons. You can obtain it from your favourite dealer, or from our downloads/ directory as "extra-CVS-*" @@ -3947,8 +3947,8 @@ beatification purposes. More separate files -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -Even if one of the project goals was to have everything in one script, +������������������� +Even if one of the project goals was to have everything in one script, there are now some support scripts around it, but those are normally only required for setup (init-pages for example). With some others you need to take a lot of care before installing on a public WebServer @@ -3957,7 +3957,7 @@ need to take a lot of care before installing on a public WebServer Pages in init-pages/ -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +�������������������� This directory just contains text-files with the wiki_source of the initial pages, which are inserted if you start ewiki.php for the first time. @@ -3967,7 +3967,7 @@ or the 'ewikictl' commandline utility. Additional tools/ -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������� This directory holds some (external) add-ons, which are intended to supply "admin functions" for the ewiki database. It is strongly discouraged to integrate this with ewiki, as it could @@ -4003,15 +4003,15 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/t_flags - ¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������� WikiPages usually have the page flag TEXT assigned. Other possible flags are DISABLED, SYSTEM, BINARY or HTML, READONLY, WRITEABLE. Usually page flags are copied from one page version to the next. - + tools/t_backup - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� Use this to make backup files from the WikiPages. This www script is a wrapper around the ewikictl commandline utility and library, and therefore supports almost the same options. @@ -4019,7 +4019,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/t_restore - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������� Allows to reinsert the files generated with the backup utility into the database. It is also a www wrapper around ewikictl and thus also supports the "plain", "flat" and "fast" file formats. @@ -4027,7 +4027,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/t_remove - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� Use this to delete a page from the database (including all saved versions). You should always prefer to set a page DISABLED with the ewiki_flags @@ -4036,7 +4036,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/t_holes - ¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������� If pages are edited often / regularly you will soon get hundreds of saved page versions. As this slows down (particularly the db_flat_file ones) and enlarges the database content size, you may @@ -4054,14 +4054,14 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/t_textinsert - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������ Can insert plain text files into the database. This is much the same, what usually happens to the files inside init-pages/ tools/t_transfer - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ���������������� Allows to download all pages in one big "binary" file, and to reinsert it on the same way. This allows for quick moving of the whole database content. @@ -4069,7 +4069,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/t_revert - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� Can undo mass changes caused by a script attack (specifically designed to spam or corrupt a Wiki) or someone who put enourmous energy into garbaging multiple pages. The {auther} field always @@ -4081,7 +4081,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/ewikictl - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + �������������� ewikictl is a commandline based utility - as opposed to the www/http based scripts mentioned above. UNIX people will find it very useful and handy, while it is @@ -4095,7 +4095,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. WebServer running your wiki (because most times one cannot make remote mysql server connections). - The most important feature is to make backups using the + The most important feature is to make backups using the --backup switch: All pages from the database will be saved into backup files @@ -4112,7 +4112,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. page will get saved (and think of a garbaged last version, this would be a bad idea). So USE --all ALLWAYS! - Backups can be reread into the database using the + Backups can be reread into the database using the --insert switch: The --dest or --source parameter says where to search for the @@ -4164,7 +4164,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. It is however recommended to use the "--format flat" or "--format fast" instead, as both can contain the complete meta - data of a page. + data of a page. --ls Will print a directory-listing like list of all pages from @@ -4205,7 +4205,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/wiki2html - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������� Renders the WikiPages and saves the resulting bodies into files. It currently cannot deal with images and binary content correctly. @@ -4213,7 +4213,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/mkhuge - ¯¯¯¯¯¯¯¯¯¯¯¯ + ������������ For lazy people - if for some reason your text editor does not allow to enter the correct include() commands for the files from the plugins/ directory you may find this shell script useful to @@ -4224,7 +4224,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/mkpluginmap - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������� Is the companion tool for the new ewiki pluginloader extension. It traverses the plugins/ directories and generates a list which allows automatical loading of ["page"] and ["action"] plugins. @@ -4236,8 +4236,8 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. tools/mkpageplugin - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ - Can convert any StaticPage file (from the spages/ directory) into + ������������������ + Can convert any StaticPage file (from the spages/ directory) into a standard ewiki page plugin (to get included() like all the others then). It detects automatically the type of the given StaticPage input files - Wiki source (.txt), ready HTML content, or even PHP @@ -4251,7 +4251,7 @@ a call to ewiki_init_spages() with the "./tools/" directory as parameter. examples/ -¯¯¯¯¯¯¯¯¯ +��������� The file "examples-1.php" is the default layout, which you will see, when you first run ewiki. The examples/ subdirectories now holds further example 'ewiki wrappers' or 'layout scripts' (commonly referred to as "yoursite.php" @@ -4264,7 +4264,7 @@ an image or graphics directory). examples/homepage.php - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������� This is an example on how to use ewiki.php with an authentication frontend. Note that this is not the recommended way to use a wiki (adding authentication can be considered "crippling" a wiki). @@ -4280,7 +4280,7 @@ an image or graphics directory). Nice things in fragments/ -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������������������� This directory holds some files to integrate ewiki.php within some other web projects (for example PhpNuke) or some helper and extension code, or just other example layouts. @@ -4291,7 +4291,7 @@ files itself!! strip_wonderful_slashes.php - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������������� If you have a PHP 4.1 or a provider using the annoying factory-default settings of such a version, you may find this tiny script helpful. It removes the just-for-security-reasons-added-backslashes from the @@ -4302,7 +4302,7 @@ files itself!! fragments/funcs/wiki_format.inc - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������������� This php include() file contains just the reduced wiki_format() function, the code to generate internal WikiLinks and the binary data stuff has been removed. @@ -4313,7 +4313,7 @@ files itself!! 404finder.php - ¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������� Simple example on how to use "ErrorDocumet 404" rediriction to activate the ewiki page search function automatically, which is the poor mans mod_rewrite. @@ -4321,7 +4321,7 @@ files itself!! htaccess - ¯¯¯¯¯¯¯¯ + �������� To make a Wiki installation look more profession you should try to use your Webservers mod_rewrite module to get nicer looking URLs. This file is an example to be installed as ".htaccess" (Web server @@ -4339,7 +4339,7 @@ files itself!! binary.php - ¯¯¯¯¯¯¯¯¯¯ + ���������� If your ewiki wrapper script is not binary safe (that is, eventually printing some or text output to stdout before you include() the core ewiki script and called the ewiki_page() function) - then @@ -4351,7 +4351,7 @@ files itself!! fragments/funcs/auth.php - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ Include this script wherever you need authentication. It uses the HTTP Basic Authentication scheme, but the passwords are inside the script in the $passwords array (so no need for .htpasswd setup). @@ -4362,7 +4362,7 @@ files itself!! fragments/css/* - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������� Please understand the *.css as examples that illustrate which style classes are defined inside ewiki.php and its companion plugins. @@ -4372,7 +4372,7 @@ files itself!! fragments/blocks/* - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������ Contains small include() scripts to be loaded into "yoursite.php" as "sidebars" and the like for beatification purposes. Oftens these are reduced but useful ["page"] or ["action"] plugins, @@ -4382,7 +4382,7 @@ files itself!! Other patches/ -¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +�������������� In the patches/ directory some code tweaking tips are collected that are either not worth a new plugin or to uncommon and unsafe and unsupported to get into fragments/ or plugins/. Please see the README and the files therein @@ -4393,7 +4393,7 @@ I often like to refer to that subdir as the "recoding FAQ". Updates + How to deal with tweaked code -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +��������������������������������������� If you ever happen to recode parts of a plugin, WHICH WE STRONGLY ENCOURAGE TO DO (to match it better to your needs) - then there is always the risk of losing your changes as soon as you upgrade and overwrite everything inside @@ -4427,14 +4427,14 @@ so everybody could enjoy your ideas. Extension HowTo -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +��������������� Best way to extend it is to read the man page on vi or emacs ;-> However the tool that made this all possible was joe. the PlugInterface -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������� The $ewiki_plugins array holds an array of "task names" connected to function names (that of course should do something senseful). As an example: @@ -4463,7 +4463,7 @@ other idf strings as array/hash index. plugin tasks -¯¯¯¯¯¯¯¯¯¯¯¯ +������������ Here's a short summary of current PlugInterface "tasks" and (recommended) function interface definitions (the "= function (..." lines). A plugin hook with [] means there can be multiple, and each one would be tried. @@ -4610,7 +4610,7 @@ edit/ hooks ["edit_patch"][0] - special hook for the patchsaving plugin = function ($id, &$data) -bloat extensions +bloat extensions ---------------- ["auth_*"][] - plugin tasks used with ewiki_auth() @@ -4646,7 +4646,7 @@ very different. mpi plugins - ¯¯¯¯¯¯¯¯¯¯¯ + ����������� Plugins of the class "mpi" extend the wiki markup with html like calls to dynamic content generating functions. They were taken from the ewiki adaption of Hans B Pufal and are very similar to the @@ -4697,14 +4697,14 @@ very different. authentication/permission plugins - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ��������������������������������� The paragraph and descriptions about the _auth interfaces have gone into plugins/auth/README.auth writing your own plugin -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������������� Using the list of current plugin tasks, you could (hopefully) write your own extension with ease. It is probably most simple to write a dynamic ["page"] plugin, so we start with this as example. All you need is a function @@ -4736,7 +4736,7 @@ page or to allow to email it to someone else (beware of the spammers!). format_* / rendering plugins -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +���������������������������� It is rather simple to add WikiMarkup using the $ewiki_config["wm_..."] settings, but for some tasks you need stronger weapons like rendering and markup plugins. @@ -4749,7 +4749,7 @@ and names used inside of it: ewiki_format() internals - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ When the function receives the input string (WikiSource), it first escapes all html tags using & < > to replace the & < > chars (because HTML is not allowed within Wiki, initially). @@ -4777,7 +4777,7 @@ and names used inside of it: $iii[0] = array("WikiSource...",0xFFFF,"core"), $iii[1] = array("....",0x0002,"html"), $iii[2] = array("text",0x0FFF,""), - + Besides the $iii[] input array, we'll also have an array containing rendering status variables called $s[]. The most important entry there is $s["in"], which is the index into the currently accessed @@ -4819,7 +4819,7 @@ and names used inside of it: the format_ plugin hooks - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ������������������������ As denoted above, the ["format_source"] and ["format_final"] plugin hooks are the simplest to work with, as both only get one parameter (passed by reference) containing either the full WikiPage source @@ -4842,7 +4842,7 @@ and names used inside of it: $iii[] and $ooo[] block flags - ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + ����������������������������� The $iii[...][1] and $ooo[...][1] hold the flags (as defined by $ewiki_config["format_block"][...][2]) for each fragment of the WikiPage. The "core" blocks (plain WikiSource) always have the diff --git a/mod/wiki/ewiki/README.de b/mod/wiki/ewiki/README.de index fcfcaf9d62..27bfb859bb 100644 --- a/mod/wiki/ewiki/README.de +++ b/mod/wiki/ewiki/README.de @@ -1,7 +1,7 @@ README.de -¯¯¯¯¯¯¯¯¯ -Dies ist eine teilweise Übersetzung der README Datei, die weiterhin als +��������� +Dies ist eine teilweise �bersetzung der README Datei, die weiterhin als Referenz verwendet sollte, da hier nur ein paar allgemeine und Setup- Informationen enthalten sind. @@ -28,9 +28,9 @@ Informationen enthalten sind. 6.1.2 Ohne MySQL DB verwenden (WICHTIG) 6.1.3 db_fast_files - 7.3.3 BöseBäckSläshes \\\\" (WICHTIG) + 7.3.3 B�seB�ckSl�shes \\\\" (WICHTIG) - 9.5.5 Paßwörter und tools/ + 9.5.5 Pa�w�rter und tools/ @@ -39,65 +39,65 @@ Informationen enthalten sind. Was ist das? -¯¯¯¯¯¯¯¯¯¯¯¯ +������������ Dies ist eine "WikiWikiWeb" Bibliothek, die in der PHP Webskriptsprache implementiert ist. Ein WikiWiki ist eine Webseite, die von wirklich jedem -verändert/ergänzt werden kann, der dort vorbeischaut (ohne vorhergehenden +ver�ndert/erg�nzt werden kann, der dort vorbeischaut (ohne vorhergehenden Registrierungskram). Es sollte relativ einfach in bestehende Websites integrierbar sein, weil es eben kein komplettes Script sondern vielmehr eine Bibliothek -ist, die kein fertiges Seitenlayout erzwingt. Stattdessen können die +ist, die kein fertiges Seitenlayout erzwingt. Stattdessen k�nnen die erzeugten WikiSeiten als Inhalt in das Layout einer bestehenden Seite eingebunden werden. Warum "ErfurtWiki"? -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������������� Meine Heimatstadt (Erfurt liegt nahe bei Weimar.de) - und das ist wirklich -nix weiter als ein Name! Der interne Projektname ist übrigens "ewiki". +nix weiter als ein Name! Der interne Projektname ist �brigens "ewiki". Warum sollte man ausgerechnet dieses Wiki verwenden wollen? - es ist wirklich alles notwendige in einer einzigen Skriptdatei, so - daß keine 20 anderen Dateien mit herumliegen müssen, wenn man es + da� keine 20 anderen Dateien mit herumliegen m�ssen, wenn man es in die eigene Site einbindet - vordefinierte Layouts werden nicht aufgezwungen, es gibt Beispielseiten - aber keine Skins oder Themes aus denen man wählen müßte; das Wiki paßt + aber keine Skins oder Themes aus denen man w�hlen m��te; das Wiki pa�t sich wirklich in eine existierende Seite ein - - es ist vergleichsweise schnell, reguläre Ausdrücke werden zwar auch hier + - es ist vergleichsweise schnell, regul�re Ausdr�cke werden zwar auch hier verwendet, aber nicht so exzessiv wie in anderen Wikis - (hauptsächlich einfache und flinke String-Funktionen) + (haupts�chlich einfache und flinke String-Funktionen) - der Funktionsumfang ist inzwischen beachtlich :) WikiAlternativen -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -Es gibt auch noch andere hübsche WikiWare, falls jemand hiermit nicht -glücklich werden tut: +���������������� +Es gibt auch noch andere h�bsche WikiWare, falls jemand hiermit nicht +gl�cklich werden tut: -* PhpWiki ist deutlich vollständiger, +* PhpWiki ist deutlich vollst�ndiger, siehe http://freshmeat.net/projects/phpwiki, - unterstützt versch. Datenbanktypen, Lokalisierung, integrierter + unterst�tzt versch. Datenbanktypen, Lokalisierung, integrierter Administrationsbereich * Miki ist eine kleine WikiImplementierung in PHP von Jukka Zitting. http://miki.sourceforge.net/ -* http://coWiki.org/ ist tatsächlich mehr ein CMS denn ein Wiki +* http://coWiki.org/ ist tats�chlich mehr ein CMS denn ein Wiki -* Und schließlich: sfWiki - das sourceforge Wiki (daher auch zu finden +* Und schlie�lich: sfWiki - das sourceforge Wiki (daher auch zu finden bei http://sfwiki.sourceforge.net/). Teile der WikiSyntax sieht ein - wenig merkwürdig aus, ein paar andere Sachen sind ganz nett; und es - unterstützt Benutzerauthentifizierung + wenig merkw�rdig aus, ein paar andere Sachen sind ganz nett; und es + unterst�tzt Benutzerauthentifizierung -* für andere Wikis in anderen Programmiersprachen einfach mal die +* f�r andere Wikis in anderen Programmiersprachen einfach mal die Suchmaschienen nerven: http://www.freshmeat.net/search/?q=wiki§ion=projects http://www.google.com/search?q=wiki @@ -105,19 +105,19 @@ gl Autor -¯¯¯¯¯ -Mario Salzer +����� +Mario Salzer ICQ95596825 und Yahoo: icq95596825 Und alle anderen wurden in die Datei CREDITS verbannt ;-> Dies ist ein relativ neues Projekt. Um es zu verbessern, bin ich sehr -auf Rückmeldungen angewiesen. Jede Mail ist ein wertvoller Beitrag! +auf R�ckmeldungen angewiesen. Jede Mail ist ein wertvoller Beitrag! ProjektSeiten -¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������� freshmeat - http://freshmeat.net/ewiki @@ -130,37 +130,37 @@ neueste Versionen (instabile EnwicklerVersionen): Support bekommen -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -Hilfe bei der Installation gibt's natürlich, und selbstverständlich sind -wir auch dankbar für jeden Hinweis über bestehende Probleme und Fehler -(bekanntermaßen ist die REAMDE noch nicht ausführlich genug und stellenweise -überhaupt keine Hilfe). +���������������� +Hilfe bei der Installation gibt's nat�rlich, und selbstverst�ndlich sind +wir auch dankbar f�r jeden Hinweis �ber bestehende Probleme und Fehler +(bekannterma�en ist die REAMDE noch nicht ausf�hrlich genug und stellenweise +�berhaupt keine Hilfe). Bevor du aber einen BugReport versendest, lies dir bitte folgende Anleitung durch (absolut notwendig um KOSTENLOSEN support zu bekommen): http://www.lugbz.org/documents/smart-questions_de.html -Danach bitte nicht zögern, einen der Autoren zu kontakten oder einfach eine +Danach bitte nicht z�gern, einen der Autoren zu kontakten oder einfach eine Nachricht in BugReports oder UserSuggestion auf unserer ProjektSeite zu hinterlassen. Wenn du dich auf unserer http://erfurtwiki.sourceforge.net/?MailingList -anmeldest, hast du die Möglichkeit Hilfe für dein Problem von einer größeren +anmeldest, hast du die M�glichkeit Hilfe f�r dein Problem von einer gr��eren Gruppe von Leuten zu bekommen (an- und wieder abmelden geht schnell). Lizens -¯¯¯¯¯¯ +������ Dieses "Programm" wird als "Public Domain" vertrieben. Public Domain ist wie "FreeWare", nur ein bischen mehr frei ;-> Man kann sich das -vorstellen, wie die GPL ohne an die GPL gebunden zu sein. (Tatsächlich -wollte ich einfach keine LICENSE Datei mitreinpacken, die größer ist als +vorstellen, wie die GPL ohne an die GPL gebunden zu sein. (Tats�chlich +wollte ich einfach keine LICENSE Datei mitreinpacken, die gr��er ist als das eigentliche Programm.) -Da dies ein freies (Bier) Stück Software ist, kann mich natürlich -niemand für irgendwelche Fehler oder all die WIRKLICH SCHLIMMEN -FESTPLATTEN-SCHÄDEN verantwortlich machen, die bei der Verwendung -entstehen könnten ;> +Da dies ein freies (Bier) St�ck Software ist, kann mich nat�rlich +niemand f�r irgendwelche Fehler oder all die WIRKLICH SCHLIMMEN +FESTPLATTEN-SCH�DEN verantwortlich machen, die bei der Verwendung +entstehen k�nnten ;> @@ -171,29 +171,29 @@ entstehen k Wie jetzt? -¯¯¯¯¯¯¯¯¯¯ -ewiki benötigt: +���������� +ewiki ben�tigt: - Webserver (Apache, Nanoweb, ...) - PHP 4.1 oder neuer -- nach Mglk. eine MySQL Datenbank (läuft aber auch ohne) +- nach Mglk. eine MySQL Datenbank (l�uft aber auch ohne) - deine bereits exitierenden Webseite - die wundervollen "magic slashes" in antiken PHP version sollten wirklich abgeschalten sein -Wenn du keine MySQL-Datenbank hast, dann verwende die Erweiterung für +Wenn du keine MySQL-Datenbank hast, dann verwende die Erweiterung f�r die Datei-Datenbank. In yoursite.php integrieren -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -In den nächsten Abschitten, soll mit dem Begriff "yoursite.php" der +��������������������������� +In den n�chsten Abschitten, soll mit dem Begriff "yoursite.php" der Teil deiner bestehenden Seite verstanden werden, der das Seitenlayout erzeugt (der also zumindest die Tags um die Ausgaben von ewiki.php bastelt). -Die schlichteste Lösung findet sich auch noch mal in example-2.php: - +Die schlichteste L�sung findet sich auch noch mal in example-2.php: + - -Die ersten beiden Befehle öffnen eine Verbindung zur MySQL-Datenbank, -normalerweise würde man das Ergebnis von mysql_conect() in einer Variable + +Die ersten beiden Befehle �ffnen eine Verbindung zur MySQL-Datenbank, +normalerweise w�rde man das Ergebnis von mysql_conect() in einer Variable wie "$db" ablegen, aber da PHP ohnehin nicht auf deren Verwendung besteht, wenn es nur eine DB-Verbindung gibt, wird eine solche Variable in -"ewiki.php" auch gar nicht verwendet (und der Name dieser Variable wäre +"ewiki.php" auch gar nicht verwendet (und der Name dieser Variable w�re damit hier egal). Der Wert in der define() Zeile sagt ewiki wie die Hyperlinks zu den -referenzierten WikiSeiten lauten müssen, damit ewiki.php auch für die -nächste angeklickte WikiSeite aufgerufen wird. +referenzierten WikiSeiten lauten m�ssen, damit ewiki.php auch f�r die +n�chste angeklickte WikiSeite aufgerufen wird. Wenn du nur ein einziges "yoursite.php" Skript hast, wirst du den Wert -direkt in "ewiki.php" verändern wollen. +direkt in "ewiki.php" ver�ndern wollen. Das error_reporting(0) wird sehr empfohlen. -Das include("ewiki.php") lädt endlich die ewiki "Bibliothek" und setzt +Das include("ewiki.php") l�dt endlich die ewiki "Bibliothek" und setzt alle bis hierher noch nicht definierten EWIKI_ Konstanten. -Der Aufruf der ewiki_page() Funktion gibt diejenige WikiSeite zurück, die -vom Browser angefragt wurde. Du mußt hier "echo" davorsetzen, denn sonst +Der Aufruf der ewiki_page() Funktion gibt diejenige WikiSeite zur�ck, die +vom Browser angefragt wurde. Du mu�t hier "echo" davorsetzen, denn sonst wird der Text nicht ausgegeben (verpufft im PHP-Nirvana) - ewiki gibt die erzeugte Seite nicht selber aus. Den WikiSeitenNamen bestimmen -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������������������� Wenn du ewiki_page() einfach so aufrufst wie im oberen Beispiel angegeben (empfohlen), dann wird es versuchen, den Namen der angefragten Seite selber zu ermmitteln ($_SERVER["PATH_INFO"] oder GET-Variablen '?id=' oder '?name=' -oder '?page=' oder '?file=' in $_REQUEST["name"]). +oder '?page=' oder '?file=' in $_REQUEST["name"]). Wenn yoursite.php aber einen anderen Weg benutzt (andere Parameternamen), -um den WikiSeitenNamen zu übergeben, dann kann man ihn schlicht als ersten +um den WikiSeitenNamen zu �bergeben, dann kann man ihn schlicht als ersten Parameter angeben: ewiki_page( $id = "WikiSeitenNanem" ); @@ -259,19 +259,19 @@ Seiten einzubinden. WikiSprache einstellen (deutsch) -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -Ich hab es jetzt schon einige Leute behaupten hören, aber auch beim +�������������������������������� +Ich hab es jetzt schon einige Leute behaupten h�ren, aber auch beim IntranetExplodierer kann man die "bevorzugten Sprachen" irgendwo einstellen. Wers nicht findet, kann ja auch gleichmal auf einen aktuellen Browser wechseln - das lohnt sich nicht nur wegen der vielen Seiten, die es dann -plötzlich doch auf Deutsch gibt! +pl�tzlich doch auf Deutsch gibt! -Wer es partou nicht hinbekommt, kann natürlich die deutsche Sprache für -ewiki erzwingen; hilfreich hierfür ist z.B. die include()-Datei +Wer es partou nicht hinbekommt, kann nat�rlich die deutsche Sprache f�r +ewiki erzwingen; hilfreich hierf�r ist z.B. die include()-Datei "fragments/force_lang_de.php". Es funktioniert aber auch mit diesem Befehl, der irgendwo in ewiki.php, -config.php oder yoursite.php eingefügt werden kann (nicht empfohlen): +config.php oder yoursite.php eingef�gt werden kann (nicht empfohlen): $_SERVER["HTTP_ACCEPT_LANGUAGE"] = "de; q=1.0, en; q=0.2, eo, nl"; @@ -284,10 +284,10 @@ $_SERVER["HTTP_ACCEPT_LANGUAGE"] = "de; q=1.0, en; q=0.2, eo, nl"; Im Detail -¯¯¯¯¯¯¯¯¯ +��������� Die MySQL DB Tabellenstruktur ist zu einem gewissen Grad kompatibel mit der -des allseits bekannten »PHPWiki« (normalerweise reicht es EWIKI_DB_TABLE_NAME -auf "wiki" zu ändern, um PhpWikis DB weiterzuverwenden). +des allseits bekannten �PHPWiki� (normalerweise reicht es EWIKI_DB_TABLE_NAME +auf "wiki" zu �ndern, um PhpWikis DB weiterzuverwenden). Dies ist der MySQL Befehl, der die DB-Tabelle erstellt (beim ersten Start, automatisch): @@ -307,40 +307,40 @@ automatisch): Den Spaltennamen {pagename} mochte ich eigentlich nicht, aber weil das der offensichtlich einzige Unterschied zur PhpWiki-Tabelle war, kam mir die Idee -mit der Kombatibilität un so hab ich das adaptiert. -Dummerweise muß nun die ewiki_database() Funktion "pagename" ständig von -und nach "id" übersetzen. +mit der Kombatibilit�t un so hab ich das adaptiert. +Dummerweise mu� nun die ewiki_database() Funktion "pagename" st�ndig von +und nach "id" �bersetzen. Die Spalte {version} wird zur Speicherung der verschiedenen abgelegten -Seitenänderungen verwendet. In anderen Wikis gibt es zu diesem Zweck eine +Seiten�nderungen verwendet. In anderen Wikis gibt es zu diesem Zweck eine Bonus-tabelle wie "backup" oder "history", aber ich hab den Sinn von sowas bisher nicht verstanden; und daher gibt es in ewiki nur diese eine Tabelle (und das scheint absolut zu reichen)! -Die erste {version} einer Seite erhält die Nummer 1. Eine bestehende -Seiten {version} wird niemals überschrieben werden => sehr sicherer MySQL- +Die erste {version} einer Seite erh�lt die Nummer 1. Eine bestehende +Seiten {version} wird niemals �berschrieben werden => sehr sicherer MySQL- Einsatz. -Mehr über die {flags} in dem entsprechenden Abschnitt in der README. Das -Feld {content} enthält natürlich den WikiSeitenQuelltext. {created} und +Mehr �ber die {flags} in dem entsprechenden Abschnitt in der README. Das +Feld {content} enth�lt nat�rlich den WikiSeitenQuelltext. {created} und {lastmodified} enthalten die entsprechenden Zeitangaben im UNIX format. -{refs} enthälte eine "\n" - getrennte Liste von referenzierten WikiSeiten. -Der Code um diese List zu erzeugen ist etwas unsauber, so daß oftmals -GeisterSeiten aufgeführt sind. Wieauchimmer, daß beeinträchtigt ewiki -nicht wirklich, und eine Korrektur wäre Zeit- und Geschwindigkeits- +{refs} enth�lte eine "\n" - getrennte Liste von referenzierten WikiSeiten. +Der Code um diese List zu erzeugen ist etwas unsauber, so da� oftmals +GeisterSeiten aufgef�hrt sind. Wieauchimmer, da� beeintr�chtigt ewiki +nicht wirklich, und eine Korrektur w�re Zeit- und Geschwindigkeits- verschwendung. -{meta} kann Bonusinfos enth, so daß die Tabellenstruktur nicht bei jeder -Erweiterung geändert werden muß. Aktuell nur für Binärdaten (Bilder) +{meta} kann Bonusinfos enth, so da� die Tabellenstruktur nicht bei jeder +Erweiterung ge�ndert werden mu�. Aktuell nur f�r Bin�rdaten (Bilder) verwendet. -{hits} zählt die Seitenaufrufe, und ist nicht in {meta} integriert, weil +{hits} z�hlt die Seitenaufrufe, und ist nicht in {meta} integriert, weil separat schneller und einfacher zu verwenden. Die ewiki DB Tabelle kann nicht nur Texteseiten enthalten, sondern auch -binären Inhalt (vornehmlich Bilder), siehe {flags}. +bin�ren Inhalt (vornehmlich Bilder), siehe {flags}. -Das Ein-Tabellen-Konzept hat es übrigens auch recht einfach gemacht, das +Das Ein-Tabellen-Konzept hat es �brigens auch recht einfach gemacht, das Datei-basierte DB-Backend zu entwickeln. Eine Beispieldatei: id: WikiPageName @@ -350,7 +350,7 @@ Datei-basierte DB-Backend zu entwickeln. Eine Beispieldatei: created: 1046532697 lastmodified: 1046532697 refs: \nErfurtWiki\nNewestPages\n - + !! WikiSourceContent ... @@ -358,8 +358,8 @@ Datei-basierte DB-Backend zu entwickeln. Eine Beispieldatei: ewiki_ Funktionen -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -Einige der Basis-Funktionen aus ewiki.php können getrennt von den anderen +����������������� +Einige der Basis-Funktionen aus ewiki.php k�nnen getrennt von den anderen verwendet werden, andere sind ausgelegt um durch bessere Implementierungen ersetzt zu werden. @@ -370,13 +370,13 @@ ersetzt zu werden. angegebene) aus der DB holt, und mit ewiki_format() die fertige HTML-Seite erzeugt. Wenn die angefragte Seite nicht existert, wird eine edit-Box - zurückgegeben. + zur�ckgegeben. ewiki_page_...() ---------------- Die meisten Fkt. mit diesem Prefix wurden aus der Hauptfkt. - herausgetrennt, um ewiki übersichtlicher und leichter erweiterbar + herausgetrennt, um ewiki �bersichtlicher und leichter erweiterbar zu machen. Die meisten enthalten Code um spezielle/interne Seiten zu erzeugen (Suche, Neuest, Info, und das Edit , ...) @@ -385,24 +385,24 @@ ersetzt zu werden. ewiki_script() -------------- Erzeugt URL aus angegebener Seiten $id und $action, verwendet dazu - die EWIKI_SCRIPT-Konstante. Dieser wrapper ermöglicht es auch die - eigentlich reservierten Schrägstriche in Seitennamen zu verwenden. + die EWIKI_SCRIPT-Konstante. Dieser wrapper erm�glicht es auch die + eigentlich reservierten Schr�gstriche in Seitennamen zu verwenden. ewiki_control_links($id, $data) ------------------------------- - Gibt die Zeile mit "DieseSeiteÄndern, SeitenInfo, ... links" aus. + Gibt die Zeile mit "DieseSeite�ndern, SeitenInfo, ... links" aus. ewiki_format($wiki_source, $scan_links=1, $html_allowed=0) ---------------------------------------------------------- - Erzeugt die formatierten (HTML) Ausgabe für den übergebenen + Erzeugt die formatierten (HTML) Ausgabe f�r den �bergebenen WikiQuelltext. Der zweite Parameter gibt an, ob nach denen im Quelltext referenzierten WikiLinks in der DB nachgesehen werden soll. Wenn dieser Parameter 0 ist, dann wird eine bereits vorh. $ewiki_links Array stattdessen - verwendet, um zu prüfen ob eine Seite in der DB vorh. ist. + verwendet, um zu pr�fen ob eine Seite in der DB vorh. ist. ewiki_link_regex_callback() @@ -426,13 +426,13 @@ ersetzt zu werden. -------------- erzeugt einen String, der mit REMOTE_ADDR und $ewiki_author angereichert wurde. - + ewiki_database($FUNCTION, $args=array() ) ------------------------------------------ - Diese Funktion ist die "Datenbankabstraktion" in ewiki. Sie enthält - ''only'' sechs SQL Kommandos, die ersetzt werden müßtem, wenn du eine - andere DB verwenden mußt. + Diese Funktion ist die "Datenbankabstraktion" in ewiki. Sie enth�lt + ''only'' sechs SQL Kommandos, die ersetzt werden m��tem, wenn du eine + andere DB verwenden mu�t. Die einzelnen "atomaren" Funktionen sind beschrieben in der orignialen README-Datei. @@ -441,41 +441,41 @@ ersetzt zu werden. $GLOBALS Verschmutzung -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +���������������������� Zumindest die ewiki_page() Funktion erzeugt einige Variablen im globalen -Namensraum. Natürlich haben auch diese Namen, die sich mit irgendetwas -aus yoursite.php überschneiden sollten: +Namensraum. Nat�rlich haben auch diese Namen, die sich mit irgendetwas +aus yoursite.php �berschneiden sollten: - $ewiki_id - Enthält die DB-$id der aktuellen Seite, ist nicht + $ewiki_id - Enth�lt die DB-$id der aktuellen Seite, ist nicht immer identisch mit $ewiki_title. $ewiki_action - Der $action-Parameter, mit dem die Seite angefordert wurde. $ewiki_title - Wird nach dem ersten Aufruf von ewiki_page() gestzt, - am nützlichsten um in dem Tag ausgegeben - zu werden - dafür muß aber ewiki_page() schon im + am n�tzlichsten um in dem <TITLE> Tag ausgegeben + zu werden - daf�r mu� aber ewiki_page() schon im Kopfbereich aufgerufen werden, die Ausgabe gepuffert, damit der Seitentitel noch innerhalb von <HEAD> ausgegeben werden kann. $ewiki_script - Eine Kopie von EWIKI_SCRIPT. - $ewiki_links - Ist ein Arraym daß in ewiki_format() prodiziert wird, und + $ewiki_links - Ist ein Arraym da� in ewiki_format() prodiziert wird, und alle gesuchten WikiSeitenNamen mit einem Wert von 0 oder 1 assoziiert, je nach dem, ob die Seite existiert oder nicht. Wird diese variable jedoch auf ==true gesetzt (also kein - Array), wird angenommen, daß alle WikiSeiten existieren. + Array), wird angenommen, da� alle WikiSeiten existieren. $ewiki_author - Der Inhalt dieser Variable wird in der {author}-Spalte von gespeicherten WikiSeiten abgelegt (zusammen mit IP:PORT). Wenn yoursite.php Benutzer kennt und authentifizieren kann, sollte der Nutzername hier abgelegt werden. - Diese Feld sollte aber NICHT ZUGEMÜLLT werden mit + Diese Feld sollte aber NICHT ZUGEM�LLT werden mit irgendwelchen Bonusinfos. - $ewiki_auth_user - Enthält Namen eines wirklich authentifizierten + $ewiki_auth_user - Enth�lt Namen eines wirklich authentifizierten Benutzers im _PROTECTED_MODE. Nicht notwendig, wird aber u.a. gerne von ewiki_auth() und ewiki_auth_user() zur Vereinfachung verwendet. @@ -483,14 +483,14 @@ aus yoursite.php $ewiki_ring - Berechtigungslevel im _PROTECTED_MODE 3 = nur lesen 2 = normaler Benutzer (lesen, editieren, ...) - 1 = Moderator (auch Seiten löschen?) + 1 = Moderator (auch Seiten l�schen?) 0 = Administrator (darf alles) $ewiki_plugins - Dieses array verbindet Aufgabengruppen (z.B. "database" oder "image_resize") mit Funktionsnamen. - Dies stellt einen wirklich einfachen und dennoch mächtigen + Dies stellt einen wirklich einfachen und dennoch m�chtigen Weg dar, um ewiki zu erweitern. - Es gibt ein eigenes Kapitel darüber in der orig. README. + Es gibt ein eigenes Kapitel dar�ber in der orig. README. $ewiki_config - Ersetzt teilweise die EWIKI_ Konstanten. @@ -499,47 +499,47 @@ Folgende gibt's nich mehr (teilweise in $ewiki_config): $ewiki_data, $ewiki_interwiki, $ewiki_internal_pages, - + EWIKI_ Konstanten -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +����������������� - - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - - -WARNUNG: Dieser Abschnitt ist grundsätzlich besonders inaktuell! Von daher +WARNUNG: Dieser Abschnitt ist grunds�tzlich besonders inaktuell! Von daher sollte ein Studium des gleichnamigen Abschnitts in der orig. README-Datei wirklich vorgezogen werden!! Viele der neu hinzugekommenen Konstanten werden -hier schlichtweg nicht erwähnt, oder inzwischen sogar __falsch__ beschrieben. +hier schlichtweg nicht erw�hnt, oder inzwischen sogar __falsch__ beschrieben. - - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - WARNUNG - - -Dieser Abschnitt erklärt einige der Konstanten und wie man sie verwenden +Dieser Abschnitt erkl�rt einige der Konstanten und wie man sie verwenden kann, um ewiki nach der eigenen Pfeife tanzen zu lassen. -Normalerweise solltest diese innherhalb von "ewiki.php" angepaßt werden, einige +Normalerweise solltest diese innherhalb von "ewiki.php" angepa�t werden, einige sind jedoch mehr wie Statusvariablen ausgelegt und sollten von "yoursite.php" -in Abhängigkeit von dort vorhanden Infos gesetzt werden (wenn dort Benutzer +in Abh�ngigkeit von dort vorhanden Infos gesetzt werden (wenn dort Benutzer eingeloggt sind z.B.). Dann ist es gut einige der Konstanten vorzudefinieren (einmal def. Konst. -können nicht wieder geändert werden). +k�nnen nicht wieder ge�ndert werden). EWIKI_SCRIPT Wichtigste Einstellung. Wird von ewiki.php verwendet, um Links zu anderen WikiSeiten zu erzeugen. - Es benötigt den Namen von yourscript.php, daß selbst wiederrum + Es ben�tigt den Namen von yourscript.php, da� selbst wiederrum ewiki.php geeignet einbindet. Der Name der angefragten WikiSeite wird immer schlicht an den hier - definierten TextString angehängt, daher sollter dieser immer in + definierten TextString angeh�ngt, daher sollter dieser immer in "/" oder "?" oder "?id=" oder "?name=" oder "?page=" enden, damit - eine gültige URL dabei herauskommt und der SeitenName von ewiki_page() + eine g�ltige URL dabei herauskommt und der SeitenName von ewiki_page() gefunden wird. Wenn auf deinem Server mod_rewrite vorhanden ist und funktioniert, - könntest du diese Konst. auch leer lassen, so alle Anfragen zu - http://wiki.example.com/ an das richtige Skript übergeben werden. + k�nntest du diese Konst. auch leer lassen, so alle Anfragen zu + http://wiki.example.com/ an das richtige Skript �bergeben werden. Ansonsten ist es gut, wenn eine URL absolut zum Server-Hauptpfad angegeben ist, also z.B. "/~user/wiki/index.php/", damit Browser - keine ungültigen URLs erzeugen, sobald eine $action vor den + keine ung�ltigen URLs erzeugen, sobald eine $action vor den Seitennamen gesetzt wird (z.B. "edit/DieseSeite"). Die Konstante wird von ewiki_script() eingesetzt um URLs zu den @@ -560,23 +560,23 @@ k Definiert den Namen der WikiSeite, die als Startseite angezeigt werden soll. EWIKI_PAGE_NEWEST - Name (intern erzeugt) der Seite, die List der zuletzt hinzugefügten - Seiten enthält. + Name (intern erzeugt) der Seite, die List der zuletzt hinzugef�gten + Seiten enth�lt. EWIKI_PAGE_SEARCH - Enthält den WikiSeitenNamen für dei SuchFunktion. + Enth�lt den WikiSeitenNamen f�r dei SuchFunktion. EWIKI_CONTROL_LINE Wenn auf 0 gestzt, wird die Zeile unter einer WikiSeite mit - "DieseSeiteÄndern, SeitenInfo, ..." nicht angezeigt. + "DieseSeite�ndern, SeitenInfo, ..." nicht angezeigt. In diesem Fall sollte der Edit-Link in yoursite.php erzeugt werden. Besser ist es normalerweise das Aussehen der Ausgabe in - ewiki_control_links() selbst zu ändern. + ewiki_control_links() selbst zu �ndern. EWIKI_AUTO_EDIT - Bei 1 (voreinstellung) wird automatisch eine Edit-Box für + Bei 1 (voreinstellung) wird automatisch eine Edit-Box f�r nicht-exisiterende Seiten angezeigt, ansonsten wird eine ZwischenSeite - ("Bitte ändere mich!") angezeigt (wie in PhpWiki). + ("Bitte �ndere mich!") angezeigt (wie in PhpWiki). EWIKI_LIST_LIMIT Maximale Anzahl von Seiten, die in den generierten Listen angezeigt @@ -588,54 +588,54 @@ k EWIKI_ALLOW_HTML - Normalerweise sollte im Wiki keine HTML erlaubt sein - böses JavaScript + Normalerweise sollte im Wiki keine HTML erlaubt sein - b�ses JavaScript und <brokenHTML/>, andere Leute nerven. - Siehe orig. README für mehr Informationen. - + Siehe orig. README f�r mehr Informationen. + EWIKI_RESCUE_HTML - Überholt, siehe plugins/markup_rescuehtml.php + �berholt, siehe plugins/markup_rescuehtml.php EWIKI_DB_F_TEXT - Dieses Flag wird für normale WikiSeiten in der DB gesetzt. + Dieses Flag wird f�r normale WikiSeiten in der DB gesetzt. EWIKI_DB_F_BINARY - Für binären Inhalt in der DB. - + F�r bin�ren Inhalt in der DB. + EWIKI_DB_F_DISABLED DB-Eintrage werden hiermit ausgeknippst. EWIKI_DB_F_HTML - Erlaubt die Verwendung von HTML im WikiQuelltext, unabhängig von + Erlaubt die Verwendung von HTML im WikiQuelltext, unabh�ngig von EWIKI_ALLOW_HTML. EWIKI_DB_F_READONLY - WikiSeite kann nicht verändert werden, so dieses Flag gesetzt ist. + WikiSeite kann nicht ver�ndert werden, so dieses Flag gesetzt ist. EWIKI_DB_F_WRITEABLE - Umkehrung von READONLY, nur nützlich wenn zuvor alle Seiten mit - EWIKI_EDIT_AUTHENTICATE schriebgeschützt wurden. + Umkehrung von READONLY, nur n�tzlich wenn zuvor alle Seiten mit + EWIKI_EDIT_AUTHENTICATE schriebgesch�tzt wurden. EWIKI_ALLOW_OVERWRITE - Für eingeloggte nutzer kann yoursite.php diese Konst. auf 1 setzen, um - auch das Ändern von schreibgeschützten Seiten zu erlauben. + F�r eingeloggte nutzer kann yoursite.php diese Konst. auf 1 setzen, um + auch das �ndern von schreibgesch�tzten Seiten zu erlauben. EWIKI_EDIT_AUTHENTICATE - Hiermit kann man ewiki dahingehend kaputt machen, daß alle Seiten - schreibgeschützt werden, und nur veränderbar sind, so yoursite.php + Hiermit kann man ewiki dahingehend kaputt machen, da� alle Seiten + schreibgesch�tzt werden, und nur ver�nderbar sind, so yoursite.php $ewiki_author setzt. EWIKI_SCRIPT_BINARY - Um binäre Daten ausgeben zu können, muß hier ein wrapper-script - angegeben werden, daß ein Datenbank-Verbindung öffnet und keine + Um bin�re Daten ausgeben zu k�nnen, mu� hier ein wrapper-script + angegeben werden, da� ein Datenbank-Verbindung �ffnet und keine Textausgaben erzeugt, bevor nicht ewiki.php eingebunden wurde, - da sonst nur Datenmüll ausgegeben würde. + da sonst nur Datenm�ll ausgegeben w�rde. - Um alle binary-Funktionalität (Bilder hochladen / cachen) loszuwerden, + Um alle binary-Funktionalit�t (Bilder hochladen / cachen) loszuwerden, einfach diese Konstante auf "" setzen, und die folgenden zwei auf 0: @@ -643,47 +643,47 @@ k Bilder zwischenspeichern. EWIKI_IMAGE_MAXSIZE - Maximale Größe von Bildern die in der DB abgelegt werden sollen. + Maximale Gr��e von Bildern die in der DB abgelegt werden sollen. EWIKI_IMAGE_RESIZE - Bilder herunterskalieren, wenn zu groß. + Bilder herunterskalieren, wenn zu gro�. - EWIKI_IDF_INTERNAL + EWIKI_IDF_INTERNAL Wird verwendet um hochgeladene Bilder zu identifizieren. Bitte - im laufenden Betrieb nicht ändern. - + im laufenden Betrieb nicht �ndern. + EWIKI_ADDPARAMDELIM - Automatisch definiert, enthält entweder "?" oder "&", abhängig von + Automatisch definiert, enth�lt entweder "?" oder "&", abh�ngig von EWIKI_SCRIPT. EWIKI_T_* - überholt, siehe ewiki_t() und $ewiki_t[] in der englischen README + �berholt, siehe ewiki_t() und $ewiki_t[] in der englischen README EWIKI_CHARS_U EWIKI_CHARS_L - Erlaubte Zeichen in WikiSeitenNamen (große und kleine Letter). Hiermit + Erlaubte Zeichen in WikiSeitenNamen (gro�e und kleine Letter). Hiermit kann man das wiki lokalisieren; deutsche Umlaute sind schon enthalten. UNIX_MILLENNIUM Sehr wichtiges Ereignis ;) - -Im tools/ Ordner ist ein kleines Script, mit dem man die erwähnten -SeitenFlags ändern kann. + +Im tools/ Ordner ist ein kleines Script, mit dem man die erw�hnten +SeitenFlags �ndern kann. $ewiki_config[] array -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -Einige der EWIKI_ Konstanten wurden durch Einträge im $ewiki_config[] Array -ersetzt oder ergänzt (die Konstanten können weiterhin zur Voreinstellung -verwendet werden). Der Vorteil dieses Arrays ist, daß die Einstellungen auch -zur Laufzeit geändert werden können. +��������������������� +Einige der EWIKI_ Konstanten wurden durch Eintr�ge im $ewiki_config[] Array +ersetzt oder erg�nzt (die Konstanten k�nnen weiterhin zur Voreinstellung +verwendet werden). Der Vorteil dieses Arrays ist, da� die Einstellungen auch +zur Laufzeit ge�ndert werden k�nnen. -Für eine komplette und (einigermaßen) aktuelle Übersicht bemühe bitte die +F�r eine komplette und (einigerma�en) aktuelle �bersicht bem�he bitte die englischsprachige README. @@ -695,16 +695,16 @@ englischsprachige README. Nur WikiQuelltextTransformation einsetzen -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -Die ewiki_format Funktion war entworfen, um sie auch unabhängig von dem -restlichen WikiSkript einsetzen zu können. -Benötigt normalerweise nur den "wiki_source" Parmeter und erzeugt die +����������������������������������������� +Die ewiki_format Funktion war entworfen, um sie auch unabh�ngig von dem +restlichen WikiSkript einsetzen zu k�nnen. +Ben�tigt normalerweise nur den "wiki_source" Parmeter und erzeugt die HTML-Seite daraus. ewiki_format($wiki_source, 0); -Alles was man noch anpassen muß ist die $ewiki_links Variable. Setze -$ewiki_links=true ("true" und nicht "1") so daß ewiki_format() später -annimmt alle WikiSeiten würden existieren. +Alles was man noch anpassen mu� ist die $ewiki_links Variable. Setze +$ewiki_links=true ("true" und nicht "1") so da� ewiki_format() sp�ter +annimmt alle WikiSeiten w�rden existieren. Wers eilig hat, kann auch die extrahierte Variante fragments/wiki_format.inc verwenden, die Frank Luithle beigesteuert hat. @@ -718,21 +718,21 @@ verwenden, die Frank Luithle beigesteuert hat. Ohne MySQL DB verwenden -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -Sollte dein Provider keine MySQL Datenbank für dich bereithalten, kannst +����������������������� +Sollte dein Provider keine MySQL Datenbank f�r dich bereithalten, kannst du das plugin "db_flat_files.php" verwenden (einfach include("plugins/..."); aufrufen um es zu laden). -Alle WikiSeiten werden dann in Textdateien in einem nur dafür +Alle WikiSeiten werden dann in Textdateien in einem nur daf�r bereitgestelltem Ordner gespeichert. Stelle hierzu noch die Konstante -EWIKI_DBFILES_DIRECTORY in der Datei "ewiki.php" passend ein ("/tmp" würde -jedesmal gelöscht, wenn der Server neu startet). -Das Verzeichnus muß relativ zum ewiki.php script angegeben werden, oder +EWIKI_DBFILES_DIRECTORY in der Datei "ewiki.php" passend ein ("/tmp" w�rde +jedesmal gel�scht, wenn der Server neu startet). +Das Verzeichnus mu� relativ zum ewiki.php script angegeben werden, oder absolut zum Serverhauptverzeichnis, nicht aber relativ zum DocumentRoot -deines Webspeicherplatzes! In diesem Beispiel wäre "./pages" richtig: +deines Webspeicherplatzes! In diesem Beispiel w�re "./pages" richtig: Erstelle ein neues Verzeichnis (via FTP-Programm) und gib dem Webserver -Schreibzugriff dafür mit dem Befehl " chmod 777 ./pages ". +Schreibzugriff daf�r mit dem Befehl " chmod 777 ./pages ". ftp> cd .../ewiki ftp> mkdir pages ftp> chmod 777 pages @@ -751,27 +751,27 @@ Mit einem graphischem FTP-Programm gibt es auch immer die Mglk. die db_fast_files -¯¯¯¯¯¯¯¯¯¯¯¯¯ +������������� Diese neuere Version von db_flat_files, speichert die WikiSeiten -komprimiert in einem Binär-Format (kann man nicht mehr mit Editor -ansehen und bearbeiten). Zusätzlich wurde der HitZähler aktiviert. +komprimiert in einem Bin�r-Format (kann man nicht mehr mit Editor +ansehen und bearbeiten). Zus�tzlich wurde der HitZ�hler aktiviert. -db_fast_files wurde in db_flat_files integriert, so daß das neue -Format jetzt nur noch über eine Konstante aktiviert werden muß -(beide Dateiformate können gleichzeitig in der DB vorhanden sein). -Für die schnellere Variante aktiviere in "plugins/db_flat_files.php" +db_fast_files wurde in db_flat_files integriert, so da� das neue +Format jetzt nur noch �ber eine Konstante aktiviert werden mu� +(beide Dateiformate k�nnen gleichzeitig in der DB vorhanden sein). +F�r die schnellere Variante aktiviere in "plugins/db_flat_files.php" die entsprechende Konstante: define("EWIKI_DB_FAST_FILES", 1); -(Diese Einstellung könntest du aber auch schon in der "config.php" +(Diese Einstellung k�nntest du aber auch schon in der "config.php" eintragen.) -Zusätzliche Konstante: EWIKI_DBFILES_GZLEVEL sagt wieviel Zeit +Zus�tzliche Konstante: EWIKI_DBFILES_GZLEVEL sagt wieviel Zeit beim Komprimieren verschwendet werden soll: 0 - keine Komprimierung 1 - ein ganz klein wenig Kompr. 2 - Voreinstellung, schnell 5 - normaler Wert in zlib, gute Komprimierung -9 - langsam für allerbeste Kompression +9 - langsam f�r allerbeste Kompression Dieses plugin wurde von Carsten Senf beigesteuert. @@ -783,18 +783,18 @@ Dieses plugin wurde von Carsten Senf beigesteuert. -BöseBäckSläshes -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -Wenn auf deinen Seiten pötzlich viele "\" RückwärtsSchrägStriche -auftauchen liegt das an einer Fehlkonfiguration von PHP. In älteren +B�seB�ckSl�shes +��������������� +Wenn auf deinen Seiten p�tzlich viele "\" R�ckw�rtsSchr�gStriche +auftauchen liegt das an einer Fehlkonfiguration von PHP. In �lteren Versionen war leider immer die Option "magic_slashes_gpc" aktiviert (siehe auch php.ini). -Bitte am besten deinen WebserverProvider das zu ändern. Wenn du aber bei +Bitte am besten deinen WebserverProvider das zu �ndern. Wenn du aber bei einem der BilligHoster (umsonst wie sourceforge.net oder tripod.com) bist, gilt wie immer: einem geschenkten Gaul... Dann verwende bitte "fragements/strip_wonderful_slashes.php", um das -Problem zumindest zu umschiffen, oder ändere deine .htaccess Datei (Apache) +Problem zumindest zu umschiffen, oder �ndere deine .htaccess Datei (Apache) wie darin beschrieben. @@ -803,16 +803,16 @@ wie darin beschrieben. -Paßwörter und tools/ -¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -Die tools/ sind gefährlich und daher per Voreinstellung nicht ohne weiteres +Pa�w�rter und tools/ +�������������������� +Die tools/ sind gef�hrlich und daher per Voreinstellung nicht ohne weiteres Nutzbar. In der Datei "tools/t_config.php" wird das Script -"fragmenst/funcs/auth.php" geladen, daß für den Browser-Login-Dialog -verantwortlich ist. Wenn du also die tools/ verwenden willst, mußt du dort -zuerst einen Benutzer mit Paßwort eintragen, sonst geht nix. +"fragmenst/funcs/auth.php" geladen, da� f�r den Browser-Login-Dialog +verantwortlich ist. Wenn du also die tools/ verwenden willst, mu�t du dort +zuerst einen Benutzer mit Pa�wort eintragen, sonst geht nix. -Um hingegen dein Wiki zu schützen, so daß nur einige wenige Personen die -Seiten editieren können, ließ dir bitte die Datei "plugins/auth/README.auth" +Um hingegen dein Wiki zu sch�tzen, so da� nur einige wenige Personen die +Seiten editieren k�nnen, lie� dir bitte die Datei "plugins/auth/README.auth" durch (leider nur in Englisch). Sie beschreibt den _PROTECTED_MODE und stellt die entsprechenden Plugins vor. diff --git a/mod/wiki/ewiki/ewiki.php b/mod/wiki/ewiki/ewiki.php index 48e3c9d48f..dffb256bfb 100644 --- a/mod/wiki/ewiki/ewiki.php +++ b/mod/wiki/ewiki/ewiki.php @@ -85,8 +85,8 @@ #-- allowed WikiPageNameCharacters -#### BEGIN MOODLE CHANGES - to remove auto-camelcase linking. - global $moodle_disable_camel_case; +#### BEGIN MOODLE CHANGES - to remove auto-camelcase linking. + global $moodle_disable_camel_case; if ($moodle_disable_camel_case) { define("EWIKI_CHARS_L", ""); define("EWIKI_CHARS_U", ""); @@ -97,10 +97,10 @@ define("EWIKI_CHARS_L", "a-z_µ¤$\337-\377"); define("EWIKI_CHARS_U", "A-Z0-9\300-\336"); -#### BEGIN MOODLE CHANGES +#### BEGIN MOODLE CHANGES } #### END MOODLE CHANGES - + define("EWIKI_CHARS", EWIKI_CHARS_L.EWIKI_CHARS_U); #-- database @@ -216,7 +216,7 @@ (?<![~!]) ((?:(?:\w+:)*['.EWIKI_CHARS_U.']+['.EWIKI_CHARS_L.']+){2,}[\w\d]*) |\^([-'.EWIKI_CHARS_L.EWIKI_CHARS_U.']{3,}) - |\[ (?:"[^\]\"]+" | \s+ | [^:\]#]+\|)* ([^\|\"\[\]\#]+) (?:\s+ | "[^\]\"]+")* [\]\#] + |\[ (?:"[^\]\"]+" | \s+ | [^:\]#]+\|)* ([^\|\"\[\]\#]+) (?:\s+ | "[^\]\"]+")* [\]\#] |(\w{3,9}:\/\/[^?#\s\[\]\'\"\)\,<]+) /x', "wiki_link_regex" => "\007 [!~]?( @@ -382,8 +382,8 @@ más adelante si piensa que es necesario.<br />", "EDIT_FORM_2" => "<br />Por favor no escriba cosas, que puedan enfadar a otras personas. Y por favor tenga en mente que - usted no es del todo anónimo en Internet - (encuentre más sobre + usted no es del todo anónimo en Internet + (encuentre más sobre '<a href=\"http://google.com/search?q=my+computers+IP+address\">IP address</a>' de su computador con Google).", "BIN_IMGTOOLARGE" => "¡La gráfica es demasiado grande!", "BIN_NOIMG" => "¡No es un archivo con una gráfica (formato de archivo inaceptable)!", @@ -766,7 +766,7 @@ function ewiki_page_view($id, &$data, $action, $all=1) { $o = ewiki_t("THANKSFORCONTRIBUTION") . $o; } - + if (EWIKI_HIT_COUNTING) { ewiki_database("HIT", $data); } @@ -812,7 +812,7 @@ function ewiki_id() { ## MOODLE-CHANGE: $asid="", Knows the devil why.... function ewiki_script($asid="", $id=false, $params="", $bin=0, $html=1, $script=NULL) { global $ewiki_config, $ewiki_plugins; - + #-- get base script url from config vars if (empty($script)) { $script = &$ewiki_config[!$bin?"script":"script_binary"]; @@ -880,7 +880,7 @@ function ewiki_script($asid="", $id=false, $params="", $bin=0, $html=1, $script= $url = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,5};)/","&", $url); } else { //This is going to be used in some header or meta redirect, so It cannot use & (bug 2620) - $url = preg_replace('/&/', '&', $url); + $url = preg_replace('/&/', '&', $url); } return($url); } @@ -936,7 +936,7 @@ function ewiki_script_url() { else { return(NULL); #-- could not guess it } - + #$url = "http://" . $_SERVER["SERVER_NAME"] . $url; return($url); } @@ -1059,10 +1059,10 @@ function ewiki_page_ordered_list($orderby="created", $asc=0, $print, $title) { if ($asc != 0) { arsort($sorted); } else { asort($sorted); } - foreach ($sorted as $name => $value) { + foreach ($sorted as $name => $value) { if (empty($value)) { $value = "0"; } ##### BEGIN MOODLE ADDITION ##### - #$sorted[$name] = strftime(str_replace('%n', $value, $print), $value); + #$sorted[$name] = strftime(str_replace('%n', $value, $print), $value); if($print=="LASTCHANGED") { $value=strftime("%c",$value); } @@ -1070,7 +1070,7 @@ function ewiki_page_ordered_list($orderby="created", $asc=0, $print, $title) { ##### BEGIN MOODLE ADDITION ##### } $o .= ewiki_list_pages($sorted); - + return($o); } @@ -1143,7 +1143,7 @@ function ewiki_page_search($id, &$data, $action) { $o .= ewiki_list_pages($found); } - + return($o); } @@ -1162,7 +1162,7 @@ function ewiki_page_info($id, &$data, $action) { $pnum = optional_param(EWIKI_UP_PAGENUM, 0, PARAM_INT); $pend = optional_param(EWIKI_UP_PAGEEND, 0, PARAM_INT); - $o = ewiki_make_title($id, ewiki_t("INFOABOUTPAGE")." '{$id}'", 2, $action,"", "_MAY_SPLIT=1"); + $o = ewiki_make_title($id, ewiki_t("INFOABOUTPAGE")." '{$id}'", 2, $action,"", "_MAY_SPLIT=1"); $flagnames = array( "TEXT", "BIN", "DISABLED", "HTML", "READONLY", "WRITEABLE", @@ -1371,7 +1371,7 @@ function ewiki_page_edit($id, $data, $action) { $version = optional_param('version', '', PARAM_CLEAN); $preview = optional_param('preview', false, PARAM_BOOL); $save = optional_param('save', false, PARAM_BOOL); - + $hidden_postdata = array(); #-- previous version come back @@ -1398,7 +1398,7 @@ function ewiki_page_edit($id, $data, $action) { #-- permission checks if (isset($ewiki_ring)) { $ring = $ewiki_ring; - } else { + } else { $ring = 3; } $flags = @$data["flags"]; @@ -1491,7 +1491,7 @@ function ewiki_page_edit($id, $data, $action) { if (EWIKI_EDIT_REDIRECT) { $url = ewiki_script("", $id, "thankyou=1", 0, 0, EWIKI_HTTP_HEADERS?ewiki_script_url():0); - + if (EWIKI_HTTP_HEADERS && !headers_sent()) { header("Status: 303 Redirect for GET"); header("Location: $url"); @@ -1542,13 +1542,13 @@ function ewiki_data_update(&$data, $author="") { #-- edit <textarea> function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) { - global $ewiki_plugins, $ewiki_config, $moodle_format; + global $ewiki_plugins, $ewiki_config, $moodle_format; $content = optional_param('content', '', PARAM_CLEAN); $version = optional_param('version', '', PARAM_CLEAN); $o=''; - + #-- previously edited, or db fetched content if ($content || $version) { $data = array( @@ -1600,8 +1600,8 @@ function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) { print_textarea($usehtmleditor, $rows, $cols, 680, 400, "content", $oldtext); echo '</td></tr></table>'; - $o .= ob_get_contents(); - ob_end_clean(); + $o .= ob_get_contents(); + ob_end_clean(); } else { ##### END MOODLE ADDITION ##### @@ -1613,7 +1613,7 @@ function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) { ##### BEGIN MOODLE ADDITION ##### } ##### END MOODLE ADDITION ##### - + #-- more <input> elements before the submit button if ($pf_a = $ewiki_plugins["edit_form_insert"]) foreach ($pf_a as $pf) { $o .= $pf($id, $data, $action); @@ -1660,8 +1660,8 @@ function ewiki_page_edit_form_final_imgupload(&$o, &$id, &$data, &$action) { function ewiki_page_edit_preview(&$data) { -#### BEGIN MOODLE CHANGES - global $moodle_format; +#### BEGIN MOODLE CHANGES + global $moodle_format; $preview_text=$GLOBALS["ewiki_plugins"]["render"][0](optional_param("content", null, PARAM_CLEAN), 1, EWIKI_ALLOW_HTML || (@$data["flags"]&EWIKI_DB_F_HTML)); return( '<div class="preview">' . "<hr noshade>" @@ -1670,7 +1670,7 @@ function ewiki_page_edit_preview(&$data) { . "<br /><br /><hr noshade><br />" . "</div>" ); -#### END MOODLE CHANGES +#### END MOODLE CHANGES } @@ -1709,7 +1709,7 @@ function ewiki_control_links($id, &$data, $action) { } } - if ($data["lastmodified"] >= UNIX_MILLENNIUM) { + if ($data["lastmodified"] >= UNIX_MILLENNIUM) { $o .= '<small>' . strftime(ewiki_t("LASTCHANGED"), @$data["lastmodified"]) . '</small>'; } @@ -1766,7 +1766,7 @@ function ewiki_format ( "close" => array(), ); #-- aliases - $in = &$s["in"]; + $in = &$s["in"]; $line = &$s["line"]; $lines = &$s["lines"]; $para = &$s["para"]; @@ -1774,7 +1774,7 @@ function ewiki_format ( $list = &$s["list"]; #-- input and output arrays - if ($wiki_source[0] == "<") { # also prepend an empty line + if ($wiki_source[0] == "<") { # also prepend an empty line $wiki_source = "\n" . $wiki_source; # for faster strpos() searchs } $iii = array( @@ -1861,7 +1861,7 @@ function ewiki_format ( while ((++$in) < count($iii)) { if (($btype = $iii[$in][2]) && ($pf_a = $ewiki_plugins["format_block"][$btype])) { $c = &$iii[$in][0]; - foreach ($pf_a as $pf) { + foreach ($pf_a as $pf) { # current buffer $c and pointer $in into $iii[] and state $s $pf($c, $in, $iii, $s, $btype); } @@ -1870,7 +1870,7 @@ function ewiki_format ( #-- wiki markup ------------------------------------------------------ $para = ""; - $in = -1; + $in = -1; while ((++$in) < count($iii)) { #-- wikimarkup if ($iii[$in][1] & 0x0001) { @@ -1920,13 +1920,13 @@ function ewiki_format ( $s["list"] = ""; } $line = substr($line, 1, -1); - if ($pf_tbl) { + if ($pf_tbl) { $pf_tbl($line, $ooo, $s); } else { - if (!$s["tbl"]) { + if (!$s["tbl"]) { $out .= "<table " . $wm_table_defaults . ">\n"; - $s["close"][] = "\n</table>"; + $s["close"][] = "\n</table>"; } $line = "<tr>\n<td>" . str_replace("|", "</td>\n<td>", $line) . "</td>\n</tr>"; } @@ -1940,7 +1940,7 @@ function ewiki_format ( #-- headlines if (($c0 == "!") && ($excl = strspn($line, "!"))) { - if ($excl > 3) { + if ($excl > 3) { $excl = 3; } $line = substr($line, $excl); @@ -1961,12 +1961,12 @@ function ewiki_format ( $n_indent = 0; if (!$list && (!$s["block"]) && ($n_indent = strspn($line, " "))) { $n_indent = (int) ($n_indent / 2.65); - while ($n_indent > $s["indent"]) { + while ($n_indent > $s["indent"]) { $out .= $wm_indent; $s["indent"]++; } } - while ($n_indent < $s["indent"]) { + while ($n_indent < $s["indent"]) { $out .= ""; $s["indent"]--; } @@ -2018,7 +2018,7 @@ function ewiki_format ( list($lopen, $ltag1, $ltag2) = $wm_list[$lchar]; $lclose = strtok($lopen, " "); $lspace = str_repeat(" ", $new_len); - + $out .= "\n$lspace<$lopen>\n" . "$lspace". $linsert . "<$ltag2>"; $s["close"][] = "$lspace</$lclose>"; $s["close"][] = "$lspace</$ltag2>"; @@ -2129,7 +2129,7 @@ function ewiki_format ( if ($ooo[$in][1] & 0x0002) { ##### BEGIN MOODLE ADDITION ##### # No WikiLinks in Editor - ################################# + ################################# global $ewiki_use_editor, $ewiki_editor_content; if(!($ewiki_use_editor && $ewiki_editor_content)) { ##### END MOODLE ADDITION ##### @@ -2186,7 +2186,7 @@ function ewiki_format_close_para(&$ooo, &$s) { function ewiki_format_close_tags(&$ooo, &$s, $count=100) { $out = &$ooo[$s["in"]][0]; - if (!is_array($s) || !is_array($s["close"])) { + if (!is_array($s) || !is_array($s["close"])) { die("\$s is garbaged == $s!!"); } while (($count--) && ($add = array_pop($s["close"]))) { @@ -2203,7 +2203,7 @@ function ewiki_format_pre(&$str, &$in, &$iii, &$s, $btype) { function ewiki_format_html(&$str, &$in, &$iii, &$s) { $he = array_reverse($GLOBALS["ewiki_config"]["htmlentities"]); $str = strtr($str, array_flip($he)); - $str = "<span class=\"markup html\">" . $str . "\n</span>\n"; + $str = "<span class=\"markup html\">" . $str . "\n</span>\n"; } @@ -2272,7 +2272,7 @@ function ewiki_render_wiki_links(&$o) { */ function ewiki_merge_links(&$ewiki_links) { global $ewiki_plugins; -#### BEGIN MOODLE CHANGES +#### BEGIN MOODLE CHANGES global $ewiki_link_case; $ewiki_link_case=array(); #### END MOODLE CHANGES @@ -2280,11 +2280,11 @@ function ewiki_merge_links(&$ewiki_links) { foreach ($ewiki_plugins["page"] as $page=>$uu) { $ewiki_links[$page] = 1; } -#### BEGIN MOODLE CHANGES +#### BEGIN MOODLE CHANGES foreach($ewiki_links as $page => $uu) { if($uu) { - $ewiki_link_case[strtolower($page)]=$page; - } + $ewiki_link_case[strtolower($page)]=$page; + } } #### END MOODLE CHANGES $ewiki_links = ewiki_array($ewiki_links); @@ -2348,7 +2348,7 @@ function ewiki_link_regex_callback($uu, $force_noimg=0) { $href = str_replace($f, $t, $href); } } - + #-- anchors $href2 = ""; if (($p = strrpos($href, "#")) && ($p) && ($href[$p-1] != "&")) { @@ -2394,9 +2394,9 @@ function ewiki_link_regex_callback($uu, $force_noimg=0) { #-- ordinary internal WikiLinks elseif (($ewiki_links === true) || @$ewiki_links[$href_i]) { $type = array("wikipage"); -#### BEGIN MOODLE CHANGES +#### BEGIN MOODLE CHANGES global $ewiki_link_case; - $href_realcase=array_key_exists($href_i,$ewiki_link_case) ? $ewiki_link_case[$href_i] : $href; + $href_realcase=array_key_exists($href_i,$ewiki_link_case) ? $ewiki_link_case[$href_i] : $href; $str = '<a href="' . ewiki_script("", $href_realcase) . s($href2) . '">' . $title . '</a>'; #### END MOODLE CHANGES @@ -2426,7 +2426,7 @@ function ewiki_link_regex_callback($uu, $force_noimg=0) { } #-- convert standard URLs - foreach ($ewiki_config["idf"]["url"] as $find) + foreach ($ewiki_config["idf"]["url"] as $find) if (strpos($href, $find)===0) { $type[-2] = "url"; $type[-1] = strtok($find, ":"); @@ -2527,7 +2527,7 @@ function ewiki_interwiki($href, &$type) { } -/* +/* implements FeatureWiki:InterMapWalking */ function ewiki_intermap_walking($id, &$data, $action) { @@ -2579,23 +2579,23 @@ function ewiki_binary($break=0) { } #-- what are we doing here? - if (($id == EWIKI_IDF_INTERNAL) && ($upload_file)) { + if (($id == EWIKI_IDF_INTERNAL) && ($upload_file)) { $do = "upload"; } else { $data = ewiki_database("GET", array("id" => $id)); $flags = @$data["flags"]; - if (EWIKI_DB_F_BINARY == ($flags & EWIKI_DB_F_TYPE)) { + if (EWIKI_DB_F_BINARY == ($flags & EWIKI_DB_F_TYPE)) { $do = "get"; } elseif (empty($data["version"]) and EWIKI_CACHE_IMAGES) { $do = "cache"; } - else { + else { $do = "nop"; } } - + #-- auth only happens when enforced with _PROTECTED_MODE_XXL setting # (authentication for inline images in violation of the WWW spirit) if ((EWIKI_PROTECTED_MODE>=5) && !ewiki_auth($id, $data, "binary-{$do}")) { @@ -2624,12 +2624,12 @@ EOF; #-- request for contents from the db elseif ($do == "get") { -#### CHANGED FOR MOODLE +#### CHANGED FOR MOODLE if (EWIKI_HIT_COUNTING) { $tmp["id"]=$id; ewiki_database("HIT", $tmp); } -#### CHANGED FOR MOODLE +#### CHANGED FOR MOODLE #-- send http_headers from meta if (is_array($data["meta"])) { @@ -2642,10 +2642,10 @@ EOF; #-- fetch from binary store if ($pf_a = $ewiki_plugins["binary_get"]) { -#### CHANGED FOR MOODLE +#### CHANGED FOR MOODLE foreach ($pf_a as $pf) { $pf($id, $data["meta"]); } -#### END CHANGED FOR MOODLE +#### END CHANGED FOR MOODLE } #-- else fpassthru @@ -2677,7 +2677,7 @@ EOF; $result = ewiki_binary_save_image($filename, $id, "RETURN", $add_meta); } - } + } #-- deliver if ($result && !$break) { @@ -2687,7 +2687,7 @@ EOF; else { $data = array( "id" => $id, - "version" => 1, + "version" => 1, "flags" => EWIKI_DB_F_DISABLED, "lastmodified" => time(), "created" => time(), @@ -2700,7 +2700,7 @@ EOF; header("Location: $id"); ewiki_log("imgcache: did not find '$id', and marked it now in database as DISABLED", 2); } - + } #-- "we don't sell this!" @@ -2829,7 +2829,7 @@ $add_meta=array(), $accept_all=EWIKI_ACCEPT_BINARY, $care_for_images=1) #-- database entry $data = array( "id" => $id, - "version" => "1", + "version" => "1", "author" => ewiki_author(), "userid" => $USER->id, "flags" => EWIKI_DB_F_BINARY | EWIKI_DB_F_READONLY, @@ -2838,7 +2838,7 @@ $add_meta=array(), $accept_all=EWIKI_ACCEPT_BINARY, $care_for_images=1) "meta" => &$meta, "content" => &$content, ); - + #-- write if not exist $exists = ewiki_database("FIND", array($id)); if (! $exists[$id] ) { @@ -2912,11 +2912,11 @@ function ewiki_t($const, $repl=array(), $pref_langs=array()) { "_" => "", " " => "", "+" => ""); - + $translation=get_string(strtolower(strtr($const,$replacechars)),"wiki",$repl); return $translation; ##### END MOODLE ADDITION ##### - + /* global $ewiki_t; #-- use default language wishes @@ -3096,7 +3096,7 @@ function ewiki_auth($id, &$data, $action, $ring=false, $request_auth=0) { #echo "_a($id,dat,$action,$ring,$request_auth)<br />\n"; if (EWIKI_PROTECTED_MODE) { - + #-- set required vars if (!isset($ewiki_ring)) { $ewiki_ring = (int)EWIKI_AUTH_DEFAULT_RING; @@ -3177,7 +3177,7 @@ function ewiki_auth_user($username, $password) { #-- return if it matches if ($success) { - if (isset($entry[1])) { + if (isset($entry[1])) { $ewiki_ring = (int)($entry[1]); } else { $ewiki_ring = 2; //(EWIKI_AUTH_DEFAULT_RING - 1); @@ -3289,7 +3289,7 @@ function ewiki_eventually_initialize(&$id, &$data, &$action) { function ewiki_database($action, $args, $sw1=0, $sw2=0, $pf=false) { #-- normalize (fetch bad parameters) - if (($action=="GET") && !is_array($args) && is_string($args)) { + if (($action=="GET") && !is_array($args) && is_string($args)) { $args = array("id" => $args); } @@ -3395,13 +3395,13 @@ class ewiki_dbquery_result { foreach ($this->keys as $key) { $row[$key] = $r[$key]; } - } else { + } else { $row = $r; } } unset($r); } - else { + else { return(NULL); // no more entries } diff --git a/mod/wiki/ewiki/fragments/auth.php b/mod/wiki/ewiki/fragments/auth.php index b1a639e4e2..287df35398 100644 --- a/mod/wiki/ewiki/fragments/auth.php +++ b/mod/wiki/ewiki/fragments/auth.php @@ -1,7 +1,7 @@ <?php # http user space authentication layer - # ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + # ������������������������������������ # can be used with the tools/, if you don't want to # set up the .htaccess and .htpasswd files @@ -28,7 +28,7 @@ #-- check password $_success = false; if (strlen($_a_u) && strlen($_a_p) && ($_a_p == @$passwords[$_a_u])) { - $_success = $_a_u; + $_success = $_a_u; } #-- request HTTP Basic authentication otherwise @@ -39,4 +39,3 @@ die(); } -?> \ No newline at end of file diff --git a/mod/wiki/ewiki/fragments/binary.php b/mod/wiki/ewiki/fragments/binary.php index 3df902d048..302e3d19df 100644 --- a/mod/wiki/ewiki/fragments/binary.php +++ b/mod/wiki/ewiki/fragments/binary.php @@ -19,4 +19,3 @@ include("ewiki.php"); -?> \ No newline at end of file diff --git a/mod/wiki/ewiki/fragments/calendar.css b/mod/wiki/ewiki/fragments/calendar.css index a83734c88b..4517c0a45d 100644 --- a/mod/wiki/ewiki/fragments/calendar.css +++ b/mod/wiki/ewiki/fragments/calendar.css @@ -27,7 +27,7 @@ td.caltoday{ background-color:#D7CFC7; font-family: Verdana, Arial, sans-serif; - font-size: 8pt; + font-size: 8pt; text-align:right; } a.calpg{ diff --git a/mod/wiki/ewiki/fragments/htaccess b/mod/wiki/ewiki/fragments/htaccess index 361ded9794..be77518798 100644 --- a/mod/wiki/ewiki/fragments/htaccess +++ b/mod/wiki/ewiki/fragments/htaccess @@ -5,7 +5,7 @@ # # It uses the mod_rewrite to look a bit more professionall than # the usual GET-vars at the end of our URLs. This is highly -# recommended as things like "script.php?edit=1&id=page" usually +# recommended as things like "script.php?edit=1&id=page" usually # scare search engines and may prevent your Wiki from getting # indexed. # diff --git a/mod/wiki/ewiki/fragments/mkhuge b/mod/wiki/ewiki/fragments/mkhuge index 4a5fe5ad7c..0723e7da56 100644 --- a/mod/wiki/ewiki/fragments/mkhuge +++ b/mod/wiki/ewiki/fragments/mkhuge @@ -26,7 +26,7 @@ fi #-- choose size -N=$1 +N=$1 if [ -z "$N" ] ; then N=0 fi diff --git a/mod/wiki/ewiki/fragments/nuke_mod_wiki_index b/mod/wiki/ewiki/fragments/nuke_mod_wiki_index index 56ffa24397..b2f2377a7f 100644 --- a/mod/wiki/ewiki/fragments/nuke_mod_wiki_index +++ b/mod/wiki/ewiki/fragments/nuke_mod_wiki_index @@ -55,4 +55,4 @@ CloseTable(); # strange function names ;) include("footer.php"); -?> + diff --git a/mod/wiki/ewiki/fragments/strip_wonderful_slashes.php b/mod/wiki/ewiki/fragments/strip_wonderful_slashes.php index 261134848e..a67edf465d 100644 --- a/mod/wiki/ewiki/fragments/strip_wonderful_slashes.php +++ b/mod/wiki/ewiki/fragments/strip_wonderful_slashes.php @@ -25,7 +25,7 @@ #-- the wiki module itself to add them before #-- insert. Strange triple add-strip-add but #-- this was the best way to solve problems - #-- without changing how the rest of the + #-- without changing how the rest of the #-- module works. $superglobals = array( @@ -49,4 +49,4 @@ -?> + diff --git a/mod/wiki/ewiki/fragments/wiki_format.inc b/mod/wiki/ewiki/fragments/wiki_format.inc index 0c09749b5b..e84ec48411 100644 --- a/mod/wiki/ewiki/fragments/wiki_format.inc +++ b/mod/wiki/ewiki/fragments/wiki_format.inc @@ -1,6 +1,6 @@ <?php -/* +/* * Wiki-Engine from "ErfurtWiki", Mario Salzer <milky@erphesfurt.de> * Adapted by Frank Luithle <sigi@fsinfo.cs.uni-sb.de> * @@ -288,4 +288,4 @@ function wiki_link_regex_callback( $uu ) { return($str); } -?> + diff --git a/mod/wiki/ewiki/plugins/aview/backlinks.php b/mod/wiki/ewiki/plugins/aview/backlinks.php index 110dbaf477..fd64363bd8 100755 --- a/mod/wiki/ewiki/plugins/aview/backlinks.php +++ b/mod/wiki/ewiki/plugins/aview/backlinks.php @@ -10,13 +10,12 @@ $ewiki_plugins["view_append"][] = "ewiki_view_append_backlinks"; function ewiki_view_append_backlinks($id, $data, $action) { $pages = ewiki_get_backlinks($id); - + $o=""; foreach ($pages as $id) { $o .= ' <a href="'.ewiki_script("",$id).'">'.$id.'</a>'; } ($o) && ($o = "<div class=\"wiki_backlinks\"><small>".get_string('backlinks', 'wiki').":</small><br />$o</div>\n"); - + return($o); } -?> \ No newline at end of file diff --git a/mod/wiki/ewiki/plugins/aview/downloads.php b/mod/wiki/ewiki/plugins/aview/downloads.php index efb744ae19..00ca4a9fa6 100644 --- a/mod/wiki/ewiki/plugins/aview/downloads.php +++ b/mod/wiki/ewiki/plugins/aview/downloads.php @@ -13,7 +13,7 @@ if (!defined("EWIKI_AUTOVIEW") || !EWIKI_AUTOVIEW) { $ewiki_t["en"]["ATTACHMENTS"] = "attachments"; -$ewiki_t["de"]["ATTACHMENTS"] = "Anhänge"; +$ewiki_t["de"]["ATTACHMENTS"] = "Anh�nge"; @@ -36,12 +36,12 @@ function ewiki_view_append_attachments($id, $data, $action) { // } // arsort($ord); // -// foreach ($ord as $id => $uu) { +// foreach ($ord as $id => $uu) { // $row = ewiki_database("GET", array("id"=>$id)); // if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $row, "view")) { // continue; -// } -// $o .= ewiki_entry_downloads($row, "*"); +// } +// $o .= ewiki_entry_downloads($row, "*"); // } #### END MOODLE CHANGES @@ -58,4 +58,4 @@ function ewiki_attachments() { -?> + diff --git a/mod/wiki/ewiki/plugins/email_protect.php b/mod/wiki/ewiki/plugins/email_protect.php index 30f76a5b3d..65af4a5e47 100644 --- a/mod/wiki/ewiki/plugins/email_protect.php +++ b/mod/wiki/ewiki/plugins/email_protect.php @@ -14,7 +14,7 @@ # # Additionally it generates faked/trap email addresses to annoy the # marketing mafia. - + #-- change these from time to time: define("EWIKI_PAGE_EMAIL", "ProtectedEmail"); @@ -188,7 +188,7 @@ case -1: // decode $string = base64_decode($string); $string = str_rot17($string); - break; + break; case 2: // url $string = ewiki_script("", EWIKI_PAGE_EMAIL, @@ -236,7 +236,7 @@ global $ewiki_config; $ewiki_up_requestlv = optional_param(EWIKI_UP_REQUESTLV, 0, PARAM_CLEAN); - + $html = ""; srand(time()/17-1000*microtime()); @@ -310,4 +310,4 @@ } -?> + diff --git a/mod/wiki/ewiki/plugins/feature/imgresize_gd.php b/mod/wiki/ewiki/plugins/feature/imgresize_gd.php index e88c998306..d3eef74460 100755 --- a/mod/wiki/ewiki/plugins/feature/imgresize_gd.php +++ b/mod/wiki/ewiki/plugins/feature/imgresize_gd.php @@ -25,7 +25,7 @@ function ewiki_binary_resize_image_gd(&$filename, &$mime, $return=0) { /*** this disallows Win32 ***/ if ( (DIRECTORY_SEPARATOR!="/") && !EWIKI_IMAGERESIZE_WIN || (strpos($mime, "image/")!==0) ) - { + { return(false); } @@ -119,4 +119,3 @@ function ewiki_binary_resize_image_gd(&$filename, &$mime, $return=0) { } -?> \ No newline at end of file diff --git a/mod/wiki/ewiki/plugins/init.php b/mod/wiki/ewiki/plugins/init.php index 323320c271..8f3c049bf7 100644 --- a/mod/wiki/ewiki/plugins/init.php +++ b/mod/wiki/ewiki/plugins/init.php @@ -7,7 +7,7 @@ You need this plugin to run only once (when you first run the Wiki), afterwards you can and should comment out the include() directive which - enabled it. + enabled it. */ @@ -66,7 +66,7 @@ function ewiki_initialization_wizard($id, &$data, &$action) { $o .= '<tr><td>WikiSoftware</td><td>ewiki '.EWIKI_VERSION."</td></tr>"; $o .= "</table>"; - #-- more diagnosis + #-- more diagnosis if (ini_get("magic_quotes")) { $o.= "<b>Warning</b>: Your PHP interpreter has enabled the ugly and outdated '<i>magic_quotes</i>'. This will lead to problems, so please ask your provider to correct it; or fix it yourself with .htaccess settings as documented in the README. Otherwise don't forget to include() the <tt>fragments/strip_wonderful_slashes.php</tt> (it's ok to proceed for the moment).<br /><br />"; } @@ -122,4 +122,4 @@ function ewiki_initialization_wizard($id, &$data, &$action) { } -?> + diff --git a/mod/wiki/ewiki/plugins/jump.php b/mod/wiki/ewiki/plugins/jump.php index bfcfdcb07a..391bf8b445 100644 --- a/mod/wiki/ewiki/plugins/jump.php +++ b/mod/wiki/ewiki/plugins/jump.php @@ -18,14 +18,14 @@ that cannot detect this themselfes). */ -#-- config +#-- config define("EWIKI_JUMP_HTTP", 1); #-- issue a HTTP redirect, or jump in place define("EWIKI_UP_REDIRECT_COUNT", "redir"); #-- text $ewiki_t["en"]["REDIRECTION_LOOP"] = "<h2>Redirection loop detected<h2>\nOperation stopped, because we're traped in an infinite redirection loop with page \$id."; -#-- plugin glue +#-- plugin glue $ewiki_plugins["handler"][] = "ewiki_handler_jump"; $ewiki_config["interwiki"]["jump"] = ""; $ewiki_config["interwiki"]["goto"] = ""; @@ -35,7 +35,7 @@ function ewiki_handler_jump(&$id, &$data, &$action) { global $ewiki_config; static $redirect_count = 5; - + $redirect_count = optional_param("EWIKI_UP_REDIRECT_COUNT", $redirect_count, PARAM_INT); $jump_markup = array("jump", "goto", "redirect", "location"); @@ -98,4 +98,3 @@ function ewiki_handler_jump(&$id, &$data, &$action) { } -?> \ No newline at end of file diff --git a/mod/wiki/ewiki/plugins/lib/mime_magic.php b/mod/wiki/ewiki/plugins/lib/mime_magic.php index b8448e72c4..c891a9ba61 100644 --- a/mod/wiki/ewiki/plugins/lib/mime_magic.php +++ b/mod/wiki/ewiki/plugins/lib/mime_magic.php @@ -89,12 +89,12 @@ function ewiki_mime_magic(&$binary_data) { array(0, 4, 0, "TADS", "application/x-tads-game"), array(0, 2, 0, "\x01\x10", "application/x-executable-file"), array(0, 2, 0, "\x01\x11", "application/x-executable-file"), - array(0, 2, 0, "\x01ƒ", "application/x-executable-file"), + array(0, 2, 0, "\x01�", "application/x-executable-file"), array(0, 5, 0, "Core\001", "application/x-executable-file"), array(0, 22, 0, "AMANDA: TAPESTART DATE", "application/x-amanda-header"), array(0, 2, 0xfff0, 0xf0ff, "audio/mpeg"), - array(4, 2, 0, "¯\x11", "video/fli"), - array(4, 2, 0, "¯\x12", "video/flc"), + array(4, 2, 0, "�\x11", "video/fli"), + array(4, 2, 0, "�\x12", "video/flc"), array(0, 4, 0, "MOVI", "video/x-sgi-movie"), array(4, 4, 0, "moov", "video/quicktime"), array(4, 4, 0, "mdat", "video/quicktime"), @@ -107,13 +107,13 @@ function ewiki_mime_magic(&$binary_data) { array(0, 4, 0, "\x07\x16\x05\x00", "application/data"), array(257, 6, 0, "ustar\0", "application/x-tar"), array(257, 8, 0, "ustar\040\040\0", "application/x-gtar"), - array(0, 2, 0, "qÇ", "application/x-cpio"), - array(0, 2, 0, "Çq", "application/x-bcpio"), + array(0, 2, 0, "q�", "application/x-cpio"), + array(0, 2, 0, "�q", "application/x-bcpio"), array(0, 6, 0, "070707", "application/x-cpio"), array(0, 6, 0, "070701", "application/x-cpio"), array(0, 6, 0, "070702", "application/x-cpio"), - array(0, 2, 0, "ÿm", "application/data"), - array(0, 2, 0, "ÿe", "application/data"), + array(0, 2, 0, "�m", "application/data"), + array(0, 2, 0, "�e", "application/data"), array(0, 5, 0, "=<ar>", "application/x-ar"), array(0, 19, 0, "!<arch>\n__________E", "application/x-ar"), array(0, 3, 0, "-h-", "application/data"), @@ -121,8 +121,8 @@ function ewiki_mime_magic(&$binary_data) { array(0, 4, 0, "<ar>", "application/x-ar"), array(0, 4, 0, ">ra<", "application/x-ar"), array(0, 4, 0, "!<ar", "application/x-ar"), - array(0, 4, 0, "\x00\x03›í", "application/data"), - array(0, 4, 0, "\x00\x03›î", "application/data"), + array(0, 4, 0, "\x00\x03��", "application/data"), + array(0, 4, 0, "\x00\x03��", "application/data"), array(0, 4, 0x8080ffff, 0x81a, "application/x-arc"), array(0, 4, 0x8080ffff, 0x91a, "application/x-arc"), array(0, 4, 0x8080ffff, 0x21a, "application/x-arc"), @@ -130,7 +130,7 @@ function ewiki_mime_magic(&$binary_data) { array(0, 4, 0x8080ffff, 0x41a, "application/x-arc"), array(0, 4, 0x8080ffff, 0x61a, "application/x-arc"), array(0, 8, 0, "\032archive", "application/data"), - array(0, 2, 0, "ê`", "application/x-arj"), + array(0, 2, 0, "�`", "application/x-arj"), array(0, 4, 0, "HPAK", "application/data"), array(0, 8, 0, "\351,\001JAM\ ", "application/data"), array(2, 5, 0, "-lh0-", "application/x-lha"), @@ -148,7 +148,7 @@ function ewiki_mime_magic(&$binary_data) { array(0, 4, 0, "SQSH", "application/data"), array(0, 4, 0, "UC2\x1a", "application/data"), array(0, 4, 0, "PK\003\004", "application/zip"), - array(20, 4, 0, "ýħÜ", "application/x-zoo"), + array(20, 4, 0, "�ħ�", "application/x-zoo"), array(10, 25, 0, "# This is a shell archive", "application/x-shar"), array(0, 4, 0, "*STA", "application/data"), array(0, 4, 0, "2278", "application/data"), @@ -164,7 +164,7 @@ function ewiki_mime_magic(&$binary_data) { array(0, 4, 0, "KRTN", "audio/x-multitrack"), array(0, 4, 0, "RIFF", "audio/x-wav"), array(0, 4, 0, "EMOD", "audio/x-emod"), - array(0, 4, 0, "ýar.", "audio/x-pn-realaudio"), + array(0, 4, 0, "�ar.", "audio/x-pn-realaudio"), array(0, 3, 0, "MTM", "audio/x-multitrack"), array(0, 2, 0, "if", "audio/x-669-mod"), array(0, 3, 0, "FAR", "audio/mod"), @@ -274,13 +274,13 @@ function ewiki_mime_magic(&$binary_data) { array(0, 2, 0, "\037\213", "application/x-gzip"), array(0, 2, 0, "\037\036", "application/data"), array(0, 2, 0, "\x1f\x1f", "application/data"), - array(0, 2, 0, "\x1fÿ", "application/data"), + array(0, 2, 0, "\x1f�", "application/data"), array(0, 2, 0, "\377\037", "application/data"), - array(0, 2, 0, "Ë\x05", "application/data"), + array(0, 2, 0, "�\x05", "application/data"), array(0, 3, 0, "BZh", "application/x-bzip2"), - array(0, 2, 0, "ÿv", "application/data"), - array(0, 2, 0, "þv", "application/data"), - array(0, 2, 0, "ýv", "application/x-lzh"), + array(0, 2, 0, "�v", "application/data"), + array(0, 2, 0, "�v", "application/data"), + array(0, 2, 0, "�v", "application/x-lzh"), array(0, 2, 0, "\037\237", "application/data"), array(0, 2, 0, "\037\236", "application/data"), array(0, 2, 0, "\037\240", "application/data"), @@ -288,7 +288,7 @@ function ewiki_mime_magic(&$binary_data) { array(0, 9, 0, "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a", "application/data"), array(0, 4, 0, "W\x12\x01\x00", "application/core"), array(0, 4, 0, "ΚW\x13", "application/x-gdbm"), - array(0, 4, 0, "\x13WšÎ", "application/x-gdbm"), + array(0, 4, 0, "\x13W��", "application/x-gdbm"), array(0, 4, 0, "GDBM", "application/x-gdbm"), array(0, 4, 0, "a\x15\x06\x00", "application/x-db"), array(0, 4, 0, "b1\x05\x00", "application/x-db"), @@ -298,8 +298,8 @@ function ewiki_mime_magic(&$binary_data) { array(0, 8, 0, "Only in ", "text/x-patch"), array(0, 23, 0, "Common subdirectories: ", "text/x-patch"), array(0, 19, 0, "!<arch>\n________64E", "application/data"), - array(0, 2, 0, "\x01ˆ", "application/x-executable-file"), - array(0, 2, 0, "\x01", "application/x-object-file"), + array(0, 2, 0, "\x01�", "application/x-executable-file"), + array(0, 2, 0, "\x01�", "application/x-object-file"), array(0, 3, 0, "\377\377\177", "application/data"), array(0, 3, 0, "\377\377\174", "application/data"), array(0, 3, 0, "\377\377\176", "application/data"), @@ -310,12 +310,12 @@ function ewiki_mime_magic(&$binary_data) { array(0, 4, 0, "\177ELF", "application/x-executable-file"), array(0, 2, 0, "\x01T", "application/data"), array(0, 2, 0, "\x01U", "application/x-executable-file"), - array(0x438, 2, 0, "ïS", "application/x-linux-ext2fs"), + array(0x438, 2, 0, "�S", "application/x-linux-ext2fs"), array(0, 4, 0, "\366\366\366\366", "application/x-pc-floppy"), - array(0774, 2, 0, "¾Ú", "application/data"), - array(0x1FE, 2, 0, "ªU", "application/data"), + array(0774, 2, 0, "��", "application/data"), + array(0x1FE, 2, 0, "�U", "application/data"), array(0x410, 2, 0, "\x13", "application/x-filesystem"), - array(0x410, 2, 0, "\x13", "application/x-filesystem"), + array(0x410, 2, 0, "\x13�", "application/x-filesystem"), array(0x410, 2, 0, "\x24h", "application/x-filesystem"), array(0x410, 2, 0, "\x24x", "application/x-filesystem"), array(0, 9, 0, "-rom1fs-\0", "application/x-filesystem"), @@ -332,7 +332,7 @@ function ewiki_mime_magic(&$binary_data) { array(0, 3, 0, "flf", "font/x-figlet"), array(0, 3, 0, "flc", "application/x-font"), array(0, 4, 0, "\x19Y\x02\x14", "font/x-libgrx"), - array(0, 4, 0, "NOFÿ", "font/x-dos"), + array(0, 4, 0, "NOF�", "font/x-dos"), array(7, 4, 0, "AGE\x00", "font/x-dos"), array(7, 4, 0, "DIV\x00", "font/x-dos"), array(0, 10, 0, "<MakerFile", "application/x-framemaker"), @@ -354,8 +354,8 @@ function ewiki_mime_magic(&$binary_data) { array(20, 4, 0, "GIMP", "application/x-gimp-brush"), array(0, 4, 0, "\336\22\4\225", "application/x-locale"), array(0, 4, 0, "\225\4\22\336", "application/x-locale"), - array(0, 2, 0, "—\x01", "application/x-executable-file"), - array(0, 2, 0, "”\x01", "application/x-executable-file"), + array(0, 2, 0, "�\x01", "application/x-executable-file"), + array(0, 2, 0, "�\x01", "application/x-executable-file"), array(0, 5, 0, "\000\001\000\000\000", "font/ttf"), array(0, 4, 0, "\x0a\x0f\x08\x0e", "application/data"), array(0, 4, 0, "\x0f\x0a\x0e\x08", "application/data"), @@ -391,11 +391,11 @@ function ewiki_mime_magic(&$binary_data) { array(0, 4, 0, "\x07\x01\x0a\x02", "application/x-executable-file"), array(0, 4, 0, "\x0e\x01\x0c\x02", "application/x-library-file"), array(0, 4, 0, "\x0d\x01\x0c\x02", "application/x-library-file"), - array(0, 4, 0, "\x02\x0aÿe", "application/x-library-file"), - array(0, 4, 0, "\x02\x0cÿe", "application/x-library-file"), - array(0, 4, 0, "\x02\x08ÿe", "application/x-library-file"), - array(0, 4, 0, "\x01X!¦", "application/core"), - array(0, 4, 0, "M§îè", "font/x-hp-windows"), + array(0, 4, 0, "\x02\x0a�e", "application/x-library-file"), + array(0, 4, 0, "\x02\x0c�e", "application/x-library-file"), + array(0, 4, 0, "\x02\x08�e", "application/x-library-file"), + array(0, 4, 0, "\x01X!�", "application/core"), + array(0, 4, 0, "M���", "font/x-hp-windows"), array(0, 10, 0, "Bitmapfile", "image/unknown"), array(0, 4, 0, "\x02\x0c\x01\x0c", "application/x-lisp"), array(0, 8, 0, "msgcat01", "application/x-locale"), @@ -412,12 +412,12 @@ function ewiki_mime_magic(&$binary_data) { array(1, 3, 0, "PNG", "image/x-png"), array(0, 4, 0, "GIF8", "image/gif"), array(0, 4, 0, "\361\0\100\273", "image/x-cmu-raster"), - array(0, 2, 0, "Øÿ", "image/jpeg"), + array(0, 2, 0, "��", "image/jpeg"), array(0, 4, 0, "hsi1", "image/x-jpeg-proprietary"), array(0, 2, 0, "BM", "image/x-bmp"), array(0, 2, 0, "IC", "image/x-ico"), - array(0, 4, 0, "•j¦Y", "x/x-image-sun-raster"), - array(0, 2, 0, "Ú\x01", "x/x-image-sgi"), + array(0, 4, 0, "�j�Y", "x/x-image-sun-raster"), + array(0, 2, 0, "�\x01", "x/x-image-sgi"), array(2048, 7, 0, "PCD_IPI", "x/x-photo-cd-pack-file"), array(0, 7, 0, "PCD_OPA", "x/x-photo-cd-overfiew-file"), array(0, 2, 0, "\x01H", "application/x-executable-file"), @@ -478,7 +478,7 @@ function ewiki_mime_magic(&$binary_data) { array(0, 2, 0, "\367\312", "font/x-tex"), array(2, 2, 0, "\000\021", "font/x-tex-tfm"), array(2, 2, 0, "\000\022", "font/x-tex-tfm"), - array('>2', 2, 0, "º¾", "application/java"), + array('>2', 2, 0, "��", "application/java"), array(8, 4, 0, "AIFF", "audio/x-aiff"), array(8, 4, 0, "AIFC", "audio/x-aiff"), array(8, 4, 0, "8SVX", "audio/x-aiff"), @@ -492,7 +492,7 @@ function ewiki_mime_magic(&$binary_data) { array(0, 12, 0, "#! /bin/tcsh", "application/x-shellscript"), array(0, 18, 0, "#! /usr/local/tcsh", "application/x-shellscript"), array('>8', 6, 0, "debian", "application/x-debian-package"), - array('>2', 2, 0, "Ûî", "application/x-rpm"), + array('>2', 2, 0, "��", "application/x-rpm"), array(2, 5, 0, "-lh -", "application/x-lha"), array(2, 5, 0, "-lh6-", "application/x-lha"), array(2, 5, 0, "-lh7-", "application/x-lha"), @@ -510,9 +510,9 @@ function ewiki_mime_magic(&$binary_data) { array(0, 4, 0, "\376\067\0\043", "application/msword"), array(0, 6, 0, "\320\317\021\340\241\261", "application/msword"), array(0, 6, 0, "\333\245-\0\0\0", "application/msword"), - array(0, 2, 0, "\x02÷", "application/x-dvi"), - array(0, 2, 0, "¯\x11", "video/fli"), - array(0, 2, 0, "¯\x12", "video/flc"), + array(0, 2, 0, "\x02�", "application/x-dvi"), + array(0, 2, 0, "�\x11", "video/fli"), + array(0, 2, 0, "�\x12", "video/flc"), array('>8', 4, 0, "AVI ", "video/avi"), array(0, 1, 0, "\x01", "video/unknown"), array(0, 1, 0, "\x02", "video/unknown"), @@ -520,33 +520,33 @@ function ewiki_mime_magic(&$binary_data) { array(0, 18, 0, "\# KDE Config File", "application/x-kdelnk"), array(0, 7, 0, "\# xmcd", "text/xmcd"), array(0, 4, 0, "\x8aMNG", "video/x-mng"), - array(0, 4, 0, "ó\x03\x00\x00", "application/x-executable-file"), - array(0, 4, 0, "ç\x03\x00\x00", "application/x-library-file"), - array(0, 4, 0, "³\x01\x00\x00", "video/mpeg"), - array(0, 4, 0, "º\x01\x00\x00", "video/mpeg"), - array(0, 4, 0, "\x00\x00l", "application/x-apl-workspace"), - array(0, 4, 0, "\x00\x00ÿm", "application/x-ar"), - array(0, 4, 0, "\x00\x00ÿe", "application/data"), + array(0, 4, 0, "�\x03\x00\x00", "application/x-executable-file"), + array(0, 4, 0, "�\x03\x00\x00", "application/x-library-file"), + array(0, 4, 0, "�\x01\x00\x00", "video/mpeg"), + array(0, 4, 0, "�\x01\x00\x00", "video/mpeg"), + array(0, 4, 0, "\x00\x00�l", "application/x-apl-workspace"), + array(0, 4, 0, "\x00\x00�m", "application/x-ar"), + array(0, 4, 0, "\x00\x00�e", "application/data"), array(0, 4, 0, "\x00\x00\x01\x06", "application/x-executable-file"), array(0, 4, 0, "G\x01\x00\x00", "application/x-object-file"), array(0, 4, 0, "K\x01\x00\x00", "application/x-executable-file"), array(0, 4, 0, "M\x01\x00\x00", "application/x-executable-file"), array(0, 4, 0, "O\x01\x00\x00", "application/x-executable-file"), - array(24, 4, 0, "kê\x00\x00", "application/data"), - array(24, 4, 0, "lê\x00\x00", "application/data"), - array(24, 4, 0, "mê\x00\x00", "application/data"), - array(24, 4, 0, "nê\x00\x00", "application/data"), - array(0, 4, 0, "\x01\x00\x00", "application/x-object-file"), - array(0, 4, 0, "‡\x01\x00\x00", "application/data"), - array(24, 4, 0, "\x00\x00êl", "application/x-dump"), - array(24, 4, 0, "\x00\x00êk", "application/x-dump"), - array(0, 4, 0, "\x00\x00¾1", "text/vnd.ms-word"), + array(24, 4, 0, "k�\x00\x00", "application/data"), + array(24, 4, 0, "l�\x00\x00", "application/data"), + array(24, 4, 0, "m�\x00\x00", "application/data"), + array(24, 4, 0, "n�\x00\x00", "application/data"), + array(0, 4, 0, "�\x01\x00\x00", "application/x-object-file"), + array(0, 4, 0, "�\x01\x00\x00", "application/data"), + array(24, 4, 0, "\x00\x00�l", "application/x-dump"), + array(24, 4, 0, "\x00\x00�k", "application/x-dump"), + array(0, 4, 0, "\x00\x00�1", "text/vnd.ms-word"), array(0, 2, 0, "\x00\x00", "audio/mpeg"), array('>16', 2, 0, "\x00\x01", "application/x-object"), array('>16', 2, 0, "\x00\x02", "application/x-executable"), array('>16', 2, 0, "\x00\x03", "application/x-sharedlib"), array('>16', 2, 0, "\x00\x04", "application/x-coredump"), - array(0, 4, 0, "\x00\x00\x00Ì", "application/x-executable-file"), + array(0, 4, 0, "\x00\x00\x00�", "application/x-executable-file"), array(0, 4, 0, "\x04\x00\x00\x00", "font/x-snf"), array(0, 4, 0, "\x00\x00\x00\x04", "font/x-snf"), array('>12', 4, 0, "\x01\x00\x00\x00", "audio/basic"), @@ -569,4 +569,3 @@ function ewiki_mime_magic(&$binary_data) { -?> \ No newline at end of file diff --git a/mod/wiki/ewiki/plugins/markup/footnotes.php b/mod/wiki/ewiki/plugins/markup/footnotes.php index 8c853d04cd..7392221f1c 100755 --- a/mod/wiki/ewiki/plugins/markup/footnotes.php +++ b/mod/wiki/ewiki/plugins/markup/footnotes.php @@ -12,7 +12,7 @@ a WikiLink to explain a more complex task on another page; your decision -*/ +*/ @@ -44,7 +44,7 @@ function ewiki_format_source_footnotes (&$source) { #-- strip "{{footnote}}" $source = substr($source, 0, $l - 2) - . "<a href=\"#fn$notenum\">·$notenum</a>" + . "<a href=\"#fn$notenum\">�$notenum</a>" . substr($source, $r + 2); #-- add "footnote" to the end of the wiki page source @@ -52,10 +52,9 @@ function ewiki_format_source_footnotes (&$source) { $source .= "\n----"; } $source .= "\n" . - "<a name=\"fn$notenum\">·$notenum</a> ". $footnote . "\n<br />"; - + "<a name=\"fn$notenum\">�$notenum</a> ". $footnote . "\n<br />"; + } } -?> \ No newline at end of file diff --git a/mod/wiki/ewiki/plugins/moodle/diff.php b/mod/wiki/ewiki/plugins/moodle/diff.php index 5a97691c77..2d255e77b1 100755 --- a/mod/wiki/ewiki/plugins/moodle/diff.php +++ b/mod/wiki/ewiki/plugins/moodle/diff.php @@ -1,4 +1,4 @@ -<?php // $Id$ +<?php # this is the "stupid diff", which shows up changes between two # saved versions of a WikiPage; even if working very unclean it @@ -26,13 +26,13 @@ if ($old_ver > 0) { $data0 = ewiki_database("GET", array("id" => $id, "version" => $old_ver)); } - + $a->new_ver=$new_ver; $a->old_ver=$old_ver; $a->pagename=$id; $o = ewiki_make_title($id, get_string("differences","wiki",$a)); - # Different handling for html: closes Bug #1530 - Wiki diffs useless when using HTML editor + # Different handling for html: closes Bug #1530 - Wiki diffs useless when using HTML editor if($wiki->htmlmode==2) { /// first do the formatiing to get normal display format without filters $options = new object(); @@ -46,15 +46,15 @@ $content0 = preg_replace('/(\S)\s+(\S)/', '$1 $2', $content0); // Remove multiple spaces. $content = preg_replace('/\n|\r/i', ' ', $content); $content = preg_replace('/(\S)\s+(\S)/', '$1 $2', $content); - + /// Replace <p> </p> $content0 = preg_replace('#(<p( [^>]*)?>( |\s+)</p>)|(<p( [^>]*)?></p>)#i', "\n", $content0); $content = preg_replace('#(<p( [^>]*)?>( |\s+)</p>)|(<p( [^>]*)?></p>)#i', "\n", $content); - + /// Place new line characters at logical HTML positions. $htmlendings = array('+(<br.*?>)+iU', '+(<p( [^>]*)?>)+iU', '+(</p>)+i', '+(<hr.*?>)+iU', '+(<ol.*?>)+iU', - '+(</ol>)+i', '+(<ul.*?>)+iU', '+(</ul>)+i', '+(<li.*?>)+iU', '+(</li>)+i', + '+(</ol>)+i', '+(<ul.*?>)+iU', '+(</ul>)+i', '+(<li.*?>)+iU', '+(</li>)+i', '+(</tr>)+i', '+(<div.*?>)+iU', '+(</div>)+i'); $htmlrepl = array("\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", @@ -73,7 +73,7 @@ foreach ($txt2 as $i => $line) { $i2 = $i; - while ($rm = $diff0[$i2++]) { + while ($rm = $diff0[$i2++]) { if($wiki->htmlmode == 2) { if ($rm == '<br />') { //ugly hack to fix line breaks $rm = ''; diff --git a/mod/wiki/ewiki/plugins/moodle/downloads.php b/mod/wiki/ewiki/plugins/moodle/downloads.php index b4cc6117b0..7562153a59 100644 --- a/mod/wiki/ewiki/plugins/moodle/downloads.php +++ b/mod/wiki/ewiki/plugins/moodle/downloads.php @@ -1,5 +1,5 @@ <?php - require_once("../../config.php"); + require_once("../../config.php"); require_once($CFG->libdir.'/filelib.php'); # this is the upload/download plugin, which allows to put arbitrary binary @@ -110,7 +110,7 @@ function ewiki_page_fileupload($id, $data, $action, $def_sec="") { $o .= upload_print_form_fragment(1,array(EWIKI_UP_UPLOAD),array(ewiki_t("file")),false,null,0,0,true); $o .= '<input type="submit" value="' . EWIKI_PAGE_UPLOAD . '" /><br /><br />' .'<b>' . ewiki_t("comment") . '</b><br /><textarea name="comment" cols="35" rows="3"></textarea><br /><br />'; - + if (empty($ewiki_upload_sections[$def_sec])) { $ewiki_upload_sections[$def_sec] = $def_sec; } @@ -301,8 +301,8 @@ function ewiki_entry_downloads($row, $show_section=0, $fullinfo=false) { $id = $row["id"]; $p_title = basename($meta["Content-Location"]); $p_time = userdate($row["created"]); - - + + $p_hits = ($row["hits"] ? $row["hits"] : "0"); $p_size = $meta["size"]; $p_size = isset($p_size) ? (", " . ($p_size>=4096 ? round($p_size/1024)."K" : $p_size." bytes")) : ""; @@ -321,12 +321,12 @@ function ewiki_entry_downloads($row, $show_section=0, $fullinfo=false) { $p_icon = ""; /*foreach ($ewiki_binary_icons as $str => $i) { - if (empty($str) || strstr($row["Content-Location"], $str) || strstr($p_ct, $str) || strstr($p_ct2, $str)) { + if (empty($str) || strstr($row["Content-Location"], $str) || strstr($p_ct, $str) || strstr($p_ct2, $str)) { $p_icon = $i; $p_icon_t = $str; } }*/ - + /// Moodle Icon Handling global $CFG; $p_icon = $OUTPUT->old_icon_url(file_extension_icon($id)); @@ -370,8 +370,8 @@ function ewiki_entry_downloads($row, $show_section=0, $fullinfo=false) { // $o = format_text($o, $moodle_format); } - - + + ewiki_t("DWNL_ENTRY_FORMAT", $info); return($o); @@ -398,4 +398,4 @@ function ewiki_action_attachments($id, $data, $action=EWIKI_ACTION_ATTACHMENTS) } -?> + diff --git a/mod/wiki/ewiki/plugins/moodle/f_fixhtml.php b/mod/wiki/ewiki/plugins/moodle/f_fixhtml.php index dcf343c82d..a3c779ee38 100644 --- a/mod/wiki/ewiki/plugins/moodle/f_fixhtml.php +++ b/mod/wiki/ewiki/plugins/moodle/f_fixhtml.php @@ -1,4 +1,4 @@ -<?php // $Id$ +<?php /* This filter plugin implements minimal html tag balancing, and can also @@ -7,7 +7,7 @@ markup abuse; it however provides no fix for <ul> inside <ul> or even <h2> inside <p> problems (this should rather be fixed in the ewiki_format function). So following code is not meant to fix any possible html file, - and it certainly won't make valid html files out of random binary data. + and it certainly won't make valid html files out of random binary data. So for full html spec conformance you should rather utilize w3c tidy (by using your Webservers "Filter" directive). */ @@ -174,4 +174,4 @@ function ewiki_html_tag_balancer(&$html) { } -?> + diff --git a/mod/wiki/ewiki/plugins/moodle/moodle_binary_store.php b/mod/wiki/ewiki/plugins/moodle/moodle_binary_store.php index 2ff51bf25a..1dd8a5aa3f 100644 --- a/mod/wiki/ewiki/plugins/moodle/moodle_binary_store.php +++ b/mod/wiki/ewiki/plugins/moodle/moodle_binary_store.php @@ -1,4 +1,4 @@ -<?php // $Id$ +<?php /* This plugin intercepts some of the binary handling functions to @@ -42,16 +42,16 @@ function moodle_binary_get_path($id, $meta, $course, $wiki, $userid, $groupid) { global $CFG; $entry=wiki_get_entry($wiki, $course, $userid, $groupid); if(!$entry) { - print_error('cannotgetentry', 'wiki'); + print_error('cannotgetentry', 'wiki'); } - + $dir=make_upload_directory("$course->id/$CFG->moddata/wiki/$wiki->id/$entry->id/".$meta["section"]); if(substr($id, 0, strlen(EWIKI_IDF_INTERNAL))!=EWIKI_IDF_INTERNAL) { print_error('cannotstartwith', 'wiki', '', EWIKI_IDF_INTERNAL.substr($id, 0, strlen(EWIKI_IDF_INTERNAL))); } $id = substr($id,strlen(EWIKI_IDF_INTERNAL)); $id = clean_filename($id); - + return "$dir/$id"; } @@ -64,13 +64,13 @@ function moodle_binary_store_file(&$filename, &$id, &$meta, $ext=".bin") { print_error('cannotacceptbin', 'wiki'); return 0; } - - + + $entry=wiki_get_entry($wiki, $course, $userid, $groupid); if(!$entry->id) { print_error('cannotgetentry', 'wiki'); } - + require_once($CFG->dirroot.'/lib/uploadlib.php'); $um = new upload_manager('upload',false,false,$course,false,0,true,true); if ($um->process_file_uploads("$course->id/$CFG->moddata/wiki/$wiki->id/$entry->id/$ewiki_title")) { @@ -83,7 +83,7 @@ function moodle_binary_store_file(&$filename, &$id, &$meta, $ext=".bin") { } print_error('uploaderror', 'wiki', '', $um->print_upload_log(true)); return false; - + } @@ -97,8 +97,8 @@ function moodle_binary_store_get_file($id, &$meta) { print_error('cannotacceptbin', 'wiki'); return 0; } - - + + $filepath=moodle_binary_get_path($id, $meta, $course, $wiki, $userid, $groupid); if (file_exists($filepath)) { readfile($filepath); @@ -116,4 +116,4 @@ function moodle_binary_store_get_file($id, &$meta) { //} } -?> + diff --git a/mod/wiki/ewiki/plugins/moodle/moodle_highlight.php b/mod/wiki/ewiki/plugins/moodle/moodle_highlight.php index 01e7c17ea0..22642e5306 100644 --- a/mod/wiki/ewiki/plugins/moodle/moodle_highlight.php +++ b/mod/wiki/ewiki/plugins/moodle/moodle_highlight.php @@ -1,4 +1,4 @@ -<?php // $Id$ +<?php /* CSS-highlights the terms used as search patterns. This is done @@ -10,7 +10,7 @@ em.highlight { color: red; } - + em.marker { background: yellow; } @@ -41,7 +41,7 @@ function ewiki_moodle_highlight(&$o, &$id, &$data, &$action) { #-- get words out of it $q = preg_replace('/[^-_\d'.EWIKI_CHARS_L.EWIKI_CHARS_U.']+/', " ", $q); $q = array_unique(explode(" ", $q)); - #-- walk through words + #-- walk through words foreach ($q as $word) { if (empty($word)) { @@ -76,4 +76,4 @@ function ewiki_moodle_highlight(&$o, &$id, &$data, &$action) { } // func -?> + diff --git a/mod/wiki/ewiki/plugins/moodle/moodle_rescue_html.php b/mod/wiki/ewiki/plugins/moodle/moodle_rescue_html.php index 64de6712e7..591c7d1198 100644 --- a/mod/wiki/ewiki/plugins/moodle/moodle_rescue_html.php +++ b/mod/wiki/ewiki/plugins/moodle/moodle_rescue_html.php @@ -1,4 +1,4 @@ -<?php // $Id$ +<?php /* Can be used to allow preserving of certain "safe" HTML <tags> @@ -23,11 +23,11 @@ function ewiki_moodle_rescue_html(&$wiki_source) { $rescue_html = array( "br", "tt", "b", "i", "strong", "em", "s", "kbd", "var", "xmp", "sup", "sub", - "pre", "q", "h1", "h2", "h3", "h4", "h5", "h6", "cite", "code", "u", + "pre", "q", "h1", "h2", "h3", "h4", "h5", "h6", "cite", "code", "u", ); - - + + #-- unescape allowed html if ($safe_html) { /* @@ -43,4 +43,4 @@ function ewiki_moodle_rescue_html(&$wiki_source) { } -?> + diff --git a/mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php b/mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php index 71c7b586b9..0634efeae2 100644 --- a/mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php +++ b/mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php @@ -1,4 +1,4 @@ -<?php // $Id$ +<?php # ToDo: Binary Content # Binary Linking /* @@ -28,8 +28,8 @@ $ewiki_t["c"]["EWIKIDUMPCSS"] = ' body { background-color:#eeeeff; padding:2px; - } - + } + H2 { background:#000000; color:#ffffff; @@ -37,8 +37,8 @@ $ewiki_t["c"]["EWIKIDUMPCSS"] = ' } --> </style> - '; - + '; + function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) { global $userid, $groupid, $cm, $wikipage, $wiki, $course, $CFG, $OUTPUT; @@ -57,15 +57,15 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) { if($wiki->htmlmode==2) { $exportformatval=1; } - $cont=ewiki_page_wiki_dump_send($binaries, - $exportformatval, - $withvirtualpages, + $cont=ewiki_page_wiki_dump_send($binaries, + $exportformatval, + $withvirtualpages, optional_param("exportdestinations", null,PARAM_CLEAN)); - } + } if($cont===false) { die; } - + $url = ewiki_script("", "WikiExport"); $ret = ewiki_make_title($id, ewiki_t($id), 2); $ret .= ($cont&&$cont!==true)?$cont."<br /><br />\n":""; @@ -80,8 +80,8 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) { '<INPUT type="hidden" name="groupid" value="'.$groupid.'" />'."\n". '<INPUT type="hidden" name="id" value="'.$cm->id.'" />'."\n". '<INPUT type="hidden" name="wikipage" value="'.$wikipage.'" />'."\n"; - - + + // Export binaries too ? if(!$wiki->ewikiacceptbinary) { $ret.='<INPUT type="hidden" name="exportbinaries" value="0" />'.$exportdestinations[0]."\n"; @@ -123,12 +123,12 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) { if(wiki_is_teacher($wiki)) { // Get Directory List $rawdirs = get_directory_list("$CFG->dataroot/$course->id", 'moddata', true, true, false); - + foreach ($rawdirs as $rawdir) { $exportdestinations[$rawdir] = get_string("moduledirectory","wiki").": ".$rawdir; } } - + $ret.=" <TR valign=\"top\">\n". ' <TD align="right">'.get_string("exportto","wiki").":</TD>\n". " <TD>\n"; @@ -140,7 +140,7 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) { $ret.= $OUTPUT->select($select)."\n"; } $ret.=" </TD>\n". - " </TR>\n". + " </TR>\n". "</TABLE>\n". ' <input type="submit" name="wikiexport" value= "'.get_string("export","wiki").'" />'."\n". "</div>\n"; @@ -150,7 +150,7 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) { function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvirtualpages=0, $exportdestinations=0) { global $ewiki_config, $wiki, $ewiki_plugins, $wiki_entry, $course, $CFG, $ewiki_t, $userid, $groupid, $OUTPUT; - + $filestozip=array(); #-- disable protected email if (is_array($ewiki_plugins["link_url"])) { @@ -160,7 +160,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir } } } - + /// HTML-Export if($exportformats==1) { #-- if exportformats is html @@ -175,20 +175,20 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir </div> </body> </html>'; - + #-- reconfigure ewiki_format() to generate offline pages and files $html_ext = ".html"; $ewiki_config["script"] = "%s$html_ext"; $ewiki_config["script_binary"] = "%s"; } - + // Export Virtual pages special $a_virtual = array_keys($ewiki_plugins["page"]); #-- get all pages / binary files $a_validpages = ewiki_valid_pages(1, $withvirtualpages); $a_pagelist = ewiki_sitemap_create($wiki_entry->pagename, $a_validpages, 100, 1); - + # Add linked binary files to pagelist foreach($a_pagelist as $key => $value) { if(is_array($a_validpages[$value]["refs"])){ @@ -206,7 +206,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir $a_images[]=urlencode($value); $a_rimages[]=urlencode(preg_replace(EWIKI_DUMP_FILENAME_REGEX, "", $value)); unset($a_validpages[$value]); - } + } if($a_validpages[$value]["type"]=="file") { $a_images[]=urlencode($value); $a_rimages[]=clean_filename(substr($value,strlen(EWIKI_IDF_INTERNAL))); @@ -216,14 +216,14 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir } } - # Remove binaries from a_validpages and add to a_pagelist + # Remove binaries from a_validpages and add to a_pagelist foreach($a_validpages as $key => $value){ if($a_validpages[$key]["type"]=="image" || $a_validpages[$key]["type"]=="file"){ $a_pagelist[]=$key; unset($a_validpages[$key]); - } - } - + } + } + #print "<pre>"; print_r($a_validpages); print "</pre>"; #print "<hr /><pre>"; print_r($a_pagelist); print "</pre>"; @@ -239,7 +239,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir #} else { # die(); #} - + /// Create/Set Directory $wname=clean_filename(strip_tags(format_string($wiki->name,true))); if($exportdestinations) { @@ -260,12 +260,12 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir print_error("cannotcreatetempdir"); } } - + $a_pagelist = array_unique($a_pagelist); - - + + #-- convert all pages - foreach($a_pagelist as $pagename){ + foreach($a_pagelist as $pagename){ if ((!in_array($pagename, $a_virtual))) { $id = $pagename; #-- not a virtual page @@ -285,59 +285,59 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir } else { continue; } - + if (empty($content)){ switch ($row["flags"] & EWIKI_DB_F_TYPE) { // Text Page case (EWIKI_DB_F_TEXT): #print "<pre>"; print_r($row[content]); print "\n-------------</pre>"; - + if($exportformats==1) {/// HTML-Export $content = ewiki_format($row["content"]); } else { $content = $row["content"]; } - + # Binary files link adjustment when html if($exportformats==1) { $content = str_replace($a_images, $a_rimages, $content); } - + $fn = preg_replace(EWIKI_DUMP_FILENAME_REGEX, "", urlencode($id)); $fn = $fn.$html_ext; if($exportformats==1) {/// HTML-Export $content = str_replace('$content', $content, str_replace('$title', $id, $HTML_TEMPLATE)); } break; - case (EWIKI_DB_F_BINARY): + case (EWIKI_DB_F_BINARY): #print "Binary: $row[id]<br />"; if (($row["meta"]["class"]=="image" || $row["meta"]["class"]=="file") && ($exportbinaries)) { - # Copy files to the appropriate directory + # Copy files to the appropriate directory $fn= moodle_binary_get_path($id, $row["meta"], $course, $wiki, $userid, $groupid); $destfn=clean_filename(substr($id,strlen(EWIKI_IDF_INTERNAL))); $dest="$exportdir/".$destfn; if(!copy($fn,$dest)) { echo $OUTPUT->notification("Cannot copy $fn to $dest."); } - + #$fn = urlencode(preg_replace(EWIKI_DUMP_FILENAME_REGEX, "", $id)); #$content = &$row["content"]; $filestozip[]=$exportdir."/".$destfn; continue (2); } else { - #-- php considers switch statements as loops so continue 2 is needed to - #-- hit the end of the for loop + #-- php considers switch statements as loops so continue 2 is needed to + #-- hit the end of the for loop continue(2); } break; - + default: # don't want it continue(2); } } - + # Do not translate links when wiki already in pure html - mode if($wiki->htmlmode!=2) { $content=preg_replace_callback( @@ -356,7 +356,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir if (!$handle = fopen($exportdir."/".$fn, 'w')) { print_error('cannotopenfile', '', '', $exportdir/$fn); } - + // Write $content to our opened file. if (fwrite($handle, $content) === FALSE) { print_error('cannotwritefile', '', '', $exportdir/$fn); @@ -370,7 +370,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir # "mode" => 0664 | (($row["flags"]&EWIKI_DB_F_WRITEABLE)?0002:0000), # ), $complevel); } - + #-- create index page /// HTML-Export if($exportformats==1) { @@ -397,23 +397,23 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir if (!$handle = fopen($exportdir."/".$indexname, 'w')) { print_error('cannnotopenfile', '', '', $exportdir/$indexname); } - + // Write $somecontent to our opened file. if (fwrite($handle, $str_formatted) === FALSE) { print_error('cannnotwritefile', '', '', $exportdir/$indexname); } - + fclose($handle); $filestozip[]=$exportdir."/".$indexname; - + #-- add index page # $archive->add($str_formatted, "Index_$rootid".$html_ext, array( # "mtime" => $row["lastmodified"], # "uname" => "ewiki", # "mode" => 0664 | (($row["flags"]&EWIKI_DB_F_WRITEABLE)?0002:0000), # ), $complevel); - } - + } + if(!$exportdestinations) { $archivename=$wname.".zip"; zip_files($filestozip, "$exportbasedir/$archivename"); @@ -422,9 +422,9 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir Header("Content-type: application/zip"); Header("Content-disposition: attachment; filename=\"$archivename\""); Header("Cache-control: private"); - Header("Original-Filename: $archivename"); + Header("Original-Filename: $archivename"); Header("X-Content-Type: application/zip"); - Header("Content-Location: $archivename"); + Header("Content-Location: $archivename"); if(!@readfile("$exportbasedir/$archivename")) { print_error("cannotreadfile", '', '', $exportbasedir/$archivename); } @@ -434,7 +434,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir #exit(); return false; } else { - return get_string("exportsuccessful","wiki")."<br />"; + return get_string("exportsuccessful","wiki")."<br />"; } } } @@ -445,16 +445,16 @@ function deldir($dir) while (false!==($FolderOrFile = readdir($handle))) { if($FolderOrFile != "." && $FolderOrFile != "..") - { + { if(is_dir("$dir/$FolderOrFile")) { deldir("$dir/$FolderOrFile"); } // recursive else { unlink("$dir/$FolderOrFile"); } - } + } } closedir($handle); if(rmdir($dir)) { $success = true; } - return $success; + return $success; } -?> + diff --git a/mod/wiki/ewiki/plugins/moodle/sitemap.php b/mod/wiki/ewiki/plugins/moodle/sitemap.php index 79a0b660d9..436c32a825 100644 --- a/mod/wiki/ewiki/plugins/moodle/sitemap.php +++ b/mod/wiki/ewiki/plugins/moodle/sitemap.php @@ -1,4 +1,4 @@ -<?php // $Id$ +<?php /* This plugin will create a sitemap rooted at the given location @@ -17,7 +17,7 @@ if(!isset($ewiki_config["SiteMap"]["RootList"])){ $ewiki_config["SiteMap"]["RootList"]=array(EWIKI_PAGE_INDEX); } -/* +/* populates an array with all sites the current user is allowed to access calls the sitemap creation function. returns the sitemap to be displayed. @@ -30,13 +30,13 @@ function ewiki_page_sitemap($id=0, $data=0, $action=0){ $str_null=NULL; $a_validpages=ewiki_valid_pages(0,1); - + //**end of hijacked code** //$time_end=getmicrotime(); - //creates the title bar on top of page + //creates the title bar on top of page if($id == EWIKI_PAGE_SITEMAP){ - $o = ewiki_make_title($id, ewiki_t($id), 2); + $o = ewiki_make_title($id, ewiki_t($id), 2); foreach($ewiki_config["SiteMap"]["RootList"] as $root){ if(isset($a_validpages[$root])){ @@ -45,13 +45,13 @@ function ewiki_page_sitemap($id=0, $data=0, $action=0){ break; } } - + }else{ - $o = ewiki_make_title($id, ewiki_t("SMFOR")." ".$id, 2); + $o = ewiki_make_title($id, ewiki_t("SMFOR")." ".$id, 2); if(isset($a_validpages[$id])){ $valid_root=TRUE; $str_rootid=$id; - } + } } $o .= "<p>".ewiki_t("VIEWSMFOR")." "; @@ -61,7 +61,7 @@ function ewiki_page_sitemap($id=0, $data=0, $action=0){ $o.='<a href="'.ewiki_script('sitemap/',$root).'">'.$root.'</a> '; } } - + $o.="</p>"; //checks to see if the user is allowed to view the root page @@ -69,7 +69,7 @@ function ewiki_page_sitemap($id=0, $data=0, $action=0){ $o .= ewiki_t("INVALIDROOT"); return $o; } - + //$timesitemap=getmicrotime(); $a_sitemap=ewiki_sitemap_create($str_rootid, $a_validpages, EWIKI_SITEMAP_DEPTH); @@ -80,16 +80,16 @@ function ewiki_page_sitemap($id=0, $data=0, $action=0){ $fin_level=format_sitemap($a_sitemap, $str_rootid, $str_formatted, $level, $timer, $fordump); $str_formatted.="</ul>".str_pad("", $fin_level*6, "</ul>\n"); $o.=$str_formatted; - + //$timesitemap_end=getmicrotime(); - + //$o.="GetAll: ".($time_end-$time)."\n"; //$o.="SiteMap: ".($timesitemap_end-$timesitemap)."\n"; //$o.="Total: ".($timesitemap_end-$time); - - + + return($o); - + } function ewiki_valid_pages($bool_allowimages=0, $virtual_pages=0){ @@ -99,10 +99,10 @@ function ewiki_valid_pages($bool_allowimages=0, $virtual_pages=0){ while ($row = $result->get()) { if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $str_null, "view")) { continue; - } - + } + $isbinary= ($row["meta"]["class"]=="image"||$row["meta"]["class"]=="file")?true:false; - + if (($row["flags"] & EWIKI_DB_F_TYPE) == EWIKI_DB_F_TEXT || ($bool_allowimages ? $isbinary : 0)) { $temp_refs=explode("\n",$row["refs"]); foreach($temp_refs as $key => $value) { @@ -143,7 +143,7 @@ function format_sitemap($a_sitemap, $str_rootpage, &$str_formatted, &$prevlevel, $str_mark=""; if($a_sitemap[$str_rootpage]["level"]>$prevlevel){ $str_mark="<ul>\n"; - } + } elseif ($a_sitemap[$str_rootpage]["level"]<$prevlevel){ //markup length is 6 characters $str_mark=str_pad("", ($prevlevel-$a_sitemap[$str_rootpage]["level"])*6, "</ul>\n"); @@ -187,9 +187,9 @@ function ewiki_page_listallchildren($str_root, &$a_children, &$a_sitemap, &$a_va } else { $a_sitemap[$str_root]=array("level" => $i_level); } - } + } } -} +} /* @@ -211,17 +211,17 @@ function ewiki_sitemap_create($str_rootid, $a_validpages, $i_maxdepth, $i_flatma $a_validpages[$str_rootid]["touched"]=TRUE; //list all of the children of the root ewiki_page_listallchildren($str_rootid, $a_children, $a_sitemap, $a_validpages, $i_depth, $i_maxdepth, $i_flatmap); - $i_depth++; - + $i_depth++; + if($a_children){ end($a_children); $str_nextlevel=key($a_children); reset($a_children); - + while($str_child = key($a_children)){ //list all children of the current child ewiki_page_listallchildren($str_child, $a_children, $a_sitemap, $a_validpages, $i_depth, $i_maxdepth, $i_flatmap); - + //if the child is the next level marker... if($str_child==$str_nextlevel){ //increment the level counter @@ -231,7 +231,7 @@ function ewiki_sitemap_create($str_rootid, $a_validpages, $i_maxdepth, $i_flatma $str_nextlevel=key($a_children); //reset the array counter to the beginning of the array reset($a_children); - //we are done with this child...get rid of it + //we are done with this child...get rid of it } array_shift($a_children); } @@ -239,4 +239,4 @@ function ewiki_sitemap_create($str_rootid, $a_validpages, $i_maxdepth, $i_flatma return $a_sitemap; } -?> + diff --git a/mod/wiki/ewiki/plugins/moodle/wantedpages.php b/mod/wiki/ewiki/plugins/moodle/wantedpages.php index dc3869da4f..235e676a6a 100644 --- a/mod/wiki/ewiki/plugins/moodle/wantedpages.php +++ b/mod/wiki/ewiki/plugins/moodle/wantedpages.php @@ -1,4 +1,4 @@ -<?php // $Id$ +<?php # lists pages, which were referenced # but not yet written @@ -15,7 +15,7 @@ function ewiki_page_wantedpages($id, $data, $action) { while ($row = $result->get()) { if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $uu, "view")) { continue; - } + } $refs .= $row["refs"]; } @@ -27,17 +27,17 @@ function ewiki_page_wantedpages($id, $data, $action) { foreach ($refs as $id=>$exists) { if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $uu, "view")) { continue; - } + } if (!$exists && !strstr($id, "://") && strlen(trim($id))) { $wanted[] = $id; } } // to prevent empty <ul></ul> getting printed out, we have to interate twice. - // once to make sure the <ul></ul> is needed at all. + // once to make sure the <ul></ul> is needed at all. // MDL-7861, <ul></ul> does not validate. - - $printul = false; + + $printul = false; foreach ($wanted as $page) { $link = ewiki_link_regex_callback(array($page, $page)); if (strstr($link, "?</a>")) { @@ -45,9 +45,9 @@ function ewiki_page_wantedpages($id, $data, $action) { } } #-- print out - + if ($printul) { - $o .= "<ul>"; + $o .= "<ul>"; foreach ($wanted as $page) { $link = ewiki_link_regex_callback(array($page, $page)); @@ -62,4 +62,4 @@ function ewiki_page_wantedpages($id, $data, $action) { return($o); } -?> + diff --git a/mod/wiki/ewiki/plugins/notify.php b/mod/wiki/ewiki/plugins/notify.php index f8897a9f3e..ffe1990388 100644 --- a/mod/wiki/ewiki/plugins/notify.php +++ b/mod/wiki/ewiki/plugins/notify.php @@ -84,7 +84,7 @@ function ewiki_notify_edit_hook($id, $data, &$hidden_postdata) { $mailto = ewiki_notify_links($data["content"], 0); if (!count($mailto)) { - return(false); + return(false); } #-- generate diff @@ -230,4 +230,3 @@ function ewiki_format_remove_notify(&$source) { -?> \ No newline at end of file diff --git a/mod/wiki/ewiki/plugins/page/orphanedpages.php b/mod/wiki/ewiki/plugins/page/orphanedpages.php index 3007680907..20acd93a82 100755 --- a/mod/wiki/ewiki/plugins/page/orphanedpages.php +++ b/mod/wiki/ewiki/plugins/page/orphanedpages.php @@ -44,11 +44,11 @@ function ewiki_page_orphanedpages($id, $data, $action) { $refs = array_unique($refs); #-- check pages to be referenced from somewhere - foreach ($pages as $p) { + foreach ($pages as $p) { if (!ewiki_in_array($p, $refs)) { if (!EWIKI_PROTECTED_MODE || EWIKI_PROTECTED_MODE_HIDING || ewiki_auth($p, $uu, "view")) { - $orphaned[] = $p; - } + $orphaned[] = $p; + } } } @@ -59,4 +59,4 @@ function ewiki_page_orphanedpages($id, $data, $action) { } -?> + diff --git a/mod/wiki/ewiki/plugins/page/pageindex.php b/mod/wiki/ewiki/plugins/page/pageindex.php index 72058c9f41..1bbbe0b793 100755 --- a/mod/wiki/ewiki/plugins/page/pageindex.php +++ b/mod/wiki/ewiki/plugins/page/pageindex.php @@ -25,7 +25,7 @@ function ewiki_page_index($id=0, $data=0, $action=0, $args=array()) { while ($row = $result->get()) { if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $uu, "view")) { continue; - } + } if (($row["flags"] & EWIKI_DB_F_TYPE) == EWIKI_DB_F_TEXT) { if (!stristr($exclude, "\n".$row["id"]."\n")) { $sorted[] = $row["id"]; @@ -41,4 +41,4 @@ function ewiki_page_index($id=0, $data=0, $action=0, $args=array()) { } -?> + diff --git a/mod/wiki/ewiki/plugins/patchsaving.php b/mod/wiki/ewiki/plugins/patchsaving.php index 21286f4586..c3b9a2f4b9 100644 --- a/mod/wiki/ewiki/plugins/patchsaving.php +++ b/mod/wiki/ewiki/plugins/patchsaving.php @@ -28,7 +28,7 @@ function ewiki_edit_patch($id, &$data) { "GET", array("id"=>$id, "version"=>$version) ); - if (!$base) { + if (!$base) { return(false); } @@ -41,7 +41,7 @@ function ewiki_edit_patch($id, &$data) { fwrite($f, $base["content"]); fclose($f); } - else { + else { return(false); } @@ -49,7 +49,7 @@ function ewiki_edit_patch($id, &$data) { fwrite($f, $content); fclose($f); } - else { + else { unlink($fn_base); return(false); } @@ -58,7 +58,7 @@ function ewiki_edit_patch($id, &$data) { fwrite($f, $data["content"]); fclose($f); } - else { + else { unlink($fn_base); unlink($fn_requ); return(false); @@ -87,4 +87,3 @@ function ewiki_edit_patch($id, &$data) { } -?> \ No newline at end of file diff --git a/mod/wiki/ewiki/plugins/pluginloader.php b/mod/wiki/ewiki/plugins/pluginloader.php index 36ed4dda60..95f1938932 100644 --- a/mod/wiki/ewiki/plugins/pluginloader.php +++ b/mod/wiki/ewiki/plugins/pluginloader.php @@ -124,4 +124,3 @@ function ewiki_dynamic_plugin_loader(&$id, &$data, &$action) { } -?> \ No newline at end of file diff --git a/mod/wiki/ewiki/plugins/spages.php b/mod/wiki/ewiki/plugins/spages.php index 8f062c6d7c..078a4798ac 100644 --- a/mod/wiki/ewiki/plugins/spages.php +++ b/mod/wiki/ewiki/plugins/spages.php @@ -19,7 +19,7 @@ $headers[] or $ewiki_headers[] array. If you define("EWIKI_SPAGES_DIR") then this directory will be read - initially, but you could also just edit the following list/array of + initially, but you could also just edit the following list/array of directories, or call ewiki_init_spages() yourself. */ @@ -179,4 +179,4 @@ function ewiki_init_spages($dirs, $idprep="") { -?> + diff --git a/mod/wiki/ewikimoodlelib.php b/mod/wiki/ewikimoodlelib.php index af044e53d6..f74307ae88 100644 --- a/mod/wiki/ewikimoodlelib.php +++ b/mod/wiki/ewikimoodlelib.php @@ -38,7 +38,7 @@ function ewiki_database_moodle($action, &$args, $sw1, $sw2) { $versionsql = "AND version = :version"; } else { $versionsql = ""; - + } # $result = mysql_query("SELECT * FROM " . EWIKI_DB_TABLE_NAME diff --git a/mod/wiki/filter.php b/mod/wiki/filter.php index 8415cf70c6..999af1f87a 100755 --- a/mod/wiki/filter.php +++ b/mod/wiki/filter.php @@ -1,4 +1,4 @@ -<?PHP // $Id$ +<?php //This function provides automatic linking to //wiki pages when its page title is found inside every Moodle text //It's based in the glosssary filter by Williams Castillo @@ -22,7 +22,7 @@ if (!isset($cachedcourseid) || $cachedcourseid !== (int)$courseid) { $wikipagelist = array(); $nothingtodo = false; - } + } $cachedcourseid = (int)$courseid; if (!empty($nothingtodo)) { // We've been here in this page already @@ -44,7 +44,7 @@ /// Walk through each wiki, and get entries. foreach ($wikis as $wiki) { if ($wiki_entries = wiki_get_entries($wiki)) { - + /// Walk through each entry and get the pages. foreach ($wiki_entries as $wiki_entry) { if ($wiki_pages = $DB->get_records('wiki_pages', array('wiki'=>$wiki_entry->id), 'pagename, version DESC')) { @@ -70,4 +70,4 @@ return filter_phrases($text, $wikipagelist); } -?> + diff --git a/mod/wiki/index.php b/mod/wiki/index.php index ae58855b22..4c5e1d2211 100644 --- a/mod/wiki/index.php +++ b/mod/wiki/index.php @@ -106,4 +106,4 @@ echo $OUTPUT->footer(); -?> + diff --git a/mod/wiki/lib.php b/mod/wiki/lib.php index cc8b6ced9f..6e4bf7aca0 100644 --- a/mod/wiki/lib.php +++ b/mod/wiki/lib.php @@ -18,7 +18,7 @@ /** * Library of functions and constants for module wiki * (replace wiki with the name of your module and delete this line) - * + * * @package mod-wiki * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later @@ -110,7 +110,7 @@ function wiki_get_students($wiki, $groups='', $sort='u.lastaccess', $fields='u.* */ function wiki_add_instance($wiki) { global $DB; - + $wiki->timemodified = time(); # May have to add extra stuff in here # @@ -267,13 +267,13 @@ function wiki_user_complete($course, $user, $mod, $wiki) { */ function wiki_print_recent_activity($course, $isteacher, $timestart) { global $CFG, $DB, $OUTPUT; - + $sql = "SELECT l.*, cm.instance - FROM {log} l JOIN {course_modules} cm ON l.cmid = cm.id - WHERE l.time > ? AND l.course = ? + FROM {log} l JOIN {course_modules} cm ON l.cmid = cm.id + WHERE l.time > ? AND l.course = ? AND l.module = 'wiki' AND action LIKE 'edit%' ORDER BY l.time ASC"; - + if (!$logs = $DB->get_records_sql($sql, array($timestart, $course->id))){ return false; } @@ -523,7 +523,7 @@ function wiki_has_entries(&$wiki) { */ function wiki_get_entries(&$wiki, $byindex=NULL) { global $CFG, $DB; - + if ($byindex == 'student') { return $DB->get_records('wiki_entries', array('wikiid'=>$wiki->id), '', 'userid,id,wikiid,course,groupid,pagename,timemodified'); @@ -763,22 +763,22 @@ function wiki_get_other_wikis(&$wiki, &$user, &$course, $currentid=0) { if (!empty($CFG->enablegroupings) && !empty($cm->groupingid)) { $groupingid = $wiki->groupingid; } - - + + switch ($wiki->wtype) { case 'student': /// Get all the existing entries for this wiki. $wiki_entries = wiki_get_entries($wiki, 'student'); - + if (!empty($CFG->enablegroupings) && !empty($wiki->groupingid)) { $sql = "SELECT gm.userid FROM {groups_members} gm " . "INNER JOIN {groupings_groups} gg ON gm.groupid = gg.groupid " . "WHERE gg.groupingid = ? "; - + $groupingmembers = $DB->get_records_sql($sql, array($wiki->groupingid)); } - + if ($isteacher and (SITEID != $course->id)) { /// If the user is an editing teacher, or a non-editing teacher not assigned to a group, show all student @@ -913,7 +913,7 @@ function wiki_get_other_wikis(&$wiki, &$user, &$course, $currentid=0) { if (!empty($CFG->enablegroupings) && !empty($wiki->groupingid) && empty($groupingmembers[$wiki_entry->userid])) { continue; } - + if (($viewall === true) or groups_is_member($viewall, $wiki_entry->userid)) { $key = 'view.php?id='.$id.'&userid='.$wiki_entry->userid.'&page='.$wiki_entry->pagename; $wikis[$key] = fullname($wiki_entry).':'.$wiki_entry->pagename; @@ -934,7 +934,7 @@ function wiki_get_other_wikis(&$wiki, &$user, &$course, $currentid=0) { /// Get all the existing entries for this wiki. $wiki_entries = wiki_get_entries($wiki, 'group'); - + if ($groupmode and ($isteacheredit or ($isteacher and !$mygroupid))) { if ($groups = groups_get_all_groups($course->id, null, $groupingid)) { $defpagename = empty($wiki->pagename) ? get_string('wikidefaultpagename', 'wiki') : $wiki->pagename; @@ -1096,7 +1096,7 @@ function wiki_get_other_wikis(&$wiki, &$user, &$course, $currentid=0) { } break; } - + return $wikis; } @@ -1519,7 +1519,7 @@ function wiki_print_wikilinks_block($cmid, $binary=false, $return=false) { if($binary) { $links["FileDownload"]=get_string("filedownload", "wiki"); } - + $name = null; if (preg_match('/([a-zA-Z0-9\-_]*)=$/', EWIKI_SCRIPT, $matches)) { $name = $matches[1]; @@ -1559,7 +1559,7 @@ function wiki_print_page_actions($cmid, $specialpages, $page, $action, $binary=f if($canedit && $binary && !in_array($page, $specialpages) && $action != "attachments") { $page["attachments/$page"]=get_string("attachments","wiki"); } - + $name = null; if (preg_match('/([a-zA-Z0-9\-_]*)=$/', EWIKI_SCRIPT, $matches)) { $name = $matches[1]; diff --git a/mod/wiki/mod_form.php b/mod/wiki/mod_form.php index 2127778ced..8ccb7e7ffb 100644 --- a/mod/wiki/mod_form.php +++ b/mod/wiki/mod_form.php @@ -87,4 +87,4 @@ class mod_wiki_mod_form extends moodleform_mod { } } -?> + diff --git a/mod/wiki/overridelock.php b/mod/wiki/overridelock.php index 9d2152ac49..61e9c95cdf 100644 --- a/mod/wiki/overridelock.php +++ b/mod/wiki/overridelock.php @@ -1,6 +1,6 @@ <?php /** - * Handles what happens when a user with appropriate permission attempts to + * Handles what happens when a user with appropriate permission attempts to * override a wiki page editing lock. * * @copyright © 2006 The Open University @@ -49,4 +49,4 @@ $pagename=$actions[1]; $DB->delete_records('wiki_locks', array('pagename'=>$pagename, 'wikiid'=>$wiki->id)); redirect("view.php?id=$id&page=".urlencode($page)); -?> + diff --git a/mod/wiki/restorelib.php b/mod/wiki/restorelib.php index c2f989f747..74878fa483 100644 --- a/mod/wiki/restorelib.php +++ b/mod/wiki/restorelib.php @@ -1,4 +1,4 @@ -<?PHP //$Id$ +<?php //This php script contains all the stuff to backup/restore //wiki mods @@ -217,7 +217,7 @@ } return $status; } - + function wiki_restore_files ($oldwikiid, $newwikiid, $oldentryid, $newentryid, $restore) { global $CFG; @@ -235,7 +235,7 @@ //First, locate course's moddata directory $moddata_path = $CFG->dataroot."/".$restore->course_id."/".$CFG->moddata; - + //Check it exists and create it $status = check_dir_exists($moddata_path,true); @@ -275,13 +275,13 @@ //wiki_decode_content_links_caller() function in each module //in the restore process function wiki_decode_content_links ($content,$restore) { - + global $CFG; - + $result = $content; - + //Link to the list of wikis - + $searchstring='/\$@(WIKIINDEX)\*([0-9]+)@\$/'; //We look for it preg_match_all($searchstring,$content,$foundset); @@ -298,7 +298,7 @@ if($rec->new_id) { //Now replace it $result= preg_replace($searchstring,$CFG->wwwroot.'/mod/wiki/index.php?id='.$rec->new_id,$result); - } else { + } else { //It's a foreign link so leave it as original $result= preg_replace($searchstring,$restore->original_wwwroot.'/mod/wiki/index.php?id='.$old_id,$result); } @@ -341,7 +341,7 @@ function wiki_decode_content_links_caller($restore) { global $CFG, $DB; $status = true; - + //Process every wiki PAGE in the course if ($pages = $DB->get_records_sql("SELECT p.id, p.content FROM {wiki_pages} p, {wiki} w @@ -411,4 +411,4 @@ return $status; } -?> + diff --git a/mod/wiki/test.php b/mod/wiki/test.php index 3c17b7922e..94cb063f5d 100644 --- a/mod/wiki/test.php +++ b/mod/wiki/test.php @@ -1,3 +1,2 @@ <?php die; -?> \ No newline at end of file diff --git a/mod/wiki/version.php b/mod/wiki/version.php index 70bca1d4e0..9ef1199ef9 100644 --- a/mod/wiki/version.php +++ b/mod/wiki/version.php @@ -1,4 +1,4 @@ -<?PHP // $Id$ +<?php ///////////////////////////////////////////////////////////////////////////////// /// Code fragment to define the version of Wiki @@ -9,4 +9,4 @@ $module->version = 2009042700; // The current module version (Date: YYYYMMDDXX $module->requires = 2009041700; // The current module version (Date: YYYYMMDDXX) $module->cron = 3600; // Period for cron to check this module (secs) -?> + diff --git a/mod/wiki/view.php b/mod/wiki/view.php index e74900e48c..b790180cd0 100644 --- a/mod/wiki/view.php +++ b/mod/wiki/view.php @@ -511,4 +511,4 @@ $strnojslockwarning '; echo $OUTPUT->footer(); -?> + -- 2.39.5