Call for Alpha Testers: ImageAreas Module (for Facebook/Flickr Style Tagging)
phinze
Joined: 2008-03-30
Posts: 40 |
Posted: Thu, 2008-06-26 19:06 |
Dear Adventurous Taggers, I am now in Phase 4 of my development process, and the ImageAreas module is ready for people to check it out and give some feedback. If you'd like to help out your friendly neighborhood GSoC student, OR want some say in how the module develops, OR have some interest in checking out the future of Gallery2 technology, please take ImageAreas for a spin! Here's how to do it:
I know the UI needs work, and there are plenty of features that still need implementing. I will be developing this thing on a daily basis, so I will be in close contact with anyone who is interested in alpha testing. Thanks in advance for any help you can offer, Gallery People! Paul Hinze |
|
Posts: 4342
Ok...
The module installed ok - I've added it to the theme's (Matrix) first photo pages, then sidebar and ... nada. Not seeing anything different to pre-install - what am I looking for?
Edit: just to fill in a couple of gaps: that's nothing happening on Firefox (v2), IE7, Opera 9.24 or Safari 3.1.1. The block is loading, and according to Firebug, various bits of ImageArea.js are executing.. I just don't see anything (not sure what I'm looking for TBH.)
Edit again: more stuff that might be relevant: Gallery 2.2.4, running on XAMPP (php 5.2.4, apache 2.2.6) on Win XP.
Posts: 40
And the grand opening of the module involves... nothing! Not exactly a strong first showing. :-/
When the block loads you should see a bar of buttons show up above your image on the photo page. You've reminded me of a major hack that I forgot about, which is that to identify which image gets the interface applied, it currently uses purely the size of the image. Gross, I know.
So, two questions: (1) do you see any buttons above your image on the photo page? (2) is your default view size on your photo page set to less than 300x300?
Finding the main photo in the JS DOM is an issue that I need to fix ASAP... I'll put it up to the top of the list.
Thanks for braving the frontier alecmyers, and kudos for providing so much testing data!
Posts: 27300
I was able to install it on G2.2.5 but it would not show up. No buttons above the image. No JS errors. JS seems to load fine.
So it seems it is not compatible (yet) with G2.2.5
Photo in question: http://langleycom.com/gallery2/v/9979-P10.png.html
I see the AJAX "loading image areas...." but that is all.
----------------------------------------------
I was able to install it on G2.3(nightly) and Was able to add notes.
Image in question: http://4megs.com/gallery2/v/User_data_admin.png.html
The admin is able to add a image tags but when I log out the tags seem to not be saved.
Users ( not logged in) can add tags but if you refresh the browser they are gone.
Hope that helps.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 40
Amazing how humbling releasing your work to the public can be...
Floridave:
r1475 has a fix in the scaleFactor calculation for a bug that was preventing notes from being properly stored. that should fix the problem on the G2.3 nightlies. As for G2.2.5, the error it's throwing is the following:
I will get a G2.2.5 install tomorrow and track this one down.
It was so helpful that you provided live links, floridave... many thanks!
----------
Alecmyers:
If you have Firebug, go to the "Console" and look for "Post" operations being made... each of these is an AJAX request, and if you expand those you should see what the server is responding. That would be where the useful debugging information is. (Granted, this should not be the case... the module should not silently fail and require Firebug to find out what went wrong... I'll work on this too.)
Thanks again guys!
Posts: 27300
phinze,
r1475 fixed the storage issue.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 32509
To get more feedback, I'd put a G2 installation online with some test albums / photos and give image tagging permissions to the public for some sub-album. or to registered users and enable self registration.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 4342
here's the error then:
getCodeBasePath was added at Gallery Core API 7.19 (http://codex.gallery2.org/Gallery2:API_Changes_Since_The_Last_Release#7.18_.3D.3E_7.19)
The module.inc requires only API 7.10: (line 43)
Posts: 4342
More random thoughts... how about using a single image for the "Add Note ... Hide Notes" bar - or a sprite arrangement? Also do you have a mechanism in mind for localisation of the text on it? (Different gifs in the language packs?)
Also (maybe getting way too far ahead at this point) two different permissions would be useful - one to set notes, one to view them.
Posts: 40
r1476 removes the use of getCodeBasePath.
r1476 also solves an issue with scaleFactor that was preventing the coordinates of the image areas from being displayed correctly... I very recently got scaleFactor working (it use to always be set to one), and so having a real scale factor forced me to make the rest of the calculations work. ;)
I now have a release copy of G2.2.5 I'm testing on in addition to the latest SVN, and everything seems to be working from here now. Looking forward to see whether or not it's working for you all... this has been really helpful!
Good idea! I'll set up a demo installation and link it here when it's ready.
Once we get the major kinks out we can then turn to the more interesting details like how it should work.
Posts: 4342
Great! r1476 seems to work nicely on Matrix theme. Works happily for different sizes of the same image etc. Also given it a quick run in Siriux - works well there too.
Are you ready for UI suggestions? I have a few - but don't want to throw them in until you're ready.
Posts: 4342
Actually I lied ... it sort-of works with Siriux, but it destroys the css formatting of the image - I'm not quite sure, but it looks like what was a
without the ImageAreaSupport block somehow gets transmogrified in the javascript to just a plain
So I lose a whole load of formatting (specifically in my case the border from the stylesheet). If I put the class back into the html (with Firebug) I get my border back.
Also I lose the rather useful forward/back arrow links that in Siriux are overlaid on the left/right halves of the image. I can see that might be a little hard to maintain though.
Posts: 27300
I think that it would be good to have another Student have a quick look see. Perhaps the season of usability student can add his comments if he has time? I will ping him.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 1
Hello Paul,
thanks for your great work! I LOVE the idea of having tagareas in Gallery
Since r1477 its working for me on 2.2.5!
I had a little problem with number formating of the scale factor, though:
Because my server runs with german locales, the comma seperator therefore is ",".
In file classes/ImageAreasImage.class, function _calculateScaleFactor(), the 2 lines for division return something like "0,25":
You could test that on yourown with something like:
So the ia-scalefactor-span looks:
But this results in JavaScript-Error in imageareas.js, cause parseFloat("0,25") results in "0" and sFact in imageareas.js gets NotANumber (NaN).
A possible workaround is using number_format() in ImageAreasImage.class:
number_format() returns "."-separated numbers even with german locales.
Besides that it works great now!
Tested with Firefox2 and Konqueror 3.5.
Looking forward to tag- and edit-permissions for tag-areas
Thanks,
Lars
Posts: 40
Here's the latest commit. Solves many issues mentioned above. Take a look!
r1479 now preserves the class information from the img tag, which makes the border come back in Siriux, but the image still loses its position in the center of the screen because the UI changes the way the stylesheets cascade. I haven't yet attempted to preserve the arrow overlay controls either, but it's on my list of things to look into.
Thank you for so accurately describing the problem as well as solving it! r1479 has your fix in place and it looks like it works great.
Good idea! Any word from jhilden? I can get in touch with him if you haven't had the chance.
---------------
All: Please play around with user permissions and give me your feedback on the idea of moving the UI to the imageLinks menu. I appreciate your restraint on more detailed issues while I've gotten things at least mildly stable, but I think I'm ready for everything you've got: any and all suggestions are welcome whenever they pop into your head!
Posts: 73
hello phinze... some alpha feedback:
when using the ICE theme, the module forces gallery2 to return a blank page when trying to edit the album.
I noticed this after setting the image areas block up in admin > themes, but had to change the parent album theme settings correspondingly as it was set to something other than default ( block did not show up).
please try testing this and resolving the issue.
my gallery version info follows:
Last Run Details:
Gallery version = 2.2.3 core 1.2.0.5
PHP version = 5.2.5 apache2handler
Webserver = Apache/2.2.6 (Unix) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e PHP/5.2.5 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7
Database = mysqli 5.0.51, lock.system=flock
Toolkits = ArchiveUpload, Dcraw, Exif, Ffmpeg, Getid3, LinkItemToolkit, NetPBM, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux Knoppix 2.6.19 #7 SMP PREEMPT Sun Dec 17 22:01:07 CET 2006 i686
Default theme = *********
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Rows in GalleryAccessMap table = 38
Rows in GalleryAccessSubscriberMap table = 2531
Rows in GalleryUser table = 49
Rows in GalleryItem table = 2496
Rows in GalleryAlbumItem table = 101
Rows in GalleryCacheMap table = 0
Posts: 73
it blanks the screen in matrix as well. obviously not a theme specific problem here.
Posts: 40
I installed the ICE theme on G2.2.5 release and attempted to recreate the problem you mention. I encountered the following warnings in debug mode whenever I attempt to save theme settings:
(My guess would be that these notices are due to the fact that they are defined as settings with a blank type in ICE's theme.inc.) Other than that I can't seem to recreate the problem you're talking about, even going through the steps you mentioned. I set the root album settings to something different, installed the module, added the block to the default theme settings, went back to edit the album, and set the photo blocks to use global settings, and now I have everything working on the ICE theme. I haven't seen any problems on Matrix either. While I doubt it, I wonder if this is a G2.2.3 issue? Perhaps try upgrading to G2.2.5?
Once you can get debug mode activated, the error will show up and I can help you better.
I'm with you; I'd like the UI to conform to Gallery conventions as much as possible while remaining easy to use. I like the idea of the UI being contained in a block, and I'll look into it.
------------------
Still working on getting a demo installation live. Soon soon!
Posts: 73
yeh sure i'll stick it in debug mode and see what pops up. yeh its an older version - i need to upgrade really anyhoo so i'll sort that out soon guys. i can see the buttons come up above the picture also - but they don't do anything, apart from the edit one, which forces a popup with a msg in.
anyway i'll write back with this debug thing shortly. laters.
Posts: 82
I tried it on a couple photos - I get a pop up that says Edit! and when I hit the OK button, it takes me back to my main gallery page
[img]http://lh4.ggpht.com/caddymob/SGmnNC66CPI/AAAAAAAANcs/qWFdtYj4pwY/ImageArea.jpg?imgmax=640[/img]
_______________________________________
Highly Dynamic Photography | Jason Corneveaux
Posts: 41
Cannot install this badboy. I have a multi site install. No luck
Error (ERROR_COLLISION) : Duplicate permission id: imageareas.add
* in modules/core/classes/helpers/GalleryPermissionHelper_advanced.class at line 751 (ImageAreasModule::error)
* in modules/core/classes/GalleryCoreApi.class at line 846 (ImageAreasModule::registerPermission)
* in modules/imageareas/module.inc at line 153 (ImageAreasModule::registerPermission)
* in modules/core/classes/GalleryModule.class at line 160 (ImageAreasModule::upgrade)
* in modules/core/PluginCallback.inc at line 236 (ImageAreasModule::installOrUpgrade)
* in modules/core/PluginCallback.inc at line 73 (PluginCallbackView::handleCallback)
* in main.php at line 433 (PluginCallbackView::renderImmediate)
* in main.php at line 94
* in main.php at line 83
* in main.php at line 3
System Information
Gallery version 2.2.5
PHP version 5.0.4 cgi-fcgi
Webserver Apache
Database mysql 5.0.27-standard
Toolkits Thumbnail, SquareThumb, NetPBM
Operating system Linux leaf.lumiere.net 2.6.12-2.6.12-1.1456_FC4-leaf #1 SMP Sat Dec 31 18:06:18 EST 2005 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0
Posts: 73
ok, here is my debug file. i've starred a few things out e.g. the theme name because it contains top secret identifiable information hehe. here it is:
Posts: 82
^ I had no idea the pentagon uses Gallery
_______________________________________
Highly Dynamic Photography | Jason Corneveaux
Posts: 73
yes. it does. the nsa uses it to keep a database of terrorist faces and we've recently written a new module that can accurately track and detect terrorists at the border with an accuracy rate of 99.95%. this helps us to reduce the terrorist rates domestically, and across the middle east. i'll pm you the module if you like/
needless to say that was complete dross what i just wrote heh
Posts: 73
some nice photography on your site there caddymob. sorry for digressing phinze!
Posts: 82
I always knew gallery was teh awesome. I suppose I could use it to help me remember one night stands just as well.... I tease!!!
Posts: 82
Thanks tsfftf!
Ok, back on task. I played around a little more and heres what I found--
On this image: http://www.corneveaux.com/gallery2/v/GE2/Swirls+of+lift.jpg.html
I guess I did apply an image area. When I click 'add imagearea' i get booted back to my home page (debug on but no output). If I go back to the image, I see I can 'Edit Imagearea', but when I click that I get the same kind of drop-down as my screen shot above, and get booted back to the homepage... Same happens when I 'delete imagearea'.
In summary, add, edit or delete ImageArea just sends me home, no debug errors.
Here is my config:
Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.2.6 cgi-fcgi
Webserver = Apache/2.2.8 (Unix) PHP/4.4.7 mod_ssl/2.2.8 OpenSSL/0.9.8c mod_fastcgi/2.4.6 DAV/2 SVN/1.4.2
Database = mysqli 5.0.45-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, Gd, ImageMagick, NetPBM, LinkItemToolkit
Acceleration = none/900, none/900
Operating system = Linux dillinger 2.6.24.6-p4-modules-peon-grsec #1 SMP Thu May 15 22:08:43 PDT 2008 x86_64
Default theme = carbon
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0
Rows in GalleryAccessMap table = 105
Rows in GalleryAccessSubscriberMap table = 3347
Rows in GalleryUser table = 30
Rows in GalleryItem table = 3300
Rows in GalleryAlbumItem table = 66
Rows in GalleryCacheMap table = 0
_______________________________________
Highly Dynamic Photography | Jason Corneveaux
Posts: 73
any updates on my debug message phinze?
Posts: 40
Sorry I've been AWOL a few days, folks, but now I'm back in action!
This was before the itemLinks on the left were properly wired in. In r1487+, these links should work. There was a difference in the way that g2.2 and the SVN versions handle the links that I've now solved. Try and give it another shot with the latest version, caddymob. Remember that you have to add the "Image Areas Support" block to the photo page for your theme!
I just tested the latest version on a multisite install of g2.2.5 and I had no problems, can you give me a little bit more detail on your setup?
I've looked over the debug information you've provided and unfortunately I'm not seeing anything that's clearly wrong. Can you try and grab the latest version of the module and give it another shot and describe what happens here?
-------------
Also, for those of you without the time or the inclination to set up a test environment, I've installed the latest version of the module to a small web space that you can register an account at and tag away to your heart's content:
http://sandbox.phinze.com/g2.2.5/main.php
Posts: 73
sure will. i'll post back when done/
Posts: 4342
I think it would be nice to be able to drag out a new imagearea, rather than have to move a new one from the default middle position and then resize it. Any chance?
Posts: 27300
Since this is a 'block' each album could have different behavior. One setting could be showing the notes on mouseover of the image and not having the 'show notes' link. Similar to:
http://www.23hq.com/mygdal/photo/307538
I like the 'Tagged Areas: xx' under the thumb. Is that just added to the iteminfo block?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 82
Checked out revision 1498.
Looks good!! Here is a test image --
http://corneveaux.com/gallery2/v/Hunts/SINGLES_002_001.jpg.html
My only critique for now is to maybe make it more like Flickr -- the imagearea shows up only when the mouse is hovering over the image, then disappears. However, I'm sorta on the fence about this -- I also like the idea of having the imagearea with an on/off switch. Guess we need more votes/input ---
Nice work Paul.
Posts: 41
I attempted to load the demo site at:
http://sandbox.phinze.com/g2.2.5/main.php
and IE 7 had an error on the photo page. The gallery main page and thumbnails loaded fine.
It was the photo page when I got the popup error and the photo would not load at all.
Below is the error message:
"IE cannot open the internet site http://sandbox.phinze.com/g2.2.5/v/waldo/maze07.jpg.html.
Operation Aborted"
So then I opened Windows Safari and the photo page with the imagenotes loaded fine. And from what I experienced in Safari it worked great but not in IE.
http://sandbox.phinze.com/g2.2.5/v/waldo/maze07.jpg.html
I am really looking forward to the finished product. Keep up the great work Phinze.
July 11 at 6:05am EST
Posts: 4342
I had a thought. I'm putatively working on a module which should allow custom crops and other image operations to be stored as derivatives. Although all derivatives usually are just resizes of the main image I don't think this is a strict requirement. Will imageareas correctly display on a derivative that features only part of the main image?
Posts: 344
Hey guys,
I'm so looking forward to this! It would help my visitors tremendously for the kind of Gallery2 website I have. So, I await any updates to this. Thank you Phinze for your dedication and hard work.
I tried to load the demo from caddymob and I just got a bunch of errors...I think authentication error and something about session data. Happened to all my browsers: Safari, FF, IE6
But, this link works for me: http://sandbox.phinze.com/g2.2.5/v/waldo/maze07.jpg.html
Looks awesome!!!!!!!!!!!!
Posts: 73
just been on the phinze.com demo. will this module actually be able to select users from the DB? it looks like a replica of the fotonotes so far... i thought this would develop more like the attempt by netbear???
Posts: 40
You're right, now comes the time when I start adding Gallery specific features. I have been reworking some of the code in the background to try and get in to better conform to Gallery standards, and that has slowed me down a bit. Your comment has gotten me back on track, though, and I'll get back on the feature push right away.
Posts: 82
skunker, chasix -- Thanks for the heads up -- it works for me in Firefox 3 in OS X, but I get the error in FF3 in windows XP, but the image will load. In IE7 the error prevents anything from loading (damn you Gates!!!)
Sorry guys, I had to turn off imageares for this reason. I had a customer email wondering why my website had errors on every page...
_______________________________________
Highly Dynamic Photography | Jason Corneveaux
Posts: 40
All you people experiencing problems on Windows browsers: I'm in the process of building myself an XP virtual machine, so I will be able to better address the evils of Windows and its pal IE soon.
Lots of progress today, getting through the list of code improvements to make in preparation for adding new features. Notable additions today (as yet uncommitted):
I'm out of town for the weekend, so probably not much coding, but I'll be on the InterWires I'm sure.
Posts: 344
I look forward to the updates, thanks
Posts: 40
Making good progress today. Here's the latest commit to SVN:
Posts: 40
Just a status update. Successfully refactored JS into better object oriented notation. It's still a bit of a rat's nest, but the overall structure is much better and the line for line quality is improving slowly.
Big news is this: As of r1517, I do believe I've tackled basic MSIE support. Tested on both 6 and 7. Give it a shot!
Now that things are getting more stable, time to work on adding features...
Posts: 344
I'm looking forward to it! I don't know how to use the SVN stuff,,,im such a noob, but I'll keep watching this thread. thanks.
Posts: 82
Hey skunker... Are you on a PC or a Mac? SVN is actually really easy either way -- send me a PM if you want I can try to help you get it figgured out, and let the developers keep doing their great work...
_______________________________________
Highly Dynamic Photography | Jason Corneveaux
Posts: 73
please review my errors phinze- this is in a modified matrix theme, only text fonts are changed really. the latest 1517 commit blanked this time when i tried editing the root album - the same problem as the last version, but allowed editing under my modified matrix, unlike last time. this is the error i receive when trying to add an image area:
Error Detail -
Error (ERROR_BAD_PARAMETER) : /UNIONFS/opt/lampp/htdocs/gallery2/modules/imageareas/AddArea.inc
* in modules/core/classes/GalleryView.class at line 182 (GalleryCoreApi::error)
* in main.php at line 318 (GalleryView::loadView)
* in main.php at line 94
* in main.php at line 83
System Information
Gallery version 2.2.4
PHP version 5.2.5 apache2handler
Webserver Apache/2.2.6 (Unix) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e PHP/5.2.5 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7
Database mysqli 5.0.51
Toolkits Thumbnail, SquareThumb, NetPBM, Gd
Operating system Linux Knoppix 2.6.19 #7 SMP PREEMPT Sun Dec 17 22:01:07 CET 2006 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0
i have "Image Tags" module installed - the netbear one - would this have any effect upon your module?
Posts: 40
I'm still not sure I understand what you mean when you say "blanked this time when I tried editing the root album" ... the ImageAreas module does not in any way attempt to modify the "Edit Album" page in Gallery. Can you give me the exact steps you take to get a blank page so that I can reproduce this error?
You will receive that error when the JavaScript in the "Add ImageArea" link falls through and the href attribute (which is bogus). I've gone to great lengths to try and make sure that the JS always returns false and therefore prevents the link from going through, but it looks like in your case it's still happening. r1518 has a kinder, gentler error message for when that does happen.
That shouldn't cause any problems, but it's hard to be sure.
Two more questions for you tsfftf: what browser are you using? and, is it possible for you to tar or zip up your entire gallery install and send it to me somehow? I'm thinking that might help me really get to the bottom of what's happening for you.
Posts: 4342
I've just had a crack at r1522, now on G2.3, in firefox 3: I get two errors on loading a photo, here's a screenshot of what's going on. (This is the same page loaded twice - the first shot is the first error, the second shot is the second error, the third shot is the firebug console of the async call from the javascript.)
Some problems with the itemLink icons too. (Not sure why they're there... I don't have icons active anywhere else on the site.)
I'm not sure if this is any help, but it can't hurt, can it?
Trying the same page in Opera: page loads ok (still have the problem with the repeated icons) but any of the itemLinks sends me to your fall-through ImageAreas Module Error page.
Safari (3.1.2) gives a JSON.Parse error in a dialog box.
IE7.... gives the JSON.Parse error ... then refuses to action any mouseclicks across the entire site, even when IE is killed an reloaded, until Imageareas is uninstalled. :-/
Posts: 4342
This time, With Norton Internet Security disabled, it works somewhat better.
Firefox still gives an error, but clicking through that and it works. (ia3.jpg)
Safari: no errors, seems to work smoothly
Opera: drops through to the ImageAreas Module Error page with any of the ItemAction links
IE7: (having uninstalled/reinstalled ImageAreas module to get control back again) loads the page ok, then clicking add imagearea gives this error (ia4.jpg) after which I lose clickability over the entire site again, until the next uninstall/reinstall cycle.
Hope that helps
Posts: 40
alecmyers,
As usual your help has been invaluable in getting the bugs worked out of each new feature I add. I believe I've addressed all of the issues you've brought up in this revision:
Please check out the latest version and make sure I've gotten everything right.
The framework is beginning to come together for integrating comments and tags, so stay tuned!
Posts: 4342
Progress is definitely occuring. Looks much smoother. I'll try to break it again later today!
Is now a good time to ask if "Add image area" could be done by dragging-out the required area with a cross-hair cursor after which (on mouse-up) the add-a-comment-box can appear? Can't remember if I suggested it already - just a thought.