I may need to depend on a dev module called views_php to provide my dynamic filter logic in the current conditions view.

Comments

spydmobile’s picture

Status: Active » Needs work

I thought I fixed this in Commit 3f4b4ef on 7.x-1.x however now it seems to be messing up in other ways. I even turned of views caching and it still acts stupid.

spydmobile’s picture

Status: Needs work » Needs review

Ok, I think I nailed it in Commit 20accbc on 7.x-1.x, and the answer is as stupid simple as the problem, create a php contextual filter.
one for year, month, day, then do the magic on the hour based on the minutes.
Like this:

/* Contextual filter: Content: Day (obs_day) */
$handler->display->display_options['arguments']['obs_day_value']['id'] = 'obs_day_value';
$handler->display->display_options['arguments']['obs_day_value']['table'] = 'field_data_obs_day';
$handler->display->display_options['arguments']['obs_day_value']['field'] = 'obs_day_value';
$handler->display->display_options['arguments']['obs_day_value']['default_action'] = 'default';
$handler->display->display_options['arguments']['obs_day_value']['default_argument_type'] = 'php';
$handler->display->display_options['arguments']['obs_day_value']['default_argument_options']['code'] = 'return  date(\'j\');';
$handler->display->display_options['arguments']['obs_day_value']['default_argument_skip_url'] = 0;
$handler->display->display_options['arguments']['obs_day_value']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['obs_day_value']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['obs_day_value']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['obs_day_value']['break_phrase'] = 0;
$handler->display->display_options['arguments']['obs_day_value']['not'] = 0;
spydmobile’s picture

Status: Needs review » Closed (fixed)

COnfirmed fixed ;-)