Jigowatt Premium Content Question

Discussion in 'PHP' started by caligrafx, May 7, 2013.

  1. #1
    I want to add this
    [premium level="1" teaser="yes" message="Message to display to those who cannot view the content."][/premium]

    somewhere in the backend but I am not sure how to write it in the function php code… please help me.
    I want the
    Contact: <?php the_author_posts_link(); ?>


    to have a leave 1.

    Authors reply:

    Here are the functions.


    Functions

    • is_premium( $post_id ) - Returns true if a post is premium.
    • is_user_subscribed( $user_id ) - Check if user is subscribed or not.
    • user_can_view_content( $post_id ) - Returns true if the logged in user can view the post.
    • get_premium_content_level( $post_id ) - Get level of premium content.
    • get_user_subscription_level( $user_id ) - Get users level.
    • get_premium_post_ids() - Returns an array of post ID's.

     
    caligrafx, May 7, 2013 IP
  2. caligrafx

    caligrafx Active Member

    Messages:
    137
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    83
    #2
    Im not sure that this is correct

    add_shortcode( 'level' => '1', 'teaser' => 'yes', 'message' => 'click here')
    PHP:
    How would I wrap the contents I would like to hide?

    Contact: <?php the_author_posts_link(); ?>
    PHP:
    Any help would be great!
    Thanks,
    Adam
     
    caligrafx, May 10, 2013 IP
  3. Avener

    Avener Well-Known Member

    Messages:
    250
    Likes Received:
    24
    Best Answers:
    1
    Trophy Points:
    135
    #3
    Can you please explain what you're trying to accomplish and I'll do my best to help?
    What is the code for, what is not working and what do you want to add?
     
    Avener, May 10, 2013 IP
  4. caligrafx

    caligrafx Active Member

    Messages:
    137
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    83
    #4
    Thanks!

    I am looking to put a shortcode that this wordpress plugin uses into a function that i need to put in a couple of pages that are in php.

    Plugin: http://codecanyon.net/item/wordpress-premium-content/137192

    This is the shortcode that you put into the rich-text editor.
    [premium level="1" teaser="yes" message="Message to display to those who cannot view the content."][/premium]
    PHP:
    Here are the functions that are given in the overview.

    I'm just not sure what to wrap the premium content I would like to hide from non members. I need the php code to put in say the template.php.

    Thanks,
    Adam
     
    caligrafx, May 12, 2013 IP