The attached patch updates sections.module for formsapi compatability.

The patch also adds basic support for php-evaluation rules in addition to path-based rules. For example, if the user is logged in as an administrator or the day is thursday, an alternate theme could be used. The the interface and syntax are copied from block.module, and should be very familiar to those who use it. A weight field has been added as well to rank sections rules.

The addition of path/php rules as well as the weight mechanism requires two new fields be added to the db schema -- the patch also updates sections.mysql.

Comments

Bèr Kessels’s picture

Status: Needs review » Needs work

The patch looks great, but it needs a little work, because you change the database, we need an upgrade path.

Furthermore, I cannot test this (yet), since I run no HEAD (yet) with sections. I do not want to commit this, untill it is qt least confirmed to work by others.

All in all: thanks a lt for the hard work!

eaton’s picture

StatusFileSize
new128 bytes

Thanks! I figured it would need some testing by others due to the nature of the changes. I've attached an 'updated' mysql file that adds the necessary columns to an existing installation.

Bèr Kessels’s picture

Status: Needs work » Needs review

WE now need some reviews :)

willdashwood’s picture

I've got a 4.7/CVS testbed and want to try the module. I'd be happy to give the changes a test as best I can but as I'm on Windows could someone email me the module with the patch applied? Thanks.

dreed47’s picture

I can't get this patch to apply to the CVS version of the sections module.

eaton’s picture

StatusFileSize
new9.51 KB

Rather baffled by this one -- I just re-rolled the patch against head, uploaded the original module and the patch to my hosting provider, and patch rejects it. More tinkering revealed an odd problem with unix vs dos line endings. I'm re-attaching separate patch files for the module and the mysql file.

eaton’s picture

StatusFileSize
new571 bytes

... and the sql file. The 'update.mysql' file in an earlier followup should be used if you have existing sections data.

Bèr Kessels’s picture

Eaton, Can you go ahead and just commit this?
I like what i see in your patches, but do not have time anywhere soon to test this. So feel free to just commit.

Thanks a lot for the hard work, this sections module is a very cool thing, and i think it needs active development, which I cannot always do alone. Again: thanks!

eaton’s picture

I'll do another quick smoke test against HEAD to make sure nothing has broken, and commit it, along with some notes in the INSTALL.txt about using the 'update.mysql' file. Thanks for the thumbs up.

eaton’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)