harmor19
10-21-2005, 03:05 PM
Is it possible to edit a template with a plugin?
Here's a code from another BBS that uses the plugin system
require "./inc/adminfunctions_templates.php";
find_replace_templatesets("header", '#help</a></li>#', "help</a></li><li><a href=\"\$settings[bburl]/\$settings[cpphpfn]\"><img src=\"\$theme[imgdir]/star.gif\" border=\"0\" alt=\"Custom Pages\">Custom Pages</a></li>");
"header" is the template it's editing,
It changes "#help</a></li>#" to help</a></li><li><a href=\"\$settings[bburl]/\$settings[cpphpfn]\"><img src=\"\$theme[imgdir]/star.gif\" border=\"0\" alt=\"Custom Pages\">Custom Pages</a></li>
Here's a code from another BBS that uses the plugin system
require "./inc/adminfunctions_templates.php";
find_replace_templatesets("header", '#help</a></li>#', "help</a></li><li><a href=\"\$settings[bburl]/\$settings[cpphpfn]\"><img src=\"\$theme[imgdir]/star.gif\" border=\"0\" alt=\"Custom Pages\">Custom Pages</a></li>");
"header" is the template it's editing,
It changes "#help</a></li>#" to help</a></li><li><a href=\"\$settings[bburl]/\$settings[cpphpfn]\"><img src=\"\$theme[imgdir]/star.gif\" border=\"0\" alt=\"Custom Pages\">Custom Pages</a></li>