inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Apr 23, 2015 19:35:00 GMT -8
Displays an alert to anyone whenever they click on an external link that it takes them off your board. You can customize the title and message of the confirmation that is seen. www.proboards.com/library/plugins/item/984
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 24, 2015 1:14:19 GMT -8
Doesn't work with links posted in the shoutbox. They have target="_blank" so it opens in a new tab. I'm not saying this is something that your plugin has to account for but I thought I would bring it to your attention.
I really like your plugin. It seems to work well and it allows for a custom title and message with a yes no dialog. This is definitely a well thought out plugin.
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Apr 24, 2015 9:39:02 GMT -8
Thanks. I forgot about the shoutbox I'll add it when I can.
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Apr 24, 2015 18:42:41 GMT -8
I've updated the code's even delegation so it now works for messages retrieved via AJAX!
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 24, 2015 23:05:12 GMT -8
I've updated the code's even delegation so it now works for messages retrieved via AJAX! May I ask what code you used to look at the shoutbox ajax to compare to mine. I'd like to see your thought process
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Apr 25, 2015 0:24:14 GMT -8
Hi P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓, I didn't use any ajax method. I used event delegation as i only need to listen for an event. So I bind an event to the container for the .message elements which only fires if a click event is triggered within one of those delegated elements. $('.container').on('click', '.message a:not([href^="'+url+'"])', function(e){ Provided that the .container is static and not removed and reinserted then I bind the click event to that element which only triggers when a .message a element is clicked. If the .container is not static and is removed or destroyed, then you can bind the event listener to the document, but as all the click events would then need to propagate up the DOM tree it takes more resources, so it's much more efficient to bind the click event as close to the inserted elements as possible.
$(document).on('click', '.message a:not([href^="'+url+'"])', function(e){
You can read more about jQuery's on method on their site hereFeel free to take a look at my code. I learned a lot by studying other's codes to see the
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 25, 2015 9:03:27 GMT -8
Hi P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓, I didn't use any ajax method. I used event delegation as i only need to listen for an event. So I bind an event to the container for the .message elements which only fires if a click event is triggered within one of those delegated elements. $('.container').on('click', '.message a:not([href^="'+url+'"])', function(e){ Provided that the .container is static and not removed and reinserted then I bind the click event to that element which only triggers when a .message a element is clicked. If the .container is not static and is removed or destroyed, then you can bind the event listener to the document, but as all the click events would then need to propagate up the DOM tree it takes more resources, so it's much more efficient to bind the click event as close to the inserted elements as possible.
$(document).on('click', '.message a:not([href^="'+url+'"])', function(e){
You can read more about jQuery's on method on their site hereFeel free to take a look at my code. I learned a lot by studying other's codes to see the Sounds good. I just determined when the ajax was from the shoutbox and looked at all the properties of such request. You way sounds better.
|
|
inherit
206056
0
Oct 22, 2024 12:06:59 GMT -8
adminabp
378
February 2014
adminabp
|
Post by adminabp on May 9, 2015 19:00:02 GMT -8
The plugin is mistaking my forum's 'SPOILER: Click to show/Click to hide' link as an external link. abetterplace.boards.net/post/3664The actual link is: javascript:void(0); Could you make it so it ignores JavaScript links like that?
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on May 9, 2015 22:12:56 GMT -8
The plugin is mistaking my forum's 'SPOILER: Click to show/Click to hide' link as an external link. abetterplace.boards.net/post/3664The actual link is: javascript:void(0); Could you make it so it ignores JavaScript links like that? Anything that would potentially navigate away, Javascript has that potential. The real question is what the function void actually does that makes the page think you are navigating away. a general [spoiler]Text[/spoiler] Will do that on all forums. This is a bug you have found and I'm sure a fix will be presented here soon.
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on May 11, 2015 7:15:30 GMT -8
The plugin is mistaking my forum's 'SPOILER: Click to show/Click to hide' link as an external link. abetterplace.boards.net/post/3664The actual link is: javascript:void(0); Could you make it so it ignores JavaScript links like that? Sure can. I'll post the update on here soon. It will also include an option to whitelist certain trusted links.
|
|
inherit
224902
0
Feb 15, 2017 12:50:39 GMT -8
Matt
2,940
September 2015
mattyboo1
|
Post by Matt on Oct 10, 2015 6:16:15 GMT -8
Hello, I have the plugin where you can type in a confirmation that warns members when they click on a link that leads outside of the forum, This plugin works as expected. however it is bringing up the external link confirmation when posting to my Forum's shoutbox, When i click submit it says i will be taken to an external link, which makes no sense, but that is what it is doing. This also occurs when deleting a post from the shoutbox or clicking on the ban member button in the shoutbox. this occurs on my forum at gameslounge.proboards.com if you need the link. I have disabled the plugin for now but would like to enable it again if this could get fixed, thanks. Quozzo
|
|
inherit
224902
0
Feb 15, 2017 12:50:39 GMT -8
Matt
2,940
September 2015
mattyboo1
|
Post by Matt on Oct 11, 2015 21:46:00 GMT -8
Hello I am still having this issue QuozzoJust tagging you again in case you missed my post.
|
|
Former Member
inherit
guest@proboards.com
215428
0
Nov 21, 2024 14:36:17 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on May 12, 2016 1:00:20 GMT -8
Just to let you know, the external link confirmation comes up when you click on a notification in your profile too, which is not needed as you are still on your own site!
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on May 12, 2016 11:46:03 GMT -8
Hi @1mako (and a belated hi to Matt). The plugin has been updated to fix the notification issue (v1.1.1) Thanks. It was updated a while back with the fixes Matt mentioned a while back, I just never posted a response here.
|
|
Former Member
inherit
guest@proboards.com
215428
0
Nov 21, 2024 14:36:17 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on May 12, 2016 12:57:09 GMT -8
Thanks Quozzo!
|
|