php and shortcode for mycred_send

Home Forums Community php and shortcode for mycred_send

This topic contains 3 replies, has 3 voices, and was last updated by  Bernard 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9324

    Anonymous
    Newbie

    Good afternoon,
    I want to transfer points between users, but the Shortcode does not work for me by the type of template.
    Is there any type of code in php to replace the Shortcode for embedding the file?
    [mycred_send amount = "10" to = "author" log = "Appreciation Post" ref = "post_appreciation"] Send Author 10 points [/ mycred_send]

    #9350

    WPExperts
    Legend

    Hey.

    You can use the do_shortcode function which WordPress provides:

    <?php echo do_shortcode( '[mycred_send amount = "10" to = "author" log = "Appreciation Post" ref = "post_appreciation"] Send Author 10 points [/ mycred_send]' ); ?>
    

    Just make sure you paste this code inside the Loop in the theme file you use.

    #9352

    WPExperts
    Legend

    Also, you should not have any spaces for each shortcode attribute so: amount = “” should be amount=”” as an example.

    #34492

    Bernard
    Senior Member

    Hi.

    Our website requires a simple scoring system.

    I’m looking for code that would give a post author a point each time another user clicks on a button/link – without subtracting it from the user clicking on the link.

    I believe it would be a hybrid between http://codex.mycred.me/shortcodes/mycred_send/ – which allow specifying the author as the recipient and;

    http://codex.mycred.me/shortcodes/mycred_give/ – which allow for new points to be created.

    Many thanks

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Spin to win points 💰
Kindly get back to your previous orientation view... your wheel is rolling there...

Do you really like this awesome addon and wanna use on your site? click here to get it now 👍
myCRED Fortune Wheel special offer unlocked!
You have a chance to win free tokens. Are you feeling lucky? Give it a spin.
* You can spin the wheel only once in a month.
* You can spin again any time by paying 500 points
* Once you pay for spin you are not able to refund it.
You must login to play mycred fortune wheel
11
Happy HolidaysGET DISCOUNT