Бот: причина переноса топика

DarkMod

Пользователь
Норм инструкция бла)
includes/functions_post.php
найти
PHP:
$post_text = sprintf($lang['BOT_TOPIC_MOVED_FROM_TO'],
до вставить
PHP:
        if (strlen($_POST['reason_move_bot']) > 0)
        {
          $reason_text = $lang['REASON_MOVE_BOT_MSG'] . ' ' . $_POST['reason_move_bot']; //Filtrated XSS
        }
        else $reason_text = '';
найти
PHP:
$post_text = sprintf($lang['BOT_TOPIC_MOVED_FROM_TO'], "<a class=\"gen\" href=\"viewforum.php?f=$old_forum_id\">$forum_names[$old_forum_id]</a>", "<a class=\"gen\" href=\"viewforum.php?f=$forum_id\">$forum_names[$forum_id]</a>",
после ставить
PHP:
$reason_text,


templates/default/modcp.tpl
найти
HTML:
<!-- IF SHOW_BOT_OPTIONS -->
<p class="mrg_2"><input type="checkbox" name="insert_bot_msg" id="insert_bot_msg" checked="checked" /><label for="insert_bot_msg">{L_BOT_LEAVE_MSG_MOVED}</label></p>
<!-- ENDIF -->

Заменить
HTML:
                <!-- IF SHOW_BOT_OPTIONS -->
                <p class="mrg_2"><input type="checkbox" name="insert_bot_msg" id="insert_bot_msg" checked="checked" onclick="$('#move_bot').slideToggle('fast');" /><label for="insert_bot_msg">{L_BOT_LEAVE_MSG_MOVED}</label></p>
                <p class="mrg_2">{L_REASON_MOVE_BOT_MSG}&nbsp;<input name="reason_move_bot" type="text" value="" /></p>
                <!-- ENDIF -->

language/lang_russian/lang_bot.php
PHP:
Топик был перенесен из форума <b>%s</b> в форум <b>%s</b><br /><br />%s
Добавить
PHP:
<br />%s

language/lang_russian/lang_main.php
PHP:
$lang['REASON_MOVE_BOT_MSG'] = 'Причина переноса:';
 

MY-94

Пользователь
Кто пользуется вариантом установки RomM1!

В (R377) заметил ошибки!!!

Notice: Undefined variable: user_id in /var/www/xxx/data/www/xxx.xx/includes/functions_post.php on line 668
Notice: Undefined variable: username in /var/www/xxx/data/www/xxx.xx/includes/functions_post.php on line 668

ggg.png

Найти:
PHP:
$post_text = sprintf($lang['BOT_TOPIC_MOVED_FROM_TO'], "<a class=\"gen\" href=\"viewforum.php?f=$old_forum_id\">$forum_names[$old_forum_id]</a>", "<a class=\"gen\" href=\"viewforum.php?f=$forum_id\">$forum_names[$forum_id]</a>", $reason_text, "<a class=\"gen\" href=\"profile.php?mode=viewprofile&u=$user_id\">$username</a>");

Заменить на:
PHP:
$post_text = sprintf($lang['BOT_TOPIC_MOVED_FROM_TO'], "<a class=\"gen\" href=\"viewforum.php?f=$old_forum_id\">$forum_names[$old_forum_id]</a>", "<a class=\"gen\" href=\"viewforum.php?f=$forum_id\">$forum_names[$forum_id]</a>", $reason_text, profile_url($userdata));
 
G

Gemini_13

Гость
Еще чуток правок для нормальной работы с модом корзины Zenden-а. Да и вообще так правильнее будет

includes/functions_post.php
Найти:
PHP:
        if (strlen($_POST['reason_move_bot']) > 0){
          $reason_text = $lang['REASON_MOVE_BOT_MSG'].' '.$_POST['reason_move_bot']; //Filtrated XSS
        } else $reason_text = '';
Заменить на:
PHP:
        $reason_text = (!empty($_POST['reason_move_bot'])) ? $_POST['reason_move_bot'] : '';
        if (strlen($reason_text) > 0)
        {
            $reason_text = '<b>'.$lang['REASON_MOVE_BOT_MSG'].'</b> '.$reason_text;
        }


И еще чуток удалим хлам...
modcp.php
Найти и удалить:
PHP:
'L_REASON_MOVE_MSG'      => $lang['REASON_MOVE_BOT_MSG'],

modcp.tpl
Найти:
HTML:
<p class="mrg_2">{L_REASON_MOVE_MSG}&nbsp;<input name="reason_move_bot" type="text" value="" /></p>
Заменить на:
HTML:
<p class="mrg_2">{L_REASON_MOVE_BOT_MSG}&nbsp;<input name="reason_move_bot" type="text" value="" /></p>
 

Hopper Around

Пользователь
ошибка как исправить? все делал по инструкии и все равно она есть...
Notice: Undefined variable: username in Z:\home\strezhi.torrents.com\www\includes\functions_post.php on line 459
 

XDA

Заблокирован
Обратите внимание, если вы хотите заключить сделку с этим пользователем, что он заблокирован.
Штука крутая.
 

Exile

Администратор
В новых ревизиях в дополнение к правкам выше.

functions_post.php
PHP:
        $post_text = sprintf($lang['BOT_TOPIC_MOVED_FROM_TO'], '[url='. make_url(FORUM_URL . $old_forum_id) .']'. $forum_names[$old_forum_id] .'[/url]', '[url='. make_url(FORUM_URL . $forum_id) .']'. $forum_names[$forum_id] .'[/url]', $reason_text, profile_url($userdata));
Языковой файл:
PHP:
$lang['BOT_TOPIC_MOVED_FROM_TO'] = 'Топик был перенесен из форума [b]%s[/b] в форум [b]%s[/b][br][br]%s[br]%s';
 
Сверху