Hello,

the new gallery.module seems to integrate gallery much better into drupal and even works with vbDrupal. Good work!

Now a disadvantage I've recognized to prior gallery.module versions: Theming.
Currently (with the old gallery.module version) I'm using an own drupal theme for the frame (header,sidebar,footer) and an own gallery theme for the content of gallery (e.g. to improve image navigation, example: http://galerie.takera.net/spielkultur/lockon/skinTakeraEins/ugf/2007-10-... ).

With the gallery.module 5.x-2.0 that doesn't seem to work. It seems that I have to use a theme made in Drupal and so I won't be able to use the advantages of gallery's template system (the variables the g2 template system has). Is that right or did I miss an option where i can still use the gallery template system?

E.g. problems in g2 admin occur: Can't disable/enable Plugins within admin of the embedded gallery.

Comments

profix898’s picture

Currently (with the old gallery.module version) I'm using an own drupal theme for the frame (header,sidebar,footer) and an own gallery theme for the content of gallery. With the gallery.module 5.x-2.0 ... it seems that I have to use a theme made in Drupal and so I won't be able to use the advantages of gallery's template system

Not sure I got your point. The embedded gallery is rendered using a G2 theme (i.e. Matrix, Floatix, ...) whereas the Drupal page (the frame around the gallery) is rendered with a Drupal theme (i.e. Garland, Bluemarine, ...). Now what are you trying to do?

Roi Danton’s picture

Not sure I got your point. The embedded gallery is rendered using a G2 theme (i.e. Matrix, Floatix, ...) whereas the Drupal page (the frame around the gallery) is rendered with a Drupal theme (i.e. Garland, Bluemarine, ...).

That's correct, and with gallery.module 5.x-1.x it works great. (this version is used at the webpage linked above)

But with gallery.module 5.x-2.0 beta3 this doesn't seem to work because the embedded gallery theme is overwritten. So for example if I install 5.x-2.0 on a fresh Drupal+Gallery installation, following pages/things don't work/work wrong in the embedded gallery:

  • g2 admin -> PlugIns (you can't enable/disable PlugIns)
  • g2 Icons are not displayed
  • g2 tab menus look bad (e.g. edit photo)
  • if g2 sidebar isn't moved to drupal sidebar, it is shown inline the g2 content and not as a separate sidebar
  • if Gallery Navigation block is enabled, the options in this block are listed inline instead of a list

It seems as the g2 theme is rendered wrong with gallery.module 5.x-2.0. This would make the new version useless for me b/c I need to edit the g2 theme.

profix898’s picture

Everything you listed is meant to work correctly with the new module version as well. Could you please visit http://scratch.profix898.de/ where I installed Drupal 5.2 and the latest gallery module (Login: webmaster, Passwd: scratch)? Does it appear broken in your experience? Does it look different from your install? Feel free to play with the settings etc. if required.

FYI: The narrow fontsize on the plugins page is a G2 bug (https://sourceforge.net/tracker/index.php?func=detail&aid=1797125&group_...).

Roi Danton’s picture

Thanks for the link: On your page everything worked fine, like I know it from the previous gallery.module 1.x-dev version.

So I tested it again with Drupal 5 RC1, Drupal 5.2, vbDrupal 5.2.2 (default Garland theme) + Gallery 2.2.3 Full (default Matrix theme). Gallery module 5.x-2.0 beta3.
Everytime the same issues occured again. With 5.x-1.x-dev everything works fine. I can't give you access to a test server (local server), but here are screenshots:
http://files.takera.net/g2_plugins.png
http://files.takera.net/g2_viewthumbs.png
http://files.takera.net/g2_viewitem.png

profix898’s picture

Can you provide some details about your directory settings? Filesystem paths to Drupal/G2, public paths to Drupal/G2 and embedded gallery? Is your G2 installed outside the Drupal root directory? It might also be helpful to look at the html source of your gallery page and check the CSS/JS paths ...

Roi Danton’s picture

It might also be helpful to look at the html source of your gallery page and check the CSS/JS paths ...

I didn't thought this is the reason b/c as I switched back to gallery.module 1.0 everything was fine.
But yes, the CSS/JS paths to gallery 2 are wrong. Sorry that I didn't recognized before. The module assumes that gallery 2 is in a subdirectory of Drupal, but it isn't:
Drupal: http://localhost/drupal/
Gallery: http://localhost/gallery2/
The detected filesystem path and URL are correct: C:\Programme\xampp\htdocs\gallery2/ and /gallery2/

(( I need to have gallery in a separate directory 'cause to domain settings (embedded gallery 2 has another (sub)domain than drupal). This works fine with gallery.module 5.x-1.0 and mod_rewrite + some .htaccess tweaks -> http://galerie.takera.net, http://bibliothek.takera.net. ))

Maybe an base path is set wrong in 2.0. The HTML source code looks similar...

... with gallery.module 5.x-1.0:

<script type="text/javascript" src="/gallery2/modules/search/SearchBlock.js"></script>
<link rel="stylesheet" type="text/css" href="/gallery2/modules/core/data/gallery.css"/>
<link rel="stylesheet" type="text/css" href="/gallery2/modules/icons/iconpacks/silk/icons.css"/>
<link rel="stylesheet" type="text/css" href="/gallery2/themes/matrix/theme.css"/>

<style type="text/css" media="all">@import "/drupal/modules/node/node.css";</style>

and is interpreted like this (correctly)

	http://localhost/gallery2/themes/matrix/theme.css	12 kb
	http://localhost/gallery2/modules/icons/iconpacks/silk/icons.css	10 kb
	http://localhost/gallery2/modules/core/data/gallery.css
	http://localhost/gallery2/modules/search/SearchBlock.js

... with gallery.module 5.x-2.0:

<style type="text/css" media="all">@import "gallery2/modules/core/data/gallery.css";</style>
<style type="text/css" media="all">@import "gallery2/modules/icons/iconpacks/silk/icons.css";</style>
<style type="text/css" media="all">@import "gallery2/themes/matrix/theme.css";</style>
<script type="text/javascript" src="gallery2/modules/search/SearchBlock.js"></script>

<style type="text/css" media="all">@import "/drupal/modules/node/node.css";</style>

and is interpreted like this (incorrectly)

	http://localhost/drupal/gallery2/themes/matrix/theme.css	677 bytes
	http://localhost/drupal/gallery2/modules/icons/iconpacks/silk/icons.css	677 bytes
	http://localhost/drupal/gallery2/modules/core/data/gallery.css
	http://localhost/drupal/gallery2/modules/search/SearchBlock.js
profix898’s picture

We have a simple (and maybe erratic) check to detect G2 installations outside Drupal root. As described in the docs (README and http://codex.gallery2.org/Integration:Drupal) its highly advisable to install G2 in the Drupal root directory or alternatively create a symlink there, but it should still work with your setup as well. Try to manually set variable 'gallery_outside' to TRUE (in variables table) and see what happens. I will change my dev environment to debug this issue. Good to have beta releases for such issues ;)

Roi Danton’s picture

gallery_outside was set as TRUE (b:1;) already. Changing to FALSE hasn't changed anything (it has changed back to TRUE automatically by accessing gallery settings -> install).
@Symlink: Can't set a junction point on test server (using WinXP) 'cause it only works with empty folders. I don't have Cygwin.

Good to have beta releases for such issues ;)

Indeed. ;)

profix898’s picture

Title: Theming Gallery: Can't use gallery themes? » js/css includes broken for G2 outside Drupal root
Category: support » bug
Status: Active » Fixed

The gallery_outside variable seems to work as expected then but the functions adding js/css to the page dont. I have just committed a bugfix for this to cvs. I didnt have much time to test it (busy weekend) but I think it should work ok. Could you please get the latest -dev version and give it a try?

Roi Danton’s picture

I've downloaded 5.x-2.x-dev. Now it is working like it should with my "outside-setup". The g2 theme appears like it should. Thanks a lot, keep up the good work!

Anonymous’s picture

Status: Fixed » Closed (fixed)