inherit
162752
0
Nov 7, 2024 3:58:23 GMT -8
Pebble
Where it all does or doesn't happen!
1,437
January 2011
pebbleleague
|
Post by Pebble on Dec 11, 2014 3:56:46 GMT -8
I'll give this a whirl later in the week and let you know how I get on.
|
|
Former Member
inherit
guest@proboards.com
177794
0
Dec 2, 2024 14:31:20 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 12, 2014 15:03:56 GMT -8
Hello! Im having a bit of coding probs. Id like to make a few custom buttons that when you click it you get.. This player has cast Cure! It Now restores 25 Hp! But I can't seem to get the image to work. Thanks in advance! ^^
|
|
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,024
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 12, 2014 16:34:58 GMT -8
Hello! Im having a bit of coding probs. Id like to make a few custom buttons that when you click it you get.. This player has cast Cure! It Now restores 25 Hp! But I can't seem to get the image to work. Thanks in advance! ^^ I'd suggest using the old style img tags for now and avoiding quotation marks until I can decide which way to go in handling the presence of quotation marks and the equal sign in pragma_content or any other attribute for that matter [img]http://i1137./n511/JAFTadmin/KH/Cure-1.png[/img]This player has cast Cura! 15 HP recovered! The use of the equal sign ("=") and the vertical bar ("|") inside the attributes field is solely for the separation of attributes and names from their values. If you need to use them for other than their intended purpose within that field then I'll place a check in the next version that will honor any that are escaped by placing a backslash in front of them and unescape them after everything has been tidily zipped up.
To be clear, using
pragma_content=[img src="http://i1137./n511/JAFTadmin/KH/Cure-1.png" alt=" "]This player has cast Cura! 15 HP recovered!
will cause problems. If you instead escape any occurences of "=" or "|" that are not meant to be used as delimiters in that field then it will be honored in the next release.
pragma_content=[img src\="http://i1137./n511/JAFTadmin/KH/Cure-1.png" alt\=" "]This player has cast Cura! 15 HP recovered!
(notice the equal signs that have nothing to do with separating name from value have a "\" in front)
The use of quotations doesn't appear to be a problem with modern browsers being smart enough to convert them to their HTML entities when inserting as attribute values |
|
|
Former Member
inherit
guest@proboards.com
177794
0
Dec 2, 2024 14:31:20 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 12, 2014 18:53:55 GMT -8
Hello! Im having a bit of coding probs. Id like to make a few custom buttons that when you click it you get.. This player has cast Cure! It Now restores 25 Hp! But I can't seem to get the image to work. Thanks in advance! ^^ I'd suggest using the old style img tags for now and avoiding quotation marks until I can decide which way to go in handling the presence of quotation marks and the equal sign in pragma_content or any other attribute for that matter [img]http://i1137./n511/JAFTadmin/KH/Cure-1.png[/img]This player has cast Cura! 15 HP recovered! That works great. But for now im just trying to add in three buttons. I need to add a lot more in the future. But its only showing two no matter what, and im not sure why.
|
|
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,024
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 12, 2014 20:33:39 GMT -8
That works great. But for now im just trying to add in three buttons. I need to add a lot more in the future. But its only showing two no matter what, and im not sure why. I am seeing all three so I might need a bit more info especially since I probably cannot see into the board to which those buttons are restricted I had to lie to the plugin that I was in board 38 to see them though. If you're going to be adding a lot more buttons it might be worthwhile to go with the nightly version since it has an option to "compact" a group of buttons by placing them in a dropdown similar to font size or smileys.
|
|
Former Member
inherit
guest@proboards.com
177794
0
Dec 2, 2024 14:31:20 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 12, 2014 20:57:03 GMT -8
oh sorry! I forgot to add them to a guest friendly part of the board. I added them here. kingdomsunleashed.proboards.com/board/3/ad-affiliationsI see all three now for some reason but they are out of order. Im using Version 0.9.4 Beta. What does the nightly version do? Edit: odd. When I refresh I no longer see them all, I just see the two now.
|
|
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,024
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 12, 2014 22:53:12 GMT -8
oh sorry! I forgot to add them to a guest friendly part of the board. I added them here. kingdomsunleashed.proboards.com/board/3/ad-affiliationsI see all three now for some reason but they are out of order. Im using Version 0.9.4 Beta. What does the nightly version do? Edit: odd. When I refresh I no longer see them all, I just see the two now. It's actually something I subconsciously keep doing (see this ). For now you could set the ID field to blockquote and INDEX to 1 until the next update. I was unable to duplicate any disappearing buttons after 20+ refreshes but I'll keep at it until it happens or I get banned. The nightly (Control Freak) version is a bit more advanced, it allows you to create not only your own custom buttons but also your own button groupings from scratch with the ability to decide which editor (quick,preview,bbcode) they should appear as well as on what board or to which user groups. and of course the compact feature I mention where you can turn a button group you've created into a dropdown. It's also capable of treating any multiline typing area as an editor so you could place a button group above the signature typing area whenever someone goes to edit their profile for example. I was able to reproduce the dropped button when I switched to Chrome and came to the conclusion that Chrome must be running too fast making my method of tacking on a timestamp to promote button uniqueness insufficient. If one iteration in the loop is taking less than a millisecond then that would just generate the same number so I've switched to $.unique_id which uses random number generation and I have been unable to reproduce a drop since.
|
|
Former Member
inherit
guest@proboards.com
177794
0
Dec 2, 2024 14:31:20 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 12, 2014 23:07:59 GMT -8
oh sorry! I forgot to add them to a guest friendly part of the board. I added them here. kingdomsunleashed.proboards.com/board/3/ad-affiliationsI see all three now for some reason but they are out of order. Im using Version 0.9.4 Beta. What does the nightly version do? Edit: odd. When I refresh I no longer see them all, I just see the two now. It's actually something I subconsciously keep doing (see this ). For now you could set the ID field to blockquote and INDEX to 1 until the next update. I was unable to duplicate any disappearing buttons after 20+ refreshes but I'll keep at it until it happens or I get banned. Okay ill wait till the next update. ^^ It now seems to be duplicating the same button twice. Hehe. No worries. Ill keep a watch here for it. Thanks for your help!
|
|
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,024
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 13, 2014 6:56:46 GMT -8
version 0.9.5 (basic) released with the following updates: - expanded available input types when showing the user a prompt (i mported from advanced version) - checked for [" instead of just [ at start of attribs to avoid confusing expanded inputs with bbcode entered in pragma_content - allow for the casual occurrence of = and | in the attributes field by using a backslash for escaping (e.g. \= ) - fixed (once again) 1-based array being treated as 0-based array resulting in incorrect button index interpretation (">=" should be ">")
|
|
Former Member
inherit
guest@proboards.com
177794
0
Dec 2, 2024 14:31:20 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 13, 2014 9:40:05 GMT -8
version 0.9.5 (basic) released with the following updates: - expanded available input types when showing the user a prompt (i mported from advanced version) - checked for [" instead of just [ at start of attribs to avoid confusing expanded inputs with bbcode entered in pragma_content - allow for the casual occurrence of = and | in the attributes field by using a backslash for escaping (e.g. \= ) - fixed (once again) 1-based array being treated as 0-based array resulting in incorrect button index interpretation (">=" should be ">") The new version works great! I think it will be a big help with my Arena! Just a question. Did you say there was a version with a drop down list for certain buttons? I will be adding in about twenty.
|
|
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,024
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 13, 2014 11:35:47 GMT -8
The new version works great! I think it will be a big help with my Arena! Just a question. Did you say there was a version with a drop down list for certain buttons? I will be adding in about twenty. Good to hear @greedsins, if you take a look at the first post in this thread you'l see there are actually two plugins: the basic version (which you are using) and the more advanced version (referred to as the "nightly" or the "Control Freak" version). The newest preview-installment for the Control Freak is at the bottom of that post and I'm working on an official update for that more advanced sibling as we speak. Also, in case you missed it, you should be able to use the original bbcode you had in the pragma_content now provided you escape the equal signs that do not have the meaning they are expected to have in that attributes field. (v0.9.5 is the "next release" being referenced btw) The use of the equal sign ("=") and the vertical bar ("|") inside the attributes field is solely for the separation of attributes and the assignment of names with their values. If you need to use them for other than their intended purpose within that field then I'll place a check in the next version that will honor any that are escaped by placing a backslash in front of them and then automatically unescape them after everything has been tidily zipped up nice and proper.
To be clear, using
pragma_content=[img src="http://i1137./n511/JAFTadmin/KH/Cure-1.png" alt=" "]This player has cast Cura! 15 HP recovered!
will cause problems. If you instead escape any occurences of "=" or "|" that are not meant to be used as delimiters in that field then it will be honored in the next release.
pragma_content=[img src\="http://i1137./n511/JAFTadmin/KH/Cure-1.png" alt\=" "]This player has cast Cura! 15 HP recovered!
(notice the equal signs that have nothing to do with separating name from value have a "\" in front)
The use of quotations doesn't appear to be a problem with modern browsers being smart enough to convert them to their HTML entities when inserting as attribute values |
|
|
Former Member
inherit
guest@proboards.com
177794
0
Dec 2, 2024 14:31:20 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 13, 2014 23:28:50 GMT -8
The new version works great! I think it will be a big help with my Arena! Just a question. Did you say there was a version with a drop down list for certain buttons? I will be adding in about twenty. Good to hear @greedsins, if you take a look at the first post in this thread you'l see there are actually two plugins: the basic version (which you are using) and the more advanced version (referred to as the "nightly" or the "Control Freak" version). The newest preview-installment for the Control Freak is at the bottom of that post and I'm working on an official update for that more advanced sibling as we speak. Also, in case you missed it, you should be able to use the original bbcode you had in the pragma_content now provided you escape the equal signs that do not have the meaning they are expected to have in that attributes field. (v0.9.5 is the "next release" being referenced btw) The use of the equal sign ("=") and the vertical bar ("|") inside the attributes field is solely for the separation of attributes and the assignment of names with their values. If you need to use them for other than their intended purpose within that field then I'll place a check in the next version that will honor any that are escaped by placing a backslash in front of them and then automatically unescape them after everything has been tidily zipped up nice and proper.
To be clear, using
pragma_content=[img src="http://i1137./n511/JAFTadmin/KH/Cure-1.png" alt=" "]This player has cast Cura! 15 HP recovered!
will cause problems. If you instead escape any occurences of "=" or "|" that are not meant to be used as delimiters in that field then it will be honored in the next release.
pragma_content=[img src\="http://i1137./n511/JAFTadmin/KH/Cure-1.png" alt\=" "]This player has cast Cura! 15 HP recovered!
(notice the equal signs that have nothing to do with separating name from value have a "\" in front)
The use of quotations doesn't appear to be a problem with modern browsers being smart enough to convert them to their HTML entities when inserting as attribute values |
Oh I see! So in the new version using the BBCode img tags would be better?
|
|
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,024
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 14, 2014 13:24:59 GMT -8
I wouldn't say using img tags would be "better", the 0.9.5 version merely addresses the problem you brought up where we are using pragma_content to insert (any) additional bbcode and that additional bbcode contains equal signs which as specifically stated in the plugin instructions is used to assign a value to an attribute in the attributes field. It's extremely difficult for a code to somehow "guess" what you meant with those extra equal signs. What the newest release does is to allow you to specify which equal signs in that field is not to be considered when assigning values to attributes and you can do so by placing a backslash in front of those that should not be considered (compare the differences between the first pragma_content line and second pragma_content line in my last post)
By the way, this would also be a problem with using the vertical bar (specifically "|") since that also has significant meaning within the attributes field. That is also addressed in the same manner by allowing the use of the backslash to point out which ones should be ignored.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Dec 15, 2014 5:42:48 GMT -8
Hello ChrisIt may have been covered within but I can't seem to locate it in reference of placing a functional Spoiler hire button. I'm sure this is possible and have no idea as to the "how to" and need your guidance on this. EDIT: disregard Eton as I just figured out how to implement it.
|
|
Former Member
inherit
guest@proboards.com
177794
0
Dec 2, 2024 14:31:20 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 15, 2014 8:32:24 GMT -8
I wouldn't say using img tags would be "better", the 0.9.5 version merely addresses the problem you brought up where we are using pragma_content to insert (any) additional bbcode and that additional bbcode contains equal signs which as specifically stated in the plugin instructions is used to assign a value to an attribute in the attributes field. It's extremely difficult for a code to somehow "guess" what you meant with those extra equal signs. What the newest release does is to allow you to specify which equal signs in that field is not to be considered when assigning values to attributes and you can do so by placing a backslash in front of those that should not be considered (compare the differences between the first pragma_content line and second pragma_content line in my last post) By the way, this would also be a problem with using the vertical bar (specifically "|") since that also has significant meaning within the attributes field. That is also addressed in the same manner by allowing the use of the backslash to point out which ones should be ignored. Oh I see. Ok ill give the other one a try. But so far it looks like its working fine! Thanks!
|
|