Gallery2

Creating and modifying plugins.
Post Reply
utak3r
Regular
Posts: 13
Joined: Tue May 15, 2007 4:11 pm
Location: Szczecin, Poland
Contact:

Gallery2

Post by utak3r »

Hi there,

Is there a plugin for displaying in a side-bar a random image from a gallery2 gallery? If not, I could write one... :)

And... are there any plugins related to gallery2? I'm thinking of an event plugin for placing images from it in articles - as resized ones, with or without a link to the original ones. Any ideas?
sooner or later... you will meet the undertaker.
http://utak3r.pl
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

You might take a look that "Unified Sidebar Image Display" plugin. It has the ability to connect to a Gallery install's "random" url and display the result in the sidebar.

Five months back I added some display options and a caching ability to it, but it could probably use some improvement. I don't use Gallery, so I was just kind of guessing from the documentation and going on what users provided as feedback.

You should also look at the "Markup: Gallery Image" event plugin, since I think that does the basics of what you are thinking with your second idea... It hasn't been touched in about seven months, and I don't know what it is capable of at the moment, but it might be good to take a look at.

There is also the "Gallery2 Embed" event plugin. I think there are quite a few threads on the forum asking for improvements to this (but I might be way wrong on that).
utak3r
Regular
Posts: 13
Joined: Tue May 15, 2007 4:11 pm
Location: Szczecin, Poland
Contact:

Post by utak3r »

mgroeninger wrote:You might take a look that "Unified Sidebar Image Display" plugin. It has the ability to connect to a Gallery install's "random" url and display the result in the sidebar.
The plugin is able to connect to a Menalto Gallery installs "random" url, access a Coppermine database directory (MySql only), connect to the web service Zooomr (http://beta.zooomr.com/home) or access images in the Serendipity Media Library
well... can't see a gallery2 here, unfortunately. But I would take a look inside, and might add this functionality.
mgroeninger wrote:There is also the "Gallery2 Embed" event plugin. I think there are quite a few threads on the forum asking for improvements to this (but I might be way wrong on that).
yeah, I've seen it - but after an hour or two I gave up :roll: oh, well.
sooner or later... you will meet the undertaker.
http://utak3r.pl
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

utak3r wrote:well... can't see a gallery2 here, unfortunately. But I would take a look inside, and might add this functionality.
I might be confused (as I said, I don't use Gallery2) but I believe the "Menalto Gallery" support has options for both version 1 and 2.

You do mean the Gallery version available from http://gallery.menalto.com/ right? So long as that is the product you mean, it should support both versions.

(edited to fix the gallery url)
utak3r
Regular
Posts: 13
Joined: Tue May 15, 2007 4:11 pm
Location: Szczecin, Poland
Contact:

Post by utak3r »

mgroeninger wrote:I might be confused (as I said, I don't use Gallery2) but I believe the "Menalto Gallery" support has options for both version 1 and 2.
took another look... yeah, it indeed supports both 1.x and 2.x 8)
although I can't get it to work - I have my gallery in another domain - and it's unavailable from a main one... it's not a subdirectory. An in the effect I get - connection refused :?
sooner or later... you will meet the undertaker.
http://utak3r.pl
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

I was able to get my test site to embed a random image from your server (at least, I hope it is your server *grin*) by just pointing the setting "Directory of Gallery installation" to "http://gallery.utak3r.pl" and setting it to Version 2.

The text name of that setting really should be updated to something like "Address of Gallery server" or something like that.

Hope that helps!
utak3r
Regular
Posts: 13
Joined: Tue May 15, 2007 4:11 pm
Location: Szczecin, Poland
Contact:

Post by utak3r »

mgroeninger wrote:I was able to get my test site to embed a random image from your server (at least, I hope it is your server *grin*) by just pointing the setting "Directory of Gallery installation" to "http://gallery.utak3r.pl" and setting it to Version 2.
yep, it's mine :)
hmm... it's calling php scripts from there, isn't it? too bad... I have this function blocked (due to common attacks) - allow_url_fopen is off. :cry:

Probably I will have to reorganize my server and move this gallery subdomain to a subdirectory of the main site and update my virtual servers...
sooner or later... you will meet the undertaker.
http://utak3r.pl
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

The plugin uses PEAR HTTP/Request. While I can't remember exactly, my gut says allow_url_fopen should not effect its calls. It might just be a simple firewall rule preventing outbound http requests if you have a firewall installed on the server. I might be wrong though.

I'd hate for you to have to reconfigure everything... :(

Good luck, though! :)
Post Reply