I am searching for the above mentioned.
It can also be a hack for plain html-sites. It's easy to integrate html into a Mambo Module.
I already tried to integrate "<? php include("http://www.mywebsite.com/gallery/block-random.php"); ?> but this didn't suffice.
Posts: 3
Any thoughts on this... I could use the same thing...
Posts: 2322
What about including block-random.php directly didn't work?
Posts: 38
Here is some code that I got working as a random photo Mambo module, while evaluating Mambo for my family site. This may not be the best way to do it, but I share it here as-is so that perhaps you can use it. However, I can not support this; I have decided not to stick with Mambo.
Assuming you know how to package up a Mambo component (beyond the scope of this discussion, see the Mambo resources), create a file called, for instance, "mod_block_random.php" containing the following code:
You will need, obviously, to properly initialize GALLERY_URL with the correct path for you installation.
(Note: I had to hack Gallery's session.php to overcome Warnings about "foreach" and "invalid arguments". Seems as if that may have been a problem local to my configuration, though.)
You can see the result in action on my test site: [url]www.barca-hall.com/index.php[/url].
Good luck!
-Jeff
Posts: 347
Jeff,
thank you very very much for this code, works fine with my Mambo. :D
Regards
Kai
Posts: 24
Hi I have interest to do this also, but
,"/path/to/your/gallerycode
is just too technical for me.
can someone explain what is the meaning of "gallery code" pls
Posts: 38
Good news. You no longer need not to worry about that. After saying I wasn't going to do it, I went ahead and made this into an installable Mambo module (which will read your com_gallery configuration to get that GALLERY_URL value itself).
To use this random block module for Mambo:
1. Download the module package: http://www.barcahall.com/mod_block_random.zip
2. Install it: Mambo Admin, choose Modules > Install/Uninstall.
3. Configure it just as you would other Mambo modules.
4. Limitations:
- I've only tested this with the official block-random.php being distributed with Gallery as of 1.4.4.
- This module can not be displayed when Mambo is displaying your Gallery page(s) themselves.
This should make it more usable.
-Jeff
Posts: 24
Thanks Jeff.
I install the module and got this error message
Posts: 38
Check that your "Path to Gallery" setting is configured properly in com_gallery. Do you have Gallery working embedded in Mambo?
-Jeff
Posts: 24
it's not really embedded.
I used wrapper to wrap the gallery.
Posts: 38
Sorry. I have no idea how to make this work, then. This module for random photos takes advantage of the great support, since Gallery 1.4.3, to operate embedded in Mambo. Enabling Gallery to integrate inside Mambo is described, for instance, in: http://forum.mamboserver.com/showthread.php?t=4642
-Jeff
Posts: 26
I'm using this mod and it only shows the first two albums of 3 or 4 that are there. Any ideas?