View Full Version : Why Can't I add a plugin
hicham65
03-04-2008, 03:21 PM
Hi;
I've added a plugin with the following code, this should allow me to include another html file into my header section;
$my_header = implode('', file('../main.html'));
However when I added the variable $my_header into the header section of the style, I seem to get the following displayed on the top before the logo:
$my_header
Why the plugin is not working? I should expect the content of the included html file to appear before the logo.
I have enabled plugin on the whole of my VBulletin
Any advise will be appreciated
Thanks
Opserty
03-04-2008, 03:33 PM
Eurgh! Why do people insist on using no standard colors & fonts when posting!
Anyway... what did you set as the hook location? Also when you said "header section" what exactly do you mean by "section"? Do you mean template or something else?
It seems odd that the $my_header is not evaluated to just an empty variable which is what I would have expected to happen. Can you post the entire contents of the Plugin? (use tags ;))
hicham65
03-04-2008, 04:57 PM
Thanks for the reply.
The hook location was at global_start. And I mean by the header, the header template.
The plugin php code is :
$my_header = implode('', file('../main.html')
And this is the header template where I did place my new plugin variable:
<!-- logo -->
$my_header
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[right]">
</td>
</tr>
</table>
<!-- /logo -->
<!-- content table -->
$spacer_open
$_phpinclude_output
Thanks
hicham
Lynne
03-04-2008, 07:07 PM
It will help if you put a semi-colon at the end of your php code. ie:
$my_header = implode('', file('../main.html');
Dismounted
03-05-2008, 04:53 AM
<a href="http://www.vbulletin.com/docs/html/templates_externalfiles" target="_blank">http://www.vbulletin.com/docs/html/t..._externalfiles</a>
hicham65
03-05-2008, 08:51 AM
It will help if you put a semi-colon at the end of your php code. ie:
$my_header = implode('', file('../main.html');
Thanks
The semi colun is already in my code, I just missed it when posting my reply.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.