Active Resources

Discussion in 'aMember Pro v.4' started by todddown, Feb 21, 2012.

  1. todddown

    todddown Member

    Joined:
    Nov 24, 2009
    Messages:
    37
    Hi,

    Does anyone know if there is a way to hide the Active Resources 'block' on the main subscription page? I'd like to keep the Active Subscriptions and Unsubscribe boxes.

    In my products I have checked the Hide 'do not display this item link in members area' box but now I just see an empty Active Resources area on the page. Can aMember check and if the members subscribed products are hidden then not show the box?

    Also I can't see where to change the titles of all these boxes. Anyone know that can be done?

    Thanks
  2. todddown

    todddown Member

    Joined:
    Nov 24, 2009
    Messages:
    37
    I just found that the titles of the boxes are hard coded here "amember\library\Am\App.php" around line 551. When I searched using the /admin-trans-global link I was able to change the unsubscribe title but not rescources and subscriptions (they where not found when searching)
  3. mikelinen

    mikelinen aMember Pro Customer

    Joined:
    Jun 22, 2011
    Messages:
    22
    I'd like the answer to this too, how to hide the Active Resources or Active Subscriptions block on the Main tab. Is the best way to just edit and remove the code at amember\library\Am\App.php" at lines 449 or 551?
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    In order to hide these blocks copy both application/default/views/blocks/member-main-subscriptions.phtml and application/default/views/blocks/member-main-resources.phtml to your theme folder's blocks/ then remove code from both files.
  5. mikelinen

    mikelinen aMember Pro Customer

    Joined:
    Jun 22, 2011
    Messages:
    22
    Thanks Alex. I tried that and what happened was it removed the contents of the block, but not the block itself, nor the label. Did I do it correctly?
  6. mikeoreilly

    mikeoreilly New Member

    Joined:
    Jan 20, 2012
    Messages:
    7
    I have exactly the same problem. Alex can you help?
  7. mikeoreilly

    mikeoreilly New Member

    Joined:
    Jan 20, 2012
    Messages:
    7
    I can remove the contenet but not the headings as well
  8. mikeoreilly

    mikeoreilly New Member

    Joined:
    Jan 20, 2012
    Messages:
    7
    I'm just ticking this so I can get the answer. Sorry.
  9. alex

    alex Administrator Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,020
    Unfortunately, there are no other ways to do that without editing amember code. Edit file
    amember/library/Am/App.php,
    replace lines
    PHP:
       function addDefaultBlocks()
        {
            
    $this->add(
                    new 
    Am_Block('member/main/left'___("Active Subscriptions"), '1-subscriptions'null'member-main-subscriptions.phtml')
                )->
    add(
                    new 
    Am_Block('member/main/left'___("Active Resources"), 'member-main-resources'null'member-main-resources.phtml')
                )->
    add(
                    new 
    Am_Block('member/main/left'___("Unsubscribe from all e-mail messages"), 'member-main-unsubscribe'
                        
    null'member-main-unsubscribe.phtml'Am_Block::BOTTOM 100)
                )->
    add(
                    new 
    Am_Block('member/main/right'___("Useful Links"), 'member-main-links'null'member-main-links.phtml')
                );
        }
     
    to the following:
    PHP:
       function addDefaultBlocks()
         {
             
    $this->add(
                     new 
    Am_Block('member/main/left'___("Unsubscribe from all e-mail messages"), 'member-main-unsubscribe'
                         
    null'member-main-unsubscribe.phtml'Am_Block::BOTTOM 100)
                 )->
    add(
                     new 
    Am_Block('member/main/right'___("Useful Links"), 'member-main-links'null'member-main-links.phtml')
                 );
         }
      
  10. mikeoreilly

    mikeoreilly New Member

    Joined:
    Jan 20, 2012
    Messages:
    7
    Alex, that appears to have worked perfectly

    Thanks
  11. mrross1

    mrross1 New Member

    Joined:
    Jul 28, 2012
    Messages:
    21
    Possibly another simpler solution is;
    Edit Messages -> Search for the string "Unsubscribe from all e-mail messages"
    Remove the text from the Translation window.

    Then add a little CSS to /application/default/views/public/css/amember.css
    #member-main-unsubscribe {
    display:none;
    }
  12. bennyuk1

    bennyuk1 aMember Pro Customer

    Joined:
    Jan 12, 2012
    Messages:
    161
    Is there an updated way to add/remove block on the users amember dashboard (when interated with wordpress) for v5.1.7? eg using theme files?
  13. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    1,670

Share This Page