WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Login :: Red Rokk Widget Collection
[resolved] Mimic login button action with url? (6 posts)

  1. kanjipad
    Member
    Posted 1 year ago #

    First, thanks for a great plug-in. I have your login form in my sidebar and it is now much more professional-looking for users, rather than having to leave the page to login. I have made a couple of small adjustments to your styling and the focus behaviour, which I'll share in another thread.

    Second, my current question... I have an icon in my header that used to direct users to the wordpress login page. It is not really needed anymore because of your widget, but it is up at the top in an easily reached position, so I would like to keep it if possible and get it to work with your login form. Otherwise, users on small screens have to scroll down to login.

    Is there an href or url address that could mimic the function of your login button, assuming the fields have been auto-filled correctly? (I think I can copy your code to check if the fields are already filled in, so this icon will only be visible when it is usable).

    If this is not possible, that's fine. Option 2 would be for the icon to move focus to your widget so the user can then hit 'return'. (I turned off the line in your code that gives your widget automatic focus .)

    I can post a link, if you need it, but the site is very much under construction.

    Cheers,

    Craig.

    http://wordpress.org/extend/plugins/login-widget-red-rokk-widget-collection/

  2. kanjipad
    Member
    Posted 1 year ago #

    This worked:

    <a href="#" title="Login"> <img src="<?php echo bloginfo('stylesheet_directory');?>/images/Login.png" alt="Login" width="32" height="32" </a>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser.]

  3. kanjipad
    Member
    Posted 1 year ago #

    Sorry, the pasted code went live on me...

    <a href="#" onclick="document.getElementById('loginform').submit(); return false;" title = "Login"> <img src="<?php echo bloginfo('stylesheet_directory');?>/images/Login.png" alt="Login" width="32" height="32" </a>

  4. Jonathon_at_RedRokk
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Kanji. This version does not really offer anything like that. But hopefully you were able to get the functionality that you wanted with the code that you posted.

  5. kanjipad
    Member
    Posted 1 year ago #

    Hi Jonathon,

    Yes, I got it all working nicely.

    I have a button up the top of my header that calls a custom javascript function. That function checks whether the contents of your widget password field have string length>1 and, if so, submits the form. If not, it scrolls your widget into view.

    The automatic focus in your original code did not quite work for me, so I commented out the relevant line of code. It set the focus on the username field, which still left the password field off the page. It also meant the slider at the top of my page was partially out of view when the page first opened.

    May I suggest you have an option, in the next release, of turning off the automatic focusing?

    Anyway, thanks for the plugin. I had a look at several other login options and this was by far the neatest, especially with my minor modifications.

    Cheers,

    Craig (Kanjipad).

  6. Jonathon_at_RedRokk
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Kanji, for the compliment. I have made a lot of modifications to this plugin that I have not yet pushed to the repository on wordpress. Will let you know when they are.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.