Forums / Cotonti / Skins / New header on a plugin?

DemptD
#1 2009-09-04 22:12
I would like a new header on a plugin... is it possible?

http://neocrome.net/page.php?id=1326

but it says nothing about header.tpl there.
GHengeveld
#2 2009-09-05 01:16
This is not supported by Seditio, so the documentation on Neocrome isn't relevant. In Cotonti there is a config option named $cfg['enablecustomhf']. If you set this to TRUE in config.php you can use a custom header and footer file for your plugin. I'm not sure, but creating a header.plugin.pluginname.tpl will likely do the trick.
Kilandor
#3 2009-09-05 08:29
Seditio had $cfg['enablecustomhf'] :) But with just that the most you can do is header.plugins.tpl

You could hook it to modify the template that gets called, hook header.main

and use
if($e == 'mypluginname')
{
	$location = 'plugins'.$e;
}

May need to do same for footer, I think we can add this as a feature, its minor and could be usefull.
DemptD
#4 2009-09-05 10:11
I have tried both header.plugins.tpl, header.plugin.tpl and header."pluginname".tpl but nothing works.

And i have set $cfg['enablecustomhf'] = TRUE;
Kilandor
#5 2009-09-05 12:42
Thats strange because header.plugins.tpl should work with all versions of cotonti, Are you sure you didn't typo the file name?, also it is in your skin folder right not the plugin folder?
DemptD
#6 2009-09-05 19:43
Nope because i tried both header.plugins.tpl, header.plugin.tpl and header."pluginname".tpl and it is in my skinfolder.
Kilandor
#7 2009-09-05 20:22
Try clearing xtemplate cache?
pieter
#8 2009-09-05 21:46
is it header.plugins.tpl or header.plug.tpl like it was in seditio?
... can we help you ...
Kilandor
#9 2009-09-05 22:03
its plugins or should be check your plug.php in root, the $location var should be "Plugins" which gets strtolower for the template name, that is possible if you had an old root file or something for it to be incorrect.
DemptD
#10 2009-09-05 22:59
$location = 'Plugins'; in my plug.php

Tried clearing cache didnt help.