Forum Webscript.Ru
		Наши скрипты => MobilePublisherPHP => Тема начата: monte от 27 Января 2004, 14:38:08
		
			
			- 
				Невозможно редактировать шаблоны
post_step1
post_step2
скрипт сбивается и показывает сам html файл вместо того, чтоб показать шаблон в форме.
			 
			
			- 
				Решение
Ищем файл admin/templates.php
меняем
if($edit && !$editsubmit) {
	if($tid == "default") {
		redirect($PHP_SELF, $lang_selecttemplate);
		exit;
	}
	eval(\'$out .= "\'.template("admin_edit_templates3").\'";\');
    $template[name]=$tid;
    $fp=fopen("$abspath/templates/$templatesdir/$tid.html",\'r\');
    $template[template]=fread($fp, filesize("$abspath/templates/$templatesdir/$tid.html"));
	eval(\'$out .= "\'.template("admin_edit_templates4").\'";\');
}
на
if($edit && !$editsubmit) {
	if($tid == "default") {
		redirect($PHP_SELF, $lang_selecttemplate);
		exit;
	}
	eval(\'$out .= "\'.template("admin_edit_templates3").\'";\');
    $template[name]=$tid;
    $fp=fopen("$abspath/templates/$templatesdir/$tid.html",\'r\');
    $template[template]=fread($fp, filesize("$abspath/templates/$templatesdir/$tid.html"));
	$template[template] = stripslashes($template[template]);
	$template[template] = htmlspecialchars($template[template]);
	eval(\'$out .= "\'.template("admin_edit_templates4").\'";\');
}
			 
			
			- 
				Спасибо!
Исправим!