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

develCuy - November 14, 2008 - 02:12

Here the patch with an screenshot for rounding the idea.

AttachmentSize
nodereference-module.patch 2.96 KB
nodereference_view_arguments_php.png 24.5 KB

#2

christopher_skauss - November 16, 2008 - 20:39
Version:5.x-1.x-dev» 6.x-2.x-dev

Here is the updated to 6.x-2.x-dev version, sorry I don'w know how to make a diff on...ermm...windows.

AttachmentSize
nodereference.module 8.83 KB

#3

christopher_skauss - November 18, 2008 - 14:03

Created a patch and fixed a logic error. Now the php textarea is given priority over the textfield, as per the original patch intentions.

AttachmentSize
nodereference.patch 2.93 KB

#4

pcambra - November 19, 2008 - 15:41

Works great, just what I needed, thanks develCuy & cristopher_skauss

#5

arcane - November 27, 2008 - 22:42

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

christopher_skauss - November 28, 2008 - 06:26

views version?

#7

chaloalvarezj - April 8, 2009 - 16:20

Tracking...

#8

ntt - April 18, 2009 - 11:20

subscribing

#9

ntt - April 25, 2009 - 15:18

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

BWPanda - April 27, 2009 - 03:04
Status:needs review» reviewed & tested by the community

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...

AttachmentSize
Content-Construction-Kit_334121_10.patch 2.7 KB

#11

superstar - June 6, 2009 - 06:04

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

zmove - June 24, 2009 - 10:13

/subscribre

Quite simple to patch, very low possibilites to break another functionnality, I think it can be commited.

#13

2440media2 - July 9, 2009 - 00:42

subscribing

#14

alvinet - July 28, 2009 - 17:07

subscribe

#15

paganwinter - August 1, 2009 - 10:33

Subscribing...

#16

superstar - August 5, 2009 - 07:17

Maintainers: could we please have this committed?

#17

michaelhall - August 5, 2009 - 17:46
Version:6.x-2.x-dev» 6.x-2.5

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

paganwinter - August 6, 2009 - 08:18

Subscribing...

#19

nyl auster - August 27, 2009 - 21:28

Subscribe

#20

keyser79 - August 31, 2009 - 04:03

could this be done for the userreference module as well?

#21

develCuy - August 31, 2009 - 09:51

@keyser79 you pointed it right. We need this feature for all cck fields linked with views, is so handy and useful.

Blessings!

 
 

Drupal is a registered trademark of Dries Buytaert.