So, I ran my g2 on dreamhost and I can't show up Image Block. I see nothing. Under Drupal see error. The reason is because Dreamhost doesn't allow make @readfile function and load images from external places. There is a document on Dreamhost knowledge base (but now i can't find it again) thatn describes how to use "include" without external path. But there is not a word about readfile and I really don't know how to make this external PHP block work even in my internal SERVER along with only one path.
Gallery version = 2.0.2 core 1.0.0.2
Drupal: 4.6.3
PHP version = 4.3.10 cgi
Webserver = Apache/1.3.33 (Unix) DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.3.10 mod_ssl/2.8.22 OpenSSL/0.9.7e
Database = mysql 4.1.14-Debian_5-log
Toolkits = Exif, ImageMagick, NetPBM, Gd, Thumbnail, ArchiveUpload, SquareThumb
Operating system = Linux flower 2.4.29-grsec+w+fhs6b+gr0501+nfs+a32+++p4+sata+c4+gr2b-v6.189 #1 SMP Mon Feb 7 13:23:30 PST 2005 i686
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mailinfo [103985]; SV1; .NET CLR 1.1.4322)
Posts: 32509
http://codex.gallery2.org/index.php/Gallery2:How_Tos#Image_Block
Posts: 243
[/b]thx. embarrased that's I looked so hard and that was so easy and the answer near. It works perfectly, but since my G2 is embed in Drupal I found interesting the next artice:
http://codex.gallery2.org/index.php/Gallery2:GalleryEmbed:getImageBlock
1/
when I put this code directly (changing only paths from /gallery2/ to /gallery_standalon_real_path/ or /gallery_embed_unreal_path_under_druapl/) I have an error:
So, I change the line
Then,
If /gallery2/ dir = /gallery_standalon_real_path/ (both in two lines)
it show thumbnail, but the link is http://www.server.ru/gallery_standalon_real_path/gallery/countries/sweden/Sweden_CafeGrassTree.jpg.html
If /gallery2/ dir = /gallery_embed_unreal_path_under_drupal/ (only in the second line)
it show thumbnail, but the link is http://www.server.ru/gallery_embed_unreal_path_under_drupal/gallery/countries/sweden/Sweden_CafeGrassTree.jpg.html
(it goes /gallery/gallery twice!)
If the code is like
the link is OK, but I don't see thumbnail.
No more variants. ;-) What can I do?
Posts: 32509
since your g2 is embedded in drupal, you should use the normal drupal/g2 imageblock. that's a feature of the drupal integration.
moving the topic to the integrations forum.
Posts: 243
ok. gallery.module isn't enought functionality right now for me, because I shall distibute many image blocks over the site along the context e.t.c. I need to use flexible code with as many option as php-string for external image block has. It it much difference between you offered me first and that I have problems last post, and can you advice any on my last post about paths?
Posts: 32509
you should use GalleryEmbed::getImageblock and not the readfile approach.
http://codex.gallery2.org/index.php/Gallery2:GalleryEmbed:getImageBlock
you can use http://codex.gallery2.org/index.php/Gallery2:GalleryEmbed:getImageBlock only if Gallery is installed on the same server.
$ret = GalleryEmbed::init(array('fullInit' => true, 'embedPath' => '/'));
well, also specify embedUri and relativeG2Path.
see
docs/EMBEDDING for examples.
Posts: 243
seem to be working, thx.
Posts: 10
Valiant,
The code from the other thread works great.
A question though is in showing multiple thumbs using the "|" seperator the images align in a vertical orientation.
Is it possible to get the alignment into a Horizontal array by adding some code?
Posts: 32509
@horizontal instead of verticle:
i guess you could achieve that with css. don't ask me how.
Posts: 5
Sorry to necropost, the search function on the site is down and this seems to be the only thread I can dig up for details on this.
I'm trying to use the libcurl code from
http://codex.gallery2.org/index.php/Gallery2:How_To_Use_The_External_Image_Block_When_url_fopen_Is_Disabled
But for some reason I am getting duplicate images when I output RecentImages, it'll show 2 of each image with the same ID. It was working fine back when I was on a host that allowed fopen commands. Has this happened to anybody else? Should I dump this idea and go with the GalleryEmbed option here http://codex.gallery2.org/index.php/Gallery2:GalleryEmbed:getImageBlock Or is this an easy fix?