Treeview
|
ricm
Joined: 2010-07-12
Posts: 8 |
Posted: Sun, 2010-11-14 09:57
|
|
"Albumselect" module used to have a treeview for G2. Is there anything similar for G3? |
|

Posts: 7985
I just wrote a module called "albumtree" that does this. It's in the gallery3-contrib repo and should show up on http://gallerymodules.com shortly. It's probably a little slow for big installs.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 5
Hi bharat,
I was working on a slight modification on your albumtree. Basically I'm just changing it to use a div with a scrollbar. But, I noticed that this code returns a list of all albums, even if a given user has no permission to the album. How could this be modified to only show albums that the user is able to view?
Posts: 7985
Doh! That's a bug. I just submitted a change to fix that:
https://github.com/gallery/gallery3-contrib/commit/30700cb8de1293b442b73dae462e3fd2e6b4bf31
Nice catch, ccoredump!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 7985
PS: if you're making the UI better, how about just modifying the albumtree module directly and replace the dropdown list? I think the dropdown list is pretty lame to begin with, so you might as well just improve it and we'll all use what you come up with.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 5
That exactly what I just did, basically I just changed the select box to a DIV and added a couple of CSS rules.
I was also playing around with some pretty iPhone-like Jquery lists, but I didn't quite get it to work.
I'll look at submitting something for this.
Thanks for the quick bug fix.
Posts: 34
I've been looking for this for a while, thanks so much! One thing is that it displays all albums (even those that you dont have the access to). In other words the permission dont work
Posts: 5
Hi disrupter,
A change was just submitted that takes care of this. But, I did come across another issue, and that is if you are using the chroot module, this module doesn't take that into account.
So none of the URLs work and there might be a security issue if a user relies on using the chroot module rather then setting up album permissions.
Posts: 5
Hi disrupter,
A change was just submitted that takes care of this. But, I did come across another issue, and that is if you are using the chroot module, this module doesn't take that into account.
So none of the URLs work and there might be a security issue if a user relies on using the chroot module rather then setting up album permissions.
Posts: 34
Thanks, I really need to learn how to read
Posts: 11
hi, is there any Classic treeview?....or how can I transform this one
Posts: 7985
I just pushed a second style up, thanks to ccoredump. It's totally hacky, but now that there are two styles, it's easy to add more. You switch between styles by going to Admin > Settings > Advanced and changing the albumtree.style variable between "list" and "select".
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!
Posts: 62
Excellent bharat, the list view works well and is just what I wanted.
Why do people always ask for more whatever they are given?
It would be great if folders could be toggled open/close as in Finder/Explorer.
I will have over 50 sub folders in some gallery folders.
John
Posts: 62
Oops, I was carried away with the list view appearance but had not tested its function.
The tree structure displays correctly but gives error page not found when selecting any folder.
An example, folder web path websitename/gallery3/index.php/locations/amersham
Selecting folder in tree list tries to connect to websitename/index.php/items/4
Switching back to select works OK
Installed ver 2 by overwriting ver 1 files, removed/saved/added/saved the module.
Any suggestions please?
Thanks,
John
Posts: 62
I've found a workaround to get albumtree working in list mode on my gallery.
Edited line 20 in albumtree_block_list.html.php to prefix /index.php/items with the root gallery folder name.
Not sure if it needs a variable for the gallery root name to be added there or if my system has lost a variable that the code is already looking for.
John
Posts: 25955
zjoh13,
good catch. Line 20 of albumtree_block_list.html.php should now read:
<a href="<?= url::site("items/$album->id")?>"><?= str_repeat(" ", $level) ?><?= $album->title ?></a>There was a missing closing </a> as well.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 62
You guys are amazing, best forum product support I've seen and it's much appreciated.
John
Posts: 51
Hi Bharat,
I gather from the above that the original albumtree module was your creation?
Congratulations! I think you've done a great service to the Gallery 3 community.
I wonder if you are able to offer any help for me to achieve a slight mod I require?
I am aiming to have it only show a part of the tree - only a certain level.
It's the parent/child relationship that I am puzzling over as I only want it to show the menu items for the parent album. An example may help?
ie - considering the following structure:
When viewing a photo within Sub-album 2, you would see links for Sub-albums 1,3 & 4. (only)
Can you shed any light on how to achieve this?
If so, I would be grateful...
Or maybe it's something you have considered for a future version?
D.
Posts: 7985
I'm not actively working on this module, but it's pretty easy so perhaps somebody else here can help.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!
Posts: 51
Ok. Thanks anyway!
I'll continue to look at the code, but if there is anyone who can offer any help, then that'd be great too!
D.