* Class for conversion between charsets.
*
* Typo Id: class.t3lib_cs.php 3439 2008-03-16 19:16:51Z flyguide $
- * Moodle $Id$
*
* @author Kasper Skaarhoj <kasperYYYY@typo3.com>
* @author Martin Kutschker <martin.t.kutschker@blackbox.net>
* 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/
- 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
default: break;
}
}
-
+
$PAGE->navbar->add(get_string("administration","wiki"));
$PAGE->set_title($wiki_entry->pagename);
$PAGE->set_focuscontrol($focus);
echo $OUTPUT->footer();
exit;
-?>
+
-<?PHP //$Id$
+<?php
//This php script contains all the stuff to backup/restore
//wiki mods
}
}
}
-
+
return $status;
}
if (is_numeric($wiki)) {
$wiki = $DB->get_record('wiki', array('id'=>$wiki));
}
-
+
//Start mod
fwrite ($bf,start_tag("MOD",3,true));
//Print assignment data
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;
}
}
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);
return $result;
}
-?>
+
<?php
/**
- * This script is called through AJAX. It confirms that a user is still
+ * This script is called through AJAX. It confirms that a user is still
* trying to edit a page that they have locked (they haven't closed
- * their browser window or something).
+ * their browser window or something).
*
* @copyright © 2006 The Open University
* @author s.marshall@open.ac.uk
$PAGE->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);
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
-<?php // $Id$
+<?php
/**
* Capability definitions for the wiki module.
*
'admin' => CAP_ALLOW
)
),
-
+
'mod/wiki:overridelock' => array(
'riskbitmask' => 0,
-<?php //$Id$
+<?php
// This file replaces:
// * STATEMENTS section in db/install.xml
-<?php //$Id$
+<?php
-// This file keeps track of upgrades to
+// This file keeps track of upgrades to
// the wiki module
//
// Sometimes, changes between versions involve
return $result;
}
-?>
+
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
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
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",
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
WikiAlternatives
-¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+����������������
If you don't like ewiki, then try at least one of these:
* PhpWiki has a more complete approach than this WikiWare,
* 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 !!)
Authors
-¯¯¯¯¯¯¯
-current maintainer: Mario Salzer <mario*erphesfurt·de> icq95596825 (+Yah,Jab)
-main contributor: Andy Fundinger <andy*burgiss·com> from http://burgiss.com/
+�������
+current maintainer: Mario Salzer <mario*erphesfurt�de> icq95596825 (+Yah,Jab)
+main contributor: Andy Fundinger <andy*burgiss�com> from http://burgiss.com/
For the complete list of authors and contributors please see the CREDITS
file.
Project Pages
-¯¯¯¯¯¯¯¯¯¯¯¯¯
-official freshmeat project page:
+�������������
+official freshmeat project page:
- http://freshmeat.net/projects/ewiki
demo site:
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
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. <note> I didn't want to
Known Bugs
-¯¯¯¯¯¯¯¯¯¯
+����������
Currently none. But this note is just here to encourage you to visit
http://erfurtwiki.sourceforge.net/?BugReports
HowTo
-¯¯¯¯¯
+�����
the ewiki script requires:
- Webserver (Apache, Nanoweb, ...)
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 <html><body> tags
around the output from ewiki. The most simple script to accomplish
this could look like this (see also example-2.php):
-
+
<HTML>
<BODY>
<?php
?>
</BODY>
</HTML>
-
+
[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
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.
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
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:
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 <HTML> is output before the 'ewiki.php'
library was loaded and got the chance to output pictures.
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:
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
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
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
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
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
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.
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.
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).
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
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.
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):
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.
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()
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
$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:
$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
$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.
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
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.
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.
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
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.
$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
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
how ewiki operates
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ������������������
ewiki_page()
- decodes the $id and $action from the GET or POST parameters
- tries to load the page from ewiki_database()
- 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)
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).
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.
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'
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
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.
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
.indent // to specify a different space-indentation
-</style>
+</style>
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:
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.
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.
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
$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
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
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.
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
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]
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
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
$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.
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!
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.
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.
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
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
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
| created: 1046532697\r
| lastmodified: 1046532697\r
| refs: \nErfurtWiki\nNewestPages\n\r
- | \r
+ |\r
| !! WikiSourceContent
| <more-text>...
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
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
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
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).
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
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.
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:
plugins/jump
- ¯¯¯¯¯¯¯¯¯¯¯¯
+ ������������
Introduces magic markup for page redirection (switching to another
page). Possible notations are:
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 :>
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
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
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
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
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
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.
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
plugins/feature/spellcheck
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ��������������������������
Turns the [preview] button below every page edit box into a
spellcheck function.
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.
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
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
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.
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
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).
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
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.
plugins/linking/link_icons
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ��������������������������
The link_icons plugin prepends icon <img>s before registered link
types, like the link_css plugin adds class="..." attributes to the
html formatted links in every page.
plugins/linking/link_target_blank
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ���������������������������������
Adds 'target="blank"' to link tags <a>, which will result in most
browsers opening pages in a new window.
plugins/linking/linkexcerpts
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ����������������������������
Adds a short preview text (with <a title="...">) to every link of
a page. This however requires multiple additonal database accesses
(slower) and could enlarge delivered .html page sizes dramatically.
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
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
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
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 <br> separated lists (for SearchPages,
PageIndex, MostVisitedPages, and so on).
plugins/appearance/listpages_ul
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ �������������������������������
Creates real <ul> 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.
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.
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).
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
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
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
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.
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.
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
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.
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 <pre> text, but with WikiLinking enabled (which
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.
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
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
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:
plugins/markup/footnotes
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ������������������������
Introduces the ability to generate footnotes by placing an
explanation into double curly brackets {{footnote text}}.
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.
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.
plugins/markup/htmltbl
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ����������������������
Provides a block escape to use the standard html <table> code
instead of the limited pipe syntax provided by ewiki. It will parse
for <tr> and <td> tags and strip any not registered attributes to
plugins/markup_rescuehtml
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ �������������������������
Allows to use some 'safe' HTML tags within the WikiPage. This
plugin replaces the previous EWIKI_RESCUE_HTML constant.
..................................................................
: The code of this module is covered by the GPL license, as it :
: was copied verbatim from the PhpWiki project. :
- ··································································
+ ������������������������������������������������������������������
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
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).
<?plugin BackLinks ?>
mpi_multimedia
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ��������������
Allows to <embed> 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.
mpi_insert
- ¯¯¯¯¯¯¯¯¯¯
+ ����������
Allows to insert another readily rendered WikiPage into the current
one, usually inside of a <table border="1">.
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).
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
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).
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
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 <input> 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
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.
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).
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
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
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
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
plugins/filter/f_msiepng
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ������������������������
Converts .png <img> 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
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.
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).
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.
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
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
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).
..................................................................
: 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.
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
control
- ¯¯¯¯¯¯¯
+ �������
Allows changing per-page settings, and adds a easily accessible
"page control" action link below every page.
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
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
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
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-*"
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
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.
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
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.
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.
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
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
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.
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
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
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
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
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
tools/wiki2html
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ���������������
Renders the WikiPages and saves the resulting <HTML> bodies into
files. It currently cannot deal with images and binary content
correctly.
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
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.
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
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"
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).
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.
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
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.
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.
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
binary.php
- ¯¯¯¯¯¯¯¯¯¯
+ ����������
If your ewiki wrapper script is not binary safe (that is, eventually
printing some <html> or text output to stdout before you include()
the core ewiki script and called the ewiki_page() function) - then
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).
fragments/css/*
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
+ ���������������
Please understand the *.css as examples that illustrate which style classes
are defined inside ewiki.php and its companion plugins.
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,
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
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
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:
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.
["edit_patch"][0] - special hook for the patchsaving plugin
= function ($id, &$data)
-bloat extensions
+bloat extensions
----------------
["auth_*"][] - plugin tasks used with ewiki_auth()
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
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
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.
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).
$iii[0] = array("WikiSource...",0xFFFF,"core"),
$iii[1] = array("<b>....",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
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
$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
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.
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/
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
Autor
-¯¯¯¯¯
-Mario Salzer <milky*erphesfurt·de>
+�����
+Mario Salzer <milky*erphesfurt�de>
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
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 ;>
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 <html><body> 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:
+
<HTML>
<BODY>
<?php
?>
</BODY>
</HTML>
-
-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" );
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";
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):
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\r
created: 1046532697\r
lastmodified: 1046532697\r
refs: \nErfurtWiki\nNewestPages\n\r
- \r
+\r
!! WikiSourceContent
<more-text>...
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.
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 <FORMular>, ...)
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()
--------------
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.
$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 <TITLE> 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.
$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.
$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
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
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:
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.
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.
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
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.
-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.
-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.
#-- 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", "");
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
(?<![~!])
((?:(?:\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 [!~]?(
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)!",
$o = ewiki_t("THANKSFORCONTRIBUTION") . $o;
}
-
+
if (EWIKI_HIT_COUNTING) {
ewiki_database("HIT", $data);
}
## 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"];
$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);
}
else {
return(NULL); #-- could not guess it
}
-
+
#$url = "http://" . $_SERVER["SERVER_NAME"] . $url;
return($url);
}
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);
}
##### BEGIN MOODLE ADDITION #####
}
$o .= ewiki_list_pages($sorted);
-
+
return($o);
}
$o .= ewiki_list_pages($found);
}
-
+
return($o);
}
$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",
$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
#-- permission checks
if (isset($ewiki_ring)) {
$ring = $ewiki_ring;
- } else {
+ } else {
$ring = 3;
}
$flags = @$data["flags"];
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");
#-- 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(
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 #####
##### 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);
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>"
. "<br /><br /><hr noshade><br />"
. "</div>"
);
-#### END MOODLE CHANGES
+#### END MOODLE CHANGES
}
}
}
- if ($data["lastmodified"] >= UNIX_MILLENNIUM) {
+ if ($data["lastmodified"] >= UNIX_MILLENNIUM) {
$o .= '<small>' . strftime(ewiki_t("LASTCHANGED"), @$data["lastmodified"]) . '</small>';
}
"close" => array(),
);
#-- aliases
- $in = &$s["in"];
+ $in = &$s["in"];
$line = &$s["line"];
$lines = &$s["lines"];
$para = &$s["para"];
$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(
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);
}
#-- wiki markup ------------------------------------------------------
$para = "";
- $in = -1;
+ $in = -1;
while ((++$in) < count($iii)) {
#-- wikimarkup
if ($iii[$in][1] & 0x0001) {
$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>";
}
#-- headlines
if (($c0 == "!") && ($excl = strspn($line, "!"))) {
- if ($excl > 3) {
+ if ($excl > 3) {
$excl = 3;
}
$line = substr($line, $excl);
$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"]--;
}
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>";
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 #####
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"]))) {
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";
}
*/
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
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);
$href = str_replace($f, $t, $href);
}
}
-
+
#-- anchors
$href2 = "";
if (($p = strrpos($href, "#")) && ($p) && ($href[$p-1] != "&")) {
#-- 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
}
#-- 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, ":");
}
-/*
+/*
implements FeatureWiki:InterMapWalking
*/
function ewiki_intermap_walking($id, &$data, $action) {
}
#-- 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}")) {
#-- 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"])) {
#-- 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
$result = ewiki_binary_save_image($filename, $id, "RETURN", $add_meta);
}
- }
+ }
#-- deliver
if ($result && !$break) {
else {
$data = array(
"id" => $id,
- "version" => 1,
+ "version" => 1,
"flags" => EWIKI_DB_F_DISABLED,
"lastmodified" => time(),
"created" => time(),
header("Location: $id");
ewiki_log("imgcache: did not find '$id', and marked it now in database as DISABLED", 2);
}
-
+
}
#-- "we don't sell this!"
#-- 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,
"meta" => &$meta,
"content" => &$content,
);
-
+
#-- write if not exist
$exists = ewiki_database("FIND", array($id));
if (! $exists[$id] ) {
"_" => "",
" " => "",
"+" => "");
-
+
$translation=get_string(strtolower(strtr($const,$replacechars)),"wiki",$repl);
return $translation;
##### END MOODLE ADDITION #####
-
+
/* global $ewiki_t;
#-- use default language wishes
#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;
#-- 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);
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);
}
foreach ($this->keys as $key) {
$row[$key] = $r[$key];
}
- } else {
+ } else {
$row = $r;
}
}
unset($r);
}
- else {
+ else {
return(NULL); // no more entries
}
<?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
#-- 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
die();
}
-?>
\ No newline at end of file
include("ewiki.php");
-?>
\ No newline at end of file
td.caltoday{
background-color:#D7CFC7;
font-family: Verdana, Arial, sans-serif;
- font-size: 8pt;
+ font-size: 8pt;
text-align:right;
}
a.calpg{
#
# 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.
#
#-- choose size
-N=$1
+N=$1
if [ -z "$N" ] ; then
N=0
fi
include("footer.php");
-?>
+
#-- 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(
-?>
+
<?php
-/*
+/*
* Wiki-Engine from "ErfurtWiki", Mario Salzer <milky@erphesfurt.de>
* Adapted by Frank Luithle <sigi@fsinfo.cs.uni-sb.de>
*
return($str);
}
-?>
+
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
$ewiki_t["en"]["ATTACHMENTS"] = "attachments";
-$ewiki_t["de"]["ATTACHMENTS"] = "Anhänge";
+$ewiki_t["de"]["ATTACHMENTS"] = "Anh�nge";
// }
// 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
-?>
+
#
# Additionally it generates faked/trap email addresses to annoy the
# marketing mafia.
-
+
#-- change these from time to time:
define("EWIKI_PAGE_EMAIL", "ProtectedEmail");
case -1: // decode
$string = base64_decode($string);
$string = str_rot17($string);
- break;
+ break;
case 2: // url
$string = ewiki_script("", EWIKI_PAGE_EMAIL,
global $ewiki_config;
$ewiki_up_requestlv = optional_param(EWIKI_UP_REQUESTLV, 0, PARAM_CLEAN);
-
+
$html = "";
srand(time()/17-1000*microtime());
}
-?>
+
/*** this disallows Win32 ***/
if ( (DIRECTORY_SEPARATOR!="/") && !EWIKI_IMAGERESIZE_WIN
|| (strpos($mime, "image/")!==0) )
- {
+ {
return(false);
}
}
-?>
\ No newline at end of file
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.
*/
$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 />";
}
}
-?>
+
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"] = "";
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");
}
-?>
\ No newline at end of file
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\83", "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"),
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"),
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\9bÃ", "application/data"),
- array(0, 4, 0, "\x00\x03\9bî", "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"),
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"),
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"),
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"),
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"),
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\9aÃŽ", "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"),
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\88", "application/x-executable-file"),
- array(0, 2, 0, "\x01\8f", "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"),
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\7f", "application/x-filesystem"),
- array(0x410, 2, 0, "\x13\8f", "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"),
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"),
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, "\97\x01", "application/x-executable-file"),
- array(0, 2, 0, "\94\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"),
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"),
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, "\95j¦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"),
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"),
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"),
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"),
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\81l", "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, "\81\x01\x00\x00", "application/x-object-file"),
- array(0, 4, 0, "\87\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"),
-?>
\ No newline at end of file
a WikiLink to explain a more complex task on another page;
your decision
-*/
+*/
#-- 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
$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
-<?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
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();
$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",
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 = '';
<?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
$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;
}
$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")) : "";
$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));
// $o = format_text($o, $moodle_format);
}
-
-
+
+
ewiki_t("DWNL_ENTRY_FORMAT", $info);
return($o);
}
-?>
+
-<?php // $Id$
+<?php
/*
This filter plugin implements minimal html tag balancing, and can also
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).
*/
}
-?>
+
-<?php // $Id$
+<?php
/*
This plugin intercepts some of the binary handling functions to
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";
}
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")) {
}
print_error('uploaderror', 'wiki', '', $um->print_upload_log(true));
return false;
-
+
}
print_error('cannotacceptbin', 'wiki');
return 0;
}
-
-
+
+
$filepath=moodle_binary_get_path($id, $meta, $course, $wiki, $userid, $groupid);
if (file_exists($filepath)) {
readfile($filepath);
//}
}
-?>
+
-<?php // $Id$
+<?php
/*
CSS-highlights the terms used as search patterns. This is done
em.highlight {
color: red;
}
-
+
em.marker {
background: yellow;
}
#-- 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)) {
} // func
-?>
+
-<?php // $Id$
+<?php
/*
Can be used to allow preserving of certain "safe" HTML <tags>
$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) {
/*
}
-?>
+
-<?php // $Id$
+<?php
# ToDo: Binary Content
# Binary Linking
/*
body {
background-color:#eeeeff;
padding:2px;
- }
-
+ }
+
H2 {
background:#000000;
color:#ffffff;
}
-->
</style>
- ';
-
+ ';
+
function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
global $userid, $groupid, $cm, $wikipage, $wiki, $course, $CFG, $OUTPUT;
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":"";
'<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";
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";
$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";
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"])) {
}
}
}
-
+
/// HTML-Export
if($exportformats==1) {
#-- if exportformats is html
</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"])){
$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)));
}
}
- # 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>";
#} else {
# die();
#}
-
+
/// Create/Set Directory
$wname=clean_filename(strip_tags(format_string($wiki->name,true)));
if($exportdestinations) {
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
} 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(
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);
# "mode" => 0664 | (($row["flags"]&EWIKI_DB_F_WRITEABLE)?0002:0000),
# ), $complevel);
}
-
+
#-- create index page
/// HTML-Export
if($exportformats==1) {
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");
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);
}
#exit();
return false;
} else {
- return get_string("exportsuccessful","wiki")."<br />";
+ return get_string("exportsuccessful","wiki")."<br />";
}
}
}
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;
}
-?>
+
-<?php // $Id$
+<?php
/*
This plugin will create a sitemap rooted at the given location
$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.
$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])){
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")." ";
$o.='<a href="'.ewiki_script('sitemap/',$root).'">'.$root.'</a> ';
}
}
-
+
$o.="</p>";
//checks to see if the user is allowed to view the root page
$o .= ewiki_t("INVALIDROOT");
return $o;
}
-
+
//$timesitemap=getmicrotime();
$a_sitemap=ewiki_sitemap_create($str_rootid, $a_validpages, EWIKI_SITEMAP_DEPTH);
$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){
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) {
$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");
} else {
$a_sitemap[$str_root]=array("level" => $i_level);
}
- }
+ }
}
-}
+}
/*
$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
$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);
}
return $a_sitemap;
}
-?>
+
-<?php // $Id$
+<?php
# lists pages, which were referenced
# but not yet written
while ($row = $result->get()) {
if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $uu, "view")) {
continue;
- }
+ }
$refs .= $row["refs"];
}
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>")) {
}
}
#-- print out
-
+
if ($printul) {
- $o .= "<ul>";
+ $o .= "<ul>";
foreach ($wanted as $page) {
$link = ewiki_link_regex_callback(array($page, $page));
return($o);
}
-?>
+
$mailto = ewiki_notify_links($data["content"], 0);
if (!count($mailto)) {
- return(false);
+ return(false);
}
#-- generate diff
-?>
\ No newline at end of file
$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;
+ }
}
}
}
-?>
+
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"];
}
-?>
+
"GET",
array("id"=>$id, "version"=>$version)
);
- if (!$base) {
+ if (!$base) {
return(false);
}
fwrite($f, $base["content"]);
fclose($f);
}
- else {
+ else {
return(false);
}
fwrite($f, $content);
fclose($f);
}
- else {
+ else {
unlink($fn_base);
return(false);
}
fwrite($f, $data["content"]);
fclose($f);
}
- else {
+ else {
unlink($fn_base);
unlink($fn_requ);
return(false);
}
-?>
\ No newline at end of file
}
-?>
\ No newline at end of file
$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.
*/
-?>
+
$versionsql = "AND version = :version";
} else {
$versionsql = "";
-
+
}
# $result = mysql_query("SELECT * FROM " . EWIKI_DB_TABLE_NAME
-<?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
if (!isset($cachedcourseid) || $cachedcourseid !== (int)$courseid) {
$wikipagelist = array();
$nothingtodo = false;
- }
+ }
$cachedcourseid = (int)$courseid;
if (!empty($nothingtodo)) { // We've been here in this page already
/// 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')) {
return filter_phrases($text, $wikipagelist);
}
-?>
+
echo $OUTPUT->footer();
-?>
+
/**
* 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
*/
function wiki_add_instance($wiki) {
global $DB;
-
+
$wiki->timemodified = time();
# May have to add extra stuff in here #
*/
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;
}
*/
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');
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
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;
/// 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;
}
break;
}
-
+
return $wikis;
}
if($binary) {
$links["FileDownload"]=get_string("filedownload", "wiki");
}
-
+
$name = null;
if (preg_match('/([a-zA-Z0-9\-_]*)=$/', EWIKI_SCRIPT, $matches)) {
$name = $matches[1];
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];
<?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
$DB->delete_records('wiki_locks', array('pagename'=>$pagename, 'wikiid'=>$wiki->id));
redirect("view.php?id=$id&page=".urlencode($page));
-?>
+
-<?PHP //$Id$
+<?php
//This php script contains all the stuff to backup/restore
//wiki mods
}
return $status;
}
-
+
function wiki_restore_files ($oldwikiid, $newwikiid, $oldentryid, $newentryid, $restore) {
global $CFG;
//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);
//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);
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);
}
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
return $status;
}
-?>
+
<?php
die;
-?>
\ No newline at end of file
-<?PHP // $Id$
+<?php
/////////////////////////////////////////////////////////////////////////////////
/// Code fragment to define the version of Wiki
$module->requires = 2009041700; // The current module version (Date: YYYYMMDDXX)
$module->cron = 3600; // Period for cron to check this module (secs)
-?>
+
';
echo $OUTPUT->footer();
-?>
+