OK, for the past few weeks i have been reading around different area's such as the form api, _cron hooks etc.
At times i could see what was happening and other times... i was totally lost.
For example for the past week or so i have been working on updating schedule module to work with 4.7.
So far i have built most of the form (god, how i wish i knew about lullabots formupdater before i began this ;P)
but i have been stuck on one single issue form_set_value() (http://api.drupal.org/api/head/function/form_set_value && http://drupal.org/node/51104 ) which allows for setting values to the form elements during the _validation stage.
Naturally I read up on the above two links and implemented it the way it said. it should work, but for the life of me i cant seem to understand why it refuses to work for me.
I keep getting:
Warning: array_shift() [function.array-shift]: The argument should be an array in /home/flk/vhosts/kolaz.techarena.co.uk/includes/form.inc on line 473
I tried to get some help on irc with no luck and i even asked some people at the drupal London meeting and funnily enough we couldn't figure out how it worked. lol.
So after a nice tutorial on forms api by Robert Castelo, i think the best way curently to go ahead with editing form values during validation might be to do it in the #build stage
for those interested in understanding the form apis there is very nice tutorials on the drupal.org.uk site done by Robert.
I personally found the http://www.drupal.org.uk/node/31 very helpful.
Whilst i was getting stuck on that i was able to make a cron hook to allow for publishing content and have committed it.
Currently it can auto-publish views (I used a single view with 'published' set to no) and it worked fine...so once i get the forms fixed i would love it if others can give it a test run since, now, the only way to test it is to set 'send' in the schedule table to be <= time().
PS the project page for this project is @ http://drupal.org/project/view_scheduler