• Resolved Raval

    (@ravals)


    Hi,
    I use the plug and it works great. The addition for custom elements also works great:

    add_action( ‘wp_enqueue_scripts’, ‘gamipress_link_enqueue_scripts’, 100 );

    However, I have a question. How to make the code added above work only on links, posts of other users?
    I added the class to the buddypress activity. However, how can you make Gamipress track only a click on another user’s link?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ruben Garcia

    (@rubengc)

    Hi @ravals

    Our Link add-on includes some events normally called “Get a click” that allows you to award to the post author of the post where the link is placed

    But, there is no way yet to place a link to award to a specific user with our Link add-on

    This is just posible with our Transfers add-on that has a feature to place links that allows to your users transfer points to a specific user (like a “donate” button)

    There is the Transfers add-on page:
    https://gamipress.com/add-ons/gamipress-transfers/

    Best regards

    Thread Starter Raval

    (@ravals)

    Thank you for your response.
    However, I mean adding a function that adds points for clicking a link with the gamipress class, but ignores the click of your own link. I’m not a programmer, and the script does not work, but I hope it will illustrate to some extent what I mean.

    
    if (get_current_user_id ()!= bp_displayed_user_id ())
    {
    add_action ('wp_enqueue_scripts', 'gamipress_link_enqueue_scripts', 100);
    }
    

    Is this option available? If not, can I count on advice how to do it?

    • This reply was modified 5 years, 6 months ago by Raval.
    Plugin Author Ruben Garcia

    (@rubengc)

    Hi @ravals

    This function (described on the plugin readme) is to enqueue a javascript file that has the code to handle the click event but this line doesn’t awards anything

    As I already mentioned you, the unique to reach something similar is through our Transfers add-on, other way implies a custom development and we don’t offer support for this type of customizations

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Click on another user’s link’ is closed to new replies.