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:


All times are GMT. The time now is 04:46 AM.

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.01682 seconds
  • Memory Usage 1,773KB
  • 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
  • (8)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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