Closed (fixed)
Project:
Galleria
Version:
6.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2008 at 16:22 UTC
Updated:
13 Mar 2009 at 16:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
hedac commentedsubscribing
maybe it would be easier to use Imagefield instead of upload module.
Comment #2
gallamine commentedI agree with hedac & silvercat. ImageField is better. It displays a thumbnail after upload. Using ImageCache would make my life easier.
Comment #3
fallsemo commentedSubscribing.
Completely agree.
Comment #4
Mark Theunissen commentedYou can do this quite easily I would imagine, by hooking into the _preprocess function. Here is the original:
It calls theme('image'), just override that in your template.php, and use theme('imagecache','preset',...,...) instead.
Comment #5
Mark Theunissen commentedAs for using Imagefield instead of upload.module, the answer is "not until it's out of alpha"!
Comment #6
sk_mamp_nb commentedHi Mark,
This is a great module but I have not been able to utilize its potential even partially.
So far I've only been able to get the images in a modal lightbox which have to be manually skipped from one to the next but I don't get any automatic slideshow.
Is there some place where I could see a step by step 'how to' or a tutorial for implementing a slideshow using Galleria?
I also have this problem that galleria shows the original images as uploaded rather than the size I specify in the theme function. I guess using the imagecache will sort this out but I don't know how to apply the _preprocess hook. I tried adding the code into my template.php but it complains that it 'can't declare the function again' since it has already been declared in galleria.module so how do I override this function in my template.php?
Besides this, adding the theme function to the node body itself creates a strange result for me: it pops-up a lightbox with the thumbnails in it. It works fine if it is called from another page.
Many thanks,
Sanjay
Comment #7
Mark Theunissen commentedHi Sanjay
There is no automatic slideshow function, the modal lightbox that you describe is the correct functionality.
The size specified in the theme function is the size you want the lightbox, not the images.
You can't just add the function into your template.php, please read the Drupal Theme Guide for info on how to theme module output in Drupal 6. Preprocess hooks are pretty standard.
You shouldn't add the theme function to a Galleria's node body. It should always be called from another page. Why do you want to display a Galleria and a link that opens the same Galleria in a Lightbox on the same page?
Comment #8
sk_mamp_nb commentedThanks Mark.
My mistake, I had misunderstood http://drupal.org/node/352081#comment-1181969 in terms of placing the theme function in the node body.
I'll read the Theme Guide.
Comment #9
Rosamunda commentedSorry if this isn´t the place to ask this (I didn´t want to add an extra issue because I think it´s pretty much related), I´m trying to use this module right out of the box (no lightbox).
As it´s not possible to make it compatible with imageCache, is there a way to set the size of the big image that shows when you click on each thumbnail?
Thanks!!
Rosamunda
Comment #10
Mark Theunissen commentedYou can use imagecache, but it requires a bit of programming (basic stuff). I'll re-open this issue, and the next time i look at Galleria, I'll see if I can make a user-friendly imagecache integration.
Comment #11
Rosamunda commentedTHANKS!!
Comment #12
kahara commentedgo to Admin > Site Configuration > File Uploads. Here you can set the maximum height / width for uploaded images.
Comment #13
iaminawe commentedI agree that imagefield and imagecache integration would turn this from a cool module into a really great and even indispensable one.
I have found info on theming the output of imagefield with multiple pics attached but dont think I have seen one that displays this slickly.
subscribing...
Comment #14
drscales commentedI did this straight in the module for now, as I have a limited requirement.
Instead of
foreach ($files as $file) {you would need to provide a forech statement likein order to cycle through the array of arrays. The next problem is to call image cache for your galleria (as your display settings for your content type are probably needing to exclude your CCK Imagefield from display). As they don' t get called through drupal with the current 'data' line
, and so don't get created
we need to change it to
This will allow image cache to process each image into the required size (YOURIMAGECACHESETTING) otherwise it just might not be ready!.
Now, the next trick is to alter the module to include options within the config page to accomodate this as a variable. Or, better still, as an option in each item type's settings. I think this is basically next on the tasklist for the Galleria module (possibly followed by some count and title attributes) so I'll park my effort here here unless anybody wants further.
Comment #15
Mark Theunissen commentedThanks for the input! One day I will get around to making Version 2 of Galleria, and when that day comes, this will help.
Comment #16
smithn.nc commentedMark,
I needed this functionality for a client, so I went ahead and added it in, along with settings to choose which imagecache preset. This patch is for imagecache functionality only. I left out imagefield integration; picking my battles, I guess. :)
Edit:
Forgot to say thanks to DRScales for the big head start getting something together. Also, reiterating again, don't use this patch, use the one below this post!
Comment #17
smithn.nc commentedWhoops! Please disregard the first patch and use this instead. I had the old one doing something goofy when reading/setting the selected imagecache preset, which would break the output if the module was used before settings were saved in the admin area.
Comment #18
Mark Theunissen commentedThanks, commited to DRUPAL-6--1!