vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   New Posting Features - Canned Replies - User Saved Text for Replies, Threads, PMs & Infractions (https://vborg.vbsupport.ru/showthread.php?t=187043)

Simon Lloyd 10-20-2008 10:52 PM

Bananalive, nice hack ;) i'm using it on 3.7.3 without problems, one request if you would, i would want to create a set of canned responses for my mods to use and a set for my admin, i dont want the mods to be able to set their own i want us all singing from the same sheet as it were!

Is there a way to store the canned responses and perhaps set an IF condition somewhere something like
PHP Code:

<if condition="is_member_of($bbuserinfo,2)">....cannedreplies 

i'm no coder and i copied that if condition from something else, but is it possible?

If you can supply the code and where to put it i am capable of that!

bananalive 10-21-2008 11:07 AM

Quote:

Originally Posted by Simon Lloyd (Post 1649316)
Bananalive, nice hack ;) i'm using it on 3.7.3 without problems, one request if you would, i would want to create a set of canned responses for my mods to use and a set for my admin, i dont want the mods to be able to set their own i want us all singing from the same sheet as it were!

Is there a way to store the canned responses and perhaps set an IF condition somewhere something like
PHP Code:

<if condition="is_member_of($bbuserinfo,2)">....cannedreplies 

i'm no coder and i copied that if condition from something else, but is it possible?

If you can supply the code and where to put it i am capable of that!

Try this... (it makes everyone share canned replies)

Give yourself full canned replies permissions.

Give your mods the following permissions:
Can use Canned Replies: Yes
Maximum Canned Replies per User: 0
Find and delete in plugin 'Canned Replies'
PHP Code:

WHERE userid=$userid 

This will achieve:
  • You (Administrators) can add/ edit/ use canned replies
  • Moderators can view/use canned replies

Simon Lloyd 10-21-2008 12:39 PM

Quote:

Originally Posted by bananalive (Post 1649624)
Try this... (it makes everyone share canned replies)

Give yourself full canned replies permissions.

Give your mods the following permissions:
Can use Canned Replies: Yes
Maximum Canned Replies per User: 0
Find and delete in plugin 'Canned Replies'
PHP Code:

WHERE userid=$userid 

This will achieve:
  • You (Administrators) can add/ edit/ use canned replies
  • Moderators can view/use canned replies

Thanks for the prompt reply, i looked at the plugin(s) and the one called Canned replies i couldn't find your suggestion but found this
PHP Code:

 "cannedreplies WHERE userid=$userid ORDER BY title ASC"

is it the entire line or this one
PHP Code:

$userid $vbulletin->userinfo['userid']; 

is this the one you meant?

bananalive 10-21-2008 02:03 PM

Quote:

Originally Posted by Simon Lloyd (Post 1649670)
Thanks for the prompt reply, i looked at the plugin(s) and the one called Canned replies i couldn't find your suggestion but found this
PHP Code:

 "cannedreplies WHERE userid=$userid ORDER BY title ASC"

is it the entire line

Not the entire line just remove the words WHERE userid=$userid from it

The whole plugin should become

PHP 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') {
$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 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]);
        
$crtest .= "<option value=\"$row[reply]\">$row[title]</option>";
    }
$crtest .= "</select>";
} } 


Simon Lloyd 10-21-2008 02:13 PM

Flippin' 'eck you're quick!, thanks for that.

Alfa1 10-21-2008 09:34 PM

I would like to have canned replies for infractions, which are the same for all staff, plus I would like to have personal canned replies for PM's. Is this possible?

BucWiLd 10-22-2008 02:58 AM

nice feature thanks. needed it

hdrmut 10-22-2008 07:44 AM

I get general Error ..

I cannot add canned replies !!

look to this screen shout in attach

one filde hiden

bananalive 10-22-2008 03:00 PM

Quote:

Originally Posted by Alfa1 (Post 1649989)
I would like to have canned replies for infractions, which are the same for all staff, plus I would like to have personal canned replies for PM's. Is this possible?

Not at the moment.
Quote:

Originally Posted by hdrmut (Post 1650250)
I get general Error ..

I cannot add canned replies !!

look to this screen shout in attach

one filde hiden

try adding $vBeditTemplate[clientscript] at beginning of template cr_edit

hdrmut 10-22-2008 03:14 PM

Quote:

Originally Posted by bananalive (Post 1650488)


try adding $vBeditTemplate[clientscript] at beginning of template cr_edit


Not fixing

Problem same :confused:

Simon Lloyd 10-24-2008 06:39 AM

Bananalive, is there a restriction to the amount of characters that can be used? im having trouble posting around 3 lines of text? This is how it looks, i have deliberately posted non existant bb code here just so you can see what i was trying to post (the information bb code tag is a custom one but works everywhere else)!
Quote:

Originally Posted by CANNED REPLY
Attatchments.

[information]

To upload a workbook, click reply then add your few words, scroll down past the submit button and you will see the Manage Attatchments button, this is where you get to add files for upload, if you have any trouble please use the [ull="www.thecodecage.com/hesk"]Contact Us[/ull] form.

[/information]

when i post this i get:
Quote:

Originally Posted by Actual Canned Reply
Attatchments.
[information]
To upload a workbook, click reply then add your few words, scroll down past the submit button and you will see the Manage Attatchments button, this is where you get to add files for upload, if you have any trouble please use the [ull=\

any ideas?

Simon Lloyd 10-24-2008 06:43 AM

Quote:

Originally Posted by hdrmut (Post 1650499)
Not fixing

Problem same :confused:

When uploading the file did you make sure that you uploaded cannedreplies.php to your forum root aswell as the xml to the includes folder....i only ask as i omitted that when i first uploaded and had that problem, i fixed it by uploading the cannedreplies.php.

Simon Lloyd 10-24-2008 10:54 AM

Quote:

Originally Posted by Previous Post
Bananalive, is there a restriction to the amount of characters that can be used? im having trouble posting around 3 lines of text? This is how it looks, i have deliberately posted non existant bb code here just so you can see what i was trying to post (the information bb code tag is a custom one but works everywhere else)!

Originally Posted by CANNED REPLY
Attatchments.

[information]

To upload a workbook, click reply then add your few words, scroll down past the submit button and you will see the Manage Attatchments button, this is where you get to add files for upload, if you have any trouble please use the [ull="www.thecodecage.com/hesk"]Contact Us[/ull] form.

[/information]
when i post this i get:

Originally Posted by Actual Canned Reply
Attatchments.
[information]
To upload a workbook, click reply then add your few words, scroll down past the submit button and you will see the Manage Attatchments button, this is where you get to add files for upload, if you have any trouble please use the [ull=\
any ideas?

Bananalive, it seems that if you add a www. or bbcode for it or html for a www. then it causes a proble, is there a workaround for this?

Andyrew 10-25-2008 12:39 PM

I have a small problem with this, if you make a canned reply that has got "Here's" in the reply it shows up in a post as "Here\'s" :confused:

Simon Lloyd 10-25-2008 01:44 PM

Quote:

Originally Posted by Andyrew (Post 1652392)
I have a small problem with this, if you make a canned reply that has got "Here's" in the reply it shows up in a post as "Here\'s" :confused:

Yep me too! it seems there is a parse problem when using either single or double quotes.

Skyrider 10-31-2008 12:21 PM

I just installed it properly, shows up in the plugin list. But my usergroup settings doesn't has any option to use the canned replies. Using latest (nonbeta) vbulletin.

Kihon Kata 10-31-2008 01:47 PM

Sorry to ask, but where to I find this:

Quote:

Adding and editing canned replies is fully integrated into the User CP with vBulletin Editor.

bananalive 10-31-2008 02:49 PM

Quote:

Originally Posted by FF|Skyrider (Post 1656582)
I just installed it properly, shows up in the plugin list. But my usergroup settings doesn't has any option to use the canned replies. Using latest (nonbeta) vbulletin.

make sure you have uploaded bitfield_cannedreplies2008.xml to ./includes/xml/
Quote:

Originally Posted by Kihon Kata (Post 1656635)
Sorry to ask, but where to I find this:

Quick Link -> User Control Panel

Then scroll down page and you will see 'Edit your Canned Replies'

url is http://www.your-forum.com/cannedreplies.php

imedic 10-31-2008 06:43 PM

I like bananas :)
Nice mod. Marked installed. Very useful. Great idea!

I have run some trouble in translating in my language :

Control panel:

Edit Your Canned Replies = Edit Your Raspunsuri sablon
(is changing only Canned Reply phrase already translated to Raspunsuri sablon)

Add a New Canned Reply Here

- could not be edited at all via search in Phrases.

Title, Reply, Add and Cancel from posting a new canned message in Control panel cannot be edited also.
It should use phrases from vb.

On the suggestion side:

- global predefined replies (individual for each usergrup) from admin cp so a user from a group can have already predefined message template just to select from menu.
Used to have templates to be filled by users with different purposes. I will need one for a template for clinical cases (medicine)
It does not make sense to ask each user to introduce the template replies so he can use it when posting a case.

- Usergrup can have admin predetermined canned replies (above suggestion) +/- ability to save own replies (selectable both , one or none)

- add your above message to install info for easy understanding ( have looked for some time to understand how it works and where i set it up, the above message saved me :D )

Skyrider 11-03-2008 07:54 AM

Thanks, it works. Though It has some issues when using --> ' <-- in canned posts. the slash \ is being added when actually using the canned post in a thread thread.

Example:
Quote:

It\'s
Quote:

we\'ll
Quote:

you\'ll
And the list goes on :).

Samsine 11-09-2008 04:51 PM

Thanks for making this wunderfull Hack :)

dutchbb 11-09-2008 06:40 PM

One problem: when you choose a canned reply, it removes all the line breaks/ space between paragraphs.

Can this be fixed, or how can I fix it?

Thanks!

Simon Lloyd 12-01-2008 07:33 AM

Is it possible to set some the permissions of the actual canned replies?, i want some of the canned replies available to the moderators only (usergroup id 5) but all of the replies available to admin, is it possible? perhaps using something like
PHP Code:

<if condition="is_member_of($bbuserinfo,5)"><font size=1><b>canned reply 1:</b></if>

<if 
condition="is_member_of($bbuserinfo,6)"><font size=1><b>canned reply 1:</b><b>canned reply 2:</b></if> 

can this mode be made in the cannedreplies.php?

I'm clutching at straws as i'm no coder :)

Alfa1 12-13-2008 02:19 PM

Quote:

Originally Posted by FF|Skyrider (Post 1658387)
Thanks, it works. Though It has some issues when using --> ' <-- in canned posts. the slash \ is being added when actually using the canned post in a thread thread.

Example:

Quote:

It\'s
we\'ll
you\'ll


And the list goes on :).

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.

bananalive 12-14-2008 06:42 PM

Quote:

Originally Posted by Alfa1 (Post 1684540)
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>";
} }


Simon Lloyd 12-15-2008 08:47 AM

Bananalive, nice to see you back and thanks for taking the time to look at this, for some reason it now removes " and ' although doesn't cause a parse error!

EDIT: it also removes ?

bananalive 12-15-2008 12:24 PM

Quote:

Originally Posted by Simon Lloyd (Post 1685753)
Bananalive, nice to see you back and thanks for taking the time to look at this, for some reason it now removes " and ' although doesn't cause a parse error!

EDIT: it also removes ?

Sorry it's because vBulletin has converted special characters into their symbol. Import attached product file.

Simon Lloyd 12-15-2008 01:45 PM

Bananalive, Fantastic!!!! works with both html and bbcode and leaves all ', ", ?, / as they should be....well done, what a weight off!

Alfa1 12-15-2008 11:07 PM

Thank you!

LordNinja 12-16-2008 03:59 AM

Suggestion:

Can you make a mod like this, but admins can define canned replies for usergroups?

-> add a canned reply -> select which usergroup(s) can use it

It would be useful for define canned replies for moderators like "post closed", "post sticked" etc. like the "multi-moderations" on Invision.

Or if you know a mod like it for vBulletin, please point me out.

Thanks

Simon Lloyd 12-16-2008 04:18 AM

Quote:

Originally Posted by Simon Lloyd (Post 1676271)
Is it possible to set some the permissions of the actual canned replies?, i want some of the canned replies available to the moderators only (usergroup id 5) but all of the replies available to admin, is it possible? perhaps using something like
PHP Code:

<if condition="is_member_of($bbuserinfo,5)"><font size=1><b>canned reply 1:</b></if>

<if 
condition="is_member_of($bbuserinfo,6)"><font size=1><b>canned reply 1:</b><b>canned reply 2:</b></if> 

can this mode be made in the cannedreplies.php?

I'm clutching at straws as i'm no coder :)

Any thoughts on this Bananalive? i know that each canned reply has an id so could we use the above IF condition to only show certain canned replies to mods but all of them to admin?

bananalive 12-16-2008 06:38 PM

Quote:

Originally Posted by Simon Lloyd (Post 1686392)
Any thoughts on this Bananalive? i know that each canned reply has an id so could we use the above IF condition to only show certain canned replies to mods but all of them to admin?

For that an extra column would be needed in canned replies table

Simon Lloyd 12-17-2008 05:58 AM

I take it that would be very complicated to acheive?

Rene Kriest 01-05-2009 05:40 PM

The trouble with this addon is, that it puts all saved text into the source code of a webpage. This way everybody can have a look at your predefined statements.

To me this is a huge security risk, because maybe sensible information might be stored via this addon.

The idea is great and if security problem gets fixed I am the first to re-install this addon. :)

bananalive 01-06-2009 07:12 AM

Quote:

Originally Posted by Rene Kriest (Post 1702496)
The trouble with this addon is, that it puts all saved text into the source code of a webpage. This way everybody can have a look at your predefined statements.

To me this is a huge security risk, because maybe sensible information might be stored via this addon.

The idea is great and if security problem gets fixed I am the first to re-install this addon. :)

The plugin only queries your canned replies, so unless someone is on your account then they can't read your replies.

Simon Lloyd 01-08-2009 02:39 PM

Bananlive, any thoughts on how to appoint some of the canned replies to moderators but all of them for me (Admin)?

Alfa1 01-10-2009 06:09 PM

Does thsi work on vb 3.8? Has anyone tried?

Rene Kriest 01-15-2009 03:16 AM

Quote:

Originally Posted by bananalive (Post 1703039)
The plugin only queries your canned replies, so unless someone is on your account then they can't read your replies.

Thank you for your explanation that proofed me wrong. :)

I gonna reinstall your fab addon ASAP.

Simon Lloyd 01-15-2009 08:41 AM

Quote:

Originally Posted by Alfa1 (Post 1707589)
Does thsi work on vb 3.8? Has anyone tried?

I have just upgraded to 3.8 and have no problems!

Simon Lloyd 02-05-2009 06:41 PM

Quote:

Originally Posted by Simon Lloyd (Post 1705165)
Bananlive, any thoughts on how to appoint some of the canned replies to moderators but all of them for me (Admin)?

Bananalive, i know your are busy with your new mod but any ideas how the above can be achieved?, i really need to allow only certain canned replies for my mods.


All times are GMT. The time now is 10:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01775 seconds
  • Memory Usage 1,885KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (10)bbcode_php_printable
  • (27)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete