#e61919
1
0
1
Sept 28, 2023 13:31:20 GMT -8
VS Admin
20,147
January 2000
admin
|
Post by VS Admin on Nov 26, 2012 17:45:57 GMT -8
You should give credit when using someone else's code, and make sure that they allow you to copy that code. That JavaScript code for get/set cookie was not written by you.
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Nov 26, 2012 17:59:46 GMT -8
I am sorry, I didn't think about www.w3schools.com copy writing their codes I guess I should contact them? Or maybe at this point just trash the code...
|
|
#e61919
1
0
1
Sept 28, 2023 13:31:20 GMT -8
VS Admin
20,147
January 2000
admin
|
Post by VS Admin on Nov 26, 2012 18:03:06 GMT -8
If they say it's free to copy, then give them credit.
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Nov 26, 2012 18:05:46 GMT -8
Ok i will. Guess i didn't really think about it since the whole website is giving examples of how to do things in JS I'd have thought they'd expect people to copy it...guess not Shows how dumb i am
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 27, 2012 1:45:17 GMT -8
Just drop of the cookie stuff and use a key. Be so much easier for you.
Once you have done that, post back if it's still not working.
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 27, 2012 1:53:42 GMT -8
Ok i will. Guess i didn't really think about it since the whole website is giving examples of how to do things in JS I'd have thought they'd expect people to copy it...guess not Shows how dumb i am I'm sure they wouldn't mind you copying the code they posted with no credit in return. The cookie functions they created are very commonly done like that, but the point is, you are copying both the functions, putting them into a plugin which you will likely be applying a copyright too yourself. The decent thing to do is to provide a link back to them in your code above the functions. Or write your own functions.
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Nov 27, 2012 9:24:51 GMT -8
Ok will do I will probably just go with the key thing at this point since I am pretty sure i would fail at writing my own functions
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Nov 27, 2012 12:10:32 GMT -8
Ok re-writing this, but i can't get the keys to work function acceptRules() { proboards.plugin.key('Lion_ruleSystem').set('accepted'); window.location = "/" } I am getting the error: Uncaught TypeError: Cannot call method 'set' of null
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 27, 2012 12:15:52 GMT -8
Are you 100% sure your key name is correct? I recommend putting it in lowercase.
Also, changing location straight after you set the key value will likely fail, as the AJAX request has to go off to the server, so the request will get terminated.
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Nov 27, 2012 12:31:32 GMT -8
Ok so how would i delay it until after i am sure it has worked? Yes, the keyname is correct. I inputed it with the useful tool off to the side...but let me try with a different name... edit: It worked right away when i changed the name of the key
|
|
#e61919
1
0
1
Sept 28, 2023 13:31:20 GMT -8
VS Admin
20,147
January 2000
admin
|
Post by VS Admin on Nov 27, 2012 12:34:33 GMT -8
This isn't in the documentation yet, but the syntax would be:
<script> proboards.plugin.key('whatever').set('value',{success: function() { put your code here }}); </script>
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Nov 27, 2012 12:47:56 GMT -8
Do plugins not run on custom pages? Cause I am not seeing the plugin on the source page...and it's not letting me grab or set the key value from there...
|
|
#e61919
1
0
1
Sept 28, 2023 13:31:20 GMT -8
VS Admin
20,147
January 2000
admin
|
Post by VS Admin on Nov 27, 2012 12:53:08 GMT -8
Correct, plugins currently do not run on custom pages.
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Nov 27, 2012 13:10:35 GMT -8
Will they? Cause the without them this code can only really work with cookies...at least the way I have been trying to get it to work...
|
|
#e61919
1
0
1
Sept 28, 2023 13:31:20 GMT -8
VS Admin
20,147
January 2000
admin
|
Post by VS Admin on Nov 27, 2012 16:36:03 GMT -8
We haven't decided, and are open to input from everyone here. There are some reasons I could see for not enabling plugins on custom pages. Perhaps we could have a setting for the custom page to disable / enable plugins.
|
|