— what your logged-in user is (permissions),
-- Authenticated

— what path (URL without hostname) you're on,
-- user/UID/subscriptions/node.

— where you click
-- NA

— what you expect to happen, and
-- NA

— what happens instead.
-- NA

I think providing a screenshot will help explain my question/issue better.
Only local images are allowed.

My problem lies with the data and heading for "Last Activity, Author, Commented" in the table where each column of data is not given its own table cell and is just separated by commas.

The obvious issue is that the headers do not align with their respective data. Secondly this just becomes a clutter box on smaller mobile devices.

My objective here is to get "Last Activity, Author, and Commented" headers and data into their own cells. Or alternatively just add them all to a ul list which can remain in the current cell. But basically I just need to find a way to be able to get this data to align properly.

Ive found this being generated in subscriptions_content.admin.inc in

function _subscriptions_content_node_form(array $form, $uid) {
.....
    $fields = t('@latest_activity, @authored, @commented');
  }
  else {
    $fields = t('@latest_activity, @authored');
  }
.....
      $subscription['extra_info'] = $tr($fields, array(
        '@latest_activity' => format_interval(time() - $subscription['latest_activity']),
        '@authored' => ($subscription['uid'] == $uid ? $tr('Yes') : $tr('No')),
        '@commented' => (!empty($subscription['commented']) ? $tr('Yes') : $tr('No')),
      ));
      subscriptions_form_helper($form[0], $defaults, $author_uid, $subscription['nid'], $title, $subscription);
.....
}

If there is no simpler solution than overriding this function then I guess my questions would be how exactly can I override this?

Ive been trying to use function MYMODULE_form__subscriptions_content_node_form_alter(array $form, $uid) but this doesnt seem to be working.

Any direction on this is super appreciated.

If theres any info that I can provide to help please just let me know.

Thanks so much!

Clint

CommentFileSizeAuthor
#2 subscriptions-page.png51.81 KBjustclint
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

justclint created an issue. See original summary.

justclint’s picture

FileSize
51.81 KB
salvis’s picture

Status: Active » Fixed

Here's your screenshot:

 

(The reason for putting three columns into one is exactly to save some space, e.g. for small mobile devices.)

_subscriptions_content_node_form() is the implementation of subscriptions_content_page_node(); I put it into a separate .admin.inc file because it's only used for administrative purposes.

subscriptions_content_page_node() goes into subscriptions_page_form(), which returns the form for 'user/%user/subscriptions/node'. So, what you do is you implement hook_form_alter() and dpm($form_id) to find the form ID. Then you implement hook_form_FORM_ID_alter() instead, dpm($form) and massage it into whatever form you like.

Status: Fixed » Closed (fixed)

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