Page MenuHomePhabricator

« action=render » does not preserve the directionality of pages
Closed, InvalidPublic

Description

Author: gangleri

Description:
Dear friends,

The output of « action=render » does not have any « HTML headers ».

To some extent « action=render » can be used to obtain a page without all the overhead.

However it would be wise to embed the output in a construct as

<div dir="ltr|rtl">

</div>

Best regards Reinhardt [[user:Gangleri]]


Version: unspecified
Severity: normal
URL: http://yi.wikipedia.org/wiki/%D7%92%D7%95%D7%92%D7%A2%D7%9C?action=render

Details

Reference
bz12242

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:57 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz12242.
bzimport added a subscriber: Unknown Object (MLST).

Well, that doesn't solve every problem. Lots of objects in the page are positioned differently in "render" view. As an example, the position of the magnify icon of thumbnail images is set differently in rtl.css, and merely adding a <div dir="rtl"> will not fix it. So in the end, I think "render" mode is not supposed to look like the final page, but is only supposed to output the exact HTML which is produced by the content of the page. In other words, it is the HTML that matters, not the look.

Perhaps a different parameter should be used with index.php to output the content + all required parts of the skin (like the body tag with its direction attribute, skin CSSes, etc).

gangleri wrote:

(In reply to comment #1)

Well, that doesn't solve every problem. ...

Thanks Huji for pointing to the other issues. To understand my needs. I mainly visit an internetcafé where I want to make for some pages a nearly 100% printout of the content only. The setup in this place is horrible and after talking some months to the people maintaining it I realized that printout supporet for Firefox, Konqueror and Opera will not change in this place for years.

I do not need the printout with the option « printable=yes » because I do not need the links generated there. I only want to avoid to get the printout truncated because of the logo, the navigation, toolbog, search, in other languages, footer, etc.

Best regards Reinhardt [[user:Gangleri]]

Now that is something else. For this special case, I think you can create an account on the desired wiki, add some user CSS for your account which hides the logo and all other unwanted parts, and even resizes the content box to fill 100% of the page width, and then print the page. You may find doing all of this a lot easier to do if using a skin other than Monobook.

If that solves your problem, and you think this bug was mainly to answer that problem, we can close this bug as WONTFIX, and I can help you with creating the required user CSS over email.

uahello wrote:

In my opinion fixing this is important.

we have a wiki and a forum and it happens that people likes visiting forums and sharing thoughts more than the wiki.

we added an iframe that displays the wiki page inside the forum. but the problem that all the toolbox are there like there is a page inside page.

I hope fixing the action=render problem will make embedding wikis inside other pages more easier and will make the wiki more popular.

I shall suggest an extended version of render for use in (i)frames,
and similar, where you cannot easily wrap your own HTML/markup around
the generated pages.

A possible way to do this might be:

action=render&html&css&body

so as to get:

<html ... >
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  <!-- comes with "html" -->
   <link rel="stylesheet" ... />
<body ... >
...
</body>
</html>

for instance. Leaving keyword(s) out, after action=render, shall not
output the respective part(s).

If need be, one should be able to specify (some) header content
verbatim:

action=render&css=httl://example.com/a.css&body=lang="yi"%20dir="rtl"

for example, should output:

   <link rel="stylesheet" hef="httl://example.com/a.css" type="text/css"/>
<body lang="yi" dir="rtl" >
...
</body>
</html>

regardless of page/wiki language and directionality.
Maybe, this is not totally thought out in all details, but I believe,
this sketch gives a direction. I also believe the amount and complexity
of possibly useful headers to be pretty limited.

If that is not so, I'd rather suggest using a minimalistic skin
instead of action=render. If a skin does not output a logo, portlets,
sidebar, and all such, it should as well deliver pages suited for
embedding.

uahello wrote:

can any one test the "&printable=yes" with some forums because it was reported to me that it doesn't work with forums.

maybe it's about the "&" character

here is an example of using the bbcode that embed wikipage:
http://www.linuxac.org/forum/linuxac13/thread28905.html

I think this functionality of action=render has its limits. The mediawiki api is much more powerful and I think that is where this needs to be implemented.

The question is, WHERE does it need to implement this ? Should it report it in the siteinfo request, or when using action=parse perhaps.

It seems that if you request headhtml in a parse request, the value is somewhat accessible, but not very easily.

If you know you are getting RTL text, then you've creating a problem for yourself.