Add PHP code textarea for views argument in nodereference.module fields
develCuy - November 14, 2008 - 02:08
| Project: | Content Construction Kit (CCK) |
| Version: | 6.x-2.5 |
| Component: | nodereference.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Description
Views.module provides a textarea of PHP code for arguments, this patch adds just same feature for nodereference.module fields associated to views.

#1
Here the patch with an screenshot for rounding the idea.
#2
Here is the updated to 6.x-2.x-dev version, sorry I don'w know how to make a diff on...ermm...windows.
#3
Created a patch and fixed a logic error. Now the php textarea is given priority over the textfield, as per the original patch intentions.
#4
Works great, just what I needed, thanks develCuy & cristopher_skauss
#5
Regarding #2, when I try to configure my nodereference, I get the error on D6:
Fatal error: Call to a member function get_option() on a non-object in /var/www/ccpresscred2.flash4play.com/public_html/sites/all/modules/views/includes/view.inc on line 1772
#6
views version?
#7
Tracking...
#8
subscribing
#9
When using PHP code to set the title of a CCK node, or setting the value of a computed field, the $node variable is avaible to be used... It would be good to have the same thing for setting the view arguments of node/userreference fields?
#10
I've tested this module and it seems to work well!
I've updated the patch for the latest version of CCK 6.x-2.x-dev (dated 2009-Apr-24) and attached it below.
It'd be good to get this committed...
#11
I have tested this patch on CCK 6.x-2.3 and it works correctly. Very useful.
Can we please have this committed asap.
#12
/subscribre
Quite simple to patch, very low possibilites to break another functionnality, I think it can be commited.
#13
subscribing
#14
subscribe
#15
Subscribing...
#16
Maintainers: could we please have this committed?
#17
The patch works great for providing php arguments for the advanced node reference using a view, but I lose the ability to upload files to any custom content type in which the node reference php arguments are applied.
Is there any progress in providing a fix for the file upload issue caused by the current patch (Content-Construction-Kit_334121_10.patch)?
#18
Subscribing...
#19
Subscribe
#20
could this be done for the userreference module as well?
#21
@keyser79 you pointed it right. We need this feature for all cck fields linked with views, is so handy and useful.
Blessings!