vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Why Can't I add a plugin (https://vborg.vbsupport.ru/showthread.php?t=172078)

hicham65 03-04-2008 03:21 PM

Why Can't I add a plugin
 
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 [php] [/php] 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 :

PHP Code:

$my_header implode(''file('../main.html'

And this is the header template where I did place my new plugin variable:

PHP Code:

<!-- 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]">
        &
nbsp;
    </
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:

PHP Code:

$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

Quote:

Originally Posted by Lynne (Post 1456962)
It will help if you put a semi-colon at the end of your php code. ie:

PHP Code:

$my_header implode(''file('../main.html'); 



Thanks

The semi colun is already in my code, I just missed it when posting my reply.


All times are GMT. The time now is 12:44 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02381 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete