I am conducting a little study and I need a customization that will extend the function of the WordPress plugin known as MyCred (available at https://wordpress.org/plugins/mycred/).
This MyCred plugin award points to registered users of a WordPress website when certain events happen, such as when they view content (posts or pages), click on special links, watch video, make comments that get approved, etc.
I would like a customization on the Points for Clicking on Link hook and other hooks. The customization will be used on a WordPress multisite installation, which MyCred supports.
For the Points for Clicking on Link hook, the customization should be similar to the default hook that comes with the MyCred installation, except that the new hook will include some lines of code that will ensure that the following four conditions are met before points can be awarded:
Required Conditions (RC) a). Referrer Domains Check to see that the user is visiting from some specific domains (by clicking a link on that domain and landing on my website). This must be limited to unique clicks and referrers. I'd like to have a field under the hook settings in the Admin interface where I can input one or more domains separated by comma. Examples of domains include facebook.com, fb.me, twitter.com, instagram.com, etc. If the field is empty, then this condition can simply be skipped.
b). Specific Posts Check to see that the user has landed on some specific posts or pages (specified by post id). I'd like to have a field on the hook section in the Admin interface where I can input one or more post id's separated by comma. Landing on the homepage or just any other page or post (which I have not included it's ID in the field) should not trigger this condition. If the field is empty, then this condition can simply be skipped.
c). Spent minimum number of minutes on the page Check to see that the user has spent minimum number of minutes on the page/post. This could be 1 minute, 2 minutes or more. I'd like to have a field on the hook section in the Admin interface where I can input the minimum time a user should spend. If the field is empty, then this condition can simply be skipped.
d). Specific Countries Check to see that the user is visiting from some specific countries based on their IP address. I'd like to have a field on the hook section in the Admin interface where I can input one or more country codes separated by comma. I could install this IP detection plugin (https://en-gb.wordpress.org/plugins/geoip-detect/) if that will make the work easier.
Necessary Hooks Needed. I'll be needing the following hooks. Please note that they are not to replace the normal MyCred Hooks. They are meant to just work independently so that I can always turn them off and use the normal MyCred Hooks whenever I wish.
(1). Custom Points for Clicking on Links
This is almost a replica of the normal "MyCred Points for Clicking on Links", except that it can only award points if the four required conditions stated above have been met. There should be new fields where I can input the domains, post IDs, minimum minutes required, and country code (e.g. US for United States, IN for India, CN for China, NG for Nigeria, etc.).
I'd also like to include a time limit (in hours), after which the hook can award points again to same user if they revisit (not refresh) a page of interest from any of the set domains, stay the required minimum minutes, are visiting from a country of interest and click on a link that is connected to mycred. For example, the custom hook could award a set number of points every 1 hour, 3 hours, 6 hours, 12 hours, 1 day, 1 week, etc. This kind of setting exist in the default MyCred Points for Viewing Content hook except that, there, it did not include settings for hours. You can check that our for more understanding. It is important to note that merely refreshing the page, in case the user has been on the page before, should not count as a new visit that can satisfy condition (a) above please. The user has to start a new session by actually clicking from an external domain and landing on the specified posts.
(2). Custom Points for Viewing Videos More like the normal " MyCred Points for Viewing Videos " except that it should have the features that I explained in (1) above.
(3). Custom Points for Comments More like the normal " MyCred Points for Comments " except that it should have the features that I explained in (1) above.
4). Custom Points for Viewing Content More like the normal " MyCred Points for Viewing Content " except that it should have the features that I explained in (1) above.
I'd like to be carried along. If there are any challenges along the way, I'd like to know. I'd also be willing to offer helpful thoughts and ideas or negotiate modifications that can help make the work easier. Please let me know your thoughts and price.