Remove Tabs from Edit Profile Page

Discussion in 'Templates customization' started by kenmomentum, May 20, 2011.

  1. kenmomentum

    kenmomentum New Member

    Joined:
    Apr 1, 2011
    Messages:
    26
    Hello Great Forum

    I asked this question before and tried what was suggested but got the old error page for having bad code! :)

    After the user logs in I would like to give the user the ability to change her password. In addition to changing her password I would also like to make sure that she can keep her unique e-mail address if possible.

    What I wan to do is remove the tab at the top of the page for "Your Payment History" and remove the tab for "Add/Renew Subscription".

    There is something about doing something for the tabs.inc. php file but that did not work.

    I did find if I comment out lines 207 and 208 the tabs go away.
    $this->add(new TabMenu_Tab(_TPL_MEMBER_ADD_RENEW, null, 'add_renew'));
    $this->add(new PaymentHistoryTab(_TPL_MEMBER_PYMNT_HIST, null, 'payment_history'));

    However, I do not think that is the best way to do this. There has to be a better way.

    Thanks for all your help.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
  3. kenmomentum

    kenmomentum New Member

    Joined:
    Apr 1, 2011
    Messages:
    26
    Hello Great Support

    I tried what was suggested and got the following message

    Fatal error: Call to undefined method TabMenu::remove() in /home/momentum/public_html/site.inc.php on line 4

    I created the new file, put what was written in the file and still a no go. You give us pictures and I still cannot follow what I need to do.:)
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Contact us in helpdesk in order to get latest tabs.inc.php
  5. kenmomentum

    kenmomentum New Member

    Joined:
    Apr 1, 2011
    Messages:
    26
    Hello Great Support & Forum

    I did get my new tabs.inc.php file and everything worked perfectly to remove two tabs.

    In my site.inc.php file I have the following:
    <?php
    if (!defined('INCLUDED_AMEMBER_CONFIG'))
    die("Direct access to this location is not allowed");
    TabMenu::getInstance()->remove(new TabMenu_Tab(null, null, 'add_renew'));
    TabMenu::getInstance()->remove(new TabMenu_Tab(null, null, 'payment_history'));
    ?>

    Now the ability for the user to renew and see her subscription is not available.

    Thanks again for all your help

Share This Page