This feature was sponsored by http://www.advancinginsights.com/. It allows you type in a brief message (255 chars are less) when requesting someone to join your buddylist in approval mode. The message is displayed with their login message notification and in the pending tables. Very useful for giving the requested user a little context as to who you are and why you are requesting their approval.

See ->

http://img381.imageshack.us/img381/4350/buddymsgmr5.png
http://img381.imageshack.us/img381/9389/buddymsg2gy0.png
http://img479.imageshack.us/img479/9756/buddymsg3ul2.png

Their are 2 patch files one for buddylist.install since this requires a schema update and the one for the buddylist.module. The zip also contains the a working buddylist.module for reference.

CommentFileSizeAuthor
#3 invitemessage.patch5.1 KBdldege
request_message.zip_.txt16.78 KBdldege
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rkn-dupe’s picture

Thanks will try it.

robertDouglass’s picture

Version: master » 5.x-1.x-dev
Status: Needs review » Needs work

I think that showing the message in drupal_set_message looks really sloppy. Maybe we can skip that part. In principle, I like the feature. Maybe you could reroll against DRUPAL-5 without the set_message?

dldege’s picture

Status: Needs work » Needs review
FileSize
5.1 KB

took out the message display from buddylist_setmsg_received(). Re-rolled.

I was also missing code in buddylist.install for making the table changes needed as part of the install, not just update.

robertDouglass’s picture

In the future, please roll patches using cvs diff -u -F^f. Thanks.

dldege’s picture

OK - my CVS skills are pretty weak - what does that do?

robertDouglass’s picture

the -u flag puts it in unified diff format and the -F flag gets it to include an extra line. the ^f is then a regular expression that matches f at the beginning of lines (aka function blah...) and includes that line so that humans (who think in terms of functions) can find the code easily and read the patch better. Here's a snippet of a patch that was made this way:

@@ -918,9 +934,20 @@ function search_view($type = 'node') {   <--- THIS PART FROM -F^f
       // Log the search keys:
       watchdog('search', t('%keys (@type).', array('%keys' => $keys, '@type' => module_invoke($type, 'search', 'name'))), WATCHDOG_NOTICE, l(t('results'), 'search/'. $type .'/'. $keys));
 
-      // Collect the search results:
-      $results = search_data($keys, $type);
-
+      // Look to the cache to see if this is a popular (thus cached) query
+      $request_uri = strtolower($base_root . request_uri());
+      $results = NULL;