Module: Carousel
floridave
Joined: 2003-12-22
Posts: 27300 |
Posted: Sun, 2010-06-06 05:26 |
Inspired from jCarousel lite a new module to add items to the sidebar in a vertical carousel. http://codex.gallery2.org/Gallery3:Modules:carousel Known issues: Dave |
|
Posts: 337
Why you chose the sidebar for it? it would be better to be placed horizontally under the resized photo, IMHO. Is it easy to modify that?
Posts: 337
I've realized that this module is intended to show random/recent/popular items, rather than make you able to navigate the photos beside the one you are viewing. It will be really nice if you could add navigation functionality as well as an option to show the thumbnails below the resized photo.
Thanks!
Posts: 27300
Because that is what I wanted it to do.
I will consider making another similar module to add a horizontal carousel under the photos.
Then it would not be a carousel then would it? Sounds to me like you want some thumb-navigation.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
I have started on creating another module to go under the thumbs and photos.
There is some bugs to work out and some css love is required but it is functional.
Here is what I have so for:
http://www.langleycom.com/gallery3/index.php/ see the bottom.
I will start a new thread once I have some more time.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 337
Looks like you disabled it, as I don't see anything similar in the bottom of the items in your site. Anyway, I am thankful you are working on that
Posts: 27300
Updated the module.
* mouse wheel navigaton
* hover pause if auto scrolling
* removed nav buttons
* auto start
* Half item to represent more items.
Use the above attachment.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 56
Hey Dave,
Looks pretty good, but I've found at least one minor bug and possibly another. The one is simply that if you re-enter the module configuration page with the "autoscroll" option checked, the fields associated with it aren't enabled. You have to uncheck and recheck to enable them. Again, minor, but anyway... BTW, what's the scale on those numbers for the scroll control? Seems like it's maybe milliseconds?
The other behavior that to me looks like a bug, but may be intended is that with autoscroll off, the images all filled the bar in a column as opposed to being a single image that you could rotate through. Was that what was supposed to happen?
At any rate, great start and I look forward to seeing this one grow!
Thanks,
Beo
Posts: 27300
yes it takes a bit of code to fix, no time to fix care to take a crack at it?
I think so. Don't know for sure as I anm using a 4th party bit of code.
No it is not intended. It does not function properly.
I am thinking of dropping this 4th party JS code as it conflicts with the other carousel module.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 56
Hey Dave,
If I have the time, my first priority would be to adjust the maximum limits on the scroll timing, but if you're considering changing the underlying code then maybe I should hold off. However, any adjustments I manage to make I'll be sure to feed back to you. Thanks again for all your hard work.
Beo
Posts: 27300
Fixed the (u)hiding / (dis)able of the times if the auto scroll is selected.
Adjusted the maximum time for the two fields as well.
I don't see that behavior now.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 56
Hey Dave,
Found a bug in the carousel views. You're using "autostart" for the field in the admin page, but just "auto" on the views, so that field doesn't do anything. The fix is:
Beo
Posts: 27300
Thanks for keeping me on my toes!
Fixed in the above attachment.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 127
Hi Dave,
Regarding the incompatibility with navcarousel module: I did a fresh install of Gallery 3 and was able to repro immediately. Your module doesn't initialise and neither does mine.
I am getting two JS errors:
eval(function (p, a, c, k, e, d) { [...] )) is not a function
(which is the jcarouselliste.js)
and
jQuery("#navcarousel").jcarousel is not a function
(which is the initialisation of for jCarousel used by my module)
Now if I modify your module so that it used the minified version of jcarousellite instead of the packed one it starts working. I have posted the modified files here and asked Lord Beowulf to test.
Uli
---
Build bridges not barriers.
Posts: 27300
Thanks, I am following the other thread as well and when Lord Beowulf reports back positively, I will update my module.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 127
I know. Sorry for the double post.
Oh and thanks for this really cool module :D
Uli
---
Build bridges not barriers.
Posts: 56
I know you're following the other thread too, but it looks like it's working great now. Thanks to both of you for some great work.
Beo
Posts: 27300
hukoeth & Lord Beowulf,
Thanks for your testing and feedback. I have updated the above .zip file to use the minified version of the JS and also found a bug where I did not have the mousewheel setting on the admin page.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 263
Is there any reason why this module in which i have above my photo pages, would cause the site to become very sluggish when the album has many photos? I have one album with 30 or so photos and i see no sluggishness, when i load a photo from a album with 170 photos, it takes a long time for each photo to load?
Does anyone have any insight on this....
Thanks..
Marcus..
www.armaniphotography.com/gallery
Posts: 27300
Updated the zip file on the codex page to reflect the recent changes.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 241
Was trying out this module as replacement for the ImageBlock module and I noticed that the check boxes for "Show on album & collection pages" and "Show on photo pages" on the settings page always seem to be checked even if I uncheck the photo pages option and save the settings. When I return back to the settings page, they are all checked again instead of reflecting their true state of being unchecked in the database.
Behavior wise, the images are not shown on the Photo pages like I set it, it's just the Settings page not reflecting the Saved state.
In my case I just show the number of images I want and turn off mouse scrolling; however, the tooltip still says to "use the mouse wheel to scroll" when it doesn't actually do anything. I'll probably just go into the code and change it to show the photo title or something.
Anyway, thought you'd like to know.
Thanks,
Mark H.
Using Gallery 3.0.1 - gallery.markheadrick.com
Posts: 27300
Thanks for the feedback. Does the attached work better?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
Well? does it work better?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 241
I'm sorry.. I've been caught up playing the new EverQuest 2 expansion LOL. This code does seem to work better. The state of the check boxes now seem to reflect their saved value.
Oh, since I've configured it not to show anything on the actual photo pages, it seems like Google is indexing things much better. The images google is showing actually points to the page where the photo is.
Thanks,
Mark H.
Using Gallery 3.0.1 - gallery.markheadrick.com
Posts: 27300
Thanks,
I updated the download for the codex page with the above version.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 6
Hello,
I have included the Carousel module, but I have a couple of queries about it.
When set to autoscroll, the Random Items block works fine, but the images in Recent and Popular Items just show the top x pixels where x seems to be proportional to the width set. Have I missed a setting somewhere? (Very likely!)
Secondly the "scroll using mouse" option doesn't seem to work in IE7 (strictly speaking in Compatibility View when using IE8) - all the images are shown, instead of the number set in the options. The full thumbnails are shown in this case however, not just the cropped images.
My implementation of Gallery is at http://modelmasterdecals.com/Gallery/index.php.
I like the module very much - and so does the Site Owner, which is much more important! - but I would like to be put right about the way I am using it.
Thanks,
Iain
Posts: 27300
I think it has to do with the very unusual aspect ratio you are using. I could be wrong but what if you have a taller item as the recent item?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 6
Hi, thanks very much for the feeback.
It certainly seems to have something to do with that. I deleted all the "unusual" items and everything was fine. I then put one of them back and now the Recent Items are fine but the Popular and Random Items are not.
I haven't tried the scrolling issue again. Do you think that is connected too?
The offending images do indeed have an unusual aspect ratio, so if we use more "normal" items throughout maybe everything will be OK. The images I picked were really just the first ones that came to hand. Unfortunately some of those which might be likely to be used in practice also have somewhat unusual aspect ratios.
Thanks again,
Iain
Posts: 6
Hello,
Back again!
I have deleted the offending images again and added a new Album whose images are an assortment of aspect ratios and sizes; everything looks OK in autoscroll mode. It looks as though there was something special about those earlier images which caused a problem. Maybe we'll just have to manipulate unusual images if it is felt essential to include them at all.
Sadly, the IE7 problem hasn't been resolved, but the site owner likes the automatic scrolling anyway!
Regards,
Iain
Posts: 27300
I have zero interest in supporting IE.
I might be interested in in attempting to support a very unusual aspect ratio. However it is low in the priority list.
How do you expect the the behavior to work? Should the <div> get bigger as the next item shows? or should the height of the <div> be determined by the largest/tallest item in the whole album/gallery?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 6
Hello,
Thanks for your interest. I suppose in an ideal world the <div> should get bigger as required when the next item shows, but I don't see a problem if it is easier to simply fix the <div> height in advance by reference to the largest/tallest item in the whole gallery (rather than in a given album since multiple albums would normally be used to generate the display). To my mind, the main objective would be to show the whole or as much as possible of the image in every case which the latter approach would achieve.
I understand that this change could not be given high priority.
Thanks again.
Regards,
Iain
Posts: 1
That's exactly what I needed to have a "latest entry" thumbnail in my sidebar (www.rienpost.com). Thanks!
Posts: 27300
The simple solution is almost always the way to go.
Add:
and adjust the height as needed.
#g-carousel-pop
#g-carousel-ran
will need some as well.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 263
Do you have any Ideas why Nav Carousel Is so sluggish with albums over say 400 photos? I have tried everyting...
with albums of say 300 photos It works great,I have one album with 700 photos and its a good 4 seconds to load the photo
the the Carousel loads fast??
I really need this to work on the large albums where users can keep scrolling until they find the photo they want...
Please take a look ...
Thanks...
http://www.armaniphotography.com/gallery/index.php/Head-Of-The-Lagoon-20102/IMG_3693
Posts: 6
It must be too simple for me, nothing changes! For the avoidance of doubt, I have added the above to http://modelmasterdecals.com/Gallery/modules/carousel/css/carousel.css. Is this right?
Thanks very much for your further input.
Regards,
Iain
Posts: 27300
I don't see any of that css when viewing your site. I bet that the css was used durring devlopment and is not used. Try adding the code to your themes css.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 6
I have added the code to the screen.css file in the folder for my chosen theme - still no good I'm afraid. Is there anywhere else I could put it? Is it possible that the problem is theme dependent? I'll try your suggestion in another theme to see if that helps. Maybe the simple solution just isn't going to work.
Regards,
Iain
Posts: 263
Dave Can you take a look Please? I have asked about this many times??????????
If you dont know , Just say that....
http://www.armaniphotography.com/gallery/index.php/Head-Of-The-Lagoon-20102/IMG_3693
Posts: 27300
No.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 241
Noticed the following bug in /carousel/views/carousel_random.html.php:
$ctitle = title; should be $ctitle = $photo->title;
I also happened to discover that IE9 shows all 5 images instead of the 3 or 1 image that I set as being the height of the carousel if IE9 is set to compatibility mode (to see how things looked with older browsers). To get around this, I went into Settings -> Advanced and set the quantity values to 1 and 3 instead of 5. Now both modes of IE9 show the correct amount of images. But.. my case is special as I'm not really using this as a scrollable carousel but something to control where I display a set number of recent and random images on the sidebar.
Regards,
Mark H.
Using Gallery 3.0.1 - gallery.markheadrick.com
Posts: 263
Posts: 27300
Cheers! fixed.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 5
I modified the JCarouselLite JavaScript code to allow for a much better presentation of the photos in case of different aspect ratios (e.g. mixed portrait and landscape orientation).
I have performed only limited testing so far, namely for the following settings:
Browser: Chrome 15 (ezcellent) and Firefox 3.6.23 (very slow, anyway not recommended since rounded corners and other screen candy is not supported)
Number of thumbs to show: 1.5
Size of thumbs: 200px
Use at own risk
Instructions:
Make a backup copy of jcarousellite.min.js in the gallery3/modules/carousel/js folder.
Download and extract the attached zip file and replace the original jcarousellite.min.js file.
--> That should be all.
Posts: 27300
Cheers!
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 253
Hi Dave,
This is a really cool module, it is working well, smooth and clean.
About the popular items : on what base is this working ? The number of time the photo page has been viewed ?
Thank you in advance for your answer
------
Posts: 27300
Popular is done with this bit of code in the view file:
So it looks to see if the user has permission to view the item(s)
make sure the items are not albums
orders by view count
and finds the quantity you want.
Does it not work properly?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 253
It seems to work well, I was just asking that because of the albums... I have so many on the website.
So what if an album gets listed in the carousel ? Is its thumbnail going to appear ?
What if we click on it, are we redirected on the listing page ?
I guess I could leave with that, although I am affraid albums are going to take all the places of the carousel in the long term.
Is there no way to list albums out of the carousel ?
Posts: 27300
If you want albums to show you would have to edit the code to not make that check.
If an album gets listed in the popular carousel, then I'm making a mistake in the code as I understand how it works.
Dave
___________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 253
So far I only get items...so it seems to work properly
Thank you for this module Dave, it is really a nice one
Posts: 253
Hello
I was wondering if there is any RSS feed for this module, and if yes which one is it ?
Posts: 27300
@more rss feeds: http://gallery.menalto.com/node/95073
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team