Login problem, GuMax 3.3

If you are having problems with GuMax, post here.
User avatar
ganacim
Rank 0
Rank 0
Posts: 1
Joined: November 12th, 2007, 6:11 pm

Re: Login problem, GuMax 3.3

Post by ganacim »

Hi,

I have the same problem.
I'm using mediawiki 1.11 and GuMax 3.3.
A

Code: Select all

print_r($this->data);

gives:

Code: Select all

Array
(
    [anonuserpage] => Array
        (
            [text] => 189.26.7.14
            [href] => /~pet/wiki/index.php/Usu%C3%A1rio:189.26.7.14
            [class] => new
            [active] => 
        )

    [anontalk] => Array
        (
            [text] => Discussão para este IP
            [href] => /~pet/wiki/index.php/Usu%C3%A1rio_Discuss%C3%A3o:189.26.7.14
            [class] => new
            [active] => 
        )

    [anonlogin] => Array
        (
            [text] => Entrar
            [href] => /~pet/wiki/index.php?title=Especial:Userlogin&returnto=Especial:Userlogout
            [active] => 
        )

)
I change these lines:

Code: Select all

<li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['userlogin']['href']) ?>"><?php
                   echo htmlspecialchars($this->data['personal_urls']['userlogin']['text']) ?></a></li>

to

Code: Select all

<li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['anonlogin']['href']) ?>"><?php
                   echo htmlspecialchars($this->data['personal_urls']['anonlogin']['text']) ?></a></li>
and got the right behavior.
User avatar
gmack
Rank 2
Rank 2
Posts: 12
Joined: November 4th, 2007, 3:24 pm

Re: Login problem, GuMax 3.3

Post by gmack »

this

Code: Select all

<li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['anonlogin']['href']) ?>"><?php
                   echo htmlspecialchars($this->data['personal_urls']['anonlogin']['text']) ?></a></li>
fix it,and gives me "Log in / create account" as a text and a correct link for login. If i want only "log in" i have to edit /mediawiki/includes/SkinTemplate.php and the function "function buildPersonalUrls() "
User avatar
vonedaddy
Rank 1
Rank 1
Posts: 8
Joined: November 28th, 2007, 10:25 am

Re: Login problem, GuMax 3.3

Post by vonedaddy »

ganacim wrote:Hi,

I have the same problem.
I'm using mediawiki 1.11 and GuMax 3.3.
A

Code: Select all

print_r($this->data);

gives:

Code: Select all

Array
(
    [anonuserpage] => Array
        (
            [text] => 189.26.7.14
            [href] => /~pet/wiki/index.php/Usu%C3%A1rio:189.26.7.14
            [class] => new
            [active] => 
        )

    [anontalk] => Array
        (
            [text] => Discussão para este IP
            [href] => /~pet/wiki/index.php/Usu%C3%A1rio_Discuss%C3%A3o:189.26.7.14
            [class] => new
            [active] => 
        )

    [anonlogin] => Array
        (
            [text] => Entrar
            [href] => /~pet/wiki/index.php?title=Especial:Userlogin&returnto=Especial:Userlogout
            [active] => 
        )

)
I change these lines:

Code: Select all

<li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['userlogin']['href']) ?>"><?php
                   echo htmlspecialchars($this->data['personal_urls']['userlogin']['text']) ?></a></li>

to

Code: Select all

<li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['anonlogin']['href']) ?>"><?php
                   echo htmlspecialchars($this->data['personal_urls']['anonlogin']['text']) ?></a></li>
and got the right behavior.


I am having a problem where when I log out, it does not show any links to log back in. What file are you changing this code in?
User avatar
gmack
Rank 2
Rank 2
Posts: 12
Joined: November 4th, 2007, 3:24 pm

Re: Login problem, GuMax 3.3

Post by gmack »

it's the file GuMax.php around line 178 and 179
User avatar
gmack
Rank 2
Rank 2
Posts: 12
Joined: November 4th, 2007, 3:24 pm

Re: Login problem, GuMax 3.3

Post by gmack »

after a clean install of mediawiki i have discovered this:

When i access the page the first time (http://127.0.0.1/mediawiki/index.php/Main_Page)
i need this

Code: Select all

                <li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['login']['href']) ?>"><?php
                   echo htmlspecialchars($this->data['personal_urls']['login']['text']) ?></a></li>

but after i loggin in and log out i need this to get the login link again

Code: Select all

 <li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['anonlogin']['href']) ?>"><?php
                   echo htmlspecialchars($this->data['personal_urls']['anonlogin']['text']) ?></a></li>
could this be part of the problem ? cause if you only loop out "personal_urls" you alwas have a login link. and in the original skin it looks like they are doing this. But in not a php-coder so i could be wrong.
User avatar
vonedaddy
Rank 1
Rank 1
Posts: 8
Joined: November 28th, 2007, 10:25 am

Re: Login problem, GuMax 3.3

Post by vonedaddy »

Ok, I figured it out, the problem was my GuMax.php file did not have this code. It had just login instead of userlogin. I changed that to anonlogin and now all if fine. Thanks for the help.
User avatar
intersol
Rank 0
Rank 0
Posts: 1
Joined: December 12th, 2007, 7:29 pm

Re: Login problem, GuMax 3.3

Post by intersol »

I don't understand the real solution. I have the following case:
In FF the login apears in IE it doesn't if I user 'anonlogin' if I switch to 'userlogin' it will apear in IE but not in FF. What's the correct code?

PS. The browser is not important but I should mention that in one I was logged in and out and in the other one I was never logged in.
User avatar
Paul
Development Team Leader
Development Team Leader
Posts: 1132
Joined: October 20th, 2007, 2:23 pm

Re: Login problem, GuMax 3.3

Post by Paul »

All right, I believe the login part wasn't good. Here is the final fix, override the old file with this update and let me know if it works.
Attachments
GuMax.zip
GuMax.php login fix for GuMax 3.3
(4.72 KiB) Downloaded 290 times
User avatar
Narvi
Rank 0
Rank 0
Posts: 3
Joined: December 6th, 2007, 4:13 am

Re: Login problem, GuMax 3.3

Post by Narvi »

That last one seems to work for me. Although I do have another question: is it possible to get rid of that "xx.xx.xx.xx Talk for this IP" part that comes up for anon users?
User avatar
Paul
Development Team Leader
Development Team Leader
Posts: 1132
Joined: October 20th, 2007, 2:23 pm

Re: Login problem, GuMax 3.3

Post by Paul »

Add following in your LocalSettings.php

Code: Select all

$wgShowIPinHeader = false;
That's it!
Post Reply