MyBB Community Forums

Full Version: Edit postbit_multiquote
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone,
As you know, the buttons "quote / edit / etc" are just images. I have changed my template so that they appear with a html code,
the problem is that now I do not understand how to edit the template "postbit_multiquote" so as to make it work with these buttons generated html.

when you click on the "multiquote", the template postbit_multiquote change the button image from "postbit_multiquote.gif" to "postbit_multiquote_on.gif".
I now no longer works as well as my buttons are not more of the images. but I need this template to change the sentence to be written in the button "Quote +" to "Quote -".

this is my template postbit_multiquote:
<a href="javascript:Thread.multiQuote({$post['pid']});" style="display: none;" id="multiquote_link_{$post['pid']}">Quote +</a>
<script type="text/javascript">
//<!--
	$('multiquote_link_{$post['pid']}').style.display = '';
// -->
</script>

As you can see the second part of the template calls a piece of java script, written in jscripts / thread.js
the portion that changes the image when you click on the button should be this:
var quoted = Cookie.get("multiquote");
        if(quoted)
        {
            var post_ids = quoted.split("|");
            post_ids.each(function(post_id) {
                if($("multiquote_"+post_id))
                {
                    element = $("multiquote_"+post_id);
                    element.src = element.src.replace("postbit_multiquote.gif", "postbit_multiquote_on.gif");
                }
            });
            if($('quickreply_multiquote'))
            {
                $('quickreply_multiquote').show();
            }
        }

How do I make by clicking on the word change from "Quote +" to "Quote -"?

Excuse me for my bad english, i'm italian.
I will also like to know this, I removed the MultiQuote button after I changed my buttons to CSS buttons.