[2.0.10] Common Replies (Canned Messages)

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
8
80%
Very Good
1
10%
Good
1
10%
Fair
0
No votes
Poor
0
No votes
 
Total votes: 10

timo_h
Registered User
Posts: 1
Joined: Mon Jul 11, 2005 11:34 am

Post by timo_h »

Another bug: When inserting a canned message, the contents of the canned message should encode the html entities.

Testcase:

Create a canned message with something like "&lang=foo". As &lang is a html entity and is being interpreted by firefox and others, it won't come out as we entered it. The correct html representation would be &lang=foo
User avatar
jvini
Registered User
Posts: 300
Joined: Tue Sep 24, 2002 11:20 pm
Contact:

Post by jvini »

This mod is good, I only have a couple of problems with it:

1) After setting up a Canned Message and selecting that the topic is moved after the message is posted, nothing happens. Meaning, I can post the Canned Message, but it is not moved to any specific forum. How can I set this up to work properly?

2) I thought that after selecting a Canned Message from the dropdown menu on the bottom of any topic, it would automatically post the message. But this isn't the case...it just opens a new reply with the Canned Message written out. How can I set it up so that it automatically posts the message after selecting it?

Thanks!

-Joe
User avatar
pilch
Registered User
Posts: 121
Joined: Sat Oct 04, 2003 9:39 am
Location: U.K
Contact:

Post by pilch »

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.


Having just had this happen to me and my m8 put me right..
canned RESPONSES
Sean says:
not canned "new topics"
Sean says:
heheh
Sean says:
just guessing thats the prob anyway


You're probably doing what I did and testing it via a NEW TOPIC.. just put yourself out of your misery quickly and REPLY to a post.

So long as you've setup your messages in your ACP you should be able to CANNED RESPONSE your heart out!

Try that out.

GL.
User avatar
pilch
Registered User
Posts: 121
Joined: Sat Oct 04, 2003 9:39 am
Location: U.K
Contact:

spoke too soon..

Post by pilch »

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.
Auror
Registered User
Posts: 29
Joined: Mon Sep 12, 2005 7:55 pm

Re: spoke too soon..

Post by Auror »

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.


Yes, yes! It would be perfect if you could INSERT a Canned Message instead of replacing it for the typed.

But the reason I'm here is because I have a problem.

Well, the MOD works fine, but if I give the group custom Canned Messages, when I'm updating my profile, I get this:

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
Heeeeeeeelp! 8O
internetbrother
Registered User
Posts: 230
Joined: Mon Mar 28, 2005 6:30 pm

Post by internetbrother »

hi

seems to be great mod

one question, is it possible to have the canned message in private message posting only ( for a special group)

while another group can have canned message in private message as well as normal posting?

I need this :D
qvroger
Registered User
Posts: 45
Joined: Fri May 23, 2003 2:27 am

Post by qvroger »

This mob is just perfect...
Thanks a lot
w_33_d
Registered User
Posts: 19
Joined: Wed Dec 10, 2003 5:39 pm

Post by w_33_d »

I installed this mod with no problems. However I cannot get the move / lock functions to work. I double checked my file edits, checked to make sure the proper tables/rows were created, etc. As far as I can see, the meta refresh controlling the redirect to the move / lock menu is not working. Here is an except from my functions_post.php file:

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
Mavo460
Registered User
Posts: 1
Joined: Sun Mar 05, 2006 4:55 pm
Location: Erfurt, Germany

Post by Mavo460 »

Hello,

I likewise get the following error message:

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
How can I repair the mistake?

Thanks Mavo460
Ivoman #7
Registered User
Posts: 64
Joined: Tue Mar 07, 2006 3:17 pm
Location: BELGIUM
Contact:

Post by Ivoman #7 »

Is there a MOD similar to this MOD?

A mod working as drathbun mentioned...
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)

- ...so based on javascript, inserted like smilies,
- wich you can also use when setting up a private messages,
- and wich are only allowed to be used by mods and admins?

lol, never know if somebody knows a link to such a mod :)
Verisimilitude
Registered User
Posts: 23
Joined: Sun Nov 02, 2003 8:13 pm

Post by Verisimilitude »

Does this MOD work with the latest version of phpBB? ...I'd like to use it, but I'm not sure if it would mess with my system's integrity.
"In the end, we will remember not the words of our enemies, but the silence of our friends."- Dr. Martin Luther King Jr.
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Post by saaiberke »

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)


It seems very interesting to me that both of the versions of this mod could be merged together. Are there any plans in that direction?

Grtz,

Nic
A.T.O.M.
Registered User
Posts: 11
Joined: Mon Mar 06, 2006 12:15 pm

Post by A.T.O.M. »

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.

Unless i'm missing something, this is not correct. Users (members of groups or otherwise) cannot create canned messages. It appears only an admin can do that after which the user can select from the predefined messages. Am i out of my tree?
Nilt
Registered User
Posts: 4
Joined: Wed Jul 30, 2003 4:41 pm
Location: Seattle, WA; USA

Post by Nilt »

Sounds like a nice little mod. I did find an issue with installing it via EasyModto install to 2.0.20, though.

In line 710 of the mod's file common-replies-1.0.3em.mod it reads:code] <textarea name="signature"style="width: 300px" rows="6" cols="30" class="post">{SIGNATURE}</textarea>[/code]This should be:

Code: Select all

		<textarea name="signature" style="width: 300px" rows="6" cols="30" class="post">{SIGNATURE}</textarea>
The issue is the space betwen "signature" and style. There's also an extra space after 300px". Version 2.0.20 has one space there and the .mod file has 2.

Other than that, this mod installed fine on 2.0.20 for me with EasyMod.

When adding a group, however, I get this error:

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
Any progress on an new version or, perhaps, insight into why this occurs?
Nilt

With Google, all things are possible.
x16
Registered User
Posts: 18
Joined: Mon Jun 26, 2006 9:36 pm

Post by x16 »

I have a question. It is possible that only the admins and moderators can see this Mod?

Something like: if userlevel = Admin


Thanks.
Post Reply

Return to “[2.0.x] MOD Database Cleanup”