vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Include .html file? (https://vborg.vbsupport.ru/showthread.php?t=156514)

Greenwhaler 08-29-2007 09:43 AM

Include .html file?
 
Hi all,

I'm trying to include a .html file within the template in vbulletin. The file contains a menu which is regularly updated, and therefore more easily maintained using one file that is updated and included in any page that requires it.

I've tried the standard:

PHP Code:

<?php include("/include/menu.html"); ?>

But it just wont work. When i look in the source code for the page once it is displayed in a browser, the php hasn't even been parsed and the actual code is there for all to see...

Please help?!

Thanks

Dismounted 08-29-2007 09:56 AM

<a href="http://www.vbulletin.com/docs/html/main/templates_externalfiles" target="_blank">http://www.vbulletin.com/docs/html/m..._externalfiles</a>

Greenwhaler 08-29-2007 10:25 AM

Dead link?

Marco van Herwaarden 08-29-2007 10:30 AM

Nope, not a dead link.

punchbowl 08-29-2007 02:43 PM

You could use an iframe if you're including your own stuff that you know is safe.

I've done it a few times but the whole allow html permissions will be the big issue.

==============

What about including files on the fly though Marco(or anyone)? I have a table produced for each member that I don't want to drag from the db as it's updated less than it'll be accessed. It would be named [userid]table.txt so if user 18 went to the page it would include 18table.txt for user 18 and so on - even if it was plain text with no html what would be the easiest way to include it

OR

I'm I reinventing the wheel and should be looking for a caching solution - and if so where?

Cheers

Dismounted 08-30-2007 07:45 AM

Fetch the file via a plugin and assign the data to a variable. Then use that variable in your templates.

amnesia623 08-30-2007 08:08 AM

I am using this in multiple locations on my forums to import rss feeds using rss2html

Dismounted 08-30-2007 10:16 AM

Then use multiple plugins.

Woot! 3000th post! :)


All times are GMT. The time now is 10:06 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.01127 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)bbcode_php_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