02-19-2012, 02:46 AM
OK, so I found it was rather strange that when you edit a KB article, you can't change the category, so I decided to mod it so that it would be able to change it. lol Let's take a gander:
In /admin/pages/kb.php
FIND:
REPLACE IT WITH:
In /includes/tpl/support/acp.tpl
FIND:
REPLACE IT WITH:
In /admin/pages/kb.php
FIND:
PHP Code:
$db->query("UPDATE `<PRE>articles` SET `name` = '{$main->postvar['editname']}', `content` = '{$main->postvar['editdescription']}' WHERE `id` = '{$main->postvar['id']}'");
REPLACE IT WITH:
PHP Code:
$db->query("UPDATE `<PRE>articles` SET `name` = '{$main->postvar['editname']}', `content` = '{$main->postvar['editdescription']}', catid = '{$main->postvar['catid']}' WHERE `id` = '{$main->postvar['id']}'");
In /includes/tpl/support/acp.tpl
FIND:
PHP Code:
<form action="" method="post" name="edit%NAME%">
<div class="subborder" id="editbox" style="display:none;">
<div class="sub">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td colspan="2"><strong>Edit %NAME%</strong></td>
</tr>
<tr>
<td width="20%">%SUB%:</td>
<td><input name="editname" type="text" id="editname" size="40" /></td>
</tr>
REPLACE IT WITH:
PHP Code:
<form action="" method="post" name="edit%NAME%">
<div class="subborder" id="editbox" style="display:none;">
<div class="sub">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td colspan="2"><strong>Edit %NAME%</strong></td>
</tr>
%CATID%
<tr>
<td width="20%">%SUB%:</td>
<td><input name="editname" type="text" id="editname" size="40" /></td>
</tr>
[php]
---
See my GitHub at https://github.com/cozylife
See my GitHub at https://github.com/cozylife