public
Created

Include CSS in PunBB 1.4 extensions

  • Download Gist
manifest.xml
XML
1 2 3 4 5 6
<hook id="hd_head"><![CDATA[
if ($forum_user['style'] != 'Oxygen' && file_exists($ext_info['path'].'/style/'.$forum_user['style'].'/style.css'))
$forum_loader->add_css($ext_info['url'].'/style/'.$forum_user['style'].'/style.css', array('type' => 'url'));
else
$forum_loader->add_css($ext_info['url'].'/style/Oxygen/style.css', array('type' => 'url'));
]]></hook>

For include CSS you can use any hook that called before hd_head.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.