PDA

View Full Version : Including a file?


ThePimp
06-14-2005, 06:26 PM
How would I go about storing an include file for global use to be called with a variable in the templates?


<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
<plugin active="1">
<title>File</title>
<hookname>global_complete</hookname>
<phpcode><![CDATA[
$file=include('file.php');
]]></phpcode>
</plugin>
</plugins>


Is this the correct way to do it? Then in the ANY template, I can just put $file, and it will include the plugin wherever it is called?

eXtremeTim
06-14-2005, 07:33 PM
The plugin will always be loaded. Your file will just show where you call it at. But yes that is the correct method for doing it.