 | [Solved] problem with admin panel after installing Password-protected forums |  |
Posted: 06/02/2007 6:48 PM |
|
|
|
|
|
| Citation |
| Posts |
1332 |
| Word Cnt. |
86,126 |
| BDay |
Feb 11 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Mar 31, 2007
Local time: 10:49 PM
Location: Birmingham, UK.
|

|
|
|
|
 |
the left menu goes funny once installed. You can check this from ACP if you like Nightrider  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: problem with admin panel after installing Password-protected forums |  |
Posted: 06/02/2007 11:05 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 5:49 PM
Location: St Pete, FL
|

|
|
|
|
 |
The MOD had several mistakes in the VALUES line in the code. This is complicated to understand even if you understand this, so the problem was hard to find and correct. I will post the before and after versions of the problematic line so that you might be able to see what had to be done to fix this:
OPEN
admin/admin_forums.php
BEFORE
| Code:
|
|
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']) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['password']) . "', intval($HTTP_POST_VARS['count_posts']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ", " . intval($HTTP_POST_VARS['forumthank']) . ")";
|
AFTER
| Code:
|
|
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']) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['password']) . "', " . intval($HTTP_POST_VARS['count_posts']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ", " . intval($HTTP_POST_VARS['forumthank']) . ")";
|
The corrections may not be obvious unless you can compare the two lines character for character. I hate having to debug code like this since it can be easy to miss the problem...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] problem with admin panel after installing Password-protected forums |  |
Posted: 06/03/2007 3:44 AM |
|
|
|
|
|
| Citation |
| Posts |
1332 |
| Word Cnt. |
86,126 |
| BDay |
Feb 11 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Mar 31, 2007
Local time: 10:49 PM
Location: Birmingham, UK.
|

|
|
|
|
 |
Ok, I edited the install file for this for mod again. And the above coding sure got to me. I think the reason I got the coding mixed up a little is because of the second admin panel I have, the one you see first when in ACP. I edited the rest of the install file ok though
Thanks for finding the above error Nightrider  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: problem with admin panel after installing Password-protected forums |  |
Posted: 06/03/2007 5:41 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 5:49 PM
Location: St Pete, FL
|

|
|
|
|
 |
I can see how it got to you. It could get to the most seasoned programmer too. You really have to be able to understand why there are all the double and single quotes and understand which field types require quotes and which don't. Even then, it's easy to make a mistake...
I'm glad it's fixed now...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] problem with admin panel after installing Password-protected forums |  |
Posted: 06/04/2007 4:34 AM |
|
|
|
|
|
| Citation |
| Posts |
1332 |
| Word Cnt. |
86,126 |
| BDay |
Feb 11 |
| Sign |
Aquarius |
| Sex |
 |
|
|
|
Joined: Mar 31, 2007
Local time: 10:49 PM
Location: Birmingham, UK.
|

|
|
|
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: problem with admin panel after installing Password-protected forums |  |
Posted: 06/04/2007 3:21 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 5:49 PM
Location: St Pete, FL
|

|
|
|
|
 |
You're welcome Chris...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Information |  |
|