Mike
Junior Member
Posts: 324
inherit
186646
0
Oct 21, 2017 6:40:31 GMT -8
Mike
324
December 2012
mike1972
|
Post by Mike on Jan 31, 2013 3:46:08 GMT -8
On my V4 forum I had some coding that allowed member to quote only the text the highlighted in a post. Would it be possible to create a plugin that would do the same on V5 or rewrite the code so that it works in V5?
The code I was using on my V4 forum is as follows.
<script type="text/javascript"> <!-- /* Quote selected text by Todge Copyright ? 2006 Please keep this header intact */
function getSel() { var txt = ''; if (window.getSelection) { txt = window.getSelection(); } else if (document.getSelection) { txt = document.getSelection(); } else if (document.selection) { txt = document.selection.createRange().text; } else return; if(txt!='') { txt = '&message='; var text = txt.split('#').join(''); } return txt; }
var quoteButton = document.getElementsByTagName('a'); for(t=0; t<quoteButton.length; t++) { if(quoteButton[t].href.match('quote=')) { quoteButton[t].onmouseover = function(){this.href+=getSel().replace(/#/g,'').replace(/\*/g,'');} quoteButton[t].onmouseout = function(){this.href=this.href.split('&message')[0];} } } // --> </script>
|
|
pluqui
Junior Member
Posts: 325
inherit
134337
0
Oct 10, 2016 4:28:13 GMT -8
pluqui
325
November 2008
pluqui
|
Post by pluqui on Jan 31, 2013 11:19:36 GMT -8
I'd like to second this please.
|
|
Mike
Junior Member
Posts: 324
inherit
186646
0
Oct 21, 2017 6:40:31 GMT -8
Mike
324
December 2012
mike1972
|
Post by Mike on Feb 1, 2013 22:32:41 GMT -8
bump
|
|
pluqui
Junior Member
Posts: 325
inherit
134337
0
Oct 10, 2016 4:28:13 GMT -8
pluqui
325
November 2008
pluqui
|
Post by pluqui on Feb 5, 2013 5:52:09 GMT -8
bump
|
|
pluqui
Junior Member
Posts: 325
inherit
134337
0
Oct 10, 2016 4:28:13 GMT -8
pluqui
325
November 2008
pluqui
|
Post by pluqui on Feb 14, 2013 13:53:48 GMT -8
Bumping again as I've just seen a similar request re images being taken on board.
|
|
Mike
Junior Member
Posts: 324
inherit
186646
0
Oct 21, 2017 6:40:31 GMT -8
Mike
324
December 2012
mike1972
|
Post by Mike on Jun 29, 2013 10:32:13 GMT -8
bump
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,322
January 2004
todge
|
Post by Todge on Jun 30, 2013 14:27:18 GMT -8
Added to my list.
If anyone else wants to take this on, go for it, otherwise I'll try to get to it asap.
|
|
Mike
Junior Member
Posts: 324
inherit
186646
0
Oct 21, 2017 6:40:31 GMT -8
Mike
324
December 2012
mike1972
|
Post by Mike on Jun 30, 2013 22:00:20 GMT -8
Thanks, Todge.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 2, 2013 6:24:03 GMT -8
I wrote this plugin last year but shelved it due to something that has long since escaped my memory. It was supposed to be an update to the old V4 multi-quote code (which is now possible in V5 without a code) but also allows highlighted quotations which is still not possible in V5. The UI for the posting form part was never finished so I just ripped that section out and rewrote it to automatically insert all the quotes into the typing area rather than choosing from a collection of quotes. I've also changed it so that quotes are deleted once used since the idea behind the original plugin was to keep a collection of quotes around for easy access like the old V4 code. Also like the old V4 code you can quote selections from more than one thread and use them all in the creation or reply on totally different thread So basically here is how it works, when there is something selected within a post a new option appears on the options menu When you choose that option the selection is saved and the quote button changes color the same way selecting or liking a post changes the color of the button associated with that feature. This way it does not interfere with the normal quoting process and is just another way of quoting If you encounter any problems or have a question/suggestion post back here, I'll check later.
|
|
Mike
Junior Member
Posts: 324
inherit
186646
0
Oct 21, 2017 6:40:31 GMT -8
Mike
324
December 2012
mike1972
|
Post by Mike on Jul 2, 2013 21:48:20 GMT -8
Thanks, Chris. This plug in does exactly what I wanted.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Aug 31, 2013 23:31:00 GMT -8
Plugin has been updated to v0.0.3(alpha) with the following improvements:- Now with ability to quote conversations and use anywhere including in thread creations and post replies
- Now with ability to reuse quotes by designating any as a "perma-quote"
- Now with ability to delete unused or unneeded quotes
- Now with ability to insert quotes individually or or as a group of selected quotes
- Now with ability to perform actions on multiple quotes
Still to come:- add pagination to control bar
- provide option to enable confirmation dialog when deleting multiple quotes
- abandon sessionStorage and go completely localStorage to facilitate quotes collected on one tab being useable on any tab
- allow HTML recognition in paste operations for simple copy&paste quoting of web content
(this is already an option in the word counter plugin but that is a forum-wide setting rather than specific to the plugin interface) This version has not been extensively tested and will not be submitted until proven stableArrested Development" Software designed to push the limits of what is legally possible"
|
|
inherit
77965
0
Apr 3, 2024 6:38:15 GMT -8
CåñåÐå™
163
April 2006
bepcanada
|
Post by CåñåÐå™ on Sept 1, 2013 6:37:19 GMT -8
ChrisI downloaded your updated version and (it doesn't seem to be like the two new image you have) It still works like the first one, but as in my last image nothing shows. Once i go to post what i higlighted. celebrity222.proboards.com/
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Sept 1, 2013 9:45:31 GMT -8
ChrisI downloaded your updated version and (it doesn't seem to be like the two new image you have) It still works like the first one, but as in my last image nothing shows. Once i go to post what i higlighted. celebrity222.proboards.com/ Your third screen grab doesn't show it but if you scrolled down you should see the quotes you've collected at the bottom. That is not TWO images but ONE single image I posted showing the new tabs created on the topic summary which is located at the bottom of the page. If no topic summary exists then a fake one is created provided there are quotes to be shown. This is in line with the V4 version of the code that allowed you to selectively add any quote anywhere into the post rather than automatically added and bunched up all at the top. Insertion works like any other bbcode button and places the quote wherever you currently have the typing caret. In addition you have the familiar V5 "select" and "actions" dropdown to perform operations on multiple quotes making it a simple exercise to insert all quotes at once if that is what you desire In your third image you need to scroll down to the topic summary to see the quotes (can't see it in your image) One caveat that I mentioned in my previous post is if you collect quotes in one browser tab you cannot use them in another browser tab unless you make them perma-quotes, the tab you used to collect the quotes must also be the tab you use to create the post that makes use of those collected quotes. A border around my image might make it a bit clearer that it is a single image
|
|
inherit
77965
0
Apr 3, 2024 6:38:15 GMT -8
CåñåÐå™
163
April 2006
bepcanada
|
Post by CåñåÐå™ on Sept 1, 2013 12:42:31 GMT -8
ChrisI downloaded your updated version and (it doesn't seem to be like the two new image you have) It still works like the first one, but as in my last image nothing shows. Once i go to post what i higlighted. celebrity222.proboards.com/ Your third screen grab doesn't show it but if you scrolled down you should see the quotes you've collected at the bottom. That is not TWO images but ONE single image I posted showing the new tabs created on the topic summary which is located at the bottom of the page. If no topic summary exists then a fake one is created provided there are quotes to be shown. This is in line with the V4 version of the code that allowed you to selectively add any quote anywhere into the post rather than automatically added and bunched up all at the top. Insertion works like any other bbcode button and places the quote wherever you currently have the typing caret. In addition you have the familiar V5 "select" and "actions" dropdown to perform operations on multiple quotes making it a simple exercise to insert all quotes at once if that is what you desire In your third image you need to scroll down to the topic summary to see the quotes (can't see it in your image) One caveat that I mentioned in my previous post is if you collect quotes in one browser tab you cannot use them in another browser tab unless you make them perma-quotes, the tab you used to collect the quotes must also be the tab you use to create the post that makes use of those collected quotes. A border around my image might make it a bit clearer that it is a single image It will as you show in your image. But on my forum it will not work with this plugin Head Base And Side Images that is used on my forum. Right now i do have Head Base And Side Images and this Quote only highlighted text enable and Quote only highlighted text will not work as you made it to work. When i disable Head Base And Side Images plugin your plugin works the way you made it to work. I'm tagging Pebble the Head Base And Side Images plugin is made by him and i'm hopeful he may have a fix.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Sept 1, 2013 16:42:21 GMT -8
I installed that plugin to see what it does and it removes some of the V5 wrapper and container classes that we've grown to love on V5. The perma-quote code identifies the existence of the summary with the following line var summary = $('.container.messages.summary, .container.posts.summary')
then rebuilds if not found but all those classes have been destroyed! Flipping the order of the plugins so that perma-quote runs first allows the quote UI to be created but it clashes horribly with the images added by the image code. I'm usually not too picky on color and pattern coordination but this one looks even worse than wormocodes.com (unabashed plug! ) and that is saying a lot. I could make a change such as var summary = $('.container.messages.summary, .container.posts.summary, .Hholder:has(.title-bar:contains(Thread Summary))')to allow playing nicely in the sandbox but that only encourages bad behaviour and rampant plugins of mass destruction... a red line must be drawn (Just having fun here Pebble, don't take me seriously)
|
|