Great module, thanks :)
I was wondering if it might be possible to allow Flag Friend to accept the username in the path argument when desired instead of the UID. For all of my user-related paths and pages I've setup the Views to accept the username as the argument, though for some reason I can't seem to get this to work using the usual method in Views with Flag Friend. I adjusted the arguments on the views to "allow string usernames" but that didn't do the trick, so I believe (unless I'm doing it wrong, possible) that Flag Friend doesn't yet support this. My hope is to keep all of the end user's personal paths on the site consistent and simple for them to understand and remember... I'm close to accomplishing this in most areas, but stuck on Flag Friend so far.
Again thanks for the excellent module.
Comments
Comment #1
sirkitree commentedI'm fairly sure that Views does this work you. For example, I have the username for user 1 on my site as 'superadmin'. If I go to /user/superadmin/friends Views interprets 'superadmin' as '1' which is then used as the argument for the view.

This is done in the view by not actually using any of the 'Validator options' which is where I believe (correct me if I'm wrong) you are trying to "allow string usernames".

Please reopen if you are still having problems after setting the Validator in this way.
Comment #2
dnewkerk commentedHey sirkitree -
I went ahead and reset my arguments as you showed in your screenshots... I also (to confirm) re-enabled an older copy of Flag Friend I had on a separate test site, tried that, then also uninstalled it completely and installed the current version and tried that. In all cases I'm using the most current release of Flag module.
What happens is that user/1/friends of course works as normal and shows that user's friends. Going to user/admin/friends (aliased username) still returns the Friends page without an error and shows the sub-navigation for Flag Friend, however it has none of the user's friends, and returns the message "No Friends have been added." This was what originally got me to go digging around in the argument settings thinking perhaps some other configuration might have better luck.
Hope this explanation helps. Please let me know if there's anything I can do to help or test further.
Comment #3
bentonboomslang commentedI am having a very similar problem. I suspect it is a bug of some sort.
When I navigate to the friend list page using the link on the Profile page all functions perfectly. However I have put a link on the primary navigation using the "me" module (this module replaces the string "me" in urls with the uid of the current user. i.e. in my primary navigation I have made the link "user/me/contacts").
When I follow this link, the contact page appears to display as normal only none of the users friends are returned (instead the empty text).
Do you know how this can be fixed.
Thanks very much,
B
Comment #4
bentonboomslang commentedOK I think I may have solved this one (or at least found a suitable workaround).
I was trying to include a link in the primary links called "My Contacts" which displayed a list of all the current user's friends.
The way I did it was to create a new page view,
The path was people/my_contacts and the title was My Contacts,
There are no relationships
Under arguments add a "Flag Friends: Friends of" argument and under "Action to take if argument is not present: " select "Provide default argument" and then "User ID from logged in user".
This works because: as there are no arguments in the path this is always the case i.e. My Contacts always shows the logged in user's friends.
Save this.
And you should be done - you can now create a primary link with no arguments in the href.
B
Comment #5
sirkitree commentedClosing due to inactivity.