Drupal Image Publishing Module


This Drupal module allows certain 3rd party image publishing programs to interact with the image.module image galleries. Now version 0.2.

The following publishing software is supported:

Gallery Remote clients

The Menalto Gallery project created Gallery Remote to simplify the process of uploading large batches of images to their Gallery photo sharing Web application. They publish an official API document, and maintain a number of Java clients, both standalone and embeddable applets. This module aims to provide a full implementation of the server side of the Gallery Remote API, and should be compatible with all Gallery Remote clients.

The Windows Web Publishing Wizard

Windows XP and on have an interesting built-in shell feature called the Publishing Wizard. The sidebar task "Publish this file/folder to the Web" invokes the Web Publishing Wizard. When this task is invoked, the Web Publishing Wizard offers a list of sites to which your images can be published. The list comes from the registry, and with this module, you can add Drupal sites to that list.

Caveats:

  • Works with the image.module gallery facility, and operates on the taxonomy used by image.module. Does not work with album.module.
  • Includes some kludges, where functionality is required that is not cleanly exposed by other Drupal modules. This may make it incompatible with future releases of Drupal.
  • It has been tested with Drupal 4.6.1, digiKam, the Gallery Remote full applet, and the Windows Web Publishing Wizard.
  • It is licensed under the GNU GPL.

Visitors are welcome to try it out with the Gallery Remote applet, in read-only mode with the image galleries presented on this site. Please use politely, with awareness that most image files are ~3MB, and upstream bandwidth comes at a premium for this server.

AttachmentSize
image_pub-0.2.tgz16.01 KB

*  »

bohtho@drupal.org (not verified) Says:

Wow, what great module.

But I read on Bryght.com that one could use the XP publishing wizard too with your module. Is that correct ? Sounds like a friendly approach to my more inexperienced users.

In that case I was wondering how I could make a way for my users to download the appropriate registry entry to include my Drupal site as a "provider" (besides the default MSN Groups) in the XP Publishing Wizard.

I saw on gallery.menalto.com that a developer had made a module for dynamically providing the registry file for each user to download (see below). Is this something that could be included in your Gallery Remote module, or converted into an extra module for Drupal ?

<?php
class DownloadRegView extends GalleryView {
/**
* @see GalleryView::isImmediate()
*/
function isImmediate() {
return true;
}
/**
* @see GalleryView::isImmediate()
*/
function renderImmediate($status, $error) {
global $gallery;
// Get the domain name
$urlgen = $gallery->getUrlGenerator();
$domain = $urlgen->getCurrentDomain();
// Get the name of the gallery
list ($ret, $rootId) =
GalleryCoreApi::getPluginParameter('module', 'core', 'id.rootAlbum');
if ($ret->isError())
{
echo $ret->wrap(__FILE__, __LINE__);
return;
}
list ($ret, $root) = GalleryCoreApi::loadEntitiesById($rootId);
if ($ret->isError())
{
echo $ret->wrap(__FILE__, __LINE__);
return;
}
$title = $root->getTitle();
// Setup the headers for the Registry file
if (!headers_sent()) {
header("Cache-control: private");
header("Content-Type: application/octet-stream");
header("Content-Disposition: filename=install_registry.reg");
}
// Build the registry file
$lines[] = 'Windows Registry Editor Version 5.00';
$lines[] = '';
$lines[] = '[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\PublishingWizard\PublishingWizard\Providers\\g2_'.$domain.']';
$lines[] = '"displayname"="'.$title.' at ['.$domain.']"';
$lines[] = '"description"="Publish Your Photos and Movies to '.$title.'"';
$params = array ();
$params['view'] = 'publishxp:PublishXP';
$lines[] = '"href"="'.$urlgen->generateUrl($params).'"';
$lines[] = '"icon"="'.$urlgen->makeUrl('/favicon.ico').'"';
echo join("\r\n", $lines);
echo "\r\n";
return GalleryStatus :: success();
}
}
?>

//Thomas/bohtho

»

Anonymous (not verified) Says:

[?php
class DownloadRegView extends GalleryView {
/**
* @see GalleryView::isImmediate()
*/
function isImmediate() {
return true;
}
/**
* @see GalleryView::isImmediate()
*/
function renderImmediate($status, $error) {
global $gallery;
// Get the domain name
$urlgen = $gallery->getUrlGenerator();
$domain = $urlgen->getCurrentDomain();
// Get the name of the gallery
list ($ret, $rootId) =
GalleryCoreApi::getPluginParameter('module', 'core', 'id.rootAlbum');
if ($ret->isError())
{
echo $ret->wrap(__FILE__, __LINE__);
return;
}
list ($ret, $root) = GalleryCoreApi::loadEntitiesById($rootId);
if ($ret->isError())
{
echo $ret->wrap(__FILE__, __LINE__);
return;
}
$title = $root->getTitle();
// Setup the headers for the Registry file
if (!headers_sent()) {
header("Cache-control: private");
header("Content-Type: application/octet-stream");
header("Content-Disposition: filename=install_registry.reg");
}
// Build the registry file
$lines[] = 'Windows Registry Editor Version 5.00';
$lines[] = '';
$lines[] = '[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\PublishingWizard\PublishingWizard\Providers\\g2_'.$domain.']';
$lines[] = '"displayname"="'.$title.' at ['.$domain.']"';
$lines[] = '"description"="Publish Your Photos and Movies to '.$title.'"';
$params = array ();
$params['view'] = 'publishxp:PublishXP';
$lines[] = '"href"="'.$urlgen->generateUrl($params).'"';
$lines[] = '"icon"="'.$urlgen->makeUrl('/favicon.ico').'"';
echo join("\r\n", $lines);
echo "\r\n";
return GalleryStatus :: success();
}
}
?]

//Thomas/bohtho

»

carlos rivero (not verified) Says:

oh man.. you saved me like 5 hours of doing the multiple upload for the image modules that I was going to do next weekend!!

thanks!! :D

»

Zach Harkey (not verified) Says:

Does this replace the galleryremote module?

»

samr7 Says:

Thanks for feedback!

Yes, this does replace galleryremote.module, although I prefer the term "renamed."

If one were to install and enable both the old galleryremote.module and image_pub.module, it's difficult to say which one will control the gallery_remote2.php entry point. Ugh. Watch out for this.

»

myadidas (not verified) Says:

So I put the gallery remote applet on my site but it sees the galleries as read only and I don't know how to change that. From the installed Gallery Remote application I can view and add photos. How does one configure the applet to allow adding photos? I basically copied your html and tweaked it to my site configuration and that's where i stand now. I see that Gallery has a permission system which I assume must be overcome to do this but I have no idea how. Is there a parameter I can add to the html? Thanks, its been said before, but one more time won't hurt: this feature is very appreciated.

»

Gustavo (not verified) Says:

This plugin rocks! I have the stand-alone client working great, but the embedded applet is read-only. Any info on how to enable it to work?

»

oliver (not verified) Says:

yea, i'd love to get this to work.. does it work with 4.6.2? what should the "gallery url" be? this looks like a great idea if I can get it to work! thanks

»

oliver (not verified) Says:

yep, seems to work with 4.6.2, although my pics were in a reverse ordering once they arrived into drupal, just because drupal only orders galleries in reverse chronological order..

the gallery url is just the root drupal address (the domain name, if you have installed into your web root directory).

»

lakyljuk (not verified) Says:

I installed your module into drupal, activated and set up image.module and still cannot get it to work. I tried with Windows Publish Wizard, so I merged .reg files with my registry, WPW offered me my site, but after typing my admin name and password in, it said it cannot connect to server. So I installed Gallery Remote Java program, set up my site and name + password, but after login button press, I got message "invalid username or password". Maybe it is because Gallery Remote adds a trailing slash after my site adress. So I typed www.1zsfm.cz/?q= (I don't have clean urls), but GR adds a slash, so result is www.1zsfm.cz/?q=/ which is invalid adress and GR cannot connect to. When I changed site adress to www.1zsfm.cz/?q=node it changed it to www.1zsfm.cz/?q=node/ and after login I have message "Server contacted, but Gallery not found at this URL http://www.1zsfm.cz/?q=node/gallery_remote2.php". Can anybody help me on this?

Thanks in advance

lakyljuk

»

Anonymous (not verified) Says:

I tried this with Digikam 0.7.2 but it didn't work. First, when it showed the galleries it didn't show any nesting, since I have categorised my galleries in a hierarchy.

Second, when I tried to add a new album I got an error ("Failed to create new album").

Not sure if they're bugs with Digikam or your module.

»

Steven (not verified) Says:

Hi, I'm trying to use image_pub with drupal 4.5.5. I tried using windows publisher and the galleryadd.pl perl script, but neither works. The perl script claims that I provided a wrong login/password pair, but drupal logged that I the script logged in successfully. Does this module work with a stock drupal installed on debian through apt ? Do I need to enable something somewhere ? Or maybe install another module ? I really would like to get this working, because afaik, this is the only module that would allow me to mass-upload files in an easy way.

»

ryan (not verified) Says:

please tell us the secret to getting gallery remote applet out of read-only....

i know its possible.
we are all dying to know
ryan.

»

Anonymous (not verified) Says:

When I try to download the registry file, I get a PHP error:

Fatal error: Call to undefined function: _() in [image_pub.module] on line 636

Someone familiar with this error?

»

syedasad (not verified) Says:

I am using Drupal 4.7 CVS

I have uploaded and enabled the latest version of the image_pub module.

I am able to open gallery remote and provide a drupal username/password which authenticates successfully.

But the applet is not allowing me to create new albums or add pictures. Seems to be in a read only mode. I am running windows 2000 server.

Another issue I am facing is that after installing and enabling image_pub.module, I get a new menu called "Image Publishing". When I click on that I get the following error.

Fatal error: Call to undefined function: system_settings_save() in /usr/home/sharezil/public_html/modules/image_pub.module on line 52

Any help is appreciated.

»

Anonymous (not verified) Says:

same here
Drupal beta 5 / digikam 0.8.1

can connect but photos are not uploaded.

When I click on image publishing, I get this error

Fatal error: Call to undefined function: system_settings_save() in /var/www/localhost/htdocs/b5drupal/modules/image_pub-0.2/image_pub.module on line 52

»

Anonymous (not verified) Says:

Looks like I am too "beta". I can't even upload a single image with the image module.

»

Tom Nys (not verified) Says:

I've fixed the image_pub library for Drupal 4.7. You can grab a copy of the module at http://www.netwalk.be.

Cheers

Tom

»

Anonymous (not verified) Says:

how are you guys embedding Gallery Remote into your Drupal sites?

»

Nimo (not verified) Says:

When will this module be updated to work with Drupal 5.x?

»