Hi,
Thank you for this wonderful module. I seem to have a slight problem. When I click 'Add to my Network', the popup works fine and able to add the user.
But when clicking on 'Remove from my Network', the popup appears, but does not load fully. It stays stuck. So basically cannot remove the user.
The following on my content profile tpl.
<?php if (count(array_intersect($user_roles, $approved_roles)) > 0) { ?>
<div><?php
if ($node->uid != $user->uid) {
if ($relationships = user_relationships_load(array('between' => array($user->uid, $node->uid)))) { print "<a href=\"$uid/relationships/1/remove\" class=\"user_relationships_popup_link\">" . t('Remove from my Network') . "\n"; }
else { print ("<a href=\"" . $GLOBALS['base_url'] . "/relationship/$node->uid/request/1\" class=\"user_relationships_popup_link\">" . t('Add to my Network') . "\n"); } }
?></div>In error report says 'page not found'.
Any help would be most appreciated.
Lilian
Comments
Comment #1
63reasons-AS commentedTry the following if it work, Not sure
if (count(array_intersect($user_roles, $approved_roles)) > 0) {<div>
</div>
Comment #2
liliplanet commentedThank you 63reasons. I tried the above, and still the same, does not load.
In my error reports I realize that it adds a url alias, in this case member/user/1/relationships/$uid/remove, so when I add the full website url (http://www.mysite.com/user/1/relationships/$uid/remove), it works.
Wonder why it's adding a url alias, but all good now, it works, and thank you so much!
Comment #3
dummas_324324_32 commentedhi,
how can I create a link to remove a user from my friendslist..
/user/MY-ID/relationships/FRIENDS-ID/remove
does not work... under relationships it creats a url like /user/MY-ID/relationships/RELATIONSHIP-ID/remove
but how can I get the relationship-id??
any idea?
Comment #4
dummas_324324_32 commentedpush..
any idea?
Comment #5
alex.k commentedTry the following:
if (count(array_intersect($user_roles, $approved_roles)) > 0) {This was adapted from functions theme_user_relationships_remove_link and theme_user_relationships_request_relationship_direct_link in user_relationships_ui.theme.inc
Comment #6
mrf commentedGoing to assume this question has been answered. If you were involved in this issue and need additional guidance feel free to set to active or re-open, if not the best way to get help is to open a new support request.