Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted May 30, 200915 yr 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.
May 30, 200915 yr 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
May 30, 200915 yr Author It is exactly because I saw the hook made by alex for REP system that I made this topic lol Anyway master_css is used only for IN_DEV mode
May 31, 200915 yr 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.
May 31, 200915 yr 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.
June 1, 200915 yr 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.
June 1, 200915 yr bfarber: You can't use addToDocumentHead() from a hook, since templateHooks() are dealt with after fetchOutput(), which deals with all those things.
June 1, 200915 yr Author The problem is not to load the CSS but to have a different CSS for each skin editable in ACP :P
June 1, 200915 yr [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.
September 11, 201014 yr Was it implemented? As much as I can see, in last 1 year & 3 month that "new version" is not out still :)
September 16, 201014 yr Author Yes you can now export CSS files exporting an hook, it was added in 3.1.0.
Archived
This topic is now archived and is closed to further replies.