Adding a REMOVE link to the buddylist

bjraines - February 12, 2008 - 21:02
Project:Buddylist2
Version:5.x-1.0-beta2
Component:Buddylist UI
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

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?

#1

criz - February 13, 2008 - 00:14

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...

#2

instantgeek - February 29, 2008 - 19:49
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?

#3

Liliplanet - June 4, 2008 - 11:28

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

#4

nodestroy - August 2, 2008 - 09:52
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.

#5

Anonymous (not verified) - August 16, 2008 - 09:53
Status:fixed» closed

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

#6

Liliplanet - September 10, 2008 - 15:39
Category:feature request» bug report
Status:closed» 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

#7

Liliplanet - September 11, 2008 - 00:20

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

#8

telefunken - September 11, 2008 - 12:15

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

#9

criz - September 11, 2008 - 12:51
Category:bug report» feature request
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.

#10

telefunken - September 11, 2008 - 18:36

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!?

#11

telefunken - September 11, 2008 - 18:44
Version:5.x-1.x-dev» 5.x-1.0-beta2
Status:fixed» active

#12

telefunken - September 12, 2008 - 10:38

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

#13

criz - September 12, 2008 - 10:56

Should work both I think...

#14

el_reverend - January 6, 2009 - 01:10

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

#15

criz - January 6, 2009 - 18:07

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;

 
 

Drupal is a registered trademark of Dries Buytaert.