I have required sent direct message in a popup[Same as attached screen] . How it's configured. When i have clicked on the sent message button it will be redirected to the new page . Please some one help it. My client has urgent requirement.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ezra-g’s picture

Title: Direct message in a popup » Private message in a popup
Component: User interface » Trusted Contacts and Private Messaging
Assigned: rinkiprasad » Unassigned
Category: support » feature
Priority: Major » Normal

What you're requesting is a feature request. Updating the project components. You can help this feature happen by filing a patch.

I've updated the meta-data for this issue to be more accurate. I encourage you to take a moment to read the documentation on getting the most from the issue queue.

rinkiprasad’s picture

I am new with drupal. Kindly provide us the module name or settings details which helps me for open private message in a popup.

ezra-g’s picture

To reiterate on #1: That functionality doesn't currently exist in Drupal Commons and would need to be added through via a patch to the source code.

japerry’s picture

Probably the most light-weight way to do this is with the modal forms module. But it will require code, as Ezra said. Modal forms gives you an API to develop your own module which would bring a popup upon clicking.

https://drupal.org/project/modal_forms

I do like the feature idea!

stewart.adam’s picture

Attached is a quick patch that adds support for modal_forms. We may want to adjust the URLs (particularly if there's going to be more than just a 'message' action in the future) but this should do for now.

ezra-g’s picture

Status: Active » Needs review

Thanks for the patch! Marking as "needs review."

japerry’s picture

Version: 7.x-3.3 » 7.x-3.x-dev
Issue tags: +commons 7.x-3.12 radar
FileSize
7.87 KB

I've made some changes to the original patch, which was lacking permissions, theming, and a few other things. I think we're about production ready for this, but would want another skimming over the review.

Devin Carlson’s picture

Status: Needs review » Needs work
  1. +++ b/drupal-org.make
    @@ -268,6 +268,10 @@ projects[module_filter][type] = "module"
    +projects[modal_forms][type] = "module"
    +projects[modal_forms][subdir] = "contrib"
    +projects[modal_forms][version] = "1.2"
    

    The Modal forms module adds support for opening common forms in a ctools modal. I think adding it here is outside of the scope of this issue.

  2. +++ b/modules/commons/commons_trusted_contacts/commons_trusted_contacts.module
    @@ -7,6 +7,15 @@
    +function commons_trusted_contacts_init() {
    +  if (module_exists('modal_forms')) {
    +    _commons_trusted_contacts_add_modal_js();
    +  }
    

    hook_init() and drupal_add_* made Devin sad. :(

    The JavaScript should be #attached to whatever render array is responsible for triggering the modal. If it can be triggered on any page then it can be added to the page in hook_page_build().

  3. +++ b/modules/commons/commons_trusted_contacts/commons_trusted_contacts.module
    @@ -1154,6 +1175,73 @@ function commons_trusted_contacts_operations_load_action_includes() {
    +/*
    + * A modal user login callback.
    + */
    

    Incorrect docblock (probably just a copy+paste error).

  4. +++ b/modules/commons/commons_trusted_contacts/views/handlers/commons_groups_handler_send_message.inc
    @@ -5,6 +5,11 @@ class commons_trusted_contacts_handler_send_message extends views_handler_field
    +    if (module_exists('modal_forms')) {
    +      return l(t('Send private message'), 'user/' . $user->uid . '/contacts/messages/nojs/popup/' . $values->og_membership_etid, array('attributes' => array('class' => array('ctools-use-modal', 'ctools-modal-message-popup-style'))));
    +    }
    +    else {
    +      return l(t('Send private message'), 'user/' . $user->uid . '/contacts/messages/nojs/popup/' . $values->og_membership_etid);
    +    }
    

    Could probably be replaced by ctools_modal_text_button().