MyBB Community Forums

Full Version: css multiquote button.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have converted my theme to use css buttons instead of images, i got the multiquote button working thanks to http://community.mybb.com/thread-120533-...#pid873660 and would just like to know is there a way to change the button so after its activated it says unquote,rather than quote.

hmm no one seems to know how to do this
I guess no one has a answer.
Open jscripts/thread.js.

Find:

element.src = element.src.replace("postbit_multiquote.gif", "postbit_multiquote_on.gif");

Replace:

element.innerHTML = "unquote";

Find:

element.src = element.src.replace("postbit_multiquote_on.gif", "postbit_multiquote.gif");

Replace:

element.innerHTML = "quote";
does it need to replace all instances of that code as it appears twice i belive.

It works but now when in comes up as unquote the button is no longer clickable.
You should change both. It shouldn't stop the button being clickable.
well it does stop it i have had to revert it back to the original to make clickable
my postbit multiquote template if it helps is.
<span class="btn_like" id="multiquote_{$post['pid']}" title="{$lang->postbit_quote}">
     <a href="javascript:Thread.multiQuote({$post['pid']});" style="display: none;" id="multiquote_link_{$post['pid']}">Quote</a>
</span>
<script type="text/javascript">
     $('multiquote_link_{$post['pid']}').style.display = '';
</script>

in the js file my lines have been edited to
element.addClassName("multiquote_on"); and
element.removeClassName("multiquote_on");

as instructed in the thread to get it to work.
Mine looks like this:

<a href="javascript:Thread.multiQuote({$post['pid']});" style="display: none;" id="multiquote_{$post['pid']}" class="pbnj" title="{$lang->postbit_multiquote}">+R</a>
<script type="text/javascript">
//<!--
	$('multiquote_{$post['pid']}').style.display = '';
// -->
</script>

The problem is yours is wrapped in a <span> I believe.
Thanks for the help I have used your template and now it works perfect thanks alot.
Glad you got it sorted Smile
Me to mans i can carry on with other stuff now.
Pages: 1 2