I have this ledge in ledges-2:
https://github.com/p/phpbb3/compare/dev ... 2Fledges-2 for my trivial css extension.
nickvergessen wrote:Input arguments: $page_title, $display_online_list, $item_id, $item
Template ledges do not have arguments, if they are needed this needs to be discussed somewhere.
Jhong wrote:This is great.
However, I think for loading scripts and CSS files a more elegant solution is needed. At the minimum, two hooks, for "before other scripts" and "after other scripts", but even better would be a load_phpbb_script() function where you could specify priority and dependencies (see WordPress' enqueue_script() for an example).
What you described for script loading is a good idea but it's off topic here.
Jhong wrote:There are other hooks I would need in the header too -- the order is important. These are the hooks I would currently need:
hook_dtd (override the DTD)
What would you need this for? DTD is defined by the style.
Jhong wrote:hook_meta (override the meta or add new values)
Overriding meta would be a different ledge, adding meta you can do with the generic header ledge.
Jhong wrote:hook_scripts_before
hook_scripts_after
Before and after what?
Jhong wrote:in addition to the hook to add a link with the FAQ, etc. links.
Probably a different topic for these as well.
Erik Frèrejean wrote:This hook should also be capable to be used as an replacement of page_header, for example if you're trying to build an third party application around phpBB and need system calls like login_box() these functions call the page header. If in that case the actual page header is called, there might arise various issues with the third party application. There are ways to hack your way around this currently but it would be much nicer if you can simply override the phpBB page header with your own code.
This would be a different ledge.