0

I am using User Relationships module. Its working fine. But I want to change a default message which get displayed on user site after getting request.

The message is like

"John has requested to be your Friend. View your pending relationship requests to approve or decline."

I want same message to be displayed as

"John has requested to be your Friend. View your pending friend requests to approve or decline."

Just want to replace the word relationship with friend. How can I do that?

1
  • try disable messages module to disable the message and rules to add a message on an event that you specify in the ui.
    – SDMulroy
    Commented Jul 3, 2014 at 5:39

1 Answer 1

0

User Relationship module allows you to set your own message, you can override the default message by settting a variable using variable_set("user_relationships_msg_{$key}", "Custom Message"), check the functions user_relationships_get_message() and _user_relationships_default_messages().

4
  • I have tried this. But it is replacing all the site wide words. For an instance Relationship word in view's edit page. Since the above message is having link in it, we cant change the whole sentence using String overrides module.
    – D-pak
    Commented Jul 3, 2014 at 5:49
  • @D-pak Updated the answer
    – msmani
    Commented Jul 3, 2014 at 6:16
  • Ok wolverine I will do that, but what if my module gets updated. Will the changes remain same? or will all changed get back to the default again?
    – D-pak
    Commented Jul 3, 2014 at 6:21
  • Implement hook_enable() in your module install file and set the variables, similarly in hook_disable() delete the variables. In that way the changes will be there as long as your module is enabled.
    – msmani
    Commented Jul 3, 2014 at 6:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.