Change Loginform plugin button to normal text link

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
mallors
Posts: 4
Joined: Tue Sep 11, 2007 12:53 pm

Change Loginform plugin button to normal text link

Post by mallors »

Hi,

I have placed the plugin serendipity_plugin_loginform in the left sidebar to make it easy to login. After entering a username and password you need to press on a submit-button.

I would like to replace the large button with a <a href> link, but dont know what the target should be then. The code for this button is:

When not logged in:
echo '<input type="submit" name="serendipity[action]" value="' . LOGIN . '" />';

When logged in:
echo '<input type="submit" name="serendipity[action]" value="' . LOGOUT . '" />';

Could anyone help changing this button into a text link that still works?

Mallors
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Change Loginform plugin button to normal text link

Post by garvinhicking »

Hi!

You could use <a href="?serendipity[logout]=true"> to logout.

You cannot replace the login thing to a link, because you need username+password, which can only be entered when clicking a submit button.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
mallors
Posts: 4
Joined: Tue Sep 11, 2007 12:53 pm

No logout

Post by mallors »

Thanks for your reaction! The following code doesnt work!

echo '<a href="?serendipity[logout]=true">Logout</a>';

It reloads the page but still keeps me logged in.
Post Reply