MyBB Community Forums

Full Version: urrghh is there a simple way to include an HTML file without writing a plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I have been trying to include a ticker on my page which grabs the latest sports odds from one of my pages and then scrolls it across.

When I gather the odds via CRON, it creates an HTML page for me with the lnks that will scroll across the page, and I want to include this into the ticker.

I can alternately have this include an XML file isntead. I have had an absolute nightmare trying to get this to include into my template and wondered if anyone knew of a simple way to include either an XML file or an HTML file.

Dan
include an html file where? Just in like pagename.php?

IF that's it just add:
<?php include('file.html');?>
wherever u want the html to display.
no inside a template. I wrote a plugin for this instead and just replace the {Live_odds_ticker}

with the content of the HTML file using get_file_contents()
hard code it into global.php or another page and dump it into a variable that you then insert into the template where you want it to show

or

use "patches" plugin to insert to code you need for you

or

use the "hooks" plugin to run specific code for a known hook without having to write your own plugin

or

write a plugin