Images in Sidebar
Images in Sidebar
Is it possible to display RANDOM images of the image gallery of serendipity in the side bar? because I cant find any plugin that does this for me.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Images in Sidebar
Hi!
Sadly there isn't.
Displaying random images is actually quite hard for the database. There is only a solution that allows random ordering for MySQL, but this does notw ork in SQLite and PostgreSQL. Since we developed the internal media database to work on all of them, there is no functionality to return a random image.
And since the image sidebar plugin uses the media gallery, it usees the internal s9y function to display images - and since there is no randomize core option, the plugin itself also can't offer one.
Best regards,
Garvin
Sadly there isn't.
Displaying random images is actually quite hard for the database. There is only a solution that allows random ordering for MySQL, but this does notw ork in SQLite and PostgreSQL. Since we developed the internal media database to work on all of them, there is no functionality to return a random image.
And since the image sidebar plugin uses the media gallery, it usees the internal s9y function to display images - and since there is no randomize core option, the plugin itself also can't offer one.
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/
-
mgroeninger
- Regular
- Posts: 546
- Joined: Mon Dec 20, 2004 11:57 pm
- Contact:
I think I might be confused, but I'm pretty sure that the "Unified Sidebar Image Display" plugin can do random images from the media gallery.
I'm pretty sure I wrote it so that it just uses a count of all the images (yeah, it pulls all the images in just to count them, which means it's a RAM hog) and the php rand function to pick however many the user specifies...
It should support random images, directory limitation, and should cache the results pretty well to keep memory usage down as much as it can.
I'm pretty sure I wrote it so that it just uses a count of all the images (yeah, it pulls all the images in just to count them, which means it's a RAM hog) and the php rand function to pick however many the user specifies...
It should support random images, directory limitation, and should cache the results pretty well to keep memory usage down as much as it can.
Matthew (Feeling generous?)
-
mgroeninger
- Regular
- Posts: 546
- Joined: Mon Dec 20, 2004 11:57 pm
- Contact:
Oh, yeah...
jermen -> you will need to select Media Library for the "source" setting. And you might need to save the settings twice before all the options show up (I'll have to look into that bug).
Garvin -> Hi again! Hope life is going well!
jermen -> you will need to select Media Library for the "source" setting. And you might need to save the settings twice before all the options show up (I'll have to look into that bug).
Garvin -> Hi again! Hope life is going well!
Matthew (Feeling generous?)
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi Matthew!
Nice to see you back posting on the forum here. As you can see there are some things you did that I simply have no knowledge of, and postings where I couldn't fill your space *g*
Hope all is well for you.
Now back to the original question: I might of course be mistaken
I searched the code for "rand" and did see some randomizing code. But I didn't fully understand it and thought that might be a different thing. Sorry then for all the confusion 
Best regards,
Garvin
Nice to see you back posting on the forum here. As you can see there are some things you did that I simply have no knowledge of, and postings where I couldn't fill your space *g*
Hope all is well for you.
Now back to the original question: I might of course be mistaken
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/