Last modified: 2010-05-15 14:35:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T3436, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1436 - Add a template expansion paramater to action=raw
Add a template expansion paramater to action=raw
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.6.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-30 21:53 UTC by SJ
Modified: 2010-05-15 14:35 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
proposed patch (1.89 KB, patch)
2005-12-17 06:21 UTC, Lupin
Details
Improved patch (3.01 KB, patch)
2005-12-17 14:16 UTC, Ævar Arnfjörð Bjarmason
Details
Updated patch, expand all templates (2.95 KB, patch)
2005-12-18 23:51 UTC, Lupin
Details

Description SJ 2005-01-30 21:53:25 UTC
It should be possible to show the wiki source of a page, regardless of how it
was rendered.  Currently, this is not possible; layers of templates and template
parameters can make the "source" one sees far removed from the generated content.

To truly make content available for easy reuse in another wiki, it should be
possible to extract a cleaner source copy than the HTML source of the rendered
browser page.  In the same sense, MW should offer "show wiki source" for the
page /it/ renders.
Comment 1 Lupin 2005-12-17 06:21:11 UTC
Created attachment 1206 [details]
proposed patch

Here's a patch - I don't know how robust it is. Please test! To use it, specify
action=raw&expandtemplates=true in the url.
Comment 2 Ævar Arnfjörð Bjarmason 2005-12-17 14:16:11 UTC
Created attachment 1208 [details]
Improved patch

Improved the patch a bit and cleaned up some code, there's still an issue with
it (and yours) it only does replacing of first-level templates, not
second-level, third leve...
Comment 3 Lupin 2005-12-17 15:09:48 UTC
To get arbitrary-level expansion, it looks to me as if we want to use
$wgParser->replaceVariables instead of $wgParser->transformMsg. However, this
method is marked private in the comments, and I don't know how to invoke it
correctly.
Comment 4 Lupin 2005-12-18 23:51:32 UTC
Created attachment 1211 [details]
Updated patch, expand all templates

This patch should expand all templates, including those hidden inside other
templates.
Comment 5 Ævar Arnfjörð Bjarmason 2005-12-19 01:04:54 UTC
FIXED in CVS HEAD

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links