I will refer to the screenshots provided.

1. shows the code i used on the Value and Output fields

2. shows the options on the VBO page

3. shows the rendered Output fields

and 4 shows the Value field is empty

Comments

webservant316’s picture

I think you forgot to upload your screen shots.

I am having the same problem. The $value field is empty after a return from the value code.

Help!

webservant316’s picture

Not only is the $value empty when referenced in the output code, but $row->php is also empty when referenced from a second php field in either the value or output code. I can reference $data->nid, I think. The only variable that seems to receive an assignment is $static.

This module appears to be broken.

Here is the value code for my first php field
return node_access( 'view', node_load( $data->nid ) );

Here is the output code for my first php field
<?php echo "value=" . $value; ?>

Here is the output code for my second php field
<?php echo "value=" . $row->php; ?>

With this code the display for my first and second php field is an empty 'value='.

webservant316’s picture

ok, so it seems that assignments are not properly made to row->php so I just put all my code in the output code section and it works that way.

<?php
$node = node_load( $data->nid );
$perm = node_access( 'view', $node );
if ($perm) { echo "yes=" . $row->title; }
else {  echo "no=" . $row->title; }
?>
webservant316’s picture

I got view_php to work in part, but in the end back pedaled to views_customfield to get what I needed.

Liam Morland’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is no longer supported. If this applies to a later version, please re-open and update the version.