Changes are made at your own risk and are not guaranteed to work. Always make backups of the database and files prior to implementing hacks. Make a special backup of the file and/or template you are modifying so that you can roll back quickly.
Hacks are dangerous and can cause your site to stop working. They make later updates to ExpressionEngine more difficult; you should track your hacks for post-update re-implementation.
Most hacks are unnecessary, please review the Development Documentation for information on expanding ExpressionEngine via Modules, Extensions, and Plugins.
Hacks are never officially supported.
These instructions are no longer accurate for EE 1.5+. If you get it working, please feel free to update this page.
Question: How can I enable and use PHP and EE global variables in the specialty templates?
Answer: Run the function below on the return value of the function show_message() in core.output.php.
public static function parsePhpAndGlobals($template) {
require_once "admin_doc/core/core.template.php";
$t = new Template();
$template = $t->parse_template_php($template);
$template = $t->global_conditionals($template);
$template = $t->parse_globals($template);
return $template;
}
Important Notes:
* This is a hack and although worked fine for me I don’t know how it’ll work for others.
* PHP variables’ $ sign may need to be escaped with \.
* Tested with EE 1.2.1 and 1.3.
* arachimi at hotmail.com for questions.
Category: Templates Category: Hacks
