Welcome to Geeklog, Anonymous Monday, November 25 2024 @ 02:27 am EST
Geeklog Forums
Draggable Block Hack
Status: offline
Turias
Forum User
Full Member
Registered: 10/20/03
Posts: 807
Right on the heels of the collapsable blocks hack comes another one that will blow your mind! Unfortunately, it is also completely useless.
Check it out at:
http://s93499194.onlinehome.us/playground/
Check it out at:
http://s93499194.onlinehome.us/playground/
16
11
Quote
Status: offline
Blaine
Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Nice work Turias It shows possiblities though. I like the floating divs.
I guess, one could somehow read back the x,y coordinates and then apply some rules. I've used a commercial portal that allowed you to move blocks between the 3 colums and positions within each col - pushing others down or up automatically. I can just imagine the Javscript kungfoo to make that all work.
I like the collapseable sides. I have asked a few theme designers to consider doing something like this for geekyears I've seen nuke themes that have a small icon on each block title that allowed you to collapse a block as well.
This is good for say the admin block that gets pretty large at times. Thats why I implemented the milonic menu on my site so that I could combine all my menus and save screen real-estate.
Geeklog components by PortalParts -- www.portalparts.com
I guess, one could somehow read back the x,y coordinates and then apply some rules. I've used a commercial portal that allowed you to move blocks between the 3 colums and positions within each col - pushing others down or up automatically. I can just imagine the Javscript kungfoo to make that all work.
I like the collapseable sides. I have asked a few theme designers to consider doing something like this for geekyears I've seen nuke themes that have a small icon on each block title that allowed you to collapse a block as well.
This is good for say the admin block that gets pretty large at times. Thats why I implemented the milonic menu on my site so that I could combine all my menus and save screen real-estate.
Geeklog components by PortalParts -- www.portalparts.com
10
14
Quote
Status: offline
Turias
Forum User
Full Member
Registered: 10/20/03
Posts: 807
Quote by Blaine: I've seen nuke themes that have a small icon on each block title that allowed you to collapse a block as well.
I've actually thought about doing this, but it doesn't seem possible with the current core. Each block on the site needs to have a unique id if you want cookies to be able to remember which blocks are open and which are closed. I don't see much point in collapsable blocks if you have to collapse them each time you load a page.
Correct me if I'm wrong, but it seems as though the only variable that gets passed into the block theme files is the block_title. So, that's all we have to work with.
Ok, so maybe we can assume that the title is unique. But, how do we get it into a javascript variable? That's where I'm stumped. If the title has either a single or double quote inside of it, the Javascript flatout breaks.
The way I see it, there are two ways to patch the core to allow this functionality:
1) Set the unique block_name variable in the themefiles (I'm assuming quotes can't be in that variable, but I haven't tested to see if GL allows it). This seems to be the correct fix for this particular problem.
2) Allow for escaping of geeklog variables so that they can be used in javascript. For example, [x_js] could be the javascript-escaped version of the [x] variable. I could see this being quite useful for other applications if it were done automatically for every theme variable.
So, that 's what has been running through my head this week. Do you see anything that I'm missing? Any ideas that might work?
6
8
Quote
Status: offline
Turias
Forum User
Full Member
Registered: 10/20/03
Posts: 807
Well, I give up. I can't think of anything else, right now. I'll take a look at the core and see how extensive the changes would need to be. If one of them isn't too bad, I'll see what Dirk thinks about putting it in the core.
10
13
Quote
Status: offline
sammykrupa
Forum User
Junior
Registered: 12/05/04
Posts: 28
Coooolll!
Sam Krupa
Sam Krupa
7
14
Quote
Status: offline
ByteEnable
Forum User
Full Member
Registered: 10/20/03
Posts: 138
I checked it out. That is pretty cool.
12
8
Quote
All times are EST. The time is now 02:27 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content