Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
hidden quick reply that says who you're quoting Details »»
hidden quick reply that says who you're quoting
Version: 1.00, by evil kev evil kev is offline
Developer Last Online: Mar 2018 Show Printable Version Email this Page

Version: 3.5.0 RC2 Rating:
Released: 08-31-2005 Last Update: 08-31-2005 Installs: 4
Code Changes  
No support by the author.

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]
to:
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&amp;noquote=1&amp;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 -->
and

change:
Code:
<tbody id="collapseobj_quickreply" style="$vbcollapse[collapseobj_quickreply]">
to:
Code:
<!-- QR MOD2 -->
<tbody id="qr_obj" style="display:none;">
<!-- /QR MOD2 -->
save.

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
change:
Code:
function qr_disable_controls()
{
to:

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
change:
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;
to:

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
save and upload (when testing using ctrl + f5 to force the browser to reload js files)

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-31-2005, 11:53 PM
KuRi KuRi is offline
 
Join Date: Jan 2005
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 09-01-2005, 12:47 AM
evil kev evil kev is offline
 
Join Date: May 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 09-01-2005, 01:12 AM
KuRi KuRi is offline
 
Join Date: Jan 2005
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 09-21-2005, 07:59 AM
Brinnie's Avatar
Brinnie Brinnie is offline
 
Join Date: Jul 2005
Location: Louisiana
Posts: 360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack, where do I get the pink skin?
Reply With Quote
  #6  
Old 09-25-2005, 08:46 PM
evil kev evil kev is offline
 
Join Date: May 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh its just a skin i made for my forum i might release it sometime if i find some spare time
Reply With Quote
  #7  
Old 09-30-2005, 08:30 AM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does it have an option so that a user can choose weather to have it open or no...like Invision Free?
Reply With Quote
  #8  
Old 10-01-2005, 03:14 PM
evil kev evil kev is offline
 
Join Date: May 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm not familiar with that option, but working on what you said there is no option it is defaultly hidden all the time.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04682 seconds
  • Memory Usage 2,281KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (9)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete