[EXTENSION] EGallery

Damn, I was hoping that would fix it.

Can you just confirm that it wouldn’t be a permissions issue? The user that Wamp is running under has access to both the yii directory and the gallery location?

Hi viji,

Can you please try the following to make sure that WSH is installed on your machine? The code is taken from this Microsoft Technet article.

Copy the following script, paste it into Notepad, and save it with a .VBS file extension (for example, Versions.vbs). Run the script, and it will report back the versions of Windows Script Host (WSH), VBScript, WMI, and ADSI installed on your computer. If any of the version numbers come back blank, that means that technology is not installed.


On Error Resume Next

WScript.Echo "WSH Version: " & WScript.Version

Wscript.Echo "VBScript Version: " & ScriptEngineMajorVersion _

    & "." & ScriptEngineMinorVersion

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _

    & "{impersonationLevel=impersonate}!\\" & strComputer _

        & "\root\cimv2")

Set colWMISettings = objWMIService.ExecQuery _

    ("Select * from Win32_WMISetting")

For Each objWMISetting in colWMISettings

    Wscript.Echo "WMI Version: " & objWMISetting.BuildVersion

Next

Set objShell = CreateObject("WScript.Shell")

strAdsiVersion = objShell.RegRead _

("HKLM\SOFTWARE\Microsoft\" &_

"Active Setup\Installed Components\" &_

"{E92B03AB-B707-11d2-9CBD-0000F87A369E}\Version")

If strAdsiVersion = vbEmpty Then

    strAdsiVersion = objShell.RegRead _

    ("HKLM\SOFTWARE\Microsoft\ADs\Providers\LDAP\")

    If strAdsiVersion = vbEmpty Then

        strAdsiVersion = "ADSI is not installed."

    Else

        strAdsiVersion = "2.0"

    End If

End If

WScript.Echo "ADSI Version: " & strAdsiVersion

Edit:

I find it highly unlikely that you don’t have WSH installed (as it comes installed by default and you would have had to uninstall it). Instead, please try the following:

Edit the file EGalleryBase.php located in the gallery extension folder.

Find the line:


$Command = realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'EGalleryProcessQueue.php '.$this->_realpath.' '.$this->thumbnailWidth.' '.$this->thumbnailHeight;

Replace with:


$Command = escapeshellarg(realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'EGalleryProcessQueue.php').' '.escapeshellarg($this->_realpath).' '.escapeshellarg($this->thumbnailWidth).' '.escapeshellarg($this->thumbnailHeight);

Find the lines:


$WshShell = new COM("WScript.Shell");

$WshShell->Run("php.exe $Command", 0, false);

Replace with:


pclose(popen("start /B php.exe $Command 2>nul >nul", "r"));

Save and try again. Let me know if you have any troubles doing that and I’ll attach the file for you to try.

hi scythah

I am sorry for the late reply… I hv changed my OS. Now am in Linux…

It works well Linux… And Thank you so much for ur reply… :)

Damn, I was hoping you’d be able to help me sort out this issue. Because I assume someone else will hit it eventually also otherwise.

I downloaded EGallery-1.3.zip and unzipped it, but how can i open a file “.3” ? :mellow:

The EGallery-1.3.zip file contains a folder called gallery. I’m not sure what “.3” file you are talking about, unless it didn’t unzip correctly?

Can you please explain what you did?

Sorry, xD

I found the folder gallery now xD,

I have unzipped with winrar the "EGallery-1.3.zip" and it extracted a file named "EGallery-1.3" that i couldnt open;

However after I opened this file inside the zip folder and appeared the gallery folder

Thanks, :P

Rafael Yukio

There’s been a couple of comments on the review page. I already have quite a few ideas about what to add and how to make it better, I’m just very busy currently, so it might take a while.

Hi,

I’ve just tried to use your EGallery on my test site but when try to display the page that contain the gallery I get this error:

PHP Error

Description

Undefined offset: 0

Source File

/home/myuser/public_html/testsite/protected/extensions/gallery/EGalleryBase.php(194)

Seem that it has trouble to create the gallery thumbnails, and looking into the ‘thumb’ directory it only create one thumbnail, then I get an error.

Hope you can help me!

Found the issue: the extension doesn’t support more than 1 level of nested subfolders…

@scythah :

Hello,

I’m working with Yii v1.1.1 and eGallery v1.3 AND I got a similar problem than “viji” :

[indent]

com_exception

<b>Source:</b> Unknown<br/><b>Description:</b> Unknown

line in error is "$WshShell->Run("php.exe $Command", 0, false);

" in "D:\wamp\www\yii\fudoshin\protected\extensions\gallery\EGalleryBase.php"

[/indent]

I’m using a PC under windows XP and WAMP 2.0 (php 5.2.6).

WSH is v5.7 ; VBscript is v5.7 ; VMI is v2600.0000 ; ADSI is v5,0,00,0

I got the error when a thumbnail has to be generated.

If I manually launch the following command into a cmd/DOS box : "php.exe D:\wamp\www\yii\fudoshin\protected\extensions\gallery\EGalleryProcessQueue.php D:\wamp\www\yii\fudoshin\images\galleries 128 128"

The thumbnails are generated and the widget runs successfully !!!

Can you bring to me some help ?

On an other hand, to have the full folder description into the Gallery page I had to correct a source file. I had to modify the "EGalleryBase::readDescription" method as following :

[indent] after line "$i = 1;" I added : "$buffer = "";"

AND I modified "$buffer = fgets($fp, 10240);" which became "$buffer .= fgets($fp, 10240);"[/indent]

Thank you for the time you’ll spend for me.

Best reagrds.

That’s correct. I plan to support a lot more things in the future, but I haven’t had any free time to work on it lately.

Hi kachinjayabi,

Please see my reply to your PM.

I am still running into the Undefined offset: 0 error during thumbnail generation. Have you made any progress on this?

Thanks!

Chris

Hi C Boyd,

Yes I’ve made a little bit of progress, but unfortunately haven’t got anywhere near a stage that will be useful to you. It’s still on my list of things to do. I’ll get there eventually, sorry it’s taking so long.

I have yii 1.1.2 running and installed eGallery on ubuntu 8.04.4 LTS Server!

My image structure is as follows:

  • yii installation path

    • images

      • Galleries

        • Certificate_Distribution_Jan-2011

        | 01_L1_Meraj_Qamar.JPG

        | 02_L1_Atiq_ur_Rehman.JPG

        | …

And I Added to a page:

$this->widget(‘application.extensions.gallery.EGallery’,

    array(


            'path' =&gt; 'images/Galleries',


            'name' =&gt; 'LCCI IT Courses Galleries',


            // 'id' =&gt; 'gallery',


            // 'showNav' =&gt; true,


            // 'mimeTypes' =&gt; array('image/gif','image/jpeg','image/png'),


            // 'createThumbnails' =&gt; true,


            // 'foldersAreDates' =&gt; false,


            // 'dateFormat' =&gt; 'jS M Y',


            'imagesPerPage' =&gt; 20,


            'imagesPerRow' =&gt; 4,


            // 'sort_order' = 'desc',


    )

);

It shows the correct description. But when I click on the gallery it gives me error:

The requested view "index" was not found.

Please help

Qamar,

if


com_exception

<b>Source:</b> Unknown<br/><b>Description:</b> Unknown

line in error is "$WshShell->Run("php.exe $Command", 0, false);

then you need to change link to your php.exe in this line (*base.php)




$WshShell->Run("C:\wamp\bin\php\php5.3.0\php.exe $Command", 0, false)



thank you

Hi,

The demo really helped me. But I had do delete the first slash in the line

‘path’ => ‘/images/gallery’,

to be

‘path’ => ‘images/gallery’,

and so it worked.

But the lines under the Galleries names don’t appear.

What could be the problem?

I’m using

Win 7 Starter

XAMPP 1.7.5 Beta

[PHP: 5.3.6]

Apache/2.2.17

Sorry for my (probably) bad English.

And thank you for the help.

I found: there was an extra (blank) line at the end of the description.txt files.

It’s working fine now.

I am use this extension, do not work, js file not copy in "assets" folder.

What could be the problem?

Sorry, my english is bad.