DirGallery extension

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

DirGallery extension

Postby Kevin » Tue May 04, 2010 9:54 am

This is the discussion topic for the DirGallery extension.

This extension enables you to add automatic simple galleries to your entries or pages from images in filesystem directory.

Get the extension here: http://extensions.pivotx.net/entry/6/dirgallery.
BlogThemesExtensionsDocumentation • Support PivotX - Click the Donate button today!
User avatar
Kevin
Administrator
 
Posts: 106
Joined: Tue Nov 20, 2007 9:58 pm
Location: Nova Scotia, Canada

Re: DirGallery extension

Postby rabbeltje » Tue May 04, 2010 11:59 am

super!

one question: there seems to be something wrong with the filenames - the title displayed underneath the image is not always the right one, it seems to kindof random which one it picks!

and 2nd, there is always the foldername before the actual title (for example: gallery pictures picturename) is there any way to leave out the 'gallery pictures' ?
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: DirGallery extension

Postby hansfn » Tue May 04, 2010 12:49 pm

The extension author might not know that this topic is created so I'll answer quickly:

1) The "random" names might be related to automatic extraction of image meta data. (The meta data in images might be wrong or just not what you want.) You could try to remove

Code: Select all
        if ($iptc['APP13']) {
            $iptc = iptcparse($iptc['APP13']);
            $alttext = $title = iconv('Windows-1250', 'UTF-8', $iptc['2#120'][0]);
        }

2) You can leave out the folder names by changing

Code: Select all
$nicefilename = formatFilename($image, true);

to

Code: Select all
$nicefilename = formatFilename($image);


All code above are found in dirgallery/snippet_dirgallery.php.
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: DirGallery extension

Postby rabbeltje » Tue May 04, 2010 12:57 pm

the 2nd option worked, the first one didn't. thanks for the help anyway :) the first issue is a bit inconvenient but it's not something that HAS to be solved on the spot, so i'll just wait if the author sees this and if he/she doesn't i'll try a pm :)
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: DirGallery extension

Postby orgoj » Tue May 04, 2010 1:05 pm

I make configurable this things in next release.
User avatar
orgoj
 
Posts: 9
Joined: Tue Apr 27, 2010 9:19 pm
Location: Czech

Re: DirGallery extension

Postby rabbeltje » Tue May 04, 2010 1:15 pm

thanks :D
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: DirGallery extension

Postby Kevin » Wed May 12, 2010 3:30 pm

The author sent me an update yesterday and it was posted to extensions.pivotx.net this morning.

Kevin
BlogThemesExtensionsDocumentation • Support PivotX - Click the Donate button today!
User avatar
Kevin
Administrator
 
Posts: 106
Joined: Tue Nov 20, 2007 9:58 pm
Location: Nova Scotia, Canada

Re: DirGallery extension

Postby ppescher » Thu Aug 19, 2010 9:51 pm

Hi,

A little fix for this great extension. Replace code at line 74 with:
Code: Select all
        if ($iptcindex) {
            getimagesize($file, $iptc);
            if (is_array($iptc) && $iptc['APP13']) {
                $iptc = iptcparse($iptc['APP13']);
                $title = $iptc[$iptcindex][0];
                if ($iptcencoding) {
                    $title = iconv($iptcencoding, 'UTF-8', $title);
                }
                $alttext = $title = cleanAttributes($title);
            }
        }


Actually only two lines changed. That fixes image attributes in the generated HTML if the IPTC metadata contains quotes.

Paolo
User avatar
ppescher
 
Posts: 13
Joined: Mon Aug 16, 2010 2:35 pm

Re: DirGallery extension

Postby orgoj » Fri Aug 20, 2010 6:59 am

I make this site configurable with params overide this week. Thanks for idea.
User avatar
orgoj
 
Posts: 9
Joined: Tue Apr 27, 2010 9:19 pm
Location: Czech


Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 4 guests

cron