Commit graph

340 commits

Author SHA1 Message Date
Jens Frank
f3a14034f4 use sortkey for subcategories, too 2004-06-10 12:06:25 +00:00
Tim Starling
3ac0a71c13 Hiero and timeline as fully modular extensions. To use, just include the header file from LocalSettings.php 2004-06-09 12:15:42 +00:00
Jens Frank
07db37945d Don't show underscores instead of spaces for subcategories. BUG #969473 2004-06-09 12:07:32 +00:00
Antoine Musso
107062dbba Replacement of most double quotes by single quotes for plain text strings. Should be bug free as I did not make change unless I was sure it was bug less. 2004-06-08 18:11:28 +00:00
Antoine Musso
e197696c58 Don't generate article list if we have no article to show 2004-06-07 08:27:13 +00:00
Antoine Musso
c629470933 bug fix in newcategorymagic: first char was alway the one of the category namespace (aka C) 2004-06-07 03:46:33 +00:00
Jens Frank
29c1135460 new layout for Category:XXX pages.
Can be turned on or off using MediaWiki:Usenewcategorypage
2004-06-06 09:24:07 +00:00
Antoine Musso
6ec37b9507 some comments added 2004-06-05 15:17:08 +00:00
Gabriel Wicke
c410b3f316 section anchor cleanup, unurlencode : 2004-06-05 10:34:32 +00:00
Tim Starling
2650e92361 More profiling sections 2004-06-05 04:51:24 +00:00
Tim Starling
242d225e10 removed non-matching wfProfileOut() calls 2004-06-05 02:22:16 +00:00
Gabriel Wicke
94c2a67f51 /tr added to tags 2004-06-02 23:22:24 +00:00
Gabriel Wicke
e4562fbd4c The Arab al[[Razi]] cleanup 2004-06-02 22:54:01 +00:00
Gabriel Wicke
6aa81d268b The Arab al[[Razi]] back on board 2004-06-02 22:39:06 +00:00
Gabriel Wicke
a0fbb5e730 section anchor encoding:
'%' -> '.'
pseudo-urlencoded for enough uniqueness in non-ascii languages
2004-06-02 15:19:28 +00:00
Gabriel Wicke
f982803ae9 nowiki handling
* unstrip done for nowiki separately (unstripNoWiki())
* unstripNoWiki() called *after* doBlockLevels
2004-06-02 12:29:15 +00:00
Brion Vibber
5830e7c6f9 Reverting to previous revision; this broke at least one example and I'm not sure why. 2004-06-02 08:01:48 +00:00
Brion Vibber
8f4bf54583 Don't put literal <nowiki>, <hiero>, or <timeline> into the output. This
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.)
2004-06-02 07:43:05 +00:00
Jens Frank
cdd0bae0ab workaround, strip nowikis again in doBlockLevels. BUG #96447 2004-06-02 05:54:52 +00:00
Gabriel Wicke
e30390b38f performance fix 2004-06-02 02:42:13 +00:00
Gabriel Wicke
9feaa3422a sig fix II 2004-06-02 01:22:29 +00:00
Gabriel Wicke
10fa17d61b bug fix: list item with nowiki 2004-06-02 00:39:02 +00:00
Gabriel Wicke
afd3aaa6d1 nowiki handling
nowiki areas are wrapped in <span class="nowiki></span > (allows styling) and treated similar to pre areas in doBlockLevels
2004-06-01 22:19:22 +00:00
Gabriel Wicke
32f3b62bab keep unwrapped text arounf 2004-06-01 11:03:39 +00:00
Gabriel Wicke
c54913969e th matching in doBlockLevels 2004-06-01 07:52:44 +00:00
Gabriel Wicke
6b87eb0077 table handling fix and notice silencing instead of buggy checking in the html strip function 2004-06-01 07:25:48 +00:00
Erik Moeller
cd18b85daa unbreak template parametrization 2004-05-31 21:50:12 +00:00
Jens Frank
9134865cca Only pop an array if it really is an array. BUG # 963554 2004-05-31 13:02:19 +00:00
Jens Frank
e2d600aa8d Fix transclusion inside of tables. BUG #962494 2004-05-31 12:12:18 +00:00
Tim Starling
a713b369c6 Changing handling of newlines in templates 2004-05-31 10:59:39 +00:00
Brion Vibber
6ae494e9e9 <br/> isn't compatible with Netscape 4.x; use <br /> to avoid gratuitously breaking it. (bug 963341) 2004-05-31 00:58:57 +00:00
Antoine Musso
9dc65ef54e fix bug 963205 : text starting with space & ! or ? or : will be <pre>ed instead of space replaced by &nbsp; 2004-05-30 18:36:33 +00:00
Tim Starling
3d1698b760 Fixed $wgCacheEpoch handling 2004-05-30 07:31:26 +00:00
Tim Starling
c479abef0c Removed PST <br> conversion, unnecessary, was annoying people 2004-05-30 02:34:44 +00:00
Tim Starling
d6dc042e00 repaired gwicke's horrible mangling of brace expansion, partial support for nested expansion (restoring 1.2 capabilities) 2004-05-29 05:19:27 +00:00
Tim Starling
d70f59f2c2 quieter tidy errors 2004-05-29 04:51:29 +00:00
Gabriel Wicke
6769ea37c9 bug fixes: no newline at end of includes, interwiki link handling, safety net in the include while loop 2004-05-27 16:08:12 +00:00
Tim Starling
a42101c0a0 Parser cache moved to memcached 2004-05-27 15:24:04 +00:00
Gabriel Wicke
14abd5d7d2 run replaceInternalLinks twice to render links/images in captions of images 2004-05-27 01:38:38 +00:00
Gabriel Wicke
b938a02ef5 image link handling 2004-05-27 01:10:01 +00:00
Gabriel Wicke
3070017d21 adjacent include handling 2004-05-27 00:27:24 +00:00
Gabriel Wicke
2e74792381 typo in magicRFC 2004-05-26 22:03:30 +00:00
Gabriel Wicke
f37a24d487 french space fix 2004-05-26 21:58:03 +00:00
Gabriel Wicke
0958e9dde1 fixed regex 2004-05-26 21:11:54 +00:00
Gabriel Wicke
b97850e021 while instead of if 2004-05-26 21:01:58 +00:00
Gabriel Wicke
e554a146d0 experimental {{foo{{bar}}}} support- Tim, please review this 2004-05-26 20:32:19 +00:00
Gabriel Wicke
4a18c231f9 french spaces return 2004-05-26 18:31:00 +00:00
Gabriel Wicke
3df865dc6b timelines now in strip() 2004-05-26 18:11:52 +00:00
Gabriel Wicke
6d41132f82 temporary removal of tokenizer for performance
To be done:
* integrate timelines into strip() / unstrip()
* 'blank' token handling (french spaces, maybe numbers)
2004-05-26 16:29:04 +00:00
Tim Starling
1a5b4b7000 Fixed profiling 2004-05-26 12:30:36 +00:00
Gabriel Wicke
bce772029e accept urlencoded (interwiki) links 2004-05-25 14:26:14 +00:00
Gabriel Wicke
bd2fd09422 pre handling fix 2004-05-24 10:25:49 +00:00
Tim Starling
587f150879 Changing template argument syntax from {{arg}} to {{{arg}}} 2004-05-23 03:39:24 +00:00
Tim Starling
6a6489ac07 fixed weird bug causing meta to fail spectacularly 2004-05-23 01:21:04 +00:00
Gabriel Wicke
4bcf953707 allow paragraphing inside div's 2004-05-22 18:22:05 +00:00
Brion Vibber
ac9621badb Add categorylinks table to separately list category relationships. Actual
_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
2004-05-15 00:29:39 +00:00
Gabriel Wicke
53acea5138 don't create a pre for a whitespace-only line 2004-05-14 22:09:33 +00:00
Gabriel Wicke
32c2c1272a strip out urlencoded \&nbsp; (inserted for french spaces, e.g. first space in 'something : something') for section anchors 2004-05-14 13:38:33 +00:00
Gabriel Wicke
51be5ecccf accidentially removed nl fix 2004-05-14 01:18:12 +00:00
Gabriel Wicke
d181a35170 Made strong/em handling more forgiving against unbalanced ticks
* close any open em's or strong tags before each heading
* close any open em's or strong's at the end of the text
2004-05-14 00:18:43 +00:00
Jens Frank
60ffb9f53a fixed '''Caesar''''s bug where 4 ticks where not properly handled. 2004-05-13 20:48:34 +00:00
Jens Frank
f2752c7fc0 Repaired rendering of ''emph ''' bold emph '' bold ''' to produce valid HTML. 2004-05-13 19:47:09 +00:00
Erik Moeller
2b029cff36 fix duplicate TOC problem again, which is independent of section folding
feature (occurred when template contained more than three headlines).
2004-05-13 17:16:50 +00:00
Gabriel Wicke
6af7c5ce7b After a longer phone call Erik and me agreed on working on an equivalent feature most likely based on categories that interacts better with caching. More discussion on to follow.
Removed with Erik's agreement.
2004-05-13 14:17:44 +00:00
Erik Moeller
201af52713 restore section folding 2004-05-13 12:20:59 +00:00
Gabriel Wicke
4f9f8df852 Silenced this, $token["pos"] was undefined when parsing '''hi'''''hi'' which created a notice. Output is fine, so silencing it should be ok. 2004-05-13 12:08:02 +00:00
Gabriel Wicke
df08e4792a removed section folding 2004-05-13 11:54:19 +00:00
Erik Moeller
ac44b37065 fix collapsing problem with templates (templates would be expanded and
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.
2004-05-12 22:01:25 +00:00
Erik Moeller
cc357845fc fix a couple of section collapsing bugs 2004-05-12 21:38:01 +00:00
Erik Moeller
c245bfe3ae fix a =/== typo 2004-05-12 13:55:40 +00:00
Erik Moeller
472272dc61 New feature:
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?)
2004-05-12 13:26:36 +00:00
Gabriel Wicke
fd7106bf4c preserve newline before braced variables 2004-05-12 12:48:36 +00:00
Brion Vibber
33f1e77c11 PHP 4.1.2 compatibility fixes (based on patch submission by Asheesh Laroia)
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.
2004-05-10 01:54:56 +00:00
Brion Vibber
5bcd470847 Add $wgUserHtml option; set to false to disable use of user-supplied HTML
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.
2004-05-09 12:04:59 +00:00
Brion Vibber
762b8e9b47 Allow installing and running the wiki on a server where ini_set has been
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.
2004-05-09 10:37:00 +00:00
Tim Starling
8f22cb45b1 include_once -> require_once 2004-05-07 13:43:10 +00:00
Gabriel Wicke
dc58bc8458 add encoding option 2004-05-07 09:06:45 +00:00
Gabriel Wicke
6267cadb18 pipe for stderr was troublesome on pages with many errors (buffer filled up), generic message now 2004-05-06 21:06:23 +00:00
Gabriel Wicke
315d66c796 * simpler html strip function if tidy is used
* error reporting if tidy doesn't honour force-output option *and* html is severely broken (if unknown elements are encountered), never return uncleaned version
2004-05-06 19:01:05 +00:00
Gabriel Wicke
3a4d20b02f return the uncleaned text if tidy isn't there or if nothing is returned 2004-05-06 13:38:23 +00:00
Gabriel Wicke
c6fe32ac5b New tidy function that uses html tidy (http://tidy.sf.net) to make sure the output is valid xhtml/xml
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)
2004-05-06 12:50:04 +00:00
Gabriel Wicke
4671bf4b40 \n rather than \n (although they both seem to work) 2004-05-02 23:53:10 +00:00
Gabriel Wicke
dea42dfed8 experimental fix to the template-inserts-newline-on-save problem 2004-05-02 23:18:25 +00:00
Gabriel Wicke
96bdd88017 two bug fixes: html comments don't add a paragraph anymore, lang links don't eat following text anymore 2004-05-02 21:27:56 +00:00
Brion Vibber
40e3893b51 Partial fix for #595869 ": in URL after ; parsed as list item"
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.
2004-04-29 06:16:21 +00:00
Erik Moeller
dfecc217ab fix longstanding bug with section editing where section headers within
<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.
2004-04-28 04:50:35 +00:00
Jens Frank
c37ee075be Hooks for Erik Zachte's EasyTimeline extension.
Plus one one-line patch by Dori.
2004-04-26 10:20:54 +00:00
Jens Frank
ad76b42c79 Fixed problems caused by merging of a patch which was generated from an old version 2004-04-24 21:20:32 +00:00
Brion Vibber
f0f5a17d5b Add {{NAMESPACE}} and {{PAGENAME}} magic words. (dori's patch) 2004-04-24 20:19:05 +00:00
Jens Frank
ba15ec0d1b removed debugging code 2004-04-24 10:46:22 +00:00
Jens Frank
b606373905 Handle French typographical rules for spaces before and after punctuation 2004-04-24 10:34:22 +00:00
Brion Vibber
09b9b3a92f Fix category link display for unmade pages; it used to display every page in the database instead of just linking pages 2004-04-24 09:28:22 +00:00
Brion Vibber
95201d803b Fix trail on bolded self-links (bug #938954).
Adds Skin::makeSelfLinkObj. These all have some duplicate code for dealing
with link trails and the link and could probably be folded together more.
2004-04-23 20:13:31 +00:00
Magnus Manske
3b07de6290 Category namespaces 2004-04-21 20:45:00 +00:00
Magnus Manske
de18da5eeb Category namespaces 2004-04-21 20:28:00 +00:00
Magnus Manske
cc1fbbe002 Category namespaces 2004-04-20 21:30:59 +00:00
Magnus Manske
9c9119439f Category namespaces 2004-04-20 21:08:24 +00:00
Gabriel Wicke
f26cfcb59d allow del and ins, other xhtml tags might be worth to allow as well (acronym and similar) 2004-04-19 17:04:22 +00:00
Antoine Musso
0fa4d73384 Fix bug 868957
Allow indentation with spaces in table wikisyntax !
( rtrim -> trim)
2004-04-18 17:26:47 +00:00
Jerome Jamnicky
039760d64f Correct call-time pass by reference in newFromUser()
(fix from Tim Starling)
2004-04-17 11:20:15 +00:00
Gabriel Wicke
ad9c9e6364 \n in " instead of ' 2004-04-16 14:28:03 +00:00
Gabriel Wicke
7822095a10 proper closing of lists when pre follows 2004-04-16 11:21:51 +00:00
Gabriel Wicke
274686b792 use class for center-replacement divs 2004-04-16 00:05:44 +00:00
Gabriel Wicke
34f603fe70 div again, we don't really know what will be inside the center tags. Could be another div for example, or a table. 2004-04-15 16:06:25 +00:00
Gabriel Wicke
919db72fdf forgot to move the actual preg_match as well, p instead of div for center 2004-04-15 16:01:39 +00:00
Gabriel Wicke
c23cb2c9c2 move fixtag replacement before doBlockLevels to avoid div inside pre 2004-04-15 14:59:46 +00:00
Gabriel Wicke
90a58a55d2 no list parsing inside pre areas 2004-04-15 14:25:34 +00:00
Tim Starling
10cf99ecb9 fixing <center>: text-align is a block level element, needs to be in a div 2004-04-15 11:26:29 +00:00
Arne Heizmann
7e25305c3f spelling mistake in comment. 2004-04-12 23:59:37 +00:00
Gabriel Wicke
37e1db3273 doBlockLevels after unstrip to avoid wrapping templates in p's (which is often invalid) 2004-04-12 18:49:55 +00:00
Gabriel Wicke
f39b48539b doBlockLevels and fixtags only in parse(), restored amp regex, ? not valid in anchor names 2004-04-12 16:10:17 +00:00
Tim Starling
5733d21563 template arguments, various improvements to handling of recursive inclusion 2004-04-11 16:46:06 +00:00
Gabriel Wicke
38355c2d18 no doBlockLevels when parsing included messages 2004-04-10 18:03:25 +00:00
Gabriel Wicke
47cdc34af9 asses li and ul to blocklevel regex, those are coming from included templates. 2004-04-10 16:06:30 +00:00
Gabriel Wicke
54717da9f9 paragraphs again, amp matching moved to match stripped areas as well 2004-04-10 15:11:14 +00:00
Erik Moeller
f3eaad894c fix notice 2004-04-10 10:46:17 +00:00
Erik Moeller
83912993db fix notices (jeluf, please enable E_NOTICE in your php.ini, also take a look
at the diff, please)
2004-04-10 10:24:02 +00:00
Erik Moeller
d0229d46bf fix paragraphs again 2004-04-10 06:50:49 +00:00
Brion Vibber
c27d8f8bfa Try to escape unaccompanied ampersands.
This doesn't yet verify that named character entities are valid, however.
2004-04-10 04:28:19 +00:00
Gabriel Wicke
f2ac7b2598 now pre for real 2004-04-10 03:09:52 +00:00
Gabriel Wicke
05eb3bb416 pre area no longer cut in pieces 2004-04-10 03:05:11 +00:00
Gabriel Wicke
158510d926 five quite fix 2004-04-10 02:38:05 +00:00
Gabriel Wicke
f530b18831 no new p on single newline 2004-04-10 01:13:48 +00:00
Gabriel Wicke
f2e949d974 added p to open tags, included templates usually start with a p 2004-04-09 17:44:23 +00:00
Gabriel Wicke
90804e0d92 some cleanup on save 2004-04-09 16:22:12 +00:00
Tim Starling
79258b548a Processing inclusions using recursive parsing rather than substitution halfway through. This fixes several bugs, but introduces some weird behaviour, for example TOC handling 2004-04-09 15:29:33 +00:00
Gabriel Wicke
ccac58dbb4 pre area fixes, ampersand hack 2004-04-09 14:55:12 +00:00
Gabriel Wicke
3e14e94db3 * no empty paragraphs anymore, two blank lines give a <p><br/></p> now.
* removed  $inBlockElem = false bug
* same in formatHeadings
* Todo: stack for nestable block levels
2004-04-09 13:40:50 +00:00
Erik Moeller
2f7946f0bb make doBlockLevels last parser stage again, and fix missing paragraphs from
intro bug
2004-04-09 11:26:27 +00:00
Erik Moeller
248f0aedf1 refix xhtml (I'm going by trial and error here) 2004-04-09 08:17:59 +00:00
Erik Moeller
d6c69e3b94 quickfix for bug that caused
- paragraphs to be stripped from intro sections
- <br> instead of paragraphs after the intro section
will break xhtml
2004-04-09 07:55:37 +00:00
Antoine Musso
cf9a0125d5 new global UNIQ_PREFIX used to init $uniq_prefix in two functions. It prevented the doBlockLevels to parse the escaped <pre> tag. 2004-04-09 07:31:35 +00:00
Tim Starling
9b6a910f1b fixed handling of invalid title in {{double braces}} 2004-04-08 13:47:11 +00:00
Gabriel Wicke
e592d588c4 * doTokenizedParser doesn't assume leading text token anymore, 0 !== false
* 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
2004-04-07 17:56:13 +00:00
Gabriel Wicke
3fba40b06c finally found the reason for the li bug, top a now in skin 2004-04-07 16:12:18 +00:00
Antoine Musso
93b85a43d3 Fix a bug I closed without checking and I cant find right now :(
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
2004-04-07 13:44:14 +00:00
Antoine Musso
90196ec9ca Fix sourceforge bug 872981
Typo ;)
2004-04-07 12:38:01 +00:00
Gabriel Wicke
1c2d1a2662 dirty hack to work around the one-space-at-beginning-required problem 2004-04-05 11:41:41 +00:00
Gabriel Wicke
c5d47384c0 no br if line contains whitespace, no empty line added after parsing interwiki language links 2004-04-05 11:34:13 +00:00
Tim Starling
ba00eafeae Added transformation to wfMsg output, allowing tags such as {{SITENAME}} and {{localurl:Special:Preferences}} in the language files and MediaWiki namespace 2004-04-05 10:38:40 +00:00
Gabriel Wicke
a2bb8422d2 * some fiddling with the remaining pre-inside-p problem
* ' also stripped
2004-04-04 19:56:14 +00:00
Gabriel Wicke
b7100af7e8 fixtags hack slightly cleaned up 2004-04-04 14:48:29 +00:00
Gabriel Wicke
e02c22b027 tocline was missing 2004-04-04 14:15:11 +00:00
Gabriel Wicke
0155f1f84e * anchor stripping now positively defined, only a few explicitly defined invalid characters are replaced by _:
$canonized_headline = preg_replace("/[ &\\/<>\\(\\)\\[\\]=,+]+/", '_', html_entity_decode(trim( $canonized_headline )));
* additional fixes for closing p's in tables
2004-04-04 13:59:45 +00:00
Gabriel Wicke
a19696f511 xhtml tweaks, please review!
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
2004-04-04 01:45:02 +00:00
Brion Vibber
a0506cac17 Basic page rendering and editing now works in XHTML! Yeah!
To test:
	$wgMimeType = "text/xml";
	$wgDocType = "-//W3C//DTD XHTML 1.0 Transitional//EN";
	$wgDTD = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
2004-04-03 10:23:26 +00:00
Brion Vibber
3d2a067e8c HTML tweaks inching towards XHTML-friendly output. To test:
$wgMimeType = "text/xml";
	$wgDocType = "-//W3C//DTD XHTML 1.0 Transitional//EN";
	$wgDTD = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";

Mozilla will spit out angry erorrs at all the well-formedness errors.
2004-04-03 10:01:08 +00:00
Tim Starling
02914ea8c8 __FORCETOC__ to display a TOC even on pages with less than 4 headings, written by Silsor 2004-04-03 04:38:09 +00:00
Magnus Manske
073d13e93d fixing category links, nth time 2004-04-02 20:34:13 +00:00
Tim Starling
e9aa758d7a Removed dependence on register_globals from everything except the special pages. Fixed miscellaneous bugs. 2004-03-29 14:48:07 +00:00
Jens Frank
94c5c43767 renamed replaceInternalLinks to doTokenizedParser 2004-03-28 10:01:13 +00:00
Tim Starling
e12289e771 alterations to allow a command-line wikitext processor 2004-03-27 22:47:25 +00:00
Brion Vibber
dbf5ee150d Fix missing initialization 2004-03-26 21:25:48 +00:00
Mr. E23
80da50e5f6 Experimental support for WikiHiero 2004-03-26 19:02:24 +00:00
Mr. E23
3af17a1fbe forgot to remove some testing code 2004-03-26 17:19:09 +00:00
Mr. E23
b320d46394 Code cleanup for strip() and unstrip() 2004-03-26 17:14:23 +00:00
Gabriel Wicke
6135b741d3 fixed section anchors 2004-03-23 11:37:15 +00:00
Tim Starling
e7b00f8fee allowing redirects in inclusions 2004-03-23 10:16:32 +00:00
Gabriel Wicke
fee06ca65b xhtml tweaks, incomplete. sometimes closing p where there should be none 2004-03-22 23:52:36 +00:00
Brion Vibber
339b742275 Printable mode cleanup. Now done through stylesheets, <link>ed so that the
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.
2004-03-21 11:28:44 +00:00
Arne Heizmann
a25fa64b94 Make ~~~~~ (five tildes) insert just date/time, without [[User:username]] 2004-03-21 03:30:41 +00:00
Tim Starling
2ca258fd03 * Changed inclusion syntax to allow e.g. {{stub}}
* 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
2004-03-20 15:03:26 +00:00
Magnus Manske
c4ba35185d fixing category feature, again 2004-03-20 12:10:25 +00:00
Brion Vibber
8510acd5a4 Clean up initialized variables; fix upload error. 2004-03-20 08:41:33 +00:00
Antoine Musso
f65c2c4601 Fix source forge bug 803693
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>
2004-03-16 14:25:09 +00:00
Antoine Musso
834b876308 fix source forge bug 787780
Allow = sign in headers. Ex:  = my text = crap = will render as <h1>my text = crap</h1>
2004-03-16 03:58:36 +00:00
Antoine Musso
9f7012d8e9 removing a debugging line (echo $variable)... I feel so lame :( 2004-03-16 02:27:42 +00:00
Antoine Musso
92b1a41750 Fix sourceforge bug 872981
Render [[[link]]]  as  [<a href...>link</a>]
Render [[[link|text]]] as [<a href...>text</a>]

UNTESTED with $wgLang->linkPrefixExtension()  true
2004-03-16 02:17:33 +00:00
Jens Frank
88d72e04d1 fixed language linking bug left from elimination of globals 2004-03-14 21:29:30 +00:00
Mr. E23
627e06bda6 Standardizing linebreaks 2004-03-14 00:55:43 +00:00
Brion Vibber
59c6e92429 Some changes to the link tables. They now all use a key on cur_id for the *_from column instead of strings, and have a unique index to force prevent any duplicate entries. There's not yet a clean step in the update script, so just clear out your links tables (patch-linktables.sql) and rebuild them with refreshLinks.php.
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.
2004-03-11 09:06:13 +00:00
Tim Starling
14a51853f3 bug fix, mContainsOldMagic goes in mOutput now 2004-03-08 09:26:23 +00:00
Brion Vibber
014093acc4 More globals and uninitialized variables fixes. Added WebRequest ($wgRequest)
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);
2004-03-08 09:09:35 +00:00
Brion Vibber
51f738ea9a More unitialized variable cleanup && 'pure' register_globals cleanup...
Added wfDebugDieBacktrace() function to help in pinpointing problems by
showing a function call backtrace along with a friendly die message.
2004-03-08 02:50:04 +00:00
Brion Vibber
b59ce22943 Replace the random boolean parameters on Title::getURL() with a set of
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.
2004-03-07 07:26:56 +00:00
Jens Frank
15abb33eed ISBN links disabled insides of [[link]]s, too, upon brions request 2004-03-06 21:51:58 +00:00
Jens Frank
0cf007d5dc disable RFC autolinking inside of [[links]] 2004-03-06 21:45:05 +00:00
Jens Frank
92a3bdd559 Added RFC link magic, similar to ISBN magic 2004-03-06 21:30:42 +00:00
Jens Frank
7e7069ea43 Moved ISBN magic to new parser 2004-03-06 20:04:25 +00:00
Tim Starling
840dee3ad4 * Fixed magic quotes in $_REQUEST, in Setup.php
* 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
2004-03-06 01:49:16 +00:00
Jens Frank
e5306123c1 Added hook to tokenizer and to parser for language specific
processing.

Using this hook, added a conversion of spaces to non-breaking
spaces for the French wikipedia.

Switched -----  -> <hr> processing to tokenizer.
2004-03-02 20:23:56 +00:00
Magnus Manske
74c787aab5 fixing category feature, again 2004-03-01 15:47:55 +00:00
Jens Frank
0449e2d7a4 extended tokenizer to handle prefixed links 2004-02-29 13:33:51 +00:00
Tim Starling
db41d9ae7c Parser improvements: global variable destruction 2004-02-29 08:43:29 +00:00
Jens Frank
7c2a2d5846 Added real parser/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.
2004-02-28 23:38:08 +00:00
Tim Starling
f798585de7 Comments and code formatting 2004-02-28 05:55:13 +00:00
Mr. E23
8c5cecc577 Fix for linkPrefixExtension feature 2004-02-28 02:29:51 +00:00
Tim Starling
634e1dc6c6 lost linestart 2004-02-28 02:09:41 +00:00
Tim Starling
bb8ca6e2c2 minor fixes 2004-02-27 00:08:19 +00:00
Tim Starling
ee73b49007 Split parser from OutputPage into Parser.php, corrected spelling of "suppress", a few other bits and pieces 2004-02-26 13:37:26 +00:00