Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ![]() Interested in joining? Click here. If you are already a member of ZBCode, feel free to login right here: |
| Sortable categories (zb) | |
|---|---|
| Tweet Topic Started: Jul 2 2009, 11:05 AM (675 Views) | |
| Choco | Jul 2 2009, 02:39 PM Post #11 |
|
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ
![]()
|
If you set the path to /, it'll always carry across the subdomain, right? Before I used quirksmode's functions, I always did it that way and it seemed to work... Also, I enabled cookies! It now remembers where you last left the categories. Some of you with slower browsers may see a small delay between when it loads the page and when the categories are ordered due to rendering times/javascript interpretation. ![]() http://aquate.us/category.html |
It's a magical world, Hobbes, ol'd buddy... ...let's go exploring!In progress: Something Special ;) | |
![]() |
|
| Reid | Jul 2 2009, 02:51 PM Post #12 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
Very epic then. And yes, setting the path to / will make most cookies work. However, I believe by setting the path to /, it might carry over to other ZB boards. I'll have to do more investigating there though. Also you should add a safeguard where if they don't have cookies enables, they don't get the option to move it, or after they move it they get a little <div> prepended to #main saying how it won't save since they are disabled. Edit: it appears my theory was correct. By using the same cookie functions you use, I was able to set a cookie on my test board and read it on another zetaboards board. Of course, any websites with a domain won't have to worry about this, but it is something you should keep in mind. Edited by Reid, Jul 2 2009, 02:54 PM.
|
| The Resource Board | |
![]() |
|
| Choco | Jul 2 2009, 03:03 PM Post #13 |
|
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ
![]()
|
Never mind, tested it in chrome. ![]()
|
It's a magical world, Hobbes, ol'd buddy... ...let's go exploring!In progress: Something Special ;) | |
![]() |
|
| Reid | Jul 2 2009, 03:06 PM Post #14 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
It works. Got any solutions for the whole forum-to-forum cookie issue? I'm thinking perhaps prepend the forum name to the order..... like... it'd be a cookie called zbcode_order or something. You'd have to do some interesting stuff to get the first word of the name (I'd use $('#nav li').eq(1).split(" ")[0]) but that's life for you. |
| The Resource Board | |
![]() |
|
| Choco | Jul 2 2009, 03:08 PM Post #15 |
|
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ
![]()
|
Why not just change path so that it's "/" if a custom domain, but if the URL has .indexOf("zetaboards")>-1 then path="/"+main_url.split(".com/")[1].split("/")[0]+"/";? [edit]Hmm...wait...but does it allow two cookies to exist with the same name if the paths are different? It ought to, but I'm not sure, and I'm a bit too lazy to test it. Lol. |
It's a magical world, Hobbes, ol'd buddy... ...let's go exploring!In progress: Something Special ;) | |
![]() |
|
| Reid | Jul 2 2009, 03:11 PM Post #16 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
That works too. Of course, you have to modify your cookie code, but that isn't hard. If you had it set up as then you could do or something like that. I may have a syntax error in there, but since it's just theory I don't care. Or you could create a custom createCookie for ZB that does the same thing... |
| The Resource Board | |
![]() |
|
| Choco | Jul 2 2009, 03:13 PM Post #17 |
|
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ
![]()
|
Custom createCookie function for ZB that does the same thing (:P):
|
It's a magical world, Hobbes, ol'd buddy... ...let's go exploring!In progress: Something Special ;) | |
![]() |
|
| Reid | Jul 2 2009, 03:15 PM Post #18 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
.match()? Yuck I tested it and if there are different paths the cookies still function. I had one with a path set as / that had the value of "hey there" and another with a path of "/defaultpostcolor/" that had a path of "DEFAULT POST COLOR." I was successfully able to read both values in the correct locations (in /defaultpostcolor/ it showed "DEFAULT POST COLOR", otherwise it showed "hey there.") |
| The Resource Board | |
![]() |
|
| Choco | Jul 2 2009, 03:19 PM Post #19 |
|
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ
![]()
|
Don't knock match, its the best I don't get what you just said. It had a path of /defaultpostcolor/ and a path of DEFAULT POST COLOR? Or did you mean value? Or is the path not working? Do you mean that you're still being able to read a cookie made on one forum in another forum? |
It's a magical world, Hobbes, ol'd buddy... ...let's go exploring!In progress: Something Special ;) | |
![]() |
|
| Reid | Jul 2 2009, 03:21 PM Post #20 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
Path = /defaultpostcolor/ , value = "DEFAULT POST COLOR" Path = / , value = "hey there" on my test board (http://s1.zetaboards.com/defaultpostcolor/) it was able to read the "DEFAULT POST COLOR" value on the other zetaboards boards (no custom domain) it read "hey there." So yes, all is well in the world. Different paths work. ... epic. |
| The Resource Board | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Code University · Next Topic » |


















7:46 PM Jul 10