It would be nice to have a views handler to generate the needed code snippet in a more friendly way, and also avoid using php input format.

I'm also expressing my desire graphically. Please see attached image.

Comments

jonhattan’s picture

Status: Active » Needs review
StatusFileSize
new6.34 KB

and also with code :)

still needs some work althout it is functional.

jonhattan’s picture

StatusFileSize
new8.35 KB

Note I've removed hook_views_handlers() since it is not used in 7.x. It's enough to declare the files in .info

New patch with two changes:

* Added an example ping script: ping.php.example
* Restrict the provided handler to be eligible only in the header area, via hook_form_alter(). There's no other way to do so.. afterall it is about views hacks :)

There're three TODO comments in the code for possible features that I'm not sure if worth it implement:

+    # TODO: check secondary display arguments.
+    # TODO: offer to choose path to a module to better work out of the box with drupal_get_path() ?
+    # TODO: check the ping script actualy returns the json we are expecting?

the 2nd item refers to the ping script location.

infojunkie’s picture

Project: Views Hacks » Views Auto-Refresh
Component: Views Auto-Refresh » Code

Moving to Views Auto-Refresh project.

infojunkie’s picture

Thanks for this patch. I'll review it soon.

infojunkie’s picture

Status: Needs review » Fixed

Great patch, thanks! Committed it with some changes.

Status: Fixed » Closed (fixed)

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