I saw another module, relationships, that has a nice remove link on the actual friendslist so you dont have to visit the other persons profile.

is this a possible new feature?

Comments

criz’s picture

hi, this would be no problem. just theme the friendslist-view and add a new column with the delete link:
/buddy/delete/UID

alternatively somebody could provide a buddy delete views field...

instantgeek’s picture

Version: » 5.x-1.x-dev

i've added both 'remove' and 'add' views fields, it's not too hard to do. i wonder if these will make it to the module?

liliplanet’s picture

Hi,

That is of great interest to me.

Please would you be so kind to show the full code for 'friendslist-view and add a new column with the delete link: /buddy/delete/UID' ?

Would most appreciate your help and thank you.
Lilian

nodestroy’s picture

Status: Active » Fixed

this links are now included. the views field name is "Buddylist: Actionlink". On your buddylist it will show a delete link, on a userlist it will add a delete or an add link.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

liliplanet’s picture

Category: feature » bug
Status: Closed (fixed) » Active

Hi,

Got it all beautifully work, but unfortunately the actionlink stays at 'Add to my buddylist' in the view buddy_api_buddylist.

Have cleared cache, uninstalled, re-installed, but still 'add to my buddylist' when the user is already a buddy.

Will this perhaps be corrected in the next version, or maybe a little fix please ..

Look forward to hearing from you.
Lilian

liliplanet’s picture

Oops, was my mistake. I uninstalled Buddylist (not 2) and that obviously deleted some tables. All good now, and thanx!

telefunken’s picture

sorry, may be i'm stupid, but i don't get a add link....i just can invite people per mail...can someone give me advice

criz’s picture

Category: bug » feature
Status: Active » Fixed

@ telefunken

You have a add/remove link on the userpages (user/UID). But you can also list users with views and display an add/remove link in it. See http://drupal.org/node/220959#comment-947483.

telefunken’s picture

thanks chriz! but i don't get a link. i tried other themes and so on. maybe because i use domainaccess!? can you give me the code? i can simply try to create a block...! i also tried to add a field called buddylist:actionlink to a block. nothing happens!?

telefunken’s picture

Version: 5.x-1.x-dev » 5.x-1.0-beta2
Status: Fixed » Active
telefunken’s picture

maybe i'm using the wrong version!? 5.x-1.x-dev or 5.x-1.0-beta2 is working?

criz’s picture

Should work both I think...

el_reverend’s picture

using latest beta and actionlinks are not included. Is there a way to manually add them to a view (page)?

criz’s picture

yes, there is a buddylist:actionlink viewsfield. just add it to your buddylist view.

see this view for example:

$view = new stdClass();
  $view->name = 'buddy_api_my_buddylist';
  $view->description = 'list of my buddies (for block use - shows everytime the buddies of the logged user)';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = FALSE;
  $view->page_title = '';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'table';
  $view->url = '';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->block = TRUE;
  $view->block_title = 'My Buddylist';
  $view->block_header = '';
  $view->block_header_format = '1';
  $view->block_footer = '';
  $view->block_footer_format = '1';
  $view->block_empty = '';
  $view->block_empty_format = '1';
  $view->block_type = 'table';
  $view->nodes_per_block = '10';
  $view->block_more = TRUE;
  $view->block_use_page_header = FALSE;
  $view->block_use_page_footer = FALSE;
  $view->block_use_page_empty = FALSE;
  $view->sort = array (
  );
  $view->argument = array (
  );
  $view->field = array (
    array (
      'tablename' => 'users',
      'field' => 'name',
      'label' => '',
    ),
    array (
      'tablename' => 'baj_node_buddylist_users',
      'field' => 'buddy_actionlink',
      'label' => '',
      'handler' => 'buddy_api_views_handler_action_link',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'usernode',
),
    ),
    array (
      'tablename' => 'baj_node_buddylist_users',
      'field' => 'currentid',
      'operator' => '=',
      'options' => '',
      'value' => '***CURRENT_USER***',
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(users, baj_node_buddylist_users, node);
  $views[$view->name] = $view;