I am conducting a little study and I need a custom code snippet or plugin to continue.
The job here for a programmer is basically to write code snippet (or separate plugin) in order to extend the functionality of MyCred Plugin (available at [login to view URL] and [login to view URL]).
This MyCred plugin award points to registered users of a WordPress website when certain events happen; like when they view posts, publish posts, make comments that get approved, etc.
Now I want an extended functionality which should be made possible by the code snippet to be written by the programmer.
Some samples of official code snippets/plugins that you should emulate are available at [login to view URL]
An example of how to write one is also available at [login to view URL]
The work is slightly similar with the concept at [login to view URL] and [login to view URL]).
The Code Snippet should trigger:
1. for the following three events (more about events available at [login to view URL] );
- Points for viewing content (award points which I would specify in the code and can change anytime)
- Points for approved / trashed / spammed comments. (award points for comments which I would specify in the code and can change anytime)
- Points for daily site visit. (award points which I would specify in the code and can change anytime)
2. if a registered user satisfies all the conditions below:
- is visiting from any known search engine (like Google, Yahoo, etc),
- has used a search term on the search engine that matches with any of the terms (maybe about three or more) that I have specified in the code snippet (white spaces should be irrelevant).
- is viewing and/or commenting on a post that has been specified (using post id or a more suitable parameter) in the Code Snippet (this means that not all posts from the blog can trigger the code snippet)
- has allowed a specified time (in hours) to elapse after the last time the user visited the same post. For example, if the expiry time is set to two hours, a user who meets all other criteria can be awarded points every two hours that he vistis.
In other words, I want the code snippet/plugin to award points if the registered user is visiting my site or viewing a post from search engine (based on some specific search terms that I can easily change), such that if the visitor is not visiting from any known search engine (like Google, Yahoo, etc), the code snippet should not trigger and therefore MyCred should work based on the default settings (same with when the registered user is visiting from a search engine but not with the specified search terms).
But if the registered user is visiting from a search engine using any of the search terms that I have specified, then some additional points (that I will specify and can easily change in the code snippet) should be awarded to the user. Same with if the user comments on that particular post or if it is the first time the user is visiting the blog for that day (daily visit).
The Code should be written in such a way that I can specify a number of posts (maybe using post ID) that those points can only we awarded on, so that it does not award more and more points when the user starts to click on all the posts on the blogs.
So if the visitor that has been referred from search engine to one of the selected posts, and then clicks on a link on that post or goes to another page (that is not selected in the code snippet), these special points will not be awarded and only the default MyCred settings will apply.
See attached document for more...