[EXTENSION] EGallery

Simple photo gallery

EGallery extension

Comments and suggestions appreciated.

Updated to version 1.1

See EGallery extension.

do you have any example or demo?

No, I’ll set one up though in the next few days.

Updated to version 1.2 which fixes problems relating to ‘path’ and whether Yii is installed in a subdirectory.

Also created a demo which will be expanded to provide more examples/documentation over the coming days/weeks.

December 18, 2009 (1.3)

Fixed problem where there would be a long pause while the server generated the thumbnails.

Download link

Please let me know if you have any troubles with the thumbnail generation. Make sure you include what OS your server is running.

I will update the demo in the next few days.

If you downloaded version 1.3 before, please re-download it as there was a problem where thumbnails would not be generated at all on linux servers (and would throw an error). It looks like only 1 person downloaded it.

Hi

I hv a prblm while running EGallery

"com_exception

Description

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

Source File

C:\wamp\www\yiisample\protected\extensions\gallery\EGalleryBase.php(364)"

Pls help me to solve it…

What version of wamp are you running? What version of windows? What PHP version is included in that? Have you changed the wamp config at all after installing wamp (so I know what to do to test it)?

Hi

I am using

WAMP 5, PHP Version 5.2.1, Window XP

Thanks, I’ll look into it.

Hi viji,

Can you please open a cmd prompt on the Windows XP server and type "php -v" (without the quotes) and tell me the output?

If it is something similar to

Then can you please type "set PATH=%PATH%;C:\wamp\php" (or change that path if the php.exe file is in a different location) and try "php -v" again? If you get a proper response (ie. your PHP version) then please try running the script again and let me know if it works correctly.

Hi

Thanx for your reply.

Just now i added the path "C:\wamp\www" and i got the proper response…

But still i hv the same problem while running 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