Will there be a D7 port of Views Table Highlighter?

Comments

ryantollefson’s picture

I would love to see this too.

RealBirkoff’s picture

I could also use it..

RealBirkoff’s picture

StatusFileSize
new2.25 KB

This simple patch upgrades the module to D7.

stunch’s picture

Applied the Patch and installed the module, selected "Table Highlighter" as the style and got the following:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: http://******.com/admin/structure/views/ajax/display/trade_orders_all/page/style_plugin
StatusText: OK
ResponseText:
Fatal error: Call to undefined function ctools_process_dependency() in /home/******/domains/******/public_html/includes/form.inc on line 1723

Any ideas?

stunch’s picture

Ok, I fixed it ( I think)

You need to edit the file "views_table_highlighter_plugin_style.inc" and remove the following:

'#process' => array('ctools_process_dependency'),

This appears to allow it to function

---------------
well that did fix the error, but it has limited the available options, so I need to replace that command with something else I think.

any ideas guys?

stunch’s picture

Hi Again,

It seems without the:

'#process' => array('ctools_process_dependency'),

All the field values are being displayed with "array"

eg:

$field_field_date1 == "array"
$field_field_depart == "array"
$field_field_itemnumber == "array"
$field_field_persons == "array"
$field_field_qty == "array"
$field_field_req == "array"

Which prevents me from assigning a php code to the relevant fields.

If anyone has a solution I'd love to hear it?

Thanks in advance

jmbouvier’s picture

This is just what I'm looking for. Need D7 though.

Vote_Sizing_Steve’s picture

Great module, would gladly use a d7 version on my new website. Subscribing.

Vote_Sizing_Steve’s picture

Regarding #6, not all the fields are broken, I'm still getting:

$nid == "5"
$node_changed == "1313881541"
$node_comment == "2"
$node_comment_statistics_comment_count == "0"
$node_counter_totalcount == ""
$node_created == "1313881541"
$node_language == "en"
$node_nid == "5"
$node_title == "1+ Inverse of Maximum Measurement"
$node_type == "formula"
$node_uid == "1"

... which is good enough to php.

Vote_Sizing_Steve’s picture

StatusFileSize
new8.74 KB

Attached is the patched (above) d7 version.

ryantollefson’s picture

This installs, and seems to work partially; but data from any content fields comes in blank.

Under the Available fields,$nid, and $node_created seem to work properly, but any custom fields come in with blank values e.g.: $field_field_project_status == ""
This happens even though in the table view it shows a value for the column. If I try to set a rule in the PHP code to match the value, nothing happens.

ryantollefson’s picture

I'm not a coder, but I'm trying to get this working properly on my site... I notice this in logs:
Warning: addslashes() expects parameter 1 to be string, array given in views_table_highlighter_plugin_style->options_form() (line 16 of \views_table_highlighter\views_table_highlighter_plugin_style.inc).

When looking at the views_table_highlighter_plugin_style.inc, line 15: foreach($fields as $field => $value) Shouldn't it read: foreach($fields as $field => $value){ ... }

Also, is line 13 correct? $fields = (array)$example_view->result[0]; Is this how array should be?

Yuri’s picture

Can this dev version be displayed on the project page? That would catch more attention for testing it out..
Subscribing.

Yuri’s picture

In a simple tasks list created with a view, I see the following example values:

$field_field_date == "Array"
$field_field_priority == "Array"
$field_field_project == "Array"
$field_field_status == "Array"
$field_field_tags == "Array"
$field_field_title == "Array"

As a workaround for my term reference fields to create available php code, I added relationship 'taxonomy terms on node'. After that the node weight appeared:
$taxonomy_term_data_node_weight == "1"
But a new non-text field in any of the used entities would do also, i.e. an extra integer term field 'custom' would be
$taxonomy_term_data_node__field_data_field_custom_fiel == "1"

Far from ideal, but if you can replace text fields by added numeric fields it will help creating workable php code.

smokris’s picture

Assigned: Unassigned » smokris
Category: task » feature
Status: Active » Fixed

Thanks, everyone. I made some improvements to the above patches (resolving the "array" problems), and tagged a 7.x-1.0 release. Works with single-value fields attached to nodes.

I'm closing this issue; please report further 7.x problems on other issues.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.