The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
hidden quick reply that says who you're quoting Details »» | |||||||||||||||||||||||||||
hidden quick reply that says who you're quoting
Developer Last Online: Mar 2018
just a quick modification that i made for my forum to change how quick reply works so the big box is by default always hidden and only shown if users want to use it. if you click on the quick reply link it says who you're quoting (and defaulty goes to quote if clicked from a message)
---------------------------- ************************************************** ************************* Quick reply modification hidden quick reply that shows who is being quoted ************************************************** ************************* How this is different to normal quick reply: - hidden by default (shown as collapsed box) - on clicking a quick reply icon automatically ticks quote box - when someone is being quoted it says who and which post number What is modified: - SHOWTHREAD template - vbulletin_quick_reply.js How to install: for SHOWTHREAD template: change: Code:
<a style="float:$stylevar[right]" href="#top" onclick="return <if condition="$show['wysiwyg'] == 2 AND !is_browser('ie')">editor_loaded ? false : </if> toggle_collapse('quickreply');"><img id="collapseimg_quickreply" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_quickreply].gif" alt="" border="0" /></a> $vbphrase[quick_reply] Code:
<!--QR MOD1 --> <a style="float:$stylevar[right]" href="#top" id="qr_hide" onclick="return false;"><img src="$stylevar[imgdir_button]/collapse_tcat_collapsed.gif" alt="" border="0" /></a> <span id="qr_name"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$LASTPOSTID">$vbphrase[quick_reply]</a></span> <script type="text/javascript"> <!-- //vbphrases can be added to vBeditTemplate[clientscript] put here for ease of modification access //can be vbphrases if added vbphrase["qr_quoting_post"] = 'Quoting Post #'; vbphrase["qr_by"] = ' by '; //--> </script> <!-- /QR MOD1 --> change: Code:
<tbody id="collapseobj_quickreply" style="$vbcollapse[collapseobj_quickreply]"> Code:
<!-- QR MOD2 --> <tbody id="qr_obj" style="display:none;"> <!-- /QR MOD2 --> NOTE: if you wish to use vbphrases add the phrases you need and modify the 'Quoting Post #' and ' by ' bits to the vbphrase names in vbulletin_quick_reply.js add at the top after the vb notice and before any script: Code:
//qr modifications //js addition 1 //variables used in mod var oldlink,oldimg,newimg,scrollTop; //set onclicks fetch_tags(fetch_object('qr_name'), 'a')[0].onclick = qr_hide; fetch_object('qr_hide').onclick = qr_hide; /** * hides or shows quick reply depending on its use */ function qr_hide(){ if(fetch_object('qr_obj').style.display == 'none'){ qr_show(); vB_Editor[QR_EditorID].check_focus(); if(!require_click)qr_active = true; }else{ fetch_object('qr_obj').style.display = 'none'; fetch_object('qr_name').innerHTML = oldlink; fetch_tags(fetch_object('qr_name'), 'a')[0].onclick = qr_hide; fetch_tags(fetch_object('qr_hide'), 'img')[0].src = oldimg; } return false } /** * shows quick reply box */ function qr_show(){ fetch_object('qr_obj').style.display = ''; oldlink = fetch_object('qr_name').innerHTML; fetch_object('qr_name').innerHTML = fetch_tags(fetch_object('qr_name'), 'a')[0].innerHTML; oldimg = fetch_tags(fetch_object('qr_hide'), 'img')[0].src; newimg = ''; for(i=0;i<oldimg.length-14;i++){ newimg = newimg + oldimg.charAt(i); } fetch_tags(fetch_object('qr_hide'), 'img')[0].src = newimg + '.gif'; scrollTop = vB_Popup_Menu.prototype.fetch_offset(fetch_object('qrform'))['top']; self.scrollTo(0,scrollTop); } /** * hides the "quoting post" text if checkbox is unchecked and vice versa */ function qr_quoteManage(){ if(this.checked == true){ fetch_object('qr_quotetext').style.display = ''; }else{ fetch_object('qr_quotetext').style.display = 'none'; } return true; } //end js addition 1 Code:
function qr_disable_controls() { Code:
function qr_disable_controls() { //qr modification //js addition 2 if(fetch_object('qr_obj').style.display != 'none')qr_hide(); if(fetch_object('qr_quickreply').checked == true)fetch_object('qr_quickreply').checked = false; fetch_object('qr_quotetext').style.display = 'none'; //end js addition 2 Code:
function qr_activate(postid) { var qr_collapse = fetch_object('collapseobj_quickreply'); if (qr_collapse && qr_collapse.style.display == "none") { toggle_collapse('quickreply'); } fetch_object('qr_postid').value = postid; fetch_object('qr_preview').select(); fetch_object('qr_quickreply').disabled = false; Code:
function qr_activate(postid) { //code no longer used /*var qr_collapse = fetch_object('collapseobj_quickreply'); if (qr_collapse && qr_collapse.style.display == "none") { toggle_collapse('quickreply'); }*/ //qr modification //js addition 3 //if qr is hidden show it fetch_object('qr_obj').style.display == 'none' ? qr_show(): self.scrollTo(0,scrollTop); //end js addition 3 fetch_object('qr_postid').value = postid; fetch_object('qr_preview').select(); fetch_object('qr_quickreply').disabled = false; //js addition 4 //make quote as default fetch_object('qr_quickreply').checked = true; //set onclick to hide quote text when checkbox isn't checked fetch_object('qr_quickreply').onclick = qr_quoteManage; //get username var quo_user = fetch_tags(fetch_object('postmenu_' + postid),'a')[0].innerHTML; //get post number //needs modifying if postnumber isnt in <strong> tags var quo_no = fetch_tags(fetch_object('postcount' + postid),'strong')[0].innerHTML; fetch_object('qr_quotetext').innerHTML = vbphrase["qr_quoting_post"] + quo_no + vbphrase["qr_by"] + quo_user; //unhide quote if hidden if(fetch_object('qr_quotetext').style.display == 'none')fetch_object('qr_quotetext').style.display = ''; //end js addition 4 installation complete Potential Problems: i've tested this with ie6 and firefox and i havent had problems altho in some cases it could degrade poorly i havent looked at the fetch_tags() method yet to understand how it degrades but this should certainly work fine on most modern browsers. there are still likely to be bugs in this as it has not been tested fully in an in-use forum. -------------------- maybe someone will have a use for this like we do, maybe not p.s. this is my first hack that i've wrote up for here so be gentle if i've done something wrong Show Your Support
|
Comments |
#2
|
|||
|
|||
I love it!!! *Clicks Install*
your gonna want to put your instructions in a txt file... so that people have it for easy reference if anyone has to re-install this for whatever reason instead of having to find the thread |
#3
|
|||
|
|||
oooh thanks i didnt know if anyone would be interested let alone so fast, i've added the text file and neated it up a bit now. let me know how you get on with it.
|
#4
|
|||
|
|||
no problems yet but you can be sure you will find out if i come across any.... just waiting to see if any members notice anything and report it to me
|
#5
|
||||
|
||||
nice hack, where do I get the pink skin?
|
#6
|
|||
|
|||
oh its just a skin i made for my forum i might release it sometime if i find some spare time
|
#7
|
|||
|
|||
Does it have an option so that a user can choose weather to have it open or no...like Invision Free?
|
#8
|
|||
|
|||
i'm not familiar with that option, but working on what you said there is no option it is defaultly hidden all the time.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|