Here is simple patch for additional tokens: ['requestor-uid'], ['requestee-uid'], ['requestor-url'], ['requestee-url']
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | flag_friend_tokens.patch | 883 bytes | Scott Reynolds |
| #1 | flag_friend.module.patch | 1.14 KB | mrjavum |
| flag_friend.module.patch | 1.12 KB | mrjavum |
Comments
Comment #1
mrjavum commentedThe fixed patch with base_path() in URL
Comment #2
sirkitree commentedcommitted. thanks!
Comment #3
Scott Reynolds commentedeeek! no need for base_path()
See attached patch to fix.
Comment #4
mrjavum commentedBut if I need to transfer site for another domen? The messages with absolute paths will be wrong...
Comment #5
sirkitree commented@mrjavum - actually, if you look at the api docs (http://api.drupal.org/api/function/url/6) you will see that the change Scott made does exactly the same thing by using the last argument options of absolute = true.
Please apply the patch and test it out and let me know if it really doesn't work for you.
Comment #6
mrjavum commentedYes, I read about url function.
But by analogy with token module (token_user.inc)
the relative path is better then absolute path (with http://www.example.com in path)
Comment #7
Scott Reynolds commentednope, they will be fine.
Comment #8
mrjavum commentedF.e. my site is on www.site1.com and all recorded messages contains links like this http://www.site1.com/user/1
I decided to transfer it to www.site2.com and all recorded messages with www.site1.com in path will be incorrect, or I'm not right?
Comment #9
Scott Reynolds commentedIn the case of activity module, yes. But then your patch would have the same problem. Perhaps @sirkitree, these should be relative paths. Absolute paths only useful for things like email.
edit: this is only the case for Activity2. Any other way these tokens are used will be fine. Even transfering from one site to another.
Comment #10
sirkitree commentedYes, I'm thinking they need to be relative. That way when you do change sites the links will still work.
Comment #11
sirkitree commentedThis was implemented.