Вход
Главное меню

Subject:*
Name/Email:*
Message Icon:*
       
Select*
Message:*


    


Click the Preview to see the content in action.
Options:*
 
 
 
 
Attach file*
   

Maximum file size: 100Kb;  Allowed extensions: zip jpg gif png  
Images at the max. Size 640 X 800 pixels. 
Confirmation Code*
0 + 7 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
     
*
* = Required
Администрирование->Темы оформления->Форум->newbb_thread.html - заменяем все найденные [i][/i] на [i][/i] . Это все.[/quote]" />

NewBB: &sort=0 после редактирования или добавления нового сообщения
by Andrey_Ra on 2003/6/23 0:31:57

Этот и другие хаки доступны для скачивания тут: Несколько полезных хаков

Xoops 2.0.3 (2.0.2 тоже самое и вообще это уже очень давно продолжается)

Предмет хака: После написания сообщения пропадает выбранная сортировка, а в строке запроса в переменной сорт появляется 0 (что вообще не предусмотрено).

1. Файл: modules\newbb\edit.php, строка 32, после include 'header.php';, replacing for line foreach (array('forum', 'topic_id', 'post_id', 'order', 'pid') as $getint) {:
Quote:

//Begin hack: order
if ((isset($HTTP_GET_VARS['order']) && trim($HTTP_GET_VARS['order']) == "DESC")) {
$order = 'DESC';
} else if ((isset($HTTP_GET_VARS['order']) && trim($HTTP_GET_VARS['order']) == "ASC")){
$order = 'ASC';
} else {
$order = '';
};
foreach (array('forum', 'topic_id', 'post_id', 'pid') as $getint) {
//End hack: order


2. В файле modules\newbb\reply.php, на строке 35 все тоже самое.

3. В файле modules\newbb\post.php, на строке 33, все тоже самое, но вместо HTTP_GET там используются HTTP_POST:
Quote:

//Begin hack: order
if ((isset($HTTP_POST_VARS['order']) && trim($HTTP_POST_VARS['order']) == "DESC")) {
$order = 'DESC';
} else if ((isset($HTTP_POST_VARS['order']) && trim($HTTP_POST_VARS['order']) == "ASC")){
$order = 'ASC';
} else {
$order = '';
};
foreach (array('forum', 'topic_id', 'post_id', 'pid') as $getint) {
//End hack: order


4. Файл modules\newbb\include\forumform.inc.php, на строке 150, заменяем $order = isset($order) ? intval($order) : ''; на:
Quote:

//Begin hack: order
$order = isset($order) ? trim($order) : '';
//End hack: order


5. Панель управления->Администрирование->Темы оформления->Форум->newbb_thread.html - заменяем все найденные <{$topic_order}> на <{$order_current}>
.

Это все.
Powered by XOOPS © 2001-2023 The XOOPS Project