Not signed in ( Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorpierovdfn
    • CommentTimeAug 6th 2010 edited
     permalink
    First, I'm sorry for my poor English.
    I've written a patch to use jQuery instead of Mootools in flatpress.
    Details are in my site.
    If somebody if interested, the article is Flatpress: jQuery instead Mootools [beta] and it's in Italian and in English.
    As written in the title, it's still in beta stage: I tested and it works as the original code.
    Details are in the article.
    If you test it, please post here a feedback.
    I think it's better than mootools (especially for developers) because it's easier, it has more plugins and it doesn't modify javascript prototypes.
    Thanks for attention, Piero VDFN
    •  
      CommentAuthorNoWhereMan
    • CommentTimeAug 8th 2010
     permalink
    I'll have a look, sounds like a good idea; mootools was nice at the time because it was faster than jQuery, but it has its downsides (and they like to change APIs very often...)
    •  
      CommentAuthorpierovdfn
    • CommentTimeAug 8th 2010
     permalink
    Thanks...
    I have ported old script to mootools 1.2 but it was so difficult because of scroller...
    Instead you don't need it with jQuery: it's included with dragger method :-)
    •  
      CommentAuthorNoWhereMan
    • CommentTimeAug 9th 2010
     permalink
    looks like you really did a good job! I'm considering it for the next release ;)
    in order to avoid name clashes, I've renamed your jsutils to jquery, and lightbox for jquery to lightbox2

    I like it! looks really like a drop-in replacement! moreover, I can finally consider wymeditor or markitup (both jquyery based IIRC) for my own usage!

    I like many of the plugins you are writing, good job!
    •  
      CommentAuthorpierovdfn
    • CommentTimeAug 9th 2010
     permalink
    Thank you, I'm honored that my contribution can go in mainline!
    Have you seen this post with my suggestions, too?
    (Sorry for patches in thread and not in external site but I didn't think about posting in pastebin).
    •  
      CommentAuthorlantaca
    • CommentTimeAug 10th 2010
     permalink
    Posted By: NoWhereManI like it! looks really like a drop-in replacement! moreover, I can finally considerwymeditorormarkitup(both jquyery based IIRC) for my own usage!


    Anche questo, anche questo!!!
    •  
      CommentAuthorNoWhereMan
    • CommentTimeAug 10th 2010
     permalink
    Anche questo, anche questo!!!


    as I said, for my own usage, you are free to choose whatever you like ;)
    •  
      CommentAuthorlantaca
    • CommentTimeAug 11th 2010
     permalink
    Yes i know, but i'm not be able to make a plugin to import any aditor... :-(
    •  
      CommentAuthorpierovdfn
    • CommentTimeAug 11th 2010
     permalink
    Lantaca, from tinyMCE, here's the base code.
    <?php
    /*
    Plugin Name: Editor
    Version: 1.0
    Plugin URI: http://your.site.tld
    Description: A small description
    Author: Lantaca
    Author URI: http://your.site.tld
    */
    add_filter('editor_toolbar', 'plugin_editor_load');
    function plugin_editor_load() {
    $URL = plugin_geturl('editor');
    echo <<<EDITOR
    Code for the editor
    EDITOR;
    }

    You just have to insert the code when it's written "Code for the editor".
    However I renamed plugins on my site, too.
    •  
      CommentAuthorlantaca
    • CommentTimeAug 16th 2010 edited
     permalink
    this it the basic code to integrate the editor on a web page (HTML)
    <body>
    <h1>jWYSIWYG</h1>
    <h2>Example: Basic</h2>
    <div>
    <textarea name="wysiwyg" id="wysiwyg" rows="5" cols="47"></textarea>
    </div>
    <script type="text/javascript" src="../lib/jquery-1.4.2.js"></script>
    <script type="text/javascript" src="../jwysiwyg/jquery.wysiwyg.js"></script>
    <script type="text/javascript">
    $(function()
    {
    $('#wysiwyg').wysiwyg();
    });
    </script>
    </body>


    the plug in is this (i suppose), it's in the folder "fp-plugin/jwysiwyg"
    <?php
    /*
    Plugin Name: jWYSIWYG Editor
    Version: 1.0
    Plugin URI: http://lantaca.altervista.org
    Description: A very simple and fast editor based on jQuery
    Author: Lantaca
    Author URI: http://lantaca.altervista.org
    */
    add_filter('editor_toolbar', 'plugin_editor_load');
    function plugin_editor_load() {
    $URL = plugin_geturl('jwysiwyg');
    echo '<script type="text/javascript" src="' . $URL . 'lib/jquery-1.4.2.js"></script> ';
    echo '<script type="text/javascript" src="' . $URL . 'jwysiwyg/jquery.wysiwyg.js"></script> ';
    echo '<script type="text/javascript" src="' . $URL . 'lib/jquery.simplemodal.js"></script> ';
    echo '<script type="text/javascript">
    $(function()
    {
    $(#wysiwyg).wysiwyg();
    });
    </script>';

    }

    but it's doesn't appear... i think i have to rename the id of text area from "content" to "wysiwyg". (i have integrate this editor in a html page and it works so)

    and if i write so, like the html integration
    $('#wysiwyg').wysiwyg();
    instead
    $(#wysiwyg).wysiwyg();
    i have this error
    Parse error: syntax error, unexpected '}', expecting ',' or ';' in C:\Programmi\LightTPD\htdocs\flatpress\fp-plugins\jwysiwyg\plugin.jwysiwyg.php on line 20

    I have try to call the function in this way
    $(#content).wysiwyg();
    but nothing happens :-)

    tell me if i understood: when i write $(#content).wysiwyg(); it transforms the id of textarea from content to wysiwyg, isn't true?
    •  
      CommentAuthorlantaca
    • CommentTimeAug 16th 2010
     permalink
    ok, now it works...

    $("#content").wysiwyg();