Skip to:
Content
Pages
Categories
Search
Top
Bottom

Restrict content or download

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of Tosh
    Tosh
    Participant

    @xberserker

    @weblogian This is kind of similar to the mod for buddypress gifts.

    You can do something like this, if they have at least 100 points they can see the content. Change 100 to whatever you want.

    `<?php
    $cb_bp_x_points = cp_displayPoints($bp->loggedin_user->id,1,$return,0,$format);
    $cp_bp_points_for_content = 100;

    if ($cb_bp_x_points >= $cp_bp_points_for_content) :
    ?>`

    Your content or download link

    `

    You need points to see this content.

    `

    Avatar of Marc P Gangmei
    Marc P Gangmei
    Participant

    @weblogian

    Thanks xberserker this work perfectly

    #it should be <?php endif; ?>

    Avatar of Tosh
    Tosh
    Participant

    @xberserker

    Great, just curious what are you using this for?

    Avatar of Marc P Gangmei
    Marc P Gangmei
    Participant

    @weblogian

    @xberserker
    I am thinking to use for my free goodies. So that I can get more user activity on my site such as comments.

    What’s your thoughts on this?
    Well I’ll be writing a post on this. And I will credit you. Thanks again.

    I think I am missing something here …

    So now I have a user who would have enough points to “buy” part of the restricted content against points .. but after following your tip from above, he only gets to see a message: “You need 5 points to see this content”

    Cool, so now what?
    Where does he have to click to “cash in the 5 points” and see the content !??!

    You code only brings out a line of simple text .. there’s no link, no tip as what what to do in order to use the available points !??!?!

    Thanks!

    Avatar of Tosh
    Tosh
    Participant

    @xberserker

    If you have enough points you can view the content, you can’t “buy” it with points. Not sure if this works with CubePoints 3 though .. might have to change some things.

    yes, but how !?!? that’s not what the code posted above is doing …

    If I use your code and the user has the needed points, than the “hidden” content is automatically displayed, without him having to “pay” anything for it (so his points account remains untouched!)

    And if he does not have enough points, that I only have a text message showing:
    “You need 5 points to see this content”

    Somehow it does not make much sense to me :-(

    I’d like him to have to click somewhere and “use” the needed points (buy with points) to see the hidden content …

    That was actually my issue, how do I build there a sort of “use 5 points to see this content” button, which when clicked “buys him” the content (and deducts the used amount from the user’s total available points)

    Avatar of Tosh
    Tosh
    Participant

    @xberserker

    Might want to post in the official cubepoints forum about this – http://cubepoints.com/forums/

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

You must be logged in to reply to this topic.