This is a place for me to put Kohana stuff that I'm developing from which I feel the Kohana community might benefit.
Right now all that's available is a sparse module that contains a helper for doing some cool stuff with the HTML , and an overload of the html helper. See @ bottom for more
... [More]
detail.
UPDATE 10/1/8another revision, this time to correct the 2.2.1 html helper issue mentioned here.
Just FYI, I still don't like how they're doing the html::link and html::script methods in 2.2.1, even after the ever-irascible Shadowhand fixed them, so I re-included my own versions in MY_html. My versions allow relative file paths, which some people, myself included, happen to like. Kohana is supposed to be all about freedom to work how you want, right?
Stay tuned, as a collborator and I hope to have finished an Oracle driver for Kohana by the end of the month. Shadowhand is such a PIA to deal with, Eeyore that he is, that I don't intend to subject myself to his ire by having the temerity to offer the driver up to the community right away. He's a talented and knowledgeable dev but a grumpy, arrogant, condescending, and impatient person, at least online! :D
I also will be adding a ready-to-go templating, user-management/auth, and menu-generation system in the next few months, so stay tuned!
FYI, I am really annoyed by all the massive changes in how everything works in Kohana 2.3, so don't expect an update to reflect those changes anytime soon. If you think the changes are great, good for you, but I for one have better things to do than to rename all my class files and re-figure out how the whole goddamned framework works as far as routing and whatnot every time Shadowhand and Pugfish get a wild hair up their rear ends and think they've found the holy fucking grail of PHP OOPitude.
If anyone thinks I'm stupid for thinking this, please whisper to me on the forum and let me know why I'm wrong.
UPDATE 08/26/08revised the MY_html helper to correct some weirdness
UPDATE 08/20/08Well it took me a while to get to it, but I finally updated the head helper to work with Kohana 2.2. I've now bundled the files together as a module so they are more portable, and included (totally without permission -- apologies Peter!) PeterB's excellent zend_autocomplete class, useful for users of IDEs. Info on PeterB's zend_autocomplete class can be found at PeterB's site
To install, unzip into your Kohana Modules directory. And that's it! (Isn't Kohana awesome?)
Currently I only have a .zip archive available, but soon I will try to upload a .tar file as well.
Currently the only thing I've finished that's fit for others to look at is a head helper class, inspired by Matt Well's brilliant idea of a helper class to allow you to mess with the HTML
elements of the outputted views.
My version follows the same general pattern as Matt's, in that it is basically a static class that has some nifty ways to manipulate the stuff inside the
, but mine goes a step further and gives total control over the creation and modification of the . This version utilizes a config file to write the intitial values, and also currently relies (yes, poor encapsulation, I know) on a customized overload of Kohana's html helper to create the individual tags inside the head.
I think I've documented the files sufficiently so that they are easy to understand and use. Basically, if you're using the Kohana Template Controller, just create a placeholder in the template file where the
should go (don't use tags, this helper creates them!), and then in your controllers do something like this: $this->template->html_head = head::instance(); where html_head is the placeholder in the template file. The other methods should be self-explanatory, but let me know if they're not! :)
If you're not using the Template Controller, you'll need to use an instance of the head class on each page where you want it to write your
for you.
If you have comments or suggestions or (helpful) criticisms, whisper @ me on the Kohana forum or make a comment on dlib's blog [Less]