vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Using include (https://vborg.vbsupport.ru/showthread.php?t=112900)

dilbert 04-13-2006 01:42 PM

Using include
 
Hi,

I created a plug-in called "Left Column Top", it's Hook Location is global_start.

The code is $includedhtml = implode('', file('D:\inetpub\bloodbanktalk\calls\test.htm'));

Then on my template "left_column" I added this $includedhtml, but it does not show the contents of the page I want included.

Did I go wrong somewhere?

The Chief 04-13-2006 06:03 PM

I would like to know how to include pages as well..

sabret00the 04-14-2006 03:53 PM

the file was not an array so why are you imploding it?

check out www.php.net/file_get_contents

dilbert 04-14-2006 03:58 PM

Quote:

Originally Posted by sabret00the
the file was not an array so why are you imploding it?

check out www.php.net/file_get_contents

Why, because I am clueless in php, the post only attests to that. :surprised:
Plus it's the advice I received http://www.vbulletin.com/forum/showthread.php?t=181892.

How would I include another file in a php template? I am using the left column hack and have 8 styles, so I'd like to simply put an include in all of the templates and only need to update a file, not 8 templates.

sabret00the 04-14-2006 04:02 PM

PHP Code:

$includedhtml file_get_contents('filelocation/filename.fileextention'); 


dilbert 04-14-2006 04:13 PM

Hmm, not working.

I tried these separately in the plug in:
$includedhtml = file_get_contents('http://www.bloodbanktalk.com/calls/test.php');
$includedhtml = file_get_contents('D:/inetpub/bloodbanktalk/calls/test.php');
$includedhtml = file_get_contents('calls/test.php');

Then in the template I place $includedhtml where I want the output. It doesn't give an error, but it doesn't show what I have in the test file either.

sabret00the 04-15-2006 10:24 AM

what happens when you do
PHP Code:

$includedhtml file_get_contents('filelocation/filename.fileextention'); 
echo 
$includedhtml "_<br />";
print_r($includedhtml); 


dilbert 04-15-2006 08:57 PM

That didn't do it either, thanks for trying, but I give up at this point.


All times are GMT. The time now is 08:08 PM.

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.01076 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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