Hi core developers...,
Looking at method preload (Article.php) you can see that <includeonly> tags will be swept.
Is it by mischance or by consciously decision that <noinclude>...</noinclude> parts remain?
Since we do not want to hack the original source code and hooks are not provided her - so:
Would it be reasonable to add this $text = preg_replace( '/<noinclude>.*?</noinclude>/s', '', $text ); into the main source code branch?
Greetings.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Uwe Baumbach wrote:
Hi core developers...,
Looking at method preload (Article.php) you can see that <includeonly> tags will be swept.
There is no "preload" method in Article.php.
Do you mean getPreloadedText() in EditPage?
Is it by mischance or by consciously decision that <noinclude>...</noinclude> parts remain?
Sounds normal to me; you either keep the parts for includes or the parts that aren't for includes.
<includeonly> -> when not including, remove this <onlyinclude> -> when including, remove anything outside this <noinclude> -> when including, remove this
However the code that's there doesn't make sense to me; it appears to be removing only the actual <includeonly> and </includeonly> start and end tags, not their content.
Would it be reasonable to add this $text = preg_replace( '/<noinclude>.*?</noinclude>/s', '', $text ); into the main source code branch?
Wouldn't that lead to a confusing mix of both?
- -- brion vibber (brion @ pobox.com / brion @ wikimedia.org)
brion wrote:
<includeonly> -> when not including, remove this <onlyinclude> -> when including, remove anything outside this <noinclude> -> when including, remove this
[...]
Wouldn't that lead to a confusing mix of both?
Well... i'm already confused :P
-- chris
Me too. Let me see if I can get it right. On Mar 16, 2007, at 8:32 AM, christoph.huesler@css.ch wrote:
brion wrote:
<includeonly> -> when not including, remove this
Shows up when the page is included in another but not when viewed under its own title?
Page Foo abc<includeonly>def</includeonly>ghi
Views as
abcghi
Page Bar {{:Foo}}
Views as
def
<onlyinclude> -> when including, remove anything outside this <noinclude> -> when including, remove this
Are these the same? Page Foo <noinclude>abc</noinclude>def<noinclude>ghi</noinclude>
abc<onlyinclude>def</onlyinclude>ghi
View both as
abcdefghi
Page Bar
{{:Foo}}
Views as
def
[...]
Wouldn't that lead to a confusing mix of both?
Well... i'm already confused :P
-- chris
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
Are these the same? Page Foo <noinclude>abc</noinclude>def<noinclude>ghi</noinclude>
abc<onlyinclude>def</onlyinclude>ghi
No. My understanding is that these will render respectively (when viewed normally) as:
abcdefghi
abcghi
And will both appear transcluded as:
def
-- Jim
On 3/16/07, Jim Hu jimhu@tamu.edu wrote:
Me too. Let me see if I can get it right. On Mar 16, 2007, at 8:32 AM, christoph.huesler@css.ch wrote:
brion wrote:
<includeonly> -> when not including, remove this
Shows up when the page is included in another but not when viewed under its own title?
Page Foo abc<includeonly>def</includeonly>ghi
Views as
abcghi
Page Bar {{:Foo}}
Views as
def
<onlyinclude> -> when including, remove anything outside this <noinclude> -> when including, remove this
Are these the same? Page Foo <noinclude>abc</noinclude>def<noinclude>ghi</noinclude>
abc<onlyinclude>def</onlyinclude>ghi
View both as
abcdefghi
Page Bar
{{:Foo}}
Views as
def
[...]
Wouldn't that lead to a confusing mix of both?
Well... i'm already confused :P
-- chris
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
Disregard - I think they're the same :)
(Misread <onlyinclude> - teaches me to test before posting)
-- Jim
On 3/16/07, Jim Wilson wilson.jim.r@gmail.com wrote:
Are these the same? Page Foo <noinclude>abc</noinclude>def<noinclude>ghi</noinclude>
abc<onlyinclude>def</onlyinclude>ghi
No. My understanding is that these will render respectively (when viewed normally) as:
abcdefghi abcghi
And will both appear transcluded as:
def
-- Jim
On 3/16/07, Jim Hu jimhu@tamu.edu wrote:
Me too. Let me see if I can get it right. On Mar 16, 2007, at 8:32 AM, christoph.huesler@css.ch wrote:
brion wrote:
<includeonly> -> when not including, remove this
Shows up when the page is included in another but not when viewed under its own title?
Page Foo abc<includeonly>def</includeonly>ghi
Views as
abcghi
Page Bar {{:Foo}}
Views as
def
<onlyinclude> -> when including, remove anything outside this <noinclude> -> when including, remove this
Are these the same? Page Foo <noinclude>abc</noinclude>def<noinclude>ghi</noinclude>
abc<onlyinclude>def</onlyinclude>ghi
View both as
abcdefghi
Page Bar
{{:Foo}}
Views as
def
[...]
Wouldn't that lead to a confusing mix of both?
Well... i'm already confused :P
-- chris
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org