I use Zetaboards forum and I wanted a javascript that would use AJAX to hide the fast reply box and put in the form for the full reply box (with smileys, BBCode, etc). Someone posted this:
Code:
<script type='text/javascript'>
if(/\/topic\//.test(location.href)){
var rplybtn = $('#fast-reply button:contains(Full Reply Screen),.topic-buttons a:has(img[alt=Add Reply])');
rplybtn.click(function(){
var url = main_url+'post/?mode=2&type=1&f='+$('input[name=f]:first').attr('value')+'&t='+location.href.split("topic/")[1].split("/")[0], text = $('#fast-reply textarea').val();
$.get(url, function(q){
$('#fast-reply').replaceWith($('form[name=posting]',q).clone());
$('#c_post-text').val(text);
$('#btn_preview').click(Preview)
});
if($(this).is('button')){return false;};
}).filter('a').attr('href','#copyright');
};
</script>
This code does that via a button. The users have to press a button that says "Full Reply Screen" in order for the script to replace the quick reply box with the full reply box, but I want to remove the button aspect and just have the replacement happen automatically on every page. Any idea what I would need to do to the above code for that to happen?