MyBB Community Forums

Full Version: how to modify postbit_multiquote?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi everybody,
i'm gonna ask something which is really hard for me to explain:
as you know, the buttons "quote/edit/etc" are simply images. i modified my templates so that now they're generated from html.
the problem is that i do not understand how to modify the template "postbit_multiquote" in order to make it work with the new buttons.
when you click the button "multiquote", the postbit_multiquote "decides" to switch the images from postbit_multiquote.gif to postbit_multiquote_on.gif.

now that my buttons are html generated, i want the postbit_multiquote to switch between a certain "div" to another "div". how do i do that?

this is the postbit_multiquote template:
<div id="button">
<a href="javascript:Thread.multiQuote({$post['pid']});" style="display: none;" id="multiquote_link_{$post['pid']}">
Quote +
</a>
</div>

<script type="text/javascript">
//<!--
	$('multiquote_link_{$post['pid']}').style.display = '';
// -->
</script>

i think i have to change the second part from "<script title... etc", but how?
i found this in jscripts/thread.js:
		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();
			}
		}

of course i have to change something in this string:
					element.src = element.src.replace("postbit_multiquote.gif", "postbit_multiquote_on.gif");
but what?

this is my postbit_template right now:
<div id="button">
	<a href="javascript:Thread.multiQuote({$post['pid']});" style="display: none;" id="multiquote_link_{$post['pid']}">
		<div id="multiquote_{$post['pid']}">Multiquote</div>
	</a>
</div>

<script type="text/javascript">
//<!--
	$('multiquote_link_{$post['pid']}').style.display = '';
// -->
</script>

do i have to change something here too?

please, somebody help... ._.