diff --git a/includes/grayside_oa_feeds.views.inc b/includes/grayside_oa_feeds.views.inc deleted file mode 100644 index 153ac01..0000000 --- a/includes/grayside_oa_feeds.views.inc +++ /dev/null @@ -1,40 +0,0 @@ - array( - 'path' => drupal_get_path('module', 'grayside_oa_feeds') .'/includes', - ), - 'handlers' => array( - 'grayside_oa_feeds_handler_field_activity_path' => array( - 'parent' => 'atrium_handler_field_activity', - ), - 'grayside_oa_feeds_handler_field_activity_user' => array( - 'parent' => 'atrium_handler_field_activity', - ), - ), - ); -} - -/** - * Implementation of hook_views_data(). - */ -function grayside_oa_feeds_views_data() { - $data = array(); - $data['comments']['atrium_activity_path'] = array( - 'real field' => 'cid', - 'title' => t('Activity path'), - 'help' => t("Path for poor man's activity field."), - 'field' => array('handler' => 'grayside_oa_feeds_handler_field_activity_path'), - ); - $data['comments']['atrium_activity_user'] = array( - 'real field' => 'cid', - 'title' => t('Activity user'), - 'help' => t("User for poor man's activity field."), - 'field' => array('handler' => 'grayside_oa_feeds_handler_field_activity_user'), - ); - return $data; -} \ No newline at end of file diff --git a/includes/grayside_oa_feeds.views_default.inc b/includes/grayside_oa_feeds.views_default.inc deleted file mode 100644 index d073528..0000000 --- a/includes/grayside_oa_feeds.views_default.inc +++ /dev/null @@ -1,437 +0,0 @@ -name = 'oa_feeds_dashboard'; - $view->description = 'Atrium > Intranet > Feed'; - $view->tag = 'atrium'; - $view->view_php = ''; - $view->base_table = 'node'; - $view->is_cacheable = FALSE; - $view->api_version = 2; - $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ - $handler = $view->new_display('default', 'Defaults', 'default'); - $handler->override_option('relationships', array( - 'group_nid' => array( - 'label' => 'Group node (post)', - 'required' => 1, - 'id' => 'group_nid', - 'table' => 'og_ancestry', - 'field' => 'group_nid', - 'override' => array( - 'button' => 'Override', - ), - 'relationship' => 'none', - ), - )); - $handler->override_option('fields', array( - 'feature' => array( - 'label' => 'Spaces feature', - 'alter' => array( - 'alter_text' => 0, - 'text' => '', - 'make_link' => 0, - 'path' => '', - 'link_class' => '', - 'alt' => '', - 'prefix' => '', - 'suffix' => '', - 'target' => '', - 'help' => '', - 'trim' => 0, - 'max_length' => '', - 'word_boundary' => 1, - 'ellipsis' => 1, - 'html' => 0, - 'strip_tags' => 0, - ), - 'empty' => '', - 'hide_empty' => 0, - 'empty_zero' => 0, - 'link_to_node' => 0, - 'machine_name' => 0, - 'exclude' => 0, - 'id' => 'feature', - 'table' => 'spaces_node', - 'field' => 'feature', - 'override' => array( - 'button' => 'Override', - ), - 'relationship' => 'none', - ), - 'atrium_activity_timestamp' => array( - 'label' => '', - 'alter' => array( - 'alter_text' => FALSE, - 'text' => '', - 'make_link' => FALSE, - 'path' => '', - 'alt' => '', - 'link_class' => '', - 'prefix' => '', - 'suffix' => '', - 'target' => '', - 'trim' => FALSE, - 'max_length' => '', - 'word_boundary' => TRUE, - 'ellipsis' => TRUE, - 'strip_tags' => FALSE, - 'html' => FALSE, - ), - 'empty' => '', - 'hide_empty' => 0, - 'empty_zero' => 0, - 'time_horizon' => 30, - 'exclude' => 0, - 'id' => 'atrium_activity_timestamp', - 'table' => 'comments', - 'field' => 'atrium_activity_timestamp', - 'relationship' => 'none', - 'date_format' => 'custom', - 'custom_date_format' => 'r', - 'override' => array( - 'button' => 'Override', - ), - ), - 'atrium_activity' => array( - 'label' => '', - 'alter' => array( - 'alter_text' => FALSE, - 'text' => '', - 'make_link' => FALSE, - 'path' => '', - 'alt' => '', - 'link_class' => '', - 'prefix' => '', - 'suffix' => '', - 'trim' => FALSE, - 'max_length' => '', - 'word_boundary' => TRUE, - 'ellipsis' => TRUE, - 'strip_tags' => FALSE, - 'html' => FALSE, - ), - 'time_horizon' => '30', - 'exclude' => 0, - 'id' => 'atrium_activity', - 'table' => 'comments', - 'field' => 'atrium_activity', - 'relationship' => 'none', - 'override' => array( - 'button' => 'Override', - ), - ), - 'title' => array( - 'label' => 'Description', - 'alter' => array( - 'alter_text' => 1, - 'text' => 'From the [title] group.', - 'make_link' => 0, - 'path' => '', - 'link_class' => '', - 'alt' => '', - 'prefix' => '', - 'suffix' => '', - 'target' => '', - 'help' => '', - 'trim' => 0, - 'max_length' => '', - 'word_boundary' => 1, - 'ellipsis' => 1, - 'html' => 0, - 'strip_tags' => 0, - ), - 'empty' => '', - 'hide_empty' => 0, - 'empty_zero' => 0, - 'link_to_node' => 0, - 'exclude' => 0, - 'id' => 'title', - 'table' => 'node', - 'field' => 'title', - 'relationship' => 'group_nid', - 'override' => array( - 'button' => 'Override', - ), - ), - 'nid' => array( - 'label' => 'Nid', - 'alter' => array( - 'alter_text' => 0, - 'text' => '', - 'make_link' => 0, - 'path' => '', - 'link_class' => '', - 'alt' => '', - 'prefix' => '', - 'suffix' => '', - 'target' => '', - 'help' => '', - 'trim' => 0, - 'max_length' => '', - 'word_boundary' => 1, - 'ellipsis' => 1, - 'html' => 0, - 'strip_tags' => 0, - ), - 'empty' => '', - 'hide_empty' => 0, - 'empty_zero' => 0, - 'link_to_node' => 0, - 'exclude' => 0, - 'id' => 'nid', - 'table' => 'node', - 'field' => 'nid', - 'override' => array( - 'button' => 'Override', - ), - 'relationship' => 'none', - ), - 'mail' => array( - 'label' => 'E-mail', - 'alter' => array( - 'alter_text' => 0, - 'text' => '', - 'make_link' => 0, - 'path' => '', - 'link_class' => '', - 'alt' => '', - 'prefix' => '', - 'suffix' => '', - 'target' => '', - 'help' => '', - 'trim' => 0, - 'max_length' => '', - 'word_boundary' => 1, - 'ellipsis' => 1, - 'html' => 0, - 'strip_tags' => 0, - ), - 'empty' => '', - 'hide_empty' => 0, - 'empty_zero' => 0, - 'link_to_user' => '0', - 'exclude' => 0, - 'id' => 'mail', - 'table' => 'users', - 'field' => 'mail', - 'override' => array( - 'button' => 'Override', - ), - 'relationship' => 'none', - ), - 'atrium_activity_path' => array( - 'label' => 'Activity Path', - 'alter' => array( - 'alter_text' => FALSE, - 'text' => '', - 'make_link' => FALSE, - 'path' => '', - 'alt' => '', - 'link_class' => '', - 'prefix' => '', - 'suffix' => '', - 'target' => '', - 'trim' => FALSE, - 'max_length' => '', - 'word_boundary' => TRUE, - 'ellipsis' => TRUE, - 'strip_tags' => FALSE, - 'html' => FALSE, - ), - 'empty' => '', - 'hide_empty' => 0, - 'empty_zero' => 0, - 'time_horizon' => 30, - 'absolute' => 1, - 'exclude' => 0, - 'id' => 'atrium_activity_path', - 'table' => 'comments', - 'field' => 'atrium_activity_path', - 'relationship' => 'none', - ), - 'atrium_activity_user' => array( - 'label' => 'Activity user', - 'alter' => array( - 'alter_text' => FALSE, - 'text' => '', - 'make_link' => FALSE, - 'path' => '', - 'alt' => '', - 'link_class' => '', - 'prefix' => '', - 'suffix' => '', - 'target' => '', - 'trim' => FALSE, - 'max_length' => '', - 'word_boundary' => TRUE, - 'ellipsis' => TRUE, - 'strip_tags' => FALSE, - 'html' => FALSE, - ), - 'empty' => '', - 'hide_empty' => 0, - 'empty_zero' => 0, - 'time_horizon' => 30, - 'overwrite_anonymous' => 0, - 'anonymous_text' => '', - 'link_to_user' => 0, - 'exclude' => 0, - 'id' => 'atrium_activity_user', - 'table' => 'comments', - 'field' => 'atrium_activity_user', - 'relationship' => 'none', - ), - )); - $handler->override_option('filters', array( - 'status' => array( - 'operator' => '=', - 'value' => 1, - 'group' => '0', - 'exposed' => FALSE, - 'expose' => array( - 'operator' => FALSE, - 'label' => '', - ), - 'id' => 'status', - 'table' => 'node', - 'field' => 'status', - 'relationship' => 'none', - ), - 'current' => array( - 'operator' => 'active', - 'value' => '', - 'group' => '0', - 'exposed' => FALSE, - 'expose' => array( - 'operator' => FALSE, - 'label' => '', - ), - 'id' => 'current', - 'table' => 'spaces', - 'field' => 'current', - 'relationship' => 'none', - ), - 'update_type' => array( - 'operator' => '=', - 'value' => '', - 'group' => '0', - 'exposed' => FALSE, - 'expose' => array( - 'operator' => FALSE, - 'label' => '', - ), - 'id' => 'update_type', - 'table' => 'node', - 'field' => 'update_type', - 'relationship' => 'none', - ), - )); - $handler->override_option('access', array( - 'type' => 'role', - 'role' => array( - '2' => 2, - ), - )); - $handler->override_option('cache', array( - 'type' => 'none', - )); - $handler->override_option('title', 'Recent activity'); - $handler->override_option('empty', 'No recent activity found.'); - $handler->override_option('use_ajax', TRUE); - $handler->override_option('items_per_page', 15); - $handler->override_option('use_pager', 'mini'); - $handler->override_option('distinct', 1); - $handler->override_option('style_plugin', 'table'); - $handler->override_option('style_options', array( - 'grouping' => 'atrium_activity_timestamp_1', - 'override' => 0, - 'sticky' => 0, - 'order' => 'desc', - 'columns' => array( - 'group_nid' => 'group_nid', - 'feature' => 'feature', - 'atrium_activity_timestamp' => 'atrium_activity_timestamp', - 'atrium_activity' => 'atrium_activity', - 'timestamp' => 'timestamp', - 'atrium_activity_timestamp_1' => 'atrium_activity_timestamp_1', - ), - 'info' => array( - 'group_nid' => array( - 'separator' => '', - ), - 'feature' => array( - 'separator' => '', - ), - 'atrium_activity_timestamp' => array( - 'separator' => '', - ), - 'atrium_activity' => array( - 'separator' => '', - ), - 'timestamp' => array( - 'separator' => '', - ), - 'atrium_activity_timestamp_1' => array( - 'separator' => '', - ), - ), - 'default' => '-1', - )); - $handler = $view->new_display('feed', 'Feed', 'feed_1'); - $handler->override_option('style_plugin', 'rss_fields'); - $handler->override_option('style_options', array( - 'mission_description' => FALSE, - 'description' => array( - 'feed_description' => '', - ), - 'fields' => array( - 'title' => 'atrium_activity', - 'description' => 'title', - 'link' => 'atrium_activity_path', - 'author' => 'mail', - 'dc:creator' => 'atrium_activity_user', - 'category' => 'feature', - 'guid' => 'nid', - 'pubDate' => 'atrium_activity_timestamp', - ), - 'georss' => array( - 'lat' => 'title', - 'lon' => 'title', - ), - )); - $handler->override_option('row_plugin', 'node_rss'); - $handler->override_option('path', 'dashboard/feed'); - $handler->override_option('menu', array( - 'type' => 'none', - 'title' => '', - 'description' => '', - 'weight' => 0, - 'name' => 'navigation', - )); - $handler->override_option('tab_options', array( - 'type' => 'none', - 'title' => '', - 'description' => '', - 'weight' => 0, - 'name' => 'navigation', - )); - $handler->override_option('displays', array()); - $handler->override_option('sitename_title', FALSE); - $translatables['oa_feeds_dashboard'] = array( - t('Defaults'), - t('Feed'), - t('No recent activity found.'), - t('Recent activity'), - ); - - $views[$view->name] = $view; - - return $views; -} diff --git a/includes/grayside_oa_feeds_handler_field_activity_path.inc b/includes/grayside_oa_feeds_handler_field_activity_path.inc deleted file mode 100644 index e7836b8..0000000 --- a/includes/grayside_oa_feeds_handler_field_activity_path.inc +++ /dev/null @@ -1,41 +0,0 @@ - FALSE); - return $options; - } - - /** - * Add the time_horizon element. - */ - function options_form(&$form, $form_state) { - parent::options_form($form, $form_state); - unset($form['time_horizon']); - $form['absolute'] = array( - '#type' => 'checkbox', - '#title' => t('Use absolute link (begins with "http://")'), - '#default_value' => $this->options['absolute'], - '#description' => t('If you want to use this as in "output this field as link" in "link path", you must enable this option.'), - ); - } - - /** - * Render this field as a link to group space. - */ - function render($value) { - // Has comments - if (!empty($value->{$this->field_alias})) { - return url("node/{$value->{$this->aliases['nid']}}", array( - 'absolute' => $this->options['absolute'], - 'fragment' => "comment-{$value->{$this->field_alias}}" - )); - } - // No comments - return url("node/{$value->{$this->aliases['nid']}}", array( - 'absolute' => $this->options['absolute'], - )); - } -} \ No newline at end of file diff --git a/includes/grayside_oa_feeds_handler_field_activity_user.inc b/includes/grayside_oa_feeds_handler_field_activity_user.inc deleted file mode 100644 index 00993d2..0000000 --- a/includes/grayside_oa_feeds_handler_field_activity_user.inc +++ /dev/null @@ -1,76 +0,0 @@ -options['overwrite_anonymous']) || !empty($this->options['link_to_user'])) { - $this->additional_fields['uid'] = 'uid'; - } - } - - function option_definition() { - $options = parent::option_definition(); - $options['overwrite_anonymous'] = array('default' => FALSE); - $options['anonymous_text'] = array('default' => '', 'translatable' => TRUE); - $options['link_to_user'] = array('default' => TRUE); - return $options; - } - - /** - * Add the time_horizon element. - */ - function options_form(&$form, $form_state) { - parent::options_form($form, $form_state); - unset($form['time_horizon']); - - $form['overwrite_anonymous'] = array( - '#title' => t('Overwrite the value to display for anonymous users'), - '#type' => 'checkbox', - '#default_value' => !empty($this->options['overwrite_anonymous']), - '#description' => t('If selected, you will see a field to enter the text to use for anonymous users.'), - ); - $form['anonymous_text'] = array( - '#title' => t('Text to display for anonymous users'), - '#type' => 'textfield', - '#default_value' => $this->options['anonymous_text'], - '#process' => array('views_process_dependency'), - '#dependency' => array( - 'edit-options-overwrite-anonymous' => array(1), - ), - ); - $form['link_to_user'] = array( - '#title' => t('Link this field to its user'), - '#description' => t('This will override any other link you have set.'), - '#type' => 'checkbox', - '#default_value' => $this->options['link_to_user'], - ); - } - - /** - * Render this field as a link to activity user - */ - function render($value) { - // Has comments - if (!empty($value->{$this->field_alias})) { - $account = user_load($value->{$this->aliases['comment_uid']}); - if (!empty($this->options['link_to_user'])) { - return theme('username', $account); - } - else { - return $account->name; - } - } - // No comments - $account = user_load($value->{$this->aliases['node_uid']}); - if (!empty($this->options['link_to_user'])) { - return theme('username', $account); - } - else { - return $account->name; - } - } -} \ No newline at end of file