We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
  • Pages:
  • 1
[ ! ] Instant-Quote
Topic Started: Dec 23 2014, 11:21 PM (461 Views)
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
http://w11.zetaboards.com/GamesAndAnime/index/
Zeta
Can anybody make a code that will insert a quote, using the "Quote" button and insert it into the "Fast Reply" section so that it doesn't take you to a whole different page just to quote somebody? Also make it replace the function of the default quote button?
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
My primary issue with coding this is that you have to convert all HTML to BBCode, which is probably the reason Dan ignored HTML: http://support.zathyus.com/topic/5066915/1/
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Cory
Dec 29 2014, 11:42 AM
My primary issue with coding this is that you have to convert all HTML to BBCode, which is probably the reason Dan ignored HTML: http://support.zathyus.com/topic/5066915/1/
Does that quick quote code you posted not work?
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
It works, but it only grabs text, it doesn't grab HTML (BBCode).
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Cory
Dec 29 2014, 01:05 PM
It works, but it only grabs text, it doesn't grab HTML (BBCode).
No BBcode at all? Wouldn't that insert anyways since it's typed, or does it not grab the coding for it?
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
It grabs the text of the post only directly from the topic page.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Cory
Dec 29 2014, 01:19 PM
It grabs the text of the post only directly from the topic page.
Well would it be possible if you somehow combined it with the Quick-Edit code? Because that code allows you to edit on that page and it shows and allows BBCode.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this:
Code:
 
<script type="text/javascript">
$('a[href*="/post/?mode=2&type=2"]').click(function(e) {
e.preventDefault();
$(this).parent('span.right').find('img.qedit').click();

window.setTimeout(function() {
$('#fast-reply textarea').val('[quote]' + $('#c_post-text').val() + '[/quote]');
$('button[onclick="restore()"]').click();
}, 1000);

$('html, body').animate({
scrollTop: $('#fast-reply').offset().top
}, 1000);
});
</script>
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Any way to add the Username and time stamp of the person quoted?
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this instead:
Code:
 
<script type="text/javascript">
$('a[href*="/post/?mode=2&type=2"]').click(function(e) {
e.preventDefault();
$(this).parent('span.right').find('img.qedit').click();

window.setTimeout(function() {
$('#fast-reply textarea').val('[quote=' + $.trim($(this).parents('tr.c_postfoot').prevUntil('tr[id*="post-"]').prev('tr').find('span.c_username').text()) + ',' + $(this).parents('tr.c_postfoot').prevUntil('tr[id*="post-"]').prev('tr').prev('tr').prev('tr').text().split('Topic Started: ')[1].split(' (')[0].replace(',', '') + ']' + $('#c_post-text').val() + '[/quote]');
$('button[onclick="restore()"]').click();
}, 1000);

$('html, body').animate({
scrollTop: $('#fast-reply').offset().top
}, 1000);
});
</script>
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
For some reason that just scrolls to the fast reply area and activates the Quick-Edit code leaving the Fast Reply empty.

http://z5.ifrm.com/30458/170/0/f5307094/InstantQuote.js
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this instead:
Code:
 
$('a[href*="/post/?mode=2&type=2"]').click(function(e) {
e.preventDefault();
$(this).parent('span.right').find('img.qedit').click();
var uName = $.trim($(this).parents('tr.c_postfoot').prevUntil('tr[id*="post-"]').prev('tr').find('span.c_username').text());
var tStamp = $.trim($(this).parents('tr.c_postfoot').prevUntil('tr[id*="post-"]').prev('tr').prev('tr').find('span.left').text().replace(',', ''));

window.setTimeout(function() {
$('#fast-reply textarea').val('[quote=' + uName + ',' + tStamp + ']' + $('#c_post-text').val() + '[/quote]');
$('button[onclick="restore()"]').click();
}, 1000);

$('html, body').animate({
scrollTop: $('#fast-reply').offset().top
}, 1000);
});
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Perfect, thanks again Cory.
This just came to me. Will this work with your Quote Notifications code?
Also will it work with the "1 line quote" code I have that makes it so when you quote people it only shows their quote and not their quote along with what they quoted?
Edited by Kankuro, Dec 31 2014, 01:23 PM.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Also it seems to mess up the quoted text.

http://prntscr.com/5ne6pt

I didn't say that.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Test the codes you think it might conflict with and see if they still work properly for you.

Did you put this code close to the quick edit code?
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Closed Requests · Next Topic »
Locked Topic
  • Pages:
  • 1