Posted by jmesam on August 26, 2008 at 9:01pm
6 followers
Jump to:
| Project: | NodeReferrer |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Is it possible to display unpublished referred nodes with NodeReferrer?
Comments
#1
Yes...but you have to modify the module.
Replace (on line 400 or so in nodereferrer.module):
$query = "SELECT n.nid, n.vid, n.titleFROM {" . $db_info['table'] . "} nr
INNER JOIN {node} n ON n.vid = nr.vid AND n.status = 1 ". $filter_nodetypes ."
WHERE nr." . $db_info['columns']['nid']['column'] . " = %d
ORDER BY ". $order;
With this:
$query = "SELECT n.nid, n.vid, n.titleFROM {" . $db_info['table'] . "} nr
INNER JOIN {node} n ON n.vid = nr.vid ". $filter_nodetypes ."
WHERE nr." . $db_info['columns']['nid']['column'] . " = %d
ORDER BY ". $order;
Notice the change in the INNER JOIN line.
A colleague and I will work towards making a patch that adds this as a configuration option and submit it here for consideration for inclusion. Meanwhile, this will do what you want I think.
#2
Thank you this is exactly was I was looking for. Works great.
I actually use a Views 2 block to display my node referrers field -- so even with this module edit it is still possible for me to block unpublished nodes by adding a views filter... perhaps the change trailerparkopera showed above should be the default behavior for this module, and let persons with other needs adjust it with views?
good luck adding a configuration option, trailerparkopera.
#3
I plan to use the module revisionning in a way where it is important that unpublished refered nodes appear.
#4
This should be implemented as option for field some kind of #416332: Option in views to only display the number of referrers node ( count the child node of a cck node and display the number )
#5
SAme need here.. it would be nice to have a field-option to include/exclude unpublished nodes (I use it as a list of reviewers for editors that are the only one that can access that field).