Hi

I can create my own views with list of my friends, but I can't add there Elaboration message as the field next to user name. There is no elaboration option in user relationships views.

canyou please add it there?

thanks a lot
Igorik

Comments

alex.k’s picture

A patch implementing it would be welcome. There were older issues on this, too.

igorik’s picture

I am sorry but I have no skills for it.

Have a nice day and thanks for your work on this module.

tic2000’s picture

Status: Active » Needs review
StatusFileSize
new2.13 KB

My first git patch. I hope the format is OK.
I did not test it in this format (in my case I have it in a custom module), but it was just copy and paste and it should work.

berdir’s picture

Looks good, only some minor coding style issues, see below. I don't commit stuff to 6.x but I can commit your patch to 7.x if you can do a quick re-roll.

+++ b/user_relationship_elaborations/user_relationship_elaborations.views.incundefined
@@ -0,0 +1,43 @@
+// $Id$

Minor, but that is not necessary anymore. Git doesn't do anything with $Id$.

+++ b/user_relationship_elaborations/user_relationship_elaborations.views.incundefined
@@ -0,0 +1,43 @@
+      ),
+    ),       ¶
+  );
+  return $tables;
+}

Trailing spaces.

Powered by Dreditor.

tic2000’s picture

OK, here are patches for D6 and D7.
But I never tried views in D7 so I don't know if something changed in the way the tables are declared.

berdir’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
StatusFileSize
new2.12 KB

Don't use the -Dx suffix as that will be ignored by the testbot.

Re-uploading your patch.

berdir’s picture

#6: 930094-elaborations_views-5.patch queued for re-testing.

konordo’s picture

Thank you for the nice patch, works like a charm.

As a quick note: if anyone has trouble with this, you should check the Views module version you are using. This patch assumes you are using Views 3. In case you are using Views 2.x, the code should be changed accordingly.

So, this

+function user_relationship_elaborations_views_api() {
+  return array(
+    'api' => 3,
+    'path' => drupal_get_path('module', 'user_relationship_elaborations'),
+  );
+}

Should change to this

+function user_relationship_elaborations_views_api() {
+  return array(
+    'api' => 2,
+    'path' => drupal_get_path('module', 'user_relationship_elaborations'),
+  );
+}

Notice the 'api' => 2 line.

berdir’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev

Commited to 7.x-1.x, back to 6.x-1.x

rolando.alevelbeyond’s picture

Version: 6.x-1.x-dev » 7.x-1.0-alpha4
Category: feature » support
Priority: Normal » Major

Urgent question..

this patch (that's included in the latest alpha version of UR) adds the elaboration message to views, but only when my view type is user relationships.. for some reason when i use a views (views 3 btw) of USERS.. i get all the user relationship fields except this one.. please help.. how can I expose this field to the USERS type of view as well?

Thanks!