Closed (fixed)
Project:
Zenophile
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
8 Sep 2009 at 20:07 UTC
Updated:
2 Dec 2009 at 22:10 UTC
I've been working on an add on module for Zenophile that adds some additional features, and while hook_form_alter gets me half of the way there, it would be wonderful if there was a zenophile hook after it generates the sub-theme that other modules could use to basically append to the *-fresh.css file with whatever they need to.
I imagine an add on module would do something like:
<?php
/**
* Implementation of hook_zenophile_created()
*/
zenophile_extras_zenophile_created ($dir, $sysname, $form)
{
// do something
}
?>
Not sure <em>exactly</em> what would be the best implementation, but for now to get my customizations to fire appropriately I have to duplicate a lot of what happens in the <code>zenophile_create_submit function to apply my customizations and get the appropriate information.
Comments
Comment #1
elliotttt commentedWoops, sorry about the above formatting, I left a </code> out of there :P
Comment #2
Garrett Albright commentedYes. This should happen one way or another…
Comment #3
elliotttt commentedThought I'd post a follow up, perhaps this specific functionality doesn't warrant the need for an API just yet ;)
In my add on module I'm doing a
hook_form_alterand adding a new field-set. I've also appended a new submit callback:<?php $form['#submit'][] = 'zenophile_extras_submit'; ?>.In my
zenophile_extras_submitfunction, it fires after the original form submission callback, and I seem to have access to everything my add on module needs by simply copying:So far, so good, I'm able to create new files in the newly created sub-theme folder, and I imagine adding a line or two to the info file won't be that difficult.
Comment #4
Garrett Albright commentedWhen the packaging robot packages up a new dev release of the 2.0 branch, give it a download. Its API pretty much consists of a single function, but it ought to be powerful enough to do just about anything you need it to. A new module included with it called Zenophile Midnight (which replaces my Zen Midnight theme) is a functional example of an add-on module you can write with the API; check out its source for the goods.
Comment #5
Garrett Albright commented