Native Parser - Использование оригинального класса парсинга DLE, модификация позволяет отказаться от дублирования кода в парсерах и улучшить безопасность так как теперь нужно будет следить только за состоянием одного класса парсинга.
Модификация глобальная, изменения такие, в файлах:
newpost.php
newtopic.php
complaint.php
discussion.php
editor.php
mark.php
moderation.php
post.php
post_mass.ph
set.php
vote.php
warning.php
Найти:
require_once BULLET_ENERGY_DIR . '/classes/filter.class.php' ;
$filter = new BulletFilter ;
Заменить на:
require_once ENGINE_DIR . '/classes/parse.class.php';
$filter = new ParseFilter;
Предварительно адаптировать parse.class.php под совместимость с форумом.
После:
$source = str_ireplace( "[declination", "[declination", $source );
Добавить:
// 4 Bullet Energy
$source = str_ireplace( "{navigate_forum}", "{navigate_forum}", $source );
$source = str_ireplace( "{widgetOnline}", "{widgetOnline}", $source );
$source = str_ireplace( "{widgetMessage}", "{widgetMessage}", $source );
$source = str_ireplace( "{share}", "{share}", $source );
$source = str_ireplace( "{topicOption}", "{topicOption}", $source );
$source = str_ireplace( "{topicVote}", "{topicVote}", $source );
$source = str_ireplace( "{topicDescription}", "{topicDescription}", $source );
$source = str_ireplace( "{topicName}", "{topicName}", $source );
$source = str_ireplace( "{speedbar}", "{speedbar}", $source );
//
***добавлено через 49 минут, 11 секунд***
Кроме того в файлах: newpost.php
После:
$_REQUEST['topic_name'] = stripslashes($option['topic']['title']) ;
Добавить:
// alt image fix
$_POST['title'] = $_REQUEST['topic_name'];
// alt image fix
После:
$row['topic']['title'] = stripcslashes($row['topic']['title']) ;
Добавить:
// alt image fix
$_POST['title'] = $row['topic']['title'];
// alt image fix
В newtopic.php
Найти:
$option['topicName'] = parent::$db->safesql( $filter->process( trim( strip_tags (str_replace( "{", "{", $_POST['topic_name'] )) ) ) );
Добавить ниже:
// alt image fix
$_POST['title'] = $option['topicName'];
// alt image fix
Сообщение отредактировал 5 июля 2015 - 17:50