Quote:
Originally Posted by Alfa1
Yes, same here. Please correct this bug. This bug causes the need to edit every canned reply after posting, which kinda defeats the purpose of canned replies.
Except for this bug, this is a great mod.
|
Name: Canned Replies
Hook Location: global_start
Code:
if ($permissions['cannedreplies'] & $vbulletin->bf_ugp['cannedreplies']['canusecr']) {
if (THIS_SCRIPT == 'newreply' OR THIS_SCRIPT == 'newthread' OR THIS_SCRIPT == 'infraction' OR THIS_SCRIPT == 'private' OR THIS_SCRIPT == 'showthread') {
$userid = $vbulletin->userinfo['userid'];
$crtest .= "$vbphrase[cannedreplies]: <br />";
$crtest .= "<select onchange=\"insertAtCaret(this.options[this.selectedIndex].value)\">";
$crtest .= "<option value=\"\"></option>";
$crs = $db->query_read("SELECT id, title, reply FROM " . TABLE_PREFIX . "cannedreplies WHERE userid=$userid ORDER BY title ASC");
while($row = $db->fetch_array($crs)) {
$row[reply] = preg_replace("#(\r\n|\n|\r)#s", "\r\n <br>", addslashes($row[reply]));
$row[reply] = str_replace('\"', '"', $row[reply]);
$row[reply] = str_replace("\'", ''', $row[reply]);
$crtest .= "<option value=\"$row[reply]\">$row[title]</option>";
}
$crtest .= "</select>";
} }