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

DemptD
#1 4. September 2009, 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 5. September 2009, 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 5. September 2009, 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 5. September 2009, 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 5. September 2009, 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 5. September 2009, 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 5. September 2009, 20:22
Try clearing xtemplate cache?
pieter
#8 5. September 2009, 21:46
is it header.plugins.tpl or header.plug.tpl like it was in seditio?
... can we help you ...
Kilandor
#9 5. September 2009, 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 5. September 2009, 22:59
$location = 'Plugins'; in my plug.php

Tried clearing cache didnt help.