B.W. Behling wrote: This sounds like a mod I need, but I'm having a slight problem with it...
It works fine, except the canned text never actually gets added to the message.
You can enter your canned text in ACP, the messages show up in the dropdown box when posting, the screen reloads when you select one, and then you're back at a blank message entry window and the dropdown box is back to the default "Choose Canned Message"
Any ideas?
If it matters, EasyMod had a critical error trying to install this one, probably due to the Multi-Vote mod I have running, so I installed it manually. I've checked all my code and it seems right, but I must have goofed someplace, else it would be working.
EDIT: Additional info... The problem only happens if you use this function for a new topic. It does work if you use it to reply in a thread. Indeed, being able to just click the dropbox and have a reply window open up is a nice feature. I just wish it would work for starting topics, as on my system Mods & Admins post birthday greetings for members every day. This would make that task a lot simpler, allowing them to use canned text in the message and then personalize it.
canned RESPONSES
Sean says:
not canned "new topics"
Sean says:
heheh
Sean says:
just guessing thats the prob anyway
pilch wrote: When I quote a post and select a canned msg I get a dialogue box telling me "You have already typed a message. Do you wish to use a canned message?"
Well if I say yes it wipes out the original text and inserts the canned msg.
Not exactly what I wanted as i DID wish to quote the original member's post with using a canned msg.
You see we have a forum section for introductions and a lot of members post any old crap to get around the post count of 1 which opens ip the goodies (say no more). So our mods and myself rightly quote their text and insert the our repetitive text (hence the addition of canned messages mod) and then simply delete the original post.
I hope this makes perfect sense in a messed up world.
Look forward to any help.
Code: Select all
Could not update/insert custom canned message
DEBUG MODE
SQL Error : 1054 Column 'A' unknow at 'field list'
INSERT INTO phpbb_custom_canned (group_id,user_id,custom_canned_title,custom_canned_message,sortorder) VALUES(A,2,'A','A',1)
Line : 605
File : usercp_register.php
Code: Select all
if ($delete_option_sql != '')
{
$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
WHERE vote_option_id IN ($delete_option_sql)
AND vote_id = $poll_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error deleting pruned poll options', '', __LINE__, __FILE__, $sql);
}
}
}
$cash_message = $GLOBALS['cm_posting']->update_post($mode, $post_data, $forum_id, $topic_id, $post_id, $topic_type, $bbcode_uid, $post_username, $post_message);
// Canned MOD Begin
if($move_after_post == 1)
{
$OldSID = $SID;
$SID = "sid=" . $userdata['session_id'];
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid('modcp.' . $phpEx . '?mode=move&' . POST_TOPIC_URL . '=' . $topic_id ) . '">';
$message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_move_message'], '<a href="' . append_sid('modcp.' . $phpEx . '?mode=move&' . POST_TOPIC_URL . '=' . $topic_id ) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
$SID = $OldSID;
return false;
}
else if($lock_after_post == 1)
{
$OldSID = $SID;
$SID = "sid=" . $userdata['session_id'];
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid('modcp.' . $phpEx . '?mode=lock&' . POST_TOPIC_URL . '=' . $topic_id ) . '">';
$message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_lock_message'], '<a href="' . append_sid('modcp.' . $phpEx . '?mode=lock&' . POST_TOPIC_URL . '=' . $topic_id ) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
$SID = $OldSID;
return false;
}
// Canned MOD End
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
$message = $lang['Stored'] . '<br />' . $cash_message . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
return false;
}
//
// Update post stats and details
Code: Select all
Could not update/insert custom canned message
DEBUG MODE
SQL Error : 1054 Column 'A' unknow at 'field list'
INSERT INTO phpbb_custom_canned (group_id,user_id,custom_canned_title,custom_canned_message,sortorder) VALUES(A,5216,'A','A',1)
Line : 548
File : usercp_register.php
drathbun wrote: As an aside... I started to implement this but didn't need the ability to create custom messages by group, and it was more complicated than I needed. Good idea, but the implementation didn't work for me. So I wrote my own... why do you care?
Because what I did was instead of using the "post and reload" method I simply call the javascript used to plug smilies into the post. So the message goes in at whatever location my cursor is currently located, and I don't lose the rest of my message. That means I can use more than one canned message in the same post.
Just an idea, if you want to look into it. 8)
drathbun wrote: As an aside... I started to implement this but didn't need the ability to create custom messages by group, and it was more complicated than I needed. Good idea, but the implementation didn't work for me. So I wrote my own... why do you care?
Because what I did was instead of using the "post and reload" method I simply call the javascript used to plug smilies into the post. So the message goes in at whatever location my cursor is currently located, and I don't lose the rest of my message. That means I can use more than one canned message in the same post.
Just an idea, if you want to look into it. 8)
wGEric wrote: ...Allows user's within a group to create canned messages which they can use to reply with common moderating messages. You can also set it up to move or lock the topic after using a canned message.
Code: Select all
<textarea name="signature" style="width: 300px" rows="6" cols="30" class="post">{SIGNATURE}</textarea>
Code: Select all
General Error
Could not insert new group
DEBUG MODE
SQL Error : 1054 Unknown column 'canned_footer_plain' in 'field list'
INSERT INTO phpbb_groups (group_type, group_name, group_description, group_moderator, group_single_user,canned_footer_plain,canned_footer_bbcode,canned_custom_count) VALUES (2, 'Nilt', 'Nilt only; allows canned messages.', 2, '0', 'test', 'test',100)
Line : 364
File : admin_groups.php