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)

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


All times are GMT. The time now is 11:08 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.01309 seconds
  • Memory Usage 1,746KB
  • 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
  • (1)bbcode_php_printable
  • (4)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