Posted by aaron on July 9, 2010 at 2:01pm
8 followers
Jump to:
| Project: | Node Reference/Embed Media Browser (nrembrowser) |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
allow various views to be added as tabs (but ensure we add required node type filter). honor exposed filters. allow tabs to be turned on/off & weighted.
Comments
#1
this one's done as soon as i tie in the exposed filters and add some admin/field settings.
#2
exposed filters are in. just need some admin magic now!
#3
Some documentation will be good too. I haven't found any description on how to use custom views for the borwser yet.
#4
i've got it working with some custom code, but need to make a ui for administering views w/ nrembrowser. that's next on my hit list.
something like:
<?php
// $Id$
/**
* @file my_browser.module
* Overrides the views & tabs of the nrembrowser media browser dialog.
*/
/**
* Implementation of hook_nrembrowser_media().
*/
function my_browser_nrembrowser_media($field) {
// Add a custom view that's been built for the browser.
$view_name = 'my_browser_view';
$view_display_id = 'default';
// Add a tab for each required view.
$view = views_get_view($view_name);
if (!$view || !$view->access($view_display_id)) {
// Don't display the tab if we don't have access.
return array();
}
$tabs = array();
$tabs['my_browser_nrembrowser_media_0'] = array(
'title' => t($view->display[$view_display_id]->display_options['title']),
'form' => 'nrembrowser_add_media_page_form',
'options' => array(
'view_name' => $view_name,
'view_display_id' => $view_display_id,
'view_arguments' => array(),
'view' => $view,
),
);
return $tabs;
}
/**
* Implementation of hook_nrembrowser_media_alter().
*/
function my_browser_nrembrowser_media_alter(&$tabs, $field) {
// This will remove the 'All' tab.
array_shift($tabs);
// This will move the newly created tab and stick it in front.
$tab = array_pop($tabs);
array_unshift($tabs, $tab);
}
?>
#5
subscribing - would really love this feature so we can use nrem, as a predecessor for drupal 7 media, on drupal 6 sites which cannot yet be build in 7
#6
Also subscribing - It'd be great having views integration (and filtering by node title with autocomplete, for example)
#7
You may use views with nrembrowser and also exposed filters using the example from #4 there just isn't an interface for adding views displays to the browser.
#8
also subscribing :)
#9
subscribing.
#10
subscribing