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 Jan 15, 2018 8:35:36 GMT -8
Only a red name (Proboards employee) can go and look into your forum, volunteers such as myself cannot.
If I cannot see the theme then I cannot really tell you which ingredient is responsible, you have 10,000 ways to bake a pie and I can't really tell you that you added too much of one ingredient if I cannot look at the recipe you are using to see which ingredient are being called for.
|
|
inherit
218932
0
Oct 19, 2024 14:55:57 GMT -8
artdoc
550
February 2015
artdoc
|
Post by artdoc on Jan 15, 2018 8:54:20 GMT -8
M-m-m- pie!
Okay, I get it. Don't know that part name? I can live with that.
Thanks. It got fixed in a round-about way.
|
|
inherit
256235
0
Oct 24, 2024 15:19:07 GMT -8
Reignman
32
August 2018
reignman
|
Post by Reignman on Oct 13, 2024 17:02:14 GMT -8
I thought this plugin had stopped working on my board recently, but then sometimes it did work. It seemed pretty random. Refreshing the page sometimes made it work again, other times not. But after investigating it a bit more, it appears to work all the time, as in the "quick quote" button appears every time you highlight some text on the page, but most of the time the button appears near the first post on the page, so if you're trying to quote something several posts down, you won't see it and think it's not working. If you scroll up the page fast enough you'll see it, but that's not very practical lol. Sometimes the button appears right by the highlighted text even if you're down the page. Not sure what caused it to start behaving this way, we haven't changed anything on the board in awhile. It's behaving this way on both Firefox and Chrome. I was wondering if any other boards were having this problem and if there's a solution? Thanks! Our board is here: purplepainforums.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 Oct 13, 2024 21:02:13 GMT -8
|
|
inherit
256235
0
Oct 24, 2024 15:19:07 GMT -8
Reignman
32
August 2018
reignman
|
Post by Reignman on Oct 20, 2024 19:34:12 GMT -8
Second Update (solution):Reignman Since this is a fairly small plugin and not editable, you can get rid of it and place the coding from it into your global header, where you can then edit the code to fix the issue.
Whoa, nice work Chris ! If it's not editable, where'd you get the code lol? All the boards seem to be down atm, but as soon as they're back up, I'll try your IIFE workaround, and hope David Clark can come up with a more permanent solution eventually. It's a super useful plugin! Thanks!
|
|
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 Oct 21, 2024 1:12:57 GMT -8
The plugin is not editable, but I can also access the code like the browser. Let me know if you find any issues. I made a few additional changes to address some problems I saw mentioned in this thread, but as you know, fixing problems makes room for more. I would have placed the code in a newly created editable plugin, but not without the author's permission. If you have the plugin installed, you have an implicit right to "use" the code, so I think having the plugin installed but disabled still retains that right. All we're doing is getting the usher to ask the gentleman in the front row to remove the tall top hat so it doesn't block our view of the show. His rights and our right to enjoy the show are now both protected. I believe Lynx took over a couple of David Clark plugin projects, so he might have some insight into his intentions regarding the plugins he left behind.
|
|
inherit
256235
0
Oct 24, 2024 15:19:07 GMT -8
Reignman
32
August 2018
reignman
|
Post by Reignman on Oct 21, 2024 1:56:47 GMT -8
Let me know if you find any issues. I made a few additional changes to address some problems I saw mentioned in this thread, but as you know, fixing problems makes room for more. Now that the boards are back up, I setup your workaround and it's working great so far. Thanks a lot man, it was a popular plugin on our board and we're glad to have it working again.
|
|
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 Oct 21, 2024 15:46:08 GMT -8
I noticed there were some updates reverted when viewing the forum Reignman code taken from view-source of purplepainforums.com<!-- Quick Quotes (UPDATED) --> <script> (()=>{ var isIE = document.all; var mouseX = 0; var mouseY = 0;
function getMouseXY(e) { if (!e) e = window.event; if (e) { mouseX = isIE ? (e.clientX + document.body.scrollLeft) : e.pageX; mouseY = isIE ? (e.clientY + document.body.scrollTop) : e.pageY; } }
document.onmousemove = getMouseXY;
function getSelectionHtml() { var html = ""; if (typeof window.getSelection != "undefined") { var sel = window.getSelection(); if (sel.rangeCount) { var container = document.createElement("div"); for (var i = 0, len = sel.rangeCount; i < len; ++i) { container.appendChild(sel.getRangeAt(i).cloneContents()); } html = container.innerHTML; } } else if (typeof document.selection != "undefined") { if (document.selection.type == "Text") { html = document.selection.createRange().htmlText; } } return html; } getSelectionHtml.mouseup = function(){ var htmlSelection = getSelectionHtml(); var quoteText = htmlSelection.replace(/>/g, "]"); var quoteText = quoteText.replace(/</g, "["); if ($('.unblocked .content:hover').length != 0) { if (htmlSelection != '') { $(".quick-quote-div").css( {position:"absolute", top:mouseY, left:mouseX}); $(".quick-quote-div").css("display", "inline"); var messageIDnum = $('.post:hover').attr('id'); var messageIDsliced = messageIDnum.substr(messageIDnum.lastIndexOf("-")+1); var messageAuthor = $('.post:hover').find('.user-link').attr('title'); var messageTimestamp = $('.post:hover').find('abbr:first').attr('data-timestamp'); messageTimestamp = messageTimestamp.substring(0, messageTimestamp.length - 3); var messageNew = '[quote author="'+ messageAuthor + '" source="/post/' + messageIDsliced + '/thread" timestamp="' + messageTimestamp + '"]' + quoteText + '[/quote]' setTimeout(function() { if ($('.quick-quote-div:hover').length == 0) { $('.quick-quote-div').css("display", "none"); htmlSelection = '' quoteText = '' } },2500) $('.quick-quote-button').click(function() { if (quoteText != '') { var existingVal = $('.quick-reply textarea').val(); $('.quick-reply textarea').val(existingVal + messageNew + "\n"); htmlSelection = '' quoteText = '' } }); } } } $(document).ready(function(){ $(document).bind("mouseup", getSelectionHtml.mouseup); }); })(); /** UPDATES: - encapsulate to avoid global variables getting overwritten - switched to <dialog> element for the top-layer treatment - used jQuery.fn.replaceSelection to insert at caret position in quick reply - look for timestamp only in post .info not entire post - search only mini-profile for author data not entire post - support correctly citing guest posts by also looking for [itemprop="name"] **/ </script> so I am posting the reasoning behind the updates here for informational purposes so you can decide Bug Fixes
If you've encountered issues then please post back here so they can be identified and addressed.
|
|
inherit
6871
0
Jun 10, 2024 2:25:35 GMT -8
bigballofyarn
"If you wish to make an apple pie from scratch, you must first invent the universe." -Carl Sagan
7,886
January 2003
bigballofyarn
|
Post by bigballofyarn on Oct 22, 2024 15:22:17 GMT -8
Chris , The only issue noted in 10 minutes of testing is that if a person is inclined to double/triple click to highlight a sentence rather than scroll with their mouse, it will break the quote. There are also the menus that browsers show on their own when you highlight text, which can appear under or over the quote button, sometimes making it appear like the quote button is there twice. bigballofyarn.proboards.com/thread/70502/quote-highlighted-test?page=1&scrollTo=1336112
|
|
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 Oct 22, 2024 18:08:56 GMT -8
This message has been moved to Geocities by Chris . Chris , The only issue noted in 10 minutes of testing is that if a person is inclined to double/triple click to highlight a sentence rather than scroll with their mouse, it will break the quote. There are also the menus that browsers show on their own when you highlight text, which can appear under or over the quote button, sometimes making it appear like the quote button is there twice. bigballofyarn.proboards.com/thread/70502/quote-highlighted-test?page=1&scrollTo=1336112 You're seeing the quote button twice because both the plugin and the global header code are running. The header code is meant to replace and supersede the plugin because the plugin is not editable. Double-click was working fine, and it could simply be the two buttons competing. Disable the plugin and see if that is the issue (you'll need to recopy the header code since there was an errant semicolon error that was corrected when scrollIntoView was added). As for clashing with browser selection popups, would adding an offset and a delay perhaps suffice (this is where a plugin with control knobs comes in handy)? Yes it does, but I wish you didn't have to scroll down to the quick reply manually. That's an excellent idea unless, of course, you want to add multiple quotes, which could become a pain. This plugin is, however, geared toward creating quick quotes as opposed to mine, which is geared toward collecting and reusing quotes. Add [0].scrollIntoView() to the line that adds the content to the quick reply to achieve that behavior... pb.data('quick_reply') ? $('.quick-reply textarea').replaceSelection(messageNew + "\n")[0].scrollIntoView() *updated in code posted above and removed the semicolon that was causing an error in that codeIt should also be noted that the conversion from HTML to BBCode is far from perfect and is noted by the author in the first post. It is not tied into the Proboards API for conversions like mine, so certain things, such as tables, embeds, spoilers, etc., won't be correctly converted back to BBCode. It basically changes < and > into [ and ].
|
|
inherit
6871
0
Jun 10, 2024 2:25:35 GMT -8
bigballofyarn
"If you wish to make an apple pie from scratch, you must first invent the universe." -Carl Sagan
7,886
January 2003
bigballofyarn
|
Post by bigballofyarn on Oct 23, 2024 1:57:32 GMT -8
Chris , The plugin is definitely disabled. I enabled and disabled it again just in case it didn't save being disabled or something. I've removed the code I had in the global header. I readded the code from your second update. People are achieving weird results when trying to click to select text. It actually seemed to work better when the plugin was presumably enabled. However, it's early, and I'm probably missing an obvious mistake on my end.
|
|
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 Oct 23, 2024 3:46:52 GMT -8
This message has been moved to Geocities by Chris . Chris , The plugin is definitely disabled. I enabled and disabled it again just in case it didn't save being disabled or something. I've removed the code I had in the global header. I readded the code from your second update. People are achieving weird results when trying to click to select text. It actually seemed to work better when the plugin was presumably enabled. However, it's early, and I'm probably missing an obvious mistake on my end. I've added a few more guardrails, but keep in mind that this plugin takes a path I opted to avoid in my own plugin. Specifically, it tries to convert HTML to BBCode by changing from angle to square brackets, but the process is a lot more involved than that. It should also be noted that the conversion from HTML to BBCode is far from perfect and is noted by the author in the first post. It is not tied into the Proboards API for conversions like mine, so certain things, such as tables, embeds, spoilers, etc., won't be correctly converted back to BBCode. It basically changes < and > into [ and ]. If you are looking for more reliable conversions rather than a quickie then I suggest you use my plugin which uses the same backend communication you see when flipping between preview and bbcode tab to get the server to do the conversions. This plugin is meant to be a quick highlight and post rather than a faithful HTML to BBCode renderer. The ignore out-of-bound selection update should address that third image you posted above, which obviously contained the <article> element so would be something out of bounds of the actual post content.
|
|
inherit
6871
0
Jun 10, 2024 2:25:35 GMT -8
bigballofyarn
"If you wish to make an apple pie from scratch, you must first invent the universe." -Carl Sagan
7,886
January 2003
bigballofyarn
|
Post by bigballofyarn on Oct 23, 2024 4:14:21 GMT -8
Chris, Thank you for the information. I will happily check out your plugin. Let me know which one to download specifically.
|
|
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 Oct 23, 2024 4:32:17 GMT -8
This message has been moved to Geocities by Chris . Chris , Thank you for the information. I will happily check out your plugin. Let me know which one to download specifically.
|
|
dustys
Junior Member
Posts: 443
inherit
258526
0
Nov 21, 2024 18:43:22 GMT -8
dustys
443
May 2019
dustys
|
Post by dustys on Oct 23, 2024 4:52:18 GMT -8
Chris , Thank you for the information. I will happily check out your plugin. Let me know which one to download specifically. Nothing happens when I install this. Am I supposed to keep the global footer from the other plugin?
|
|