Added function to include a file in all plugins

This commit is contained in:
Marc MAURICE 2010-12-30 10:40:38 +01:00
parent 7fd7065683
commit fe20539226

View file

@ -25,6 +25,12 @@ array_shift($plugins); array_shift($plugins); // remove . and ..
foreach ($plugins as $p) if (is_file("plugins/$p/functions.php")) foreach ($plugins as $p) if (is_file("plugins/$p/functions.php"))
require "plugins/$p/functions.php"; require "plugins/$p/functions.php";
function plugins_include($phpFile)
{
foreach ($GLOBALS['plugins'] as $p) if (is_file("plugins/$p/$phpFile"))
require "plugins/$p/$phpFile";
}
if (! function_exists('getThumbTarget')) { if (! function_exists('getThumbTarget')) {
function getThumbTarget($imageSimplePath) function getThumbTarget($imageSimplePath)
{ {
@ -199,6 +205,8 @@ a {
<div id="parentfolder"><a href="<?php echo $parentLink ?>">^</a></div> <div id="parentfolder"><a href="<?php echo $parentLink ?>">^</a></div>
<?php } ?> <?php } ?>
<?php plugins_include("before_content.php") ?>
<?php foreach($folders as $folder) { ?> <?php foreach($folders as $folder) { ?>
<div class="folder"> <div class="folder">
<?php if ($folder["preview"] === "") { ?> <?php if ($folder["preview"] === "") { ?>