G2 UI Homework Assignment #1

bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2003-05-03 05:13

Welcome to the first in a series of Gallery 2.x User Interface homework assignments. This is intended to get us all moving along the right path towards a fully functioning Death Sta- uh, "User Interface Team". You're encouraged to post replies to this with whatever thoughts cross your mind during this process.

Here's the first assignment.
1. Install Gallery 2.x
2. Configure it to use NetPBM or ImageMagick
3. Enable the Search Module
4. Create a new sub-album
5. Upload a photo to the new album
6. Create a new User
7. Create a new Group
8. Add a new User to the Group
9. Make the new user the owner of the photo
10. Use the search feature to locate the new image

The whole process should take you less than 30 minutes, provided you have MySQL or PostgreSQL support compiled into PHP. Post a follow up to this thread when you've completed this assignment, along with any thoughts you had along the way.

Good luck. As always, if you or any member of your team are captured during this mission we will disavow all knowledge.

 
Ihad

Joined: 2003-05-01
Posts: 11
Posted: Sat, 2003-05-03 10:20

1.
* for inexperienced users a step by step walkthrough config.php creation would be better than having to rename/copy/edit the file.
(* error messages need to be formatted, text table is like 50pixel wide in opera)
* at the end of the install process either mentiuon what files the admin NEEDS to remove for security reasons
* also: mention HOW the "admin" can log in for the first time, maybe offer a "Login now" Link
* lastly maybe offer suggestions in a "First Steps" paragraph, i.e. "how to add your first picture" (very much like your post here, just a little more explicit)

2.
* offering a link to either binaries is a must, preferrably in the configuration section of the respective module.

* testing the netpbm settings resulted in uncaptured errors:
Fatal error: Maximum execution time of 5 seconds exceeded in d:wwwgallery2modulescoreclassesGalleryPlatformWinNtPlatform.class on line 87

Fatal error: Maximum execution time of 5 seconds exceeded in d:wwwgallery2modulescoreclassesGallery.class on line 745

due to the fact that they were installed but the dlls were not in the windows path environment.
easily solved though. maybe add an error wrapper for this.

3.
* i didn't have a seach module oops.

4.
* no feedback that subalbum was created.
* no quick way to see what albums currently exist
* a clickable text tree view of currently available entries/albums would be desirable
* delete is not mentioning which item/album will be deleted.
* when editing album there's no admin link nor browse link, i.e. stuck at editing screen unless user clicks on "(no)" thumbnail link.

5-10. no major problems, could use clearer user guidance for the less experienced

All in all the "admin interface" needs a little work to be more intuitive for less experienced users, offer better and easier navigation in and out the different menus and sections and lastly a more comprehensive error wrapping in case something goes wrong.

More thoughts later. Must run.

Cheers
Alex. aka Ihad.

 
qumqats

Joined: 2003-05-03
Posts: 10
Posted: Sat, 2003-05-03 12:08
Quote:
Welcome to the first in a series of Gallery 2.x User Interface homework assignments. This is intended to get us all moving along the right path towards a fully functioning Death Sta- uh, "User Interface Team". You're encouraged to post replies to this with whatever thoughts cross your mind during this process.

Here's the first assignment.
1. Install Gallery 2.x

a.) download - no problem
b.) read README
ba.) #1 - already done
bb.) #2 - running setup/test/index.php ( http://outel.org/gallery2/setup/test/index.php ) returns the following error:
Error (ERROR_UNIMPLEMENTED)in modules/core/classes/GalleryStorageFactory.class at line 62
in modules/core/classes/Gallery.class at line 802
in init.php at line 127
in setup/test/index.php at line 30
in setup/test/index.php at line 10
bc.) hmm maybe something latter in the README will fix this.
bd.) #3 - create database - ok - done
bd.) #4 - create config.php - ok - done
be.) #5 - run setup/setup.php - it asks for a password and says it is defined thus:
$gallery->setConfig('storage.password', 'your password here');
in config.php. No such line exists. When I enter the setup.password it appears to like it and takes me to the next screen. This contains a link that takes me to the main page of gallery2
bf.) #6 - login - ok - done

Quote:
2. Configure it to use NetPBM or ImageMagick

The 'Modules' page has a column of 'Actions' that are links. You have a single link that does different operations depending on the state of that module. I think that a pretty strong argument could be made against this. A link should always do the same thing. True you're changing the text of the link, but I'd rather see sub-columns of links with all the 'install's in one colunm, all the 'configure's in another column etc. Something like the following:

install
_______configure
_________________activate
install
install
_______configure
_________________________deactivate
This makes it clear the state of the module, points out which ones need to be configured/activated, and removes all possiblity of confusion from multifunction links.
Is there a unix/windows portable way you could do a `which` and fill in a default Path on the configure screen?

Quote:
3. Enable the Search Module

ok - done

Quote:
4. Create a new sub-album

Ok - I go to the Gallery and look for the link. ! What? no link? what 'Action's can I do? ( action? operation? function? does anything sound better than 'Action'? )
I select 'add album' and it brings up a page.
I use the back action in the browser to take another look at the main Gallery page and discover than when I want to go back to the 'add album' page that I can't. You NEED to add a GO or SUBMIT button!!
When I hit the 'Create' button to add an album it takes me back to the same 'Add' screen. It should take me back to the Gallery that I just inserted the album into.
There isn't a link on the 'Add album' screen that will take me back to the Gallery.

Quote:
5. Upload a photo to the new album

Error (ERROR_TOOLKIT_FAILURE)in modules/imagemagick/classes/ImageMagickToolkit.class at line 229
in modules/imagemagick/classes/ImageMagickToolkit.class at line 105
in modules/core/classes/GalleryDerivative.class at line 473
in modules/core/classes/GalleryDerivativeImage.class at line 170
in modules/core/classes/GalleryDerivativeHelper.class at line 465
in modules/core/classes/GalleryDerivativeHelper.class at line 401
in modules/core/ItemAdmin.inc at line 83
in modules/core/classes/GalleryView.class at line 234
hmmmm is a 2.4meg jpeg too large? lets try something smaller is 620k small enough? Nope, still getting the error. Odd, ImageMagick passed the test on the Configure screen.

 
MiiJaySung

Joined: 2003-04-30
Posts: 19
Posted: Sun, 2003-05-04 14:08

I'm running Windows XP. Although I do use RedHat linux 9 as well, I tend to stick to windows, mainly because Windows has a slicker, smoother interface, and therefore nicer to use, and since XP is stable I personally don't see anything wrong with it for a desktop system (Admittly, Linux is better as a server).

Anyway, I could not configure NetBPM. Nothing would happen. Anyway, I got this error after clicking active.

Test: netpbm :: ActivateModule [1 iteration(s)]
Timing: 0.0111 elapsed, 90.49 per second
Error: Error (ERROR_BAD_PATH)
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesnetpbmclassesNetPbmToolkitHelper.class (gallerystatus::error) at line 153
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesnetpbmclassesNetPbmToolkitHelper.class (netpbmtoolkithelper::testbinaries) at line 70
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesnetpbmmodule.inc (netpbmtoolkithelper::getoperationsandproperties) at line 117
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestTestCaseActivateModule.class (netpbmmodule::activate) at line 34
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestTestCase.class (activatemoduletestcase::teststart) at line 13
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php (activatemoduletestcase::start) at line 217
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 159
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 44
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 8

Error (ERROR_BAD_PATH)
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesnetpbmclassesNetPbmToolkitHelper.class (gallerystatus::error) at line 153
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesnetpbmclassesNetPbmToolkitHelper.class (netpbmtoolkithelper::testbinaries) at line 70
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesnetpbmmodule.inc (netpbmtoolkithelper::getoperationsandproperties) at line 117
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestTestCaseActivateModule.class (netpbmmodule::activate) at line 34
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestTestCase.class (activatemoduletestcase::teststart) at line 13
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php (activatemoduletestcase::start) at line 217
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 159
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 44
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 8

Despite this, I managed to find the config in phpMyAdmin very quickly. I corrected the path from c:appsnetbpm to my path. Should the 's be escaped though ?

When I did a search, and put some in a keyword that was also used in the album name, I saw a bug where it said Description: A load of $`form.searchCriteria`

I used the word 'shit' as my keyword, and that should have come up instead of $`form.searchCriteria`.

Other than that, if you exclude the slow download time of my poxy 56k modem, that didn't take more than 20 mins, despite having to track down that error.

Oh, I can't seem to get thumbnails on NetBPM, is that just me, or is it cos I'm on netBPM ?

I'm trying to get imageMakic to work, but after correcting in the path in the SQL DB, it does this..

Test: imagemagick :: ActivateModule [1 iteration(s)]
Timing: 0.0225 elapsed, 44.4759 per second
Error: Error (ERROR_TOOLKIT_FAILURE)
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesimagemagickclassesImageMagickToolkitHelper.class (gallerystatus::error) at line 143
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesimagemagickclassesImageMagickToolkitHelper.class (imagemagicktoolkithelper::discovermimetypes) at line 48
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesimagemagickmodule.inc (imagemagicktoolkithelper::getoperationsandproperties) at line 117
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestTestCaseActivateModule.class (imagemagickmodule::activate) at line 34
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestTestCase.class (activatemoduletestcase::teststart) at line 13
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php (activatemoduletestcase::start) at line 217
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 159
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 44
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 8

Error (ERROR_TOOLKIT_FAILURE)
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesimagemagickclassesImageMagickToolkitHelper.class (gallerystatus::error) at line 143
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesimagemagickclassesImageMagickToolkitHelper.class (imagemagicktoolkithelper::discovermimetypes) at line 48
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2modulesimagemagickmodule.inc (imagemagicktoolkithelper::getoperationsandproperties) at line 117
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestTestCaseActivateModule.class (imagemagickmodule::activate) at line 34
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestTestCase.class (activatemoduletestcase::teststart) at line 13
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php (activatemoduletestcase::start) at line 217
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 159
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 44
in C:SoftwareInternetnusphereapachehtdocsscriptsgallery2setuptestindex.php at line 8

This is after clicking activate. It however says it's active.

Anyway, I've managed to do all 10, it's just werid thumbnails aren't working on me :sad:

 
mikepee
mikepee's picture

Joined: 2003-05-05
Posts: 2
Posted: Mon, 2003-05-05 01:46

It seems I get:
Error (ERROR_PERMISSION_DENIED)
when I try to do most things...

I have gallery installed on linux.
PHP 4.3.1 SQL 4.0.12 Apache 1.3.27

I have all the temp folders CHMOD 777.

All NetPBM's except tiff->ppm and ppm->tiff are working.

When I upload an image I don't get a thumbnail. I can only view the original image.

http://www.criscodisco.com/gallery2/
L: admin
P: crisco

See for yourself and let me know what's wrong.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Mon, 2003-05-05 02:30

Is your albums directory chmodded 0777 too (or data directory, whatever it is in G2 :))?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2003-05-05 07:10
mikepee wrote:
All NetPBM's except tiff->ppm and ppm->tiff are working.

When I upload an image I don't get a thumbnail. I can only view the original image.

When I hit "test settings" on your NetPBM site admin page it complains that it can't find any of your NetPBM binaries in /usr/local/bin. Verify the path to your NetPBM binaries and try again.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2003-05-05 07:15

Looks like people are making progress getting it installed. The feedback you're posting here is good. We have to learn from the problems you're experiencing and improve the product to get rid of them. Keep the feedback coming!

 
Ihad

Joined: 2003-05-01
Posts: 11
Posted: Mon, 2003-05-05 09:16

for some reason the netpbm timeout errors came back after installing the CVS versions 30.04. to 05.05.2003

as soon as I point to the the right netpbm path it results in timeouts. seems to be cmd command variable problems (double backslashes)?:
debug info:

(mysql): UPDATE g2_ModuleParameterMap SET
g_parameterValue='C:\\usr\\bin\\netpbm\\' WHERE g_moduleName='netpbm' AND
g_parameterName='path'

In debug mode I also noticed that forward and backward slashes are mixed together often, i.e. d:\www\gallery2\modules\core/classes/GalleryUser.class
while windows can handle this it may be better for consistency purposes to clean this up?

I was unable to get any CVS script later than 30.04. to work with netpbm. Once I set the path string to an empty dir I get the appropriate "failed" messages when testing the settings, as soon as it points to the binaries it will result in a timeout.

the html code for that page contains the following html syntax error:

<form method="POST" action="main.php" accept-charset="UTF-8"">

there's one " too many which points to a faulty $controller assembly.
error in GalleryTheme.class on line 179:
$result .= '">';
should read: $result .= '>';

that doesnt cause the timeouts though...

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2003-05-05 09:45
Ihad wrote:
for some reason the netpbm timeout errors came back after installing the CVS versions 30.04. to 05.05.2003

as soon as I point to the the right netpbm path it results in timeouts. seems to be cmd command variable problems (double backslashes)?:

Hmm. Look at the debug information where it's executing the NetPBM commands. Do you see anything unusual about that? There's a known (and unresolved) issue with executing NetPBM commands on windows where they time out. Have you tried ImageMagick?

Ihad wrote:
In debug mode I also noticed that forward and backward slashes are mixed together often, i.e. d:\www\gallery2\modules\core/classes/GalleryUser.class
while windows can handle this it may be better for consistency purposes to clean this up?

Yeah, I need to go through the code carefully and replace all the hard coded forward slashes.

Ihad wrote:
<form method="POST" action="main.php" accept-charset="UTF-8"">

I can't reproduce this problem. What's the URL you're on when you see this?

 
Ihad

Joined: 2003-05-01
Posts: 11
Posted: Mon, 2003-05-05 09:59

the trailing quote error is there since 15.04. CVS

url: http://localhost/gallery2/main.php?g2_view=core%3ASiteAdmin&g2_subView=netpbm%3AAdminNetPbm

if you check your GalleryTheme.class file on line 179 you see that you add a trailing quote to a <form> tag, yet you correctly enclose all open paramaters within the formtag so you'll always have a trailing quote too many due to line 179.

re: netpbm
this is very strange. I started with 15.04. CVS and had no problems with netpbm then
due to lack of a search module i downloaded the latest cvs and my troubles started.
I went back to 15.04. and still get timesouts now. odd.
the netpbm dlls are in the path setting: C:\WINNT\system32 directory

I can't give you any debug info since nothing happens once I press test settings. It will only result in the two already mentioned error messages (5sec limit)
here's the error.log from apache when hitting the "test settings" button:

giftopnm: Compiled Sun May 27 17:27:36  2001 by user "phumblet"
giftopnm: BSD defined
giftopnm: RGB_ENV='RGBDEF'
giftopnm: RGBENV= 'RGBDEF' (env vbl is unset)

it seems giftopnm is executed but aborted due to env "vbl" being unset?

I'll try imagemagick next.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2003-05-05 10:29
Ihad wrote:
the trailing quote error is there since 15.04. CVS

url: http://localhost/gallery2/main.php?g2_view=core%3ASiteAdmin&g2_subView=netpbm%3AAdminNetPbm

if you check your GalleryTheme.class file on line 179 you see that you add a trailing quote to a <form> tag, yet you correctly enclose all open paramaters within the formtag so you'll always have a trailing quote too many due to line 179.

You're absolutely right. It's weird, that doesn't show up for me when I view-source in Mozilla 1.3. I can only see it in IE! Argh. I've fixed it and will check in the fix shortly.

Ihad wrote:
re: netpbm
this is very strange. I started with 15.04. CVS and had no problems with netpbm then
due to lack of a search module i downloaded the latest cvs and my troubles started.
I went back to 15.04. and still get timesouts now. odd.
the netpbm dlls are in the path setting: C:\WINNT\system32 directory

That's the classic pattern with the NetPBM binaries. I can't explain it either.

 
Ihad

Joined: 2003-05-01
Posts: 11
Posted: Mon, 2003-05-05 10:37

weird, yes. but it really seems the cmd command is executed alright.

according to my apache logs giftopnm is executed but aborted due to env "vbl" being unset.

why this vbl is suddenly unset remains unknown :o

addendum:
netpbm timeouts only occur when I have a internet connection active.
as soon as I go offline (disconnect) netpbm works just fine.
once I reconnect to the internet, netpbm will timeout again.

Why? It's a mystery! :-?

---------------
ADDENDUM:

Error (ERROR_BAD_PATH)
in d:\www\gallery2\modules\core\classes\GalleryPhotoItem.class (gallerystatus::error) at line 119
in d:\www\gallery2\modules\core\ItemAddChildren.inc (galleryphotoitem::create) at line 109
in d:\www\gallery2\main.php (itemaddchildrencontroller::handlerequest) at line 131
in d:\www\gallery2\main.php at line 24

This error results due to a php.ini setting or lack of thereof:

You MUST SET a temp dir for upload with FORWARD slashes! i.e. look at your php.ini lines:

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir =d:/temp/

NOTE:
a) will not work with backslashes: d:\temp\
b) will not work if not specified, i.e. systemdefault

debug info when trying to add a file/picture in G2:
a) file_exists(d:tempphpAC.tmp)
b) file_exists(C:WINNTTEMPphpA8.tmp)

HTH

 
Ihad

Joined: 2003-05-01
Posts: 11
Posted: Mon, 2003-05-05 12:01

back to the #tasks:
8.
* add user to group needs to be more elaborate, i.e. list current users and their group associations and change/assign/remove group associations for single or multiple users in one screen
i.e. users 1 to 20 = 1 screen, 21 - etc.
sortable table: (username/groups)
clickable username | assigned groups as dropdown list entries | checkbox

checkbox is there so people can perform actions for all checked users.
once you click on a user you get the userdetails and can modify group settings for that user there. if more users were checked admin should have the option to either set group settings for all checked users as current or edit settings for all checked users separately one after another until all checked users are changed.

9. same as 8.
once you have 200 users it isn't very practicable to have a single text entry field where you enter a username. a more sophisticated way to handle users is needed. even dropdown lists will not be practicable for larger userbases. phpBB2 has a lookup feature which helps but also isnt quite as effective as one wish.
Best would be to offer a "userbrowser" where admins can pick users from a sortable list (sorted by users/groups).

10.
more elaborate search options, e.g. search within albums, include/exclude search parameter options.

Again, a more stringent way to display results of actions is needed. Often the script does not tell if an album was crerated etc. (see first comment)

off for lunch.

cheers.
Ihad