Pełna Nazwa Tematu: Complete Messages System & Simple Subforums MOD - zmiana w admin_forums.php...
Witam serdecznie!
Tak więc mam problem. Otóż zainstalowałem Advanced Profile Fields, a następnie Simple Subforums MOD - wszytko idzie dobrze prócz jeden zmiany w pliku admin_forums.php:
Simple Subforums MOD napisał(a):
#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
#
#-----[ IN-LINE FIND ]------------------------------------------
#
# We're still in the FIND command above: $sql = "INSERT INTO " . FORUMS_TABLE . " [snip]....
#
cat_id,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
forum_parent,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
intval($HTTP_POST_VARS[POST_CAT_URL])
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
$new_cat . ', ' . $new_parent
I właśnie modyfikacja Complete Messages System trochę zmieniła kod tzn na:
Kod:
$sql = "INSERT INTO " . FORUMS_TABLE . "
SET $sqlUpdate
forum_id = '" . $next_id . "',
forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "',
cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ",
forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "',
forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ",
forum_order = $next_order,
$FielVal_sql
prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "";
I za bardzo nie wiem jak go zmodyfikować... Gdy zrobię to tak:
Kod:
$sql = "INSERT INTO " . FORUMS_TABLE . "
SET $sqlUpdate
forum_id = '" . $next_id . "',
forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "',
cat_id = " . $new_cat . ', ' . $new_parent . ",
forum_parent,
forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "',
forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ",
forum_order = $next_order,
$FielVal_sql
prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "";
To przy dodawaniu nowego forum otrzymuję taki komunikat:
Cytuj:
Couldn't insert row in forums table
DEBUG MODE
SQL Error : 1064 Something is wrong in your syntax obok ' , forum_parent, forum_desc ' w linii 5
INSERT INTO phpbb_forums SET forum_id = '2', forum_name = 'hgjf', cat_id = , , forum_parent, forum_desc = '', forum_status = 0, forum_order = 20, auth_view=0, auth_read=0, auth_post=0, auth_reply=0, auth_edit=1, auth_delete=1, auth_sticky=3, auth_announce=3, auth_vote=1, auth_pollcreate=1, auth_attachments=1, auth_download=1, prune_enable = 0
Line : 557
File : admin_forums.php
Z góry dzięki za pomoc...
Pozdrawiam!