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
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 :)
Thanks this worked.... its kinda neater , should be addition to the plugin :) ..
but an Issue ... now when the page loads the "Submit" button is bout 15-20 lines below blank space, it should have been just below the "Show Drawing Board" link and when it is clicked the button should adjust below the drawing board and vice versa ....
i think it can be achieved with ajax ?
and y the output img of drawing room is so small but the drawin board is big in size etc ?
asking to many questions , pardon that :)
you can see it working here, testing there : http://blog.drhack.net/download-videos-from-youtube-other
Thanks
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 :)
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 :)