Skip to content

PunBB 1.4 for developers

dimkalinux edited this page Jul 20, 2011 · 4 revisions

DRAFT This page is not complete.

Changes for extensions developers

Use $forum_loader for loading CSS and JS

Standard pattern for include CSS from extension

<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>