Skip to:
Content
Pages
Categories
Search
Top
Bottom

error after message customization on activate.php


  • dhsllc
    Participant

    @dhsllc

    I have the most current WordPress and Buddypress install (we also have bbpress).

    I setup a sidebar for my buddypress pages which includes the buddypress ‘login’ plugin.

    When a user activates their registration the message reads:

    The original code is:

    <p><?php printf( __( ‘Your account was activated successfully! You can now log in with the username and password you provided when you signed up.’, ‘buddypress’ ), wp_login_url( bp_get_root_domain() ) ); ?></p>

    I changed it to:

    <p><?php printf( __( ‘Your account was activated successfully! You can now log in on the sidebar with the username and password you provided when you signed up.’, ‘buddypress’ ), wp_login_url( bp_get_root_domain() ) ); ?></p>

    I also tried:

    <p>Your account was activated successfully! You can now log in with the username and password you provided when you signed up.</p>

    This change is trigering this error:

    Parse error: syntax error, unexpected ‘else’ (T_ELSE) in /home/admin/public_html/wp-content/themes/Divi-Child/buddypress/members/activate.php on line 47

    I am not a programmer. I don’t know how to fix this. Any help is appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)

  • dhsllc
    Participant

    @dhsllc

    It would still be great to know the answer to the original inquiry in case it helps others.

    I did find an alternate solution to completely bypass the activate.php page by using this plugin: (BuddyDev) BP Auto Login on Activation (https://buddydev.com/plugins/bp-autologin-on-activation/) By Brajesh Singh(BuddyDev.com).

    When a user gets their activation email and clicks on the activation link, the user is redirected to their profile page. A message is displayed above the profile navigation indicating the account has been activated.


    Henry Wright
    Moderator

    @henrywright

    The following code won’t cause the parse error:

    <p><?php printf(
        __( 'Your account was activated successfully! You can now log in on the sidebar with the username and password you provided when you signed up.', 'your-theme-domain' ),
        wp_login_url( bp_get_root_domain() )
    ); ?></p>

    Parse error: syntax error, unexpected ‘else’ (T_ELSE) in /home/admin/public_html/wp-content/themes/Divi-Child/buddypress/members/activate.php on line 47

    This is referring to an else statement on line 47 of activate.php. What do you have on line 47?


    dhsllc
    Participant

    @dhsllc

    Ah, I should have compared the code a little closer. My bad.

    It was missing an <?php endif; ?> statement going from one <?php else : ?> to another.

    Now I know. 🙂

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