I am just beginning to get into development, and one of the things I would like to do to my forum is have the quote button simply paste the quote bbcode into the quickreply box rather than send the users to another page. The reason I am posting this here is because I do not necessarily want it done FOR me, just a little advice on how this could be accomplished if at all.
Here is an example of what I want to do; notice how the quote button just inserts the quote code into the reply box.
A quick and dirty code would be to cycle through each quote button on the page and add a click handler to each that will insert the message content that follows it into the quick reply possibly with a key modifier such as CTRL so one could click normally and be taken to full reply unless holding the key. The handler would preventDefault to suppress the default action of the quote button when activated. The complexity of such a code would depend on whether you want plain simple text as in your image example or fully formatted HTML/BBCOde. For example, if the post contains an image do you want it quoted as well, or if there were words bolded or colored would that be copied to the quote as well? If the answer is yes then you would need to grab the HTML rather than the text and convert it to BBCode. For the most part you could do this with regular expressions since the V5 bbcode format now closely shadows the HTML syntax and just replace "<" with "[" and ">" with "]", there would of course be exceptions to such a blind mass replacement (e.g such a character appearing in a code box would first need to be preprocessed perhaps converting to its HTML entity counterpart to avoid regex recognition).
In the handler something along the lines of $('.form_post_quick_reply textarea[name="message"]').replaceSelection( '[quote]' + $(this).closest('.content').find('.message').html().replace(/\<(\/?\w+)([\s>])/g,"[$1$2").replace(/\>/g,"]")+'[/quote]' )
would for the most part produce an anonymous quote and place it in the quick reply. To get a quote with a name and time attached you would need to do a bit more work and gather that info then add the appropriate attributes (author, timestamp, source) before sending it to quick reply
Every day, coders are looking for new ways to kill bugs. Think you've got what it takes?
"To fight the bug, we must first understand the bug. "