Hello all,
I've just installed s9y (very impressive!) and have added the sidebar plugin that shows a random Gallery 2 image. This works great, except that I would like to limit the random images selected to just one specific gallery rather than from the entire set of galleries available. Does anyone know whether this is possible?
Many thanks
Rich
Gallery 2 sidebar plugin - specific gallery to show?
ok, i'm totally not into coding but actually you should be able to do that. open serendipity_plugin_gallery_menalto_random.php file and find this code:
now you can play a little with this link scheme. add gallery's g2_itemId with id of album you want to show. something like that:
should work althought it's not tested. so, play with it on your own risk 
Code: Select all
if ((int)$this->get_config('gversion') === 2) {
$file = 'main.php?g2_view=imageblock:External&g2_blocks=randomImage&g2_itemFrame=none';
}
Code: Select all
if ((int)$this->get_config('gversion') === 2) {
$file = 'main.php?g2_view=imageblock:External&g2_blocks=randomImage&g2_itemFrame=none&g2_itemId=id_of_your_album';
}
"everything is under control" - kasparov demo
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Hey, thanks a lot for this contribution. In fact making this configurable is a very good idea, I just committed this to CVS.
Best regards,
Garvin
Hey, thanks a lot for this contribution. In fact making this configurable is a very good idea, I just committed this to CVS.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/