Add Transfer Messages

Home / Tutorials / Add Transfer Messages

This feature has been included into myCred as of version 1.7.6 and is no longer available as a tutorial. If you have been using this tutorial to implement transfer messages, please make sure you remove it to prevent conflicts!

  1. Hi Master G.

    This is a brilliant improvement, thanks again.

    I’ve implemented everything but it generates double the transaction. My log template for receiving is: “%display_name% says: %message%” This generates two separate log entries for the recipient: 1) “Admin says: %message%” and 2) “Admin says: my actual message to recipient.” and the transfer takes place x2. Also the instant notification is “Admin says: %message%” I would really appreciate it if you can help me fix this.

    The only thing I am not sure how to do is to add notification support. I looked at your codex for “mycred_notifications_note filter” but it doesn’t really tell me what I need to do. Could you please expand on that.

    Thanks a lot for this improvement.

    1. Hi Gabriel

      I was also able to implement and experience the same issue as Bernard.

      Thanks for the clarifications


    2. Hey Bernard.

      First lets start with the Notifications add-on.
      Since messages are appended to the log entry, all you need to do in order to show the message is to have the %entry% shortcode present in the notifications template. Let me know if this is not a solution for you and I can show you how you can add the message via a custom template tag in your notifications template.

      Regarding duplicate entires, in the above code where you return 'done', change this to return false. It’s related to a bug in 1.3.3 and has to do with priorities. The ‘done’ string should be enough but the bug requires us to use false in order to work.

  2. For “Next we hook into mycred_add and replace this template tag with the message” where is mycred_add ? I cant’t find it. Please advise!

  3. Hi! I just wan to know if this works on a robust q&a theme? Or any question and answer type of themes? I’d like to reward members who post questions and answer questions. Is this the right plugin for me?


    1. Hi.

      myCRED can not support all themes and plugins out of the box. If your Q&A functionalities are added via your theme then you will need to check if there is a way for a third party to “detect” when an answer is posted or when a question is posted in order to award points. If you look in the support forum for “Third Party Hooks” you will see a lot of plugins that I have added custom support for via your themes functions.php file.

      Check out the forum and see if a Q&A plugin you might be using is supported, if not you can always request it.

      The same goes for themes. If you have a particular theme in question and it is free, I would be happy to have a look for you. If it is a premium theme you would need to contact the author and ask him to contact me directly to work out a connection between the theme and my plugin.

  4. Hi Gabriel,

    First of all thanks so much for your plugin. I’m using it in a timebank website and it works great. I have a question: I added an extra field following the instructions above, but is it possible to add another extra field to display in the transfer credit page? And is it possible to rename the fields and customize the message inside the box? Unfortunately, I have extremely limited knowledge of php and I’m not able to answer and I don’t have a clue of how to do that.

    1. Technically you can add or remove any number of fields. You either need to use existing filters to adjust the form and then create a custom script or create a brand new form that contains the information you want the way you want it with a custom script file.

      I understand this can be a bit tricky if you are not comfortable with PHP. If all else fails you can always contact me via the contact form and I can provide you with a quote for the customization.

  5. Thanks so much for your help Gabriel. For the moment I will ask our website members to add the proper info to the extra field we have already implemented rather than in a second extra field as that’s beyond my capabilities. If the website grows I’ll come back to you for a quote. I appreciate your quick reply anyway

  6. This code is not working on two different websites. The form, when the “Transfer Coins” button is clicked, the button gets stuck on “Processing”. Any suggestions?

  7. I’m seeing the same issue as Ashwin in 1.7.5. Using the code provided in this tutorial, when I attempt to process the transfer the submit button changes to “Processing” as expected but the page stalls the transfer never occurs.

    1. Hey.

      This tutorial has been out of sync with myCRED for a while now and I have received a lot of requests to add this to myCRED, so as of 1.7.6 it will be a built-in feature making this tutorial obsolete.

  8. Hi Gabriel,

    Any ETA for version 1.7.6 so messages are included natively?


Comments are closed.

Last edited June 11, 2021