indiePaper MyBB Premium Themes

Toggle Panel

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Know anything about cookies?
09-29-2009, 10:15 PM
Post: #1
Know anything about cookies?
If I make a new table on my forum (Like the one in this tutorial), and make it collapsible, how would I add cookies so when a guest or user collapses it, it stays collapsed until they uncollapse it?

For example, on the forum index, if you collapse one of the categories and refresh the page, it stays collapsed, where as if I make a custom collapsible table, collapse it, and refresh the page, it will be uncollapsed, because it didnt save a cookie.

Any advice?

I asked the same thing on the MyBB forums but have gotten no response

Visit this user's website Find all posts by this user
Quote this message in a reply
09-30-2009, 05:51 PM
Post: #2
RE: Know anything about cookies?
What I was trying to do was to have a cookie with all the IDs of the elements that were collapsed in one string, and then I'd split them to create an array. After that, a loop would take every ID in the array and hide it.

Find all posts by this user
Quote this message in a reply
09-30-2009, 10:16 PM
Post: #3
RE: Know anything about cookies?
Heres the thing though... I know absolutely nothing about Javascript Tongue

Visit this user's website Find all posts by this user
Quote this message in a reply
09-30-2009, 10:41 PM
Post: #4
RE: Know anything about cookies?
Ohh, you should have say that before Tongue

Well, it won't be as easy to explain then... I suggest you to read some javascript basics here.

It's late for me now so I'll post a better reply tomorrow

Find all posts by this user
Quote this message in a reply
10-01-2009, 06:17 AM
Post: #5
RE: Know anything about cookies?
Wow too confusing for my little brain Tongue
Ill have to read up on it some other time, thanks!

Visit this user's website Find all posts by this user
Quote this message in a reply
10-01-2009, 04:05 PM
Post: #6
RE: Know anything about cookies?
Well, w3schools is probably the easiest place I know to learn JS. They even have a "try it yourself" section on each lesson to give you the oportunity to learn in an easier way. I really doubt I can explain it to you if you don't know a bit of the basics. But I'll try if you want Tongue

Find all posts by this user
Quote this message in a reply
10-01-2009, 04:41 PM
Post: #7
RE: Know anything about cookies?
Well the easiest way for me would be to just give me the code and tell me what to edit to get the cookies to be saved Tongue
But I need to learn JS if Im going to be a theme designer, so I will read up on that at W3Schools this weekend when my schoolwork isnt bombarding me Tongue

Visit this user's website Find all posts by this user
Quote this message in a reply
10-01-2009, 05:13 PM
Post: #8
RE: Know anything about cookies?
Well, I wouldn't be teaching you... I'd just give you the answer, and well, that's not exactly what we're looking for. Besides, my method might not be the best so I don't want to misslead you if you're learning.

But you don't need to know JS to make themes. Actually, JS just began to be used in themes for MyBB Tongue

Find all posts by this user
Quote this message in a reply
10-01-2009, 07:08 PM
Post: #9
RE: Know anything about cookies?
Im sure it would have helped for the theme conversion I just got payed for! (I got payed $150!)

Visit this user's website Find all posts by this user
Quote this message in a reply
10-01-2009, 09:18 PM
Post: #10
RE: Know anything about cookies?
Congrats! That's a very good amount for a theme convertion Smile

Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: