[DataLife] استفاده از تگ custom در تمام فایل های قالب

Silver PC

Well-Known Member
استفاده از تگ custom در تمام فایل های قالب وبسایت شما که قبلا تنها در main.tpl می توانستید استفاده کنید .

فایل engine/classes/templates.class.php را باز کنید
کد زیر را پیدا کنید :

کد:
$this->copy_template = $this->template;
        
        $this->template_parse_time += $this->get_real_time() - $time_before;
        return true;

در بالای آن کد زیر را قرار دهید :

کد:
if (strpos ( $this->template, "{custom" ) !== false) {
    $this->template = preg_replace ( "#\\{custom category=['\"](.+?)['\"] template=['\"](.+?)['\"] aviable=['\"](.+?)['\"] from=['\"](.+?)['\"] limit=['\"](.+?)['\"] cache=['\"](.+?)['\"]\\}#ies", "custom_print('\\1', '\\2', '\\3', '\\4', '\\5', '\\6', '{$dle_module}')", $this->template );
}

حالا در تمام فایل های قالب می تونید از این تگ استفاده کنید
 

جدیدترین ارسال ها

بالا