How to avoid intermediate page

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How to avoid intermediate page

Fernando Correia
Our users are annoyed with the successful login confimation page. They
are demanding that instead of showing the page and forcing them to
click on the link or wait 10 seconds, the target page be displayed.
This way, response time will improve and so will usability.

I'd like some help, if possible, on a way to make the output of a page
go to $wgOut, but following all steps that would be followed if the
page were served normally. I mean, without taking some shortcuts that
might make it to parse differently.

I would change function successfulLogin() in SpecialUserlogin.

Now it calls, among other things:

$wgOut->returnToMain( $auto, $this->mReturnTo );

I'd like to change this to put into $wgOut the correct output for the
page with the title $this->mReturnTo.

Any hint will be appreciated.

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: How to avoid intermediate page

Thomas Dalton
> I'd like some help, if possible, on a way to make the output of a page
> go to $wgOut, but following all steps that would be followed if the
> page were served normally. I mean, without taking some shortcuts that
> might make it to parse differently.

Can you do something to make the confirmation page a standard redirect
to the target page?

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: How to avoid intermediate page

Alexis Moinet
In reply to this post by Fernando Correia
Fernando Correia wrote :

> Our users are annoyed with the successful login confimation page. They
> are demanding that instead of showing the page and forcing them to
> click on the link or wait 10 seconds, the target page be displayed.
> This way, response time will improve and so will usability.
>
> I'd like some help, if possible, on a way to make the output of a page
> go to $wgOut, but following all steps that would be followed if the
> page were served normally. I mean, without taking some shortcuts that
> might make it to parse differently.
>
> I would change function successfulLogin() in SpecialUserlogin.
>
> Now it calls, among other things:
>
> $wgOut->returnToMain( $auto, $this->mReturnTo );
>
> I'd like to change this to put into $wgOut the correct output for the
> page with the title $this->mReturnTo.

Open includes/OutputPage.php and find the function returnToMain

change the line :

if ( $auto ) {
     $wgOut->redirect( $titleObj->escapeFullURL() );
     /*$wgOut->addMeta( 'http:Refresh', '10;url=' . $titleObj->escapeFullURL() );*/
}

you can also simply reduce the waiting time (10 sec) by changing the value in $wgOut->addMeta( 'http:Refresh', '10;url=' . $titleObj->escapeFullURL() );




_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: How to avoid intermediate page

Alexis Moinet
Alexis Moinet wrote :
> Open includes/OutputPage.php and find the function returnToMain
>
> change the line :
>
> if ( $auto ) {
>      $wgOut->redirect( $titleObj->escapeFullURL() );
>      /*$wgOut->addMeta( 'http:Refresh', '10;url=' . $titleObj->escapeFullURL() );*/
> }
>

Sorry, didn't test this far enough, looks like there is a bug when logging-out : the "user links" are still in "the logged-in config" while I'm obviously logged out (since I can't edit pages when logged out and it tells me so)

Mmmmh might need some "refresh-links" code that I'm not aware of...




_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: How to avoid intermediate page

Platonides
In reply to this post by Alexis Moinet
Alexis Moinet wrote:
> if ( $auto ) {
>      $wgOut->redirect( $titleObj->escapeFullURL() );
>      $wgOut->addMeta( 'http:Refresh', '10;url=' . $titleObj->escapeFullURL() );
> }
>
> you can also simply reduce the waiting time (10 sec) by changing the value in $wgOut->addMeta( 'http:Refresh', '10;url=' . $titleObj->escapeFullURL() );

Changing the 10 sec to 0 sec will work like a redirect (in fact, it's a
html redirect).


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: How to avoid intermediate page

Alexis Moinet
Platonides a écrit :

> Alexis Moinet wrote:
>> if ( $auto ) {
>>      $wgOut->redirect( $titleObj->escapeFullURL() );
>>      $wgOut->addMeta( 'http:Refresh', '10;url=' . $titleObj->escapeFullURL() );
>> }
>>
>> you can also simply reduce the waiting time (10 sec) by changing the value in $wgOut->addMeta( 'http:Refresh', '10;url=' . $titleObj->escapeFullURL() );
>
> Changing the 10 sec to 0 sec will work like a redirect (in fact, it's a
> html redirect).

Unfortunately, it displays the "successlogin" page for a very small time before doing the redirect but maybe it's because I did it on local, perhaps a server installation will do it faster and won't display it ?

BTW, another problem of the "redirect() hack" is that the returnToMain() function is used in several other places (like wiki error display) so you better copy/paste the usefull part of the code directly in the successfulLogin() function and remove the call
to returnToMain(). (and possibly do the same in SpecialUserLogout.php)
BTW2, even when I don't change anything, I still have the problem of having the logged-in personnal tolls though I'm logged out, so that could be some problem on my side, not coming from modifying the returnToMain();


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: How to avoid intermediate page

Thomas Dalton
> Unfortunately, it displays the "successlogin" page for a very small time before doing the redirect but maybe it's because I did it on local, perhaps a server installation will do it faster and won't display it ?

It will show the confirmation page for as long as it takes to load the
target page - that's how html redirects work, not much we can do about
that.

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Can data from individual pages be merged?

Sullivan, James (NIH/CIT) [C]
In reply to this post by Alexis Moinet
One of our wiki users is using a template that has a table where values
for items in the table are placed.  So, for example, the template has
the demographics of each state in the US.  Then 50 wiki pages are
created calling the template and each page has the variables described
by the template defined, such as capital city, population, size, etc.
Now, what this user would like to do is merge say just the capital city
information from all 50 pages into one single page.  I'm certain this is
possible with SQL routines to extract the data directly from the
database but I was wondering if Mediawiki has a way, or extension,
allowing the variables defined by a template used for multiple pages to
be retrieved through the wiki itself.

Thanks for racking your brain...
-Jim

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Can data from individual pages be merged?

Judson Dunn-2
On 4/20/07, Sullivan, James (NIH/CIT) [C] <[hidden email]> wrote:

> One of our wiki users is using a template that has a table where values
> for items in the table are placed.  So, for example, the template has
> the demographics of each state in the US.  Then 50 wiki pages are
> created calling the template and each page has the variables described
> by the template defined, such as capital city, population, size, etc.
> Now, what this user would like to do is merge say just the capital city
> information from all 50 pages into one single page.  I'm certain this is
> possible with SQL routines to extract the data directly from the
> database but I was wondering if Mediawiki has a way, or extension,
> allowing the variables defined by a template used for multiple pages to
> be retrieved through the wiki itself.

Semantic Mediawiki can do this.
http://ontoworld.org/wiki/Semantic_MediaWiki
http://meta.wikimedia.org/wiki/Semantic_MediaWiki

It allows more structured data, and then you can do inline queries for
example. It is pretty powerful, but was designed almost exactly for
the kind of problem you have in your example.

Judson
[[:en:User:Cohesion]]

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Can data from individual pages be merged?

Sullivan, James (NIH/CIT) [C]
Thanks.  I also found the Dynamic Page List extension
(http://www.mediawiki.org/wiki/Extension:DynamicPageList)
which looks promising.

-Jim

-----Original Message-----
From: cohesion [mailto:[hidden email]]
Sent: Friday, April 20, 2007 4:54 PM
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Can data from individual pages be merged?

On 4/20/07, Sullivan, James (NIH/CIT) [C] <[hidden email]> wrote:
> One of our wiki users is using a template that has a table where
> values for items in the table are placed.  So, for example, the
> template has the demographics of each state in the US.  Then 50 wiki
> pages are created calling the template and each page has the variables

> described by the template defined, such as capital city, population,
size, etc.
> Now, what this user would like to do is merge say just the capital
> city information from all 50 pages into one single page.  I'm certain
> this is possible with SQL routines to extract the data directly from
> the database but I was wondering if Mediawiki has a way, or extension,

> allowing the variables defined by a template used for multiple pages
> to be retrieved through the wiki itself.

Semantic Mediawiki can do this.
http://ontoworld.org/wiki/Semantic_MediaWiki
http://meta.wikimedia.org/wiki/Semantic_MediaWiki

It allows more structured data, and then you can do inline queries for
example. It is pretty powerful, but was designed almost exactly for the
kind of problem you have in your example.

Judson
[[:en:User:Cohesion]]

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l