Показать сообщение отдельно
Старый 21.12.2004, 13:25     # 11
Merlin Cori
Moderator
 
Аватар для Merlin Cori
 
Регистрация: 29.04.2002
Адрес: Moscow
Пол: Male
Сообщения: 2 980

Merlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБог
Merlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБогMerlin Cori СуперБог
решается так:
PHP код:
function load_template()
{
        global 
$THEME_DIR$CONFIG$template_header$template_footer;

        
$tmpl_loc = array();
        
$tmpl_loc unserialize(base64_decode(LOC));

        if (
file_exists(TEMPLATE_FILE)) {
            
$template_file TEMPLATE_FILE;
        } elseif (
file_exists($THEME_DIR TEMPLATE_FILE)) {
            
$template_file $THEME_DIR TEMPLATE_FILE;
        } else die(
"<b>Coppermine critical error</b>:<br />Unable to load template file ".TEMPLATE_FILE."!</b>");

//----------------------------------- Added lines

        
$aa="<br><br><div align=\"center\">Powered by Merlin Cori <a href=\"http://rh-server\"> Logo </a></div>";
    
$tmpl_loc['s']=$aa;

/------------------------------------
end added lines


        $template 
fread(fopen($template_file'r'), filesize($template_file));
        
$gallery_pos strpos($template'{LANGUAGE_SELECT_FLAGS}');
        
$template str_replace('{LANGUAGE_SELECT_FLAGS}'languageSelect('flags') ,$template);
        
$gallery_pos strpos($template'{LANGUAGE_SELECT_LIST}');
        
$template str_replace('{LANGUAGE_SELECT_LIST}'languageSelect('list') ,$template);
        
$gallery_pos strpos($template'{THEME_DIR}');
        
$template str_replace('{THEME_DIR}'$THEME_DIR ,$template);
        
$gallery_pos strpos($template'{THEME_SELECT_LIST}');
        
$template str_replace('{THEME_SELECT_LIST}'themeSelect('list') ,$template);
//        $gallery_pos = strpos($template, $tmpl_loc['l']);
        
$gallery_pos strpos($template$tmpl_loc['l']);
        
$template str_replace($tmpl_loc['l'], $tmpl_loc['s'] ,$template);

        
$template_header substr($template0$gallery_pos);
        
$template_footer substr($template$gallery_pos);
        
$add_version_info '<!--Coppermine Photo Gallery '.COPPERMINE_VERSION.'--></body>';
        
$template_footer ereg_replace("</body[^>]*>",$add_version_info,$template_footer);


У себя проверил - работает.... А с сериализацией и базе64 не стал заморачиваться....
Проще, а эффект тот же.
Соответственно, в переменную $aa пишешь все, что тебе надо, или вообще оставляешь ее пустой. Тогда ничего и не будет выводится
__________________
Есть две бесконечные вещи, Вселенная и глупость.
Впрочем, на счет Вселенной, я не уверен



Вклад IMHO.WS в медицину и науку
Присоединяйтесь!!!!!

Последний раз редактировалось Merlin Cori; 21.12.2004 в 13:54.
Merlin Cori вне форума