Hi guys,
Just wonder if it's possible to:
1. Force a fixed message while "Add to friends" is clicked in the first time. The fixed message should only allow system administrator to configure.
2. If user A blocks user B but later decides to remove it, "Add to friends" should not send a confirmation message again.
I cannot configure above situation in Rules module. If it could be done via Rules module, please tip me. Great appreciate.
-MX
Comments
Comment #1
mercmobily commentedHi,
I am afraid neither of them are possible with Rules and Friendlist... not that I know of anyway :(
They are pretty specialised things... I *guess* you could study Rules' code and figure out if they have the necessary hooks to do that.
Ah wait. Wait wait wait.
Friendlist_api calls this:
module_invoke_all('friendlist_relations', 'add', 'pre', $requester, $requestee, $rtid, $message, $old_status, NULL, $user_generated);
This means that you can write your own custom code that checks if that's the first time a request is fired up, and if that's the case, change $message accordingly. You can also change friendlist_ui_relation_form() (through a hook obviously... don't change the code!) so that the same thing happens: if it's the first time a relation is asked, the default message is displayed and you don't allow editing of it.
I am afraid (2) is impossible, because of the nature of Rules. The only possible path is to figure out what kind of hook you'd need in Rules to be able to plugin extra checks for actions in Rules, write a patch ready to go, and try to get it accepted in Rules.
Sorry about the late answer...
Merc,
Comment #2
mercmobily commented