breaks (X)HTML validation as well as the general rule of rejecting
unknown tags by showing them as text. (<nowiki> is never unknown of course,
so it never appears. Just its text remains raw.)
_page_ links to category pages like [[:category:Some cat]] will stay in
links/brokenlinks and not be listed in the category page list anymore.
A link can optionally specify a sort key like this: [[category:cat|Sort me]].
The page will then be sorted in category lists according to the given text
instead of the page name; thus categories may be sorted arbitrarily, by
last name or whatever.
There is also a timestamp field included on gwicke's request; this is not
used yet. Also it will currently be updated at every edit of the page,
this can be changed by implementing differential updating for the cat links.
TODO:
* Make sure that automatic sort keys are updated on page rename.
* Make sure cateory pages get cache-invalidated and purged
* Use proper text sorting instead of raw binary sort
* Allow specification of the display style on category pages: comma list
or bullet list or number list; by sortkey or by timestamp; etc
formatted first and thus cause a duplicate TOC, the internal parser now has
an isMain parameter to specify whether it is called from the main article
text, or from a template.
Automatic or manual collapsing and expanding of long pages.
Pages can be collapsed automatically according to a size threshold
set in the user preferences. Pages can be collapsed manually by clicking
the "Collapse" link in the TOC.
When a page is collapsed, only the intro & TOC are displayed. The
individual TOC lines link to section views, which can be individually edited
(classic section editing).
Section editing/viewing behavior has also been improved. When a section
with subsections is viewed or edited, all subsections are also loaded.
Known issues:
- After saving a section, we return to the full article view
rather than the section view, even if we previously were in section view
mode.
- Should work with Standard and Monobook, not tested with Cologne Blue yet.
- In Monobook, no backlink to the mother article is shown during section
viewing (Gabriel, can you fix that?)
Also, urlencode anchor names for non-ascii compatibility. This is the
recommendation of HTML 4.01 standard in B.2.1, as far as I can tell.
Works in UTF-8 at least for IE6/win, Firefox, Safari.
in wiki markup. Note that <nowiki>, <pre>, <math> etc are counted as wiki
markup. That <pre> looks like HTML's <pre> is a coincidence; they behave
differently (<pre> also disables other wiki markup like <nowiki> does).
Also, escape the <math> tag when $wgUseTeX is off.
disabled via disable_functions in php.ini (bug #928168)
The PHPTal skin doesn't function unless the PEAR bits are in include_path,
so it's disabled if ini_set can't be used. If the files are manually placed
or a real PEAR installation is available with the right stuff, one can
use $wgUsePHPTal = true;
There are likely other things that need to be taken into account for
restricted environments. Maintenance scripts haven't been tweaked for
such an environment yet either.
* error reporting if tidy doesn't honour force-output option *and* html is severely broken (if unknown elements are encountered), never return uncleaned version
Disabled by default, set $wgUseTidy = true to enable
Possible improvements:
* Tweaking it to work on windows (don't know if that's possible)
* use the php5 built-in tidy module if available, that seems to allow a fine-grained config on which tags are allowed as well (see http://www.php.net/manual/en/ref.tidy.php)
Also put sensible names on many variables in doBlockLevels() and added
some comments.
This partial fix requires there to be a space prior to the post-; : to get
parsed as the definition:
; def title : def text
thus it doesn't trigger on a URL or namesapce properly written:
; def title [http://link] : def text
However the regexp will fail and break things if there's an actual space
before a : in the link, which is possible in piped text etc. It may be
desirable to deal with this at the tokenizer level, to keep it clear
of links, tags, etc.
<nowiki> or <!-- .. --> tags would cause it to miscount section
numbers. Parser::extractTags modified to allow stripping HTML comments
as well. Note: Presently HTML comments are completeley removed from
the output using preg_replace. Should they ever be rendered instead,
Parser::extractTags should be used.
* pre nesting problem fixed by matching against $uniq_prefix . '-' . $tag, marker changed to this format. If stripped areas shouldn't be nested in p's, add those tags to the $inBlockElem = false; regex in doBlockLevels
Basicly creating an internal link with a <nowiki> thing generate bad link in the database (using a NaodW29). I used the unstrip function of parser.php to remove that from the text before it is send to the internal link handler. Seems to fix things quite well
fixed problems:
* surplus closing p's
* invalid nesting of table / div (floated images) / hr in <p>'s
* generation of multiple empty p's
* invalid nesting of section editing spans
* invalid anchor names- attention! this might break links! Replacing [^a-z0-9] -> '_' now
known issues:
* needs a space at the beginning of the first line in the wikisource to parse leading ''', * and similar
print command on a regular page will actually use the print stylesheet.
Explicitly following the printable link will also show the printable view
on screen.
CAVEATS: IE/Win may oversimplify the link style in what should be colored
or underlined text. Page title is not shown in Nostalgia skin printable
view. Part of the footer is duplicated in the output and will be visible in a styleless
user agent (lynx, really old Netscape, etc). Some render options aren't
totally handled right for printable, such as ? brokenlinks.
Also, section edit links are now available in diff view if the dest rev is
the current revision.
Some misc code clean-up and formatting as well.
* Split MediaWiki namespace into MediaWiki and Template (requires changes to all language files)
* Purge links to on edit of Template namespace
* General refactoring of purging and cache invalidation code
When a title is given in a == == headline, the html was incorectly generated as:
<a name="sectionname"></a><a class="internal">link</a>
It now generates:
<a class="internal" name="sectioname">link</a>
This saves trouble in a number of places where we can now do joins with the link tables to get other info (such as cur_is_redirect!) as well as the name, and fewer bits need to be juggled on page renaming, as outgoing links no longer have to be changed (cur_id remains the same when a page is renamed).
rebuildLinks.inc and some of the tools in the 'maintenance page' still need to be updated to work with the new setup. (Special:Maintenance needs a *lot* of cleanup in general. It's kind of a catch-all of vaguely defined features which suck performance like a hydroelectric dam.)
Also I've slipped in some extra debug code. And, I think 'indexes.sql' is a big waste of time and should all be moved into tables.sql. Building indexes separately doesn't help on InnoDB and won't do anything on MyISAM either if you're just going to replace the table after it's built with an imported one from a dump which creates it with indexes.
object to encapsulate the handling of get/post variables:
The following grab something out of $_REQUEST. The first parameter is the
variable name and is required. The second is an optional default value:
$wgRequest->getVal() - any type, returns NULL if no default given
$wgRequest->getInt() - forced integer, 0 default
$wgRequest->getText() - runs through $wgLang->recodeInput()
$wgRequest->getBool() - return true/false
$wgRequest->getCheck() - returns true if the var is set, even if to ""
$wgRequest strips slashes at initialization if necessary.
Also in this fine object:
$wgRequest->wasPosted() - returns false if this wasn't a real form post,
so we can protect against faked submissions in get urls.
There's still plenty of work to do, not everything uses the new functions
yet. To test the strict mode, do define('DEBUG_GLOBALS', 1);
practical, clear methods:
Title::getLocalURL() - "/wiki/index.php/Foobar" or "/wiki/index.php?title=Foobar&action=edit"
Title::getFullUrl() - ditto with $wgServer on the front
Title::getInternalUrl() - ditto with $wgInternalServer on the front (for some squid-related functions)
Title::escapeLocalUrl() - local URL escaped for HTML output
Title::escapeFullUrl() - full URL escaped for HTML output
All take an optional query parameter.
Title::getURL(), wfFullUrl() and wfFullUrlE() are now officially
deprecated and will result in instant death. wfLocalUrl() and wfLocalUrlE()
will be killed shortly; they are still used in the language files.
* Converted many instances of globals from the query to $_REQUEST
* Renamed near-useless Title::getURL() to Title::getPartialURL()
* Created new Title::getURL(), to replace wfLocalUrl, wfLocalUrlE, wfFullUrl and wfFullUrlE. Replaced most instances throughout the code
* In Parser.php, generalised stripping of <nowiki>, <pre> and <math> to allow more general use such as nesting
* Moved body of Article::preSaveTransform to Parser.php
* Put lots of comments in Title.php
processing.
Using this hook, added a conversion of spaces to non-breaking
spaces for the French wikipedia.
Switched ----- -> <hr> processing to tokenizer.
Tokenizer is a new class that splits a text into tokens.
Parser calls the tokenizer to get one token by another and
handle them one by one.
Parser:doAllQuotes and Parser:replaceInternalLinks have been
replaced by the new parser.
Image thumbnailing now allows links in the captions.