Kam erst heute dazu den Mod einzubauen und es funktioniert einwandfrei, vielen Dank "Mehrpack"


MfG Nachtfalke
Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_jr_admin.php
#
#-----[ FIND ]------------------------------------------
#
$cache_data_file = $phpbb_root_path.'cache/jr_admin.dat';
if (@is_file($cache_data_file))
{
if (date('YzH',time()) - date('YzH',@filemtime($cache_data_file)) >= 1)
{
@unlink($cache_data_file);
}
}
if (file_exists($phpbb_root_path.'cache/jr_admin.dat'))
{
//Read all the modules from cache file
include($phpbb_root_path.'cache/jr_admin.dat');
}
else
{
//Read all the modules from original admin files
$setmodules = 1;
$dir = @opendir($phpbb_root_path.JR_ADMIN_DIR);
$pattern = "/^admin_.+\.$phpEx$/";
while (($file = @readdir($dir)) !== false)
{
if (preg_match($pattern, $file))
{
include_once($phpbb_root_path.JR_ADMIN_DIR.$file);
}
}
@closedir($dir);
@ksort($module);
unset($setmodules);
@unlink ($cache_data_file);
$data = "<?php\n";
foreach ($module as $cat => $item_array)
{
foreach($item_array as $module_name => $filename)
{
$data .= '$module[\''.$cat.'\'][\''.$module_name.'\'] = \''.$filename."';\n";
}
}
$data .= "\n?>";
$data = str_replace('sid='.$userdata['session_id'], '', $data);
$data = str_replace('&', '', $data);
$fp = fopen( $cache_data_file, "w" );
fwrite($fp, $data);
fclose($fp);
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
//Read all the modules
$setmodules = 1;
$dir = @opendir($phpbb_root_path.JR_ADMIN_DIR);
$pattern = "/^admin_.+\.$phpEx$/";
while (($file = @readdir($dir)) !== false)
{
if (preg_match($pattern, $file))
{
include_once($phpbb_root_path.JR_ADMIN_DIR.$file);
}
}
@closedir($dir);
@ksort($module);
unset($setmodules);
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------