Support » Plugin: Theme My Login » Things are bad after update + extensions

  • Resolved kunique

    (@kunique)



    Hello,

    I just upgraded to the newest version and purchased 2 extensions. Unfortunately, there are some problems on my site.
    Previously, the login-form.php, lostpassword-form.php, and resetpass-form.php were customized and kept in my child theme, so that they can overwrite the updates and keep my customizations.
    After updating to the newest version 7.0.11, those forms are no longer recognised even though they are still in my child theme.
    Please any help on how to restore and keep my previous customizations?

    Thanks in advance!
    Kinique

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    DearJeff,

    Thanks for the info.
    However, if I use the theme-my-login-custom.php to customize the TML, will the changes stay after updates of the plugin?

    Thanks in advance.
    Kunique

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Yes.

    Hi Jeff,

    I created the theme-my-login-custom.php in the wpcontent>plugin, and I tried by puting the previous code for lostpassword form; the form was modified to suit me in the old version. After puting the code in the file, the website was no longer visible.

    Below is what the theme-my-login-custom.php contained:

    <?php
    /*
    If you would like to edit this file, copy it to your current theme’s directory and edit it there.
    Theme My Login will always look in your theme’s directory first, before using this default template.
    */
    ?>
    <div class=”tml tml-lostpassword” id=”theme-my-login<?php $template->the_instance(); ?>”>
    <?php $template->the_action_template_message( ‘lostpassword’ ); ?>
    <?php $template->the_errors(); ?>
    <form name=”lostpasswordform” id=”lostpasswordform<?php $template->the_instance(); ?>” action=”<?php $template->the_action_url( ‘lostpassword’, ‘login_post’ ); ?>” method=”post”>
    <p class=”tml-user-login-wrap”>
    <label for=”user_login<?php $template->the_instance(); ?>”><?php
    if ( ’email’ == $theme_my_login->get_option( ‘login_type’ ) ) {
    _e( ‘E-mail:’, ‘theme-my-login’ );
    } else {
    _e( ‘Username or E-mail:’, ‘theme-my-login’ );
    } ?></label>
    <input type=”text” name=”user_login” id=”user_login<?php $template->the_instance(); ?>” class=”input” value=”<?php $template->the_posted_value( ‘user_login’ ); ?>” size=”20″ />
    </p>

    <?php do_action( ‘lostpassword_form’ ); ?>

    <p class=”tml-submit-wrap”>
    <input type=”submit” name=”wp-submit” id=”wp-submit<?php $template->the_instance(); ?>” value=”<?php esc_attr_e( ‘Get New Password’, ‘theme-my-login’ ); ?>” />
    <input type=”hidden” name=”redirect_to” value=”<?php $template->the_redirect_url( ‘lostpassword’ ); ?>” />
    <input type=”hidden” name=”instance” value=”<?php $template->the_instance(); ?>” />
    <input type=”hidden” name=”action” value=”lostpassword” />
    </p>
    </form>
    <?php $template->the_action_links( array(
    ‘login’ => false,
    ‘register’ => false,
    ‘lostpassword’ => false
    ) ); ?>
    </div>

    Please any help?
    I was happy to update and pay, but it seems the version 7 is full of issues for us, who are not php experts.

    Thanks in advance!
    Kunique

    Plugin Author Jeff Farthing

    (@jfarthing84)

    What you posted there is the lost password form. I’m sorry, but what are you trying to achieve?

    Hi jeff,

    As you can see, the form was customized so that on the lost password page, login, register and lostpassword don’t appear, as in
    ‘login’ => false,
    ‘register’ => false,
    ‘lostpassword’ => false
    This is because all such options are already in the menu of the theme.

    Also, my theme provider gave me a custom code so that if I go to mywebsite/login, the social login of the theme also appeared there.
    Lastly, the resetpassword form was also customized: the hint message to make the password strong.

    With TML 7, all such customizations are no longer working.
    Please help me.

    Thanks in advance!
    Kunique

    Plugin Author Jeff Farthing

    (@jfarthing84)

    
    function customize_tml() {
        // Remove action links from lostpassword form
        if ( $lp_form = tml_get_form( 'lostpassword' ) ) {
            $lp_form->render_args['show_links'] = false;
        }
    
        // Change resetpass hint
        if ( $rp_hint = tml_get_form_field( 'resetpass', 'indicator_hint' ) ) {
            $rp_hint->set_content( '<p class="description indicator-hint">YOUR TEXT HERE</p>' );
        }
    }
    add_action( 'init', 'customize_tml' );
    
    kunique

    (@kunique)

    Thanks Jeff!
    It worked.

    Please one more thing:
    I would also like to have an introductory message on the lostpassword form;
    I had that set in the previous version.

    The intro should be like:
    Please enter your username or email address. You will receive a link to create a new password via email.

    Please can you kindly help me with that as well?

    Thanks in advance!
    Kunique

    • This reply was modified 1 month ago by  kunique.
    • This reply was modified 1 month ago by  kunique.
    • This reply was modified 1 month ago by  kunique.
    Plugin Author Jeff Farthing

    (@jfarthing84)

    You could easily just add arbitrary content like that by creating and using a page for that action, if you don’t already have one, and adding to the content.

    Thanks Jeff!
    I did that and it is working perfectly.

    Please one last thing(I hope):
    My theme came with social login in the header, and with the old TML, the TML login page was also customized to have the social login of the theme there.

    I think this code was used: <?php do_action( ‘gears_login_form’ ); ?>

    That customization is also no longer working with TML 7. Please any help with that?

    Thanks in advance!
    Kunique

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Perhaps try this:

    
    function add_gears_login_form_to_login_form() {
        do_action( 'gears_login_form' );
    }
    add_action( 'login_form', 'add_gears_login_form_to_login_form' );
    
    kunique

    (@kunique)

    Hello Jeff,

    Thanks a lot, I tried the code you gave and it is working fine on the login page, except that if I press the login in the header of the theme, the pull down comes with the original social connect (google + facebook) of the theme plus another set of google + facebook connect. The issue is, there is a doubling of the social connect on the login pull down, but the login page is actually fine.

    Please any help to rectify that?

    Thanks in advance!
    Kunique

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Try adding it directly to the TML form instead:

    
    function add_gears_login_form_to_tml() {
    	tml_add_form_field( 'login', 'gears_login_form', array(
    		'type'     => 'action',
    		'priority' => 20,
    	) );
    }
    add_action( 'init', 'add_gears_login_form_to_tml' );
    
    kuniquesol

    (@kuniquesol)

    Hi Jeff,

    Thanks a lot! the new code worked perfectly.

    Best regards,
    Kunique Sol

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.