Jump to content

CSS support for Hooks


teraßyte

Recommended Posts

Posted

Hooks already support templates but what about CSS files?

Adding CSS files manually in the hook package won't add them in DB and so you can't edit those files from ACP using the built-in editor, and using an FTP program to edit them defeats the purpose of the new IPB3 editor.

Posted

Also Alex made a hook for REP. It said place in master_CSS. That did nothing. I had to place in css_1 to work, so whats the purpose of master_css if it doesn't load the CSS files from there?

Or is that for IN_DEV, while css_1 is for non IN_DEV

Posted

I spoke to Brandon about it when I made that hook, hooks should support adding CSS files in a future version (3.x) for example. It's just one of those annoyances that'll you'll have to upload it to every CSS folder on your site.

Posted

It's not a perfect solution, but another option is hook into the includecss hook in globalTemplate->includeCSS, and manually insert a style tag with your css.

Posted

Or in your hook code you can do addToDocumentHead() as includecss pointing to the proper location. Then you could upload the CSS anywhere and the source code could map to it.

Posted

[quote name='m4rtin' date='01 June 2009 - 10:29 AM' timestamp='1243866552' post='1806742']
bfarber: You can't use addToDocumentHead() from a hook, since templateHooks() are dealt with after fetchOutput(), which deals with all those things.


Ah yes (at least for template hooks - overloaders you can use the method). Think we have an open discussion about that somewhere, either internally on a wish list or in the bug tracker FFFV.

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...