Hidepost with multiple subscription levels

Discussion in 'Setting-up protection' started by wonder, Jul 21, 2009.

  1. wonder

    wonder New Member

    Joined:
    Oct 20, 2008
    Messages:
    12
    I have hidepost setup working well for 2 subscription levels. Bu I have bronze, silver, gold.

    When someone is logged in with a bronze membership they get a link for the silver content: You must upgrade to view this content. Please click here to upgrade now!

    Then they can go and pay for that product and it works.

    But the exact same link is shown for the gold content.

    How can I make gold hidepost link go to the payment for a different product?

    Josh
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    This will take some hacking of the hidepost plugin.
    You'll need to go in an tell it to display a different URL/text depending on the level that the user is currently at.

    David
  3. wonder

    wonder New Member

    Joined:
    Oct 20, 2008
    Messages:
    12
    (Thanks David)

    Here is the solution I used if anyone wants it (in hidepost.php):

    PHP:
                        break;
                case 
    8:
                case 
    9$show 'Administrator';
                        break;
            endswitch;
            
    $hidepost_role_text str_replace('%role%',$show,$hidepost_role_text);
            
            
    // EDIT BY JOSH - This is a hack to show a different upgrade link
            
    if ($hidepost_max_level == 3)
                
    $hidepost_role_text "You must upgrade to view this content. Please <a href=\"http://www.mysite.com/member/member.php?&product_id=xx\">click here</a> to upgrade to the success package!";
                
                
            if (
    $hidepost_role_text_hide != 1) return $hidepost_role_text; else return '';
        }
        return 
    $matches[2][$m_id]; //Return the content if user can see

Share This Page