• Resolved palatino

    (@palatino)


    Hi,

    using the BBCode in messages and announcements produces weird output for line breaks and list formatting.

    This is my input:

    [quote]quote[/quote]
    [b]bold[/b]
    [i]italic[/i]
    [list]
    [*]Point 1
    [*]Point 2
    [*]Point 3
    [/list]

    This is the output:

    quote
    rnboldrnitalicrn
    rn[*]Point 1rn[*]Point 2rn[*]Point 3rn

    https://www.ads-software.com/plugins/front-end-pm/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Shamim Hasan

    (@shamim51)

    uncomment line 52 in bbcode.php if this does not work for you follow next instruction.
    find in fep-class.php line 1389

    <a title="'.__("List item", "fep").'" href="javascript:void(0);" onclick=\'surroundTheText("[*]", "", document.forms.message.message_content); return false;\'><img src="'.$this->pluginURL.'/images/bbc/li.png" /></a>

    replace with
    <a title="'.__("List item", "fep").'" href="javascript:void(0);" onclick=\'surroundTheText("[*]", "[/*]", document.forms.message.message_content); return false;\'><img src="'.$this->pluginURL.'/images/bbc/li.png" /></a>

    find in bbcode.php line 13
    '/\[\*\](.+)\\n/Ui',

    replace with
    '/\[\*\](.+)\[\/\*\]/Ui',

    fine in line 54
    $subject = preg_replace($this->patterns, $this->replacements, $subject);

    add following code before this line (do not replace this line)
    $subject = str_replace( array ('\r\n', '\r', '\n'),'<br/>', $subject);

    let me know if this work for you

    Plugin Author Shamim Hasan

    (@shamim51)

    thank you for showing bug.
    i have changed code and uploaded. that is more accurate solution. u can download. if it solve your problem please mark this as solved.

    Thread Starter palatino

    (@palatino)

    Thank you Shamim,

    it looks almost great now.
    Only the lines get spread out very wide due to your style rules:
    #fep-content th, #fep-content td {white-space: pre-line;}

    Are they necessary?

    Also there are a few words not prepared for translation: So far I found “annoncement” and “ago”.

    I’d be happy to add the respective translations as soon as the pot file includes them.

    Thank you for this plugin
    Palatino

    Thread Starter palatino

    (@palatino)

    By the way: It would be nice if you add a link to my profile page in your plugin description translators list.

    Cheers, Palatino

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘BBCode does no t work’ is closed to new replies.