vb.org Archive

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

Andyrew 08-20-2011 06:51 PM

Quote:

If you want to avoid the <br> problem, just add a space at the end of each row.
Is an editor issue which adds html <br> automatically when you have empty rows on your text or use some BB codes.
How do you stop this br code appearing, where are you supposed to add the spaces. I have added spaces in the canned reply but it makes no difference.

mmackinnon 08-20-2011 11:37 PM

yah same here, everything working but for the BR issue

Jman423 08-21-2011 01:48 AM

This is also working for me, but as others mentioned, the <br> is still showing up whether or not there is a space at the end of each line.

Thank you for fixing it... deleting a few extra characters is better than the way it worked before.

Eric 08-21-2011 10:19 AM

Ok, for the <br> issue, this appears to correct it. Edit the /clientscript/cannedreplies.js file (the updated one in my post or xtremecoders' zip file) and replace everything with:

Code:

function insertCannedReply(text)
{
        text = text.replace(/\n/g, "");
        text = text.replace(/<br>/g, "\n");

        if (document.getElementById("vB_Editor_001"))
        {
                CKEDITOR.instances.vB_Editor_001_editor.insertHtml(text);
        }
        else
        {
                CKEDITOR.instances.vB_Editor_QR_editor.insertHtml(text);
        }
}


Andyrew 08-21-2011 10:59 AM

Thanks Eric, works perfect now. :D:up:

inigo 08-21-2011 11:05 AM

Quote:

Originally Posted by Eric (Post 2236102)
Ok, for the <br> issue, this appears to correct it. Edit the /clientscript/cannedreplies.js file (the updated one in my post or xtremecoders' zip file) and replace everything with:

Code:

function insertCannedReply(text)
{
        text = text.replace(/\n/g, "");
        text = text.replace(/<br>/g, "\n");

        if (document.getElementById("vB_Editor_001"))
        {
                CKEDITOR.instances.vB_Editor_001_editor.insertHtml(text);
        }
        else
        {
                CKEDITOR.instances.vB_Editor_QR_editor.insertHtml(text);
        }
}


Works great for me! 4.1.5 p1

Thanks!!!!!!!!!!!!

Igel1 08-21-2011 01:40 PM

But as empty lines are inserted
better that way

Code:

function insertCannedReply(text)
{
        text = text.replace(/\\"/ig, "\"");
        text = text.replace(/ \<br\>/ig, "");

        if (document.getElementById("vB_Editor_001"))
        {
                CKEDITOR.instances.vB_Editor_001_editor.insertHtml(text);
        }
        else
        {
                CKEDITOR.instances.vB_Editor_QR_editor.insertHtml(text);
        }
}

So BB code also works without <br>

Jman423 08-21-2011 02:38 PM

Quote:

Originally Posted by Igel1 (Post 2236147)
But as empty lines are inserted
better that way

Code:

function insertCannedReply(text)
{
        text = text.replace(/\\"/ig, "\"");
        text = text.replace(/ \<br\>/ig, "");

        if (document.getElementById("vB_Editor_001"))
        {
                CKEDITOR.instances.vB_Editor_001_editor.insertHtml(text);
        }
        else
        {
                CKEDITOR.instances.vB_Editor_QR_editor.insertHtml(text);
        }
}

So BB code also works without <br>

This worked for me, thanks.

sevenmix 08-22-2011 04:45 AM

Now it works perfect, thank you so much.

8thos 08-22-2011 04:56 AM

Hey Eric, the same problem with Canned Replies, is it the same problem with Post Templates? https://vborg.vbsupport.ru/showthread.php?t=242246


All times are GMT. The time now is 11:54 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.01306 seconds
  • Memory Usage 1,744KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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