Page 1 of 1

Markup: Gallery Image

Posted: Tue Feb 17, 2009 10:39 am
by kazschuri
Hi

I have installed a Gallery 2.2.4 on the same server as my blog. I now installed the "Markup: Gallery Image" Plugin, cause I wanted to use the already uploaded pictures from the Gallery in my blog.

I hope, that this is the right Plugin ...

But right now my main problem is getting to the pictures. I am pretty confident that I got all the paths right, but I am not at all certain what to put in the blog so that a picture will be linked from my gallery.

Could you help me?

Kaz

Re: Markup: Gallery Image

Posted: Fri Feb 20, 2009 2:44 pm
by kazschuri
Hmm ... nobody an idea how it works?

Maybe I can elaborate a bit an get an answer :-D

I have s9y with the current version and gallery with version 2.2.4 installed. They both reside on the same domain and both within the same directory.

The absolute path to the gallery is
/var/www/customers/myuserdirectory/mydomaindirectory/gallery2/

The albums of the gallery are at
/var/www/customers/myuserdirectory/mydomaindirectory/gallery/g2data/albums/

so a bit removed at the old directory of the previous installation.

And s9y is installed under

/var/www/customers/myuserdirectory/mydomaindirectory/blog/

that is my current situation.

In the modul preferences I set the paths accordingly.

All I need now, would be the actual code to put into my blog posts, so that an image that is already uploaded in the gallery/albums/ will be linked into the blog post.

I read, that I need to use the img tag ... but I am not able to figure out, what source I have to put into the img tag ... does it use a relative adress based on some of the preferences of the module? which?

I would really appreciate information :-)

Thanks,

Kaz

Re: Markup: Gallery Image

Posted: Fri Feb 20, 2009 3:05 pm
by garvinhicking
Hi!

Sigh.

Gallery integration is still a bit a weakpoint of serendipity. There's a multitude of ways to get it to work, but each one of them has some drawbacks that more or less suck.

Having said that, the galleryimage plugin has a somewhat concealed documentation right now. Inside the PHP file serendipity_event_galleryimage.php there'S a documentation that you need to use BBCode like syntax:

Code: Select all

// nearly completly rewritten on Sept 2005 by Alexander 'dma147' Mieland, http://blog.linux-stats.org, <dma147@linux-stats.org>
// Contact me on IRC in #linux-stats, #archlinux, #archlinux.de, #s9y on irc.freenode.net
// to reflect gallery2 album images.
//
// Code based on the WP-Gallery plugin by Geoff Hutchison http://geoffhutchison.net/blog/categories/computers/web/wp-plugins/
//
// Basic usage is:
//             [GImage]album/image.ext[/GImage] with .ext needed if not the default .jpg
// full syntax is:
//             [GImage size=sized|full|thumb; link=image|image_sized|album|page|none; align=left|center|right|none; caption=text string; style=link|fancy|image][album/]image.ext[/GImage]
So you'd have to enter those tags, and the plugin will take care of resolving the proper gallery path...

I've personally never used the s9y/gallery interfaces, so sadly I'm not very helpful on those areas :(

Regards,
Garvin

Re: Markup: Gallery Image

Posted: Sun Feb 22, 2009 2:29 pm
by kazschuri
Thx, those code-bits helped to get me to link to an entire album.

But when I try to let him display a single picture from one of those albums s9y gives me the following warning:

Code: Select all

Warning: getimagesize(/var/www/customers/myname/mydomain/gallery/g2data/albums/Teddy/img_5550.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /var/www/customers/myname/mydomain/blog/plugins/serendipity_event_galleryimage/serendipity_event_galleryimage.php on line 599

Warning: getimagesize(/var/www/customers/myname/mydomain/gallery/g2data/albums/Teddy/img_5550.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /var/www/customers/myname/mydomain/blog/plugins/serendipity_event_galleryimage/serendipity_event_galleryimage.php on line 611
Der Eintrag wurde gespeichert (Anzeigen)
When I look at the mentioned php file at those lines I get the following part starting with the "if-statement" in line 598 and the two "list" being the problematik lines at 599 and 611.

Code: Select all

      if ($this->get_config('gversion') != 2) {
            // get thumbnail image attributes
            list($width, $height, $type, $attr) = getimagesize($album_base.'/'.$album.'/'.$photo.$image_size.$photo_ext);
        } else {
            $thissize = getimagesize($album_abs.'/albums/'.$album.'/'.$photo.".".$photo_ext);
            if (strtolower($param_array['size']) == 'sized') {
                $newsize = $this->g2_imagesize($thissize[0], $thissize[1], $this->get_config('popup_max'));
                $width= $newsize[0];
                $height = $newsize[1];
                $attr = 'width="'.$width.'" height="'.$height.'"';
            } elseif (strtolower($param_array['size']) == 'thumb') {
                $newsize = $this->g2_imagesize($thissize[0], $thissize[1], $this->get_config('thumb_max'));
                $width= $newsize[0];
                $height = $newsize[1];
                $attr = 'width="'.$width.'" height="'.$height.'"';
            } else {
                list($width, $height, $type, $attr) = getimagesize($album_abs."/albums/".$album."/".$photo.".".$photo_ext);
            }
        }
Do you have any idea what to do?

Ah und Garvin, nette Bilder da bei Flickr :-D

Thx,

Kaz

Re: Markup: Gallery Image

Posted: Mon Feb 23, 2009 12:17 pm
by garvinhicking
Hi!

And does the file /var/www/customers/myname/mydomain/gallery/g2data/albums/Teddy/img_5550.jpg exist? Or is there maybe a wrong path contained in this string?
Ah und Garvin, nette Bilder da bei Flickr :-D
Thanks! :-)

Regards,
Garvin