• Resolved Niazai

    (@dr-hack)


    Hello,

    Interested Plugin .. wat i wanted to achieve was that below the text are a above the Submit Button in the page a link should come saying something like “Show Drawing Board” or similiar … and when the user clicks on the link the draw comments get showed using JS or Ajax what ever suits .. now i dont know where to add wat in WP .. kinda new :S

    <script>
    
    function clickMeCSS(ID)
    {
    div = document.getElementById(ID);
    div.style.visibility = "visible"// if it doesnt work try div.style.visibility = true
    }
    </script>
    <a href="Javascript:clickMeCSS('drawingboard');">Show Drawing Board</a>
    <span id="drawingboard" style="visibility:hidden;">
    <p><label>DrawBoard: (optional)</label>
    <?php do_action('comment_form', $post-?>ID); ?>
    </p>
    </span>

    what i thought could work is above but cant get it to work .. i know its wrong where to put the do_action(comment_form) tag ?

    It wil be a neat addition to the Plugin ..

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can disable the hook for my plugin, by going to Settings => Draw Comments and set the Option to “No” and than put this in your comments.php, before your submit buttons…

    <script>
    
    function clickMeCSS(ID, text)
    {
    div = document.getElementById(ID);
    link = document.getElementById(text);
    link.innerHTML = (link.innerHTML == "Show Drawing Board") ? "Hide Drawing Board" : "Show Drawing Board";
    div.style.visibility = (div.style.visibility == "hidden") ? "visible" : "hidden"; // if it doesnt work try div.style.visibility = true
    }
    </script>
    <a href="Javascript:clickMeCSS('drawingboard', 'drawingtext');" id="drawingtext">Show Drawing Board</a>
    <span id="drawingboard" style="visibility:hidden;">
    <p><label>DrawBoard: (optional)</label>
    <?php echo getDrawArea().getColors(); ?>
    </p>
    </span>

    I hope it works out 🙂

    yeah, maybe i add it to the next version 🙂

    I think the problem is that you use visibility, it should work with display none/block instead…

    the drawing area is bigger than the image, because it’s a lot easier to
    draw in a big area 🙂

    Thread Starter Niazai

    (@dr-hack)

    got the display to work now its lookin even neater 😉 ….

    thanks 🙂

    any ideas for future releases,more functions to add ?

    yeah maybe a paint bucket tool to fill areas 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin:Draw Comments] Min/Max addition in plugin’ is closed to new replies.