• Resolved mewcrazy

    (@mewcrazy)


    Hello,

    I’m using the myCred Plugin to give my users Coins for certain actions on my website. Now I want to integrate it with WP-Polls.

    I want to call a php function when a user successfully votes for a poll.

    Can you tell me if you have a hook for that prepared or how I could achieve it without editing your plugin’s core files?

    Kind Regards,
    Dennis Bitsch

    https://www.ads-software.com/plugins/wp-polls/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Lester Chan

    (@gamerz)

    I have added in for the next version, in the mean time you can download the dev version https://github.com/lesterchan/wp-polls/archive/master.zip

    The action hook is wp_polls_vote_poll_success

    Mewcrazy – I’ve just asked a similar question before I found yours. I am looking to integrate a point / gamification system that has the flexibility to integrate with polls or any other thing I like. As you may know, most of the existent systems are very specific in what activities may earn points. I am sensing you might have found a way to achieve this flexibility. Is this correct and would you mind telling me about it?

    Thread Starter mewcrazy

    (@mewcrazy)

    Hey, sure. I’m using the plugin MyCred, it offers everything you need. Simple shortcodes are available too. Check their documentation for more.

    Just installed it and so far it does indeed look flexible. The biggest thing I like is the amount of freely-given help, code snippets, etc.

    Hello again. Using both of these now! ??
    Some of the MyCred hooks natively allow for limits, but the one for WP-Polls does not. I’d like to limit the point-awarding for polls per day, since I have a random poll page; instead of having users being able to just refresh the page and keep racking up points…I’d like to limit per day in the WP-Polls section. Any ideas?

    Thread Starter mewcrazy

    (@mewcrazy)

    I didn’t succeed in integrating the hook yet and moved on to other tasks. Could you help me with it and share the code snippet maybe? ??

    I’ll take a look at your code and see if I can help with the limit until Lester got time to help us ??

    Well I have a weird answer for you…
    While searching for answers about this very issue, I came across a post / forum reply / something (it’s been long enough now for me to forget the exact location but I feel like it wast Github) where someone was asking for something similar to the hook of mycred and wp-polls. Lester has been working on updated versions of the plugin and depositing them there. So, I uninstalled official version and installed the one from there. This new version has this hook built-in. It worked great. But then I was having some other various issues, as the code for the Gist version is not completely updated and it wasn’t keeping my questions and answers properly, but was adding points via mycred for polls.

    I asked him when he’d make the official release of the plugin and he said not til the new release of WP, which looks to be mid-to-late August. So, I decided to uninstall the Github version, so I could at least have the polling functionality – so I could work on writing pre-release poll questions etc. til the update.

    So I uninstalled it and re-installed the official version.
    BUT…interestingly enough…the hook stayed!!!

    So that is a round-about answer but it’s what I did. ??

    Update: Looks like here’s the Github: WP-Polls

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘After Vote hook for myCred Integration’ is closed to new replies.