This seems like it should be something that would be included in a Handbook for this module but alas there isn't one. Also, I am aware that you have requested that php requests be posted to the main forum but I am not getting any answers to what seems like a very simple question. Therefore, I am posting here.

I consider myself to have a working knowledge of php so this isn't really a question on HOW to do something in php.

My question is, What is the format going to be for taking the data into your module and then re-expressing it?

If you could post a VERY simple example of code that might go in your module then I can take if from there. Thank you so much. Any questions I have on what to do with the array of nodes I get INTO the module, I will direct to the main forum.

Comments

tpainton’s picture

Okay, I found this in a new post... Is this the format?

$nodes = array();

[custom php checking here...]

return $nodes;

This is all I need to know..

gnassar’s picture

Status: Active » Closed (fixed)

Straight from the README: (emphasis added)

Usage:
------
A new filter, labeled "Node: Node ID", will appear as addablein your Views filter lists. If you add that filter, you'll note the "Options" dropdown will have two choices: "PHP code" and "ID list". "PHP code" will take a snippet of PHP as its value (without the <?php and ?> bracket tags), which should return an array of integers representing node IDs. The filter will evaluate the PHP, and filter on the numbers in the return array. "ID list" will simply take a list of numbers, separated by commas, and filter those node IDs. This is currently used mainly for testing, but may survive to release if someone finds it useful.

tpainton’s picture

And my question still isn't answered. Which leads me to believe you read my question less well than I already had read your README. I have accomplished my task using a a php coded exclude argument. Now I wonder why this module even exists given that is possible.. Don't worry I wont ask!