Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Obscure Formating errors CLEditor/Emotify Plugin

Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
edited January 2014 in Vanilla 2.0 - 2.8

Vanilla 2.1B2, Opera/Firefox

i there... ;)

Here is all of my pity Story... :D
http://vanillaforums.org/discussion/25859/obscure-formating-errors-cleditor/p1

In Short:

Emotify 2.0.5 is making these Artifacts to the Text in CLEditor, after saving...
Not shure if it is a Bug... maybe somebody has a quick Idea??

http://caba.de/CaBaFoRuM/index.php?p=/discussion/2508/das-neue-cabaforum-tipps-test-und-hilfeseite#latest

Name= testuser
Passw= testuserpass

Thanks in advance... ;)

Comments

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    Just the conclusion from the other Post:

    This is really incredible... i was searching for Months for this error...

    Now it seems, that the EMOTIFY Plugin is the problem!!!
    I could Shoot myself, but I am sure, that I disabled ALL Plugins for testing purposes...
    Maybe its because Emotify 1.0 is not having this issues (but others) and V2.0.5. does....
    I deinstalled my Green Smilies Version of Emotify and put the original Emotify 2.0.5 Plugin... same errors as before... if I switch it off or use V1.0, there are no more "Question marks"...
    Crazy, Crazy... but I'm glad that I've found it... :D

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    Using Emotify 2.0.1. and modified it with the Green Smilies... no Artifacts any more....
    have now to examine the differences between V2.0.1 and 2.0.5 to get to this strange bug...

    One problem still remains:

    The Smilies are not put there, where the Editor Cursor is.... is there any solution for that?
    Thanks... ;)

  • peregrineperegrine MVP
    edited January 2014

    @Dr_Sommer - What version of PHP are you using?

    I would probably use version 2.05 and try to fix that, then the other way around.

    that said aside from the js changes.

    one fundamental change between the two is this

    2.05 has this.

    $Text = ' '.html_entity_decode($Text).' ';
    

    and 2.01 has this.

    $Text = ' '.$Text.' ';

    with versions of php lower than 5.4 you must set the UTF-8 flag in the function for UTF-8 to work properly.

    so in summary re-install 2.05 and change around line 233 in class.emotify.plugin.php

    try each of these below as a replacement for $Text = ' '.html_entity_decode($Text).' '; and see what works best and report back which works best.

        $Text = ' '. html_entity_decode($Text, ENT_COMPAT | ENT_HTML401, 'UTF-8') .' ';
    
        or
    
    
        $Text = ' '. html_entity_decode($Text, ENT_COMPAT , 'UTF-8') .' ';
    
        or 
    
        $Text = ' '. html_entity_decode($Text,ENT_HTML5 , 'UTF-8') .' ';
    
    or possibly
    
       $Text = ' '. html_entity_decode($Text,ENT_QUOTES , 'UTF-8') .' ';
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    Great, peregrine... ;)
    the first one did it for me:

    $Text = ' '. html_entity_decode($Text, ENT_COMPAT | ENT_HTML401, 'UTF-8') .' ';

    still confused, that nobody had this trouble like I did.... does nobody uses the CLeditor with the Emotify Plugin?? :# :# :#

    ok... one LAST Bug to go :# :

    The Icons are always placed on the end of some Text in the Editor and not on Cursor position!!
    For example: if I write a longer Text and at the End I would Like to populate some Smilies on several places inside the Text... that is not possible... ;(

    Is there a easy solution for that?

    After that I'll not trouble you again for about a Month... :# :#

  • peregrineperegrine MVP
    edited January 2014

    @Dr_Sommer said:
    Great, peregrine... ;)
    the first one did it for me:

    $Text = ' '. html_entity_decode($Text, ENT_COMPAT | ENT_HTML401, 'UTF-8') .' ';

    awesome, glad one of my solutions worked for you. Do you want to file it on github?

    still confused, that nobody had this trouble like I did.... does nobody uses the CLeditor with the Emotify Plugin?? :# :# :#

    ok... one LAST Bug to go :# :

    unfortunately, I don't use either plugin.

    I dislike the cleditor, and prefer buttonbar. most users of the forum don't need all those bells and whistles the way I figure it.

    The Icons are always placed on the end of some Text in the Editor and not on Cursor position!! For example: if I write a longer Text and at the End I would Like to populate some Smilies on several places inside the Text... that is not possible... ;(
    After that I'll not trouble you again for about a Month... :grin::grin:

    test :) test o:) test

    do the emoticons populate correctly using another editor?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    If you like, you can push it to github... i don't jet have an Account there, but soon (CaBa Calendar) :D

    For normal Users the WYSIWYG Editor is great, cause they know the usability from other Editors... ;)

    Now back to the Emoticons problem:

    When I turn off CLEditor and use the standard Editor, the "bug" still appears ( Smilies are placed on the end of the editor, not on cursor position)

    So it must be an plugin issue, right?

  • hgtonighthgtonight ∞ · New Moderator

    From what I remember, the plugin (emotify) has no idea where the cursor position is. Clicking on the button removes the cursor from the textbox. Thus it just inserts the smiley at the end of the typed text.

    Visual editors get around this by passing the position data through to the click events. You could of course do this for emotify as a standalone feature.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • peregrineperegrine MVP
    edited January 2014

    If you like, you can push it to github... i don't jet have an Account there,

    I placed an issue on github re: html_entity_decode in emotify plugin.

    https://github.com/vanillaforums/Garden/issues/1773

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited January 2014

    @hgtonight: just googeling for some answers... how is it to prevent the focus to be stolen from the Editor? Could that be a quick fix?? But as always, no clue how to do that... ;)

    Another thing:
    if I use TinyMCEFour from vrijvlinder, there is another integrated Emoticon plugin, functioning as it should... unfortunately I have other issues with the TinyMCEFour plugin....
    would it be possible to integrate that plugin to the CLeditor V1.2.7?

    p.s.: ThX Peregrine.. ;)

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited January 2014

    Okeee.. here is the modified Emotify plug with our green Smilies... as said before, we LOVE emoticons...hehe... :D:D

    Now the only thing that is left, is the positioning of the smilies on Cursor position... I can't figure that out... this is making me nuts!!! ;( ;(

    When I have this of my back, I can concentrate on Plugifying my Calender for Vanilla... looking good... (picture 2) :D:D

  • hgtonighthgtonight ∞ · New Moderator

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • the smilie with the pinocchio nose. thats a good one.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited January 2014

    thats less then 1/3 of all the available Emoticons... :D:D:D

    ThX hgtonight, I'll look into that, but I did research and Try all night yesterday... I'ts the lack of JS Knowledge... ;( :D

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited January 2014

    boobies !! lol that one is very funny ....I want that one in my signature so people don't mistake me for a man...

Sign In or Register to comment.