PDA

View Full Version : Include .html file?


Greenwhaler
08-29-2007, 09:43 AM
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 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! :)