[Tags] New Module for Gallery 2.2
Termitenshort
Joined: 2005-10-09
Posts: 1894 |
Posted: Tue, 2007-03-20 20:12 | |||
Hello All Fellow gallery users !! I have been working for some time on a good Tags module responding to a need of improving the current keywords management that was not as scalable and so here it is finally for you all to test out !! Please keep in mind these few things: - I made it for Gallery 2.2 *may work in 2.1 but I have not tested it at all* If you want to see what it looks like before installing: Screenshots on my site. Current features: What DOES NOT work yet Feel free to comment or let me know if you have any questions/requests See you all !
|
||||
Posts: 27300
Looks great.
I FTPd the tags directory to to the modules directory.
Site admin-> plugins ...Activated the module. It activated: good so far.
went to an item selected edit item I saw the tag tab...and as soon as I clicked on the tag tab I got a error.
full error in debug mode attached but the summary:
Perhaps a mysql version issue?
--------------------
Gallery version = 2.2 core 1.2.0
PHP version = 5.1.4 apache2handler
Webserver = Apache
Database = mysqlt 4.0.27, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, LinkItemToolkit, NetPBM, SquareThumb, Thumbnail, Gd, Ffmpeg, ImageMagick
Acceleration = none, none
Operating system = FreeBSD host401.ipowerweb.com 4.11-STABLE FreeBSD 4.11-STABLE #0: Wed Apr i386
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2
Rows in GalleryAccessMap table = 27
Rows in GalleryAccessSubscriberMap table = 60
Rows in GalleryUser table = 3
Rows in GalleryItem table = 56
Rows in GalleryAlbumItem table = 9
Rows in GalleryCacheMap table = 0
----------------------------
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
I am able to go to the tag settings admin page and save results.
I get a error when going to the Tags Management link
Posts: 1894
Hello Dave,
After a little searching on the web it seems that you are right. this
ORDER BY count(g2_TagsMap.g_itemId) DESC
is not valid in mysql 4.x, I'm not entirely certain when it starts being available as I use 5.0.27 ....I found a bug report for the same issue and implemented this as a fix in there, please try the enclosed file and let me know so I can simply release a new version
For the curious, the bug report
Thanks !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 13451
Get this into DP now!!
Also, integration with the keywords module would be useful. I have a lot of images "tagged" with Keywords, and if I add your tags to the images it shows up double ( http://h0bbel.p0ggel.org/gallery2/main.php?g2_view=tags.VirtualAlbum&g2_TagName=Fredrik ). I would love to be able to import the keywords as tags to be able to unify this.
h0bbel - Gallery Team
If you found my help useful, please consider donating to Gallery
http://h0bbel.p0ggel.org
Posts: 1894
Lol ! and how ?
I thought the keywords module was not meant to scale up and that's why there was a request to make it so. This is the original reason I started this . Also if I import the keywords into the tags then I would also have to remove the keywords to avoid double up (like you mentioned). I'll create 2 maintenance tasks for this.
PS: which version of mysql are you using ? did you try the new TagsHelper.class ?
See you !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 13451
Termite: Talk to mindless. He could set you up with a code repo in gallery-contrib, and DP would happen all on it's own.
I'm on MySQL 5.0.32, and I didn't test the new class.
h0bbel - Gallery Team
If you found my help useful, please consider donating to Gallery
http://h0bbel.
Posts: 27300
Termite: Much better with the new class. I was able to get both admin sections and I was able to add a few tags.
however when I navigated away from the page I got this error in debug:
I am able to navigate back the the site admin page (not able to browse any items) and deactivated the module. I was then able to browse the albums again.
I reactivated the module and was unable to browse, getting the same error.
This looks promising. Sorry for the old SQL version.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 8601
Termite.. I fully agree with h0bbel. Looks like you're already setup to use gallery-contrib. Just commit your module into gallery2/modules/tags then cd ../.. and do perl $pathToRealG2/lib/tools/bin/makeManifest.pl -p modules/tags
This will write a MANIFEST file in your directory which you can then add to svn. Updating and committing the MANIFEST file is what triggers a new build for downloadable plugins / community repository.
Posts: 32509
some suggestions:
- i'd add a tag.add permission such that you can give visitors / users the ability to add tags without giving them the permission to mess with the item itself.
- a "add tag" item action link or even a AJAX based add-tag UI below thumbnails would be cool.
- it looks like this kind of UI doesn't work if there are 100, 1000 or 10000 tags.
http://www.termitenshort.com/projects/main.php?g2_view=core.DownloadItem&g2_itemId=138
maybe there should be a list of the 20 most popular tags + an auto-completion box (use YUI! use auto-complete)
some sites show a list of similar already-existing tags when trying to add a new one to minimize duplicate /similar tags / typos.
- @tag-cloud: are you using the same HTML / approach as we do for the keyword cloud of g2.2's keyalbum module? i spent some time improving it for g2.2.
looking forward to seeing this in DP.
you have svn write access to gallery-contrib on sf.net. please add your module at trunk/gallery2/modules/tag.
--------------
Doumentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 1894
Oki I'll work on this in the week-end (I need to set it up on my linux box)
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 1894
Hello Valiant,
I was thinking about that, but if you don't have edit rights, would you still be able to get to that page at all (since it's an edit plugin) ?
I'll think about this ... it could be indeed very nice
This UI is gone (old screenshot), the new UI is like you said 1 part wher you add/remove tags to this item, 1 part where you see the most popular tags (all or limited - to be chosen in the admin panel), see this and this
Yes, I did not want to reinvent the wheel and it sure looked nice as it was so I used it . I realy only made a different UI and added the scalability with the new tables.
I'll write it to SVN now, but I'll have to create the manifest Saturday.
See you !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 1894
I didn't forget about you, I'm thinking of a simple way to solve this and I think I have an idea
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 1894
btw Dave,
Did you try to de-activate the summaries in the tags module to see if you were able to navigate to the albums/items ?
Let me know
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 27300
Now that you mention it. Yes.
If I add a tag through the 'Tags managment' link I am able to navigate the site, but get the error on clicking the 'tag' tab.
If I enable any of the checkboxes in the 'tag settings' section I am unable to navigate the site.
Sending you URL and login info for my test site.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 1894
So I think I got it.
Can you try this new revision of TagHelper.class ?
Thanks!!
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 1894
Valiant, Mindless,
I tried creating the MANIFEST with windows and I got this:
Am I doing something wrong ?
I'll try again with linux Tomorrow or Saturday (like I originally planned )
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 8601
nice, got it into gallery-contrib very quickly
see http://codex.gallery2.org/Gallery:Using_Subversion for some info on svn settings to get the right svn properties on the files (in future, I fixed all the files you added).
your command above is correct, but String::CRC32 perl module is required. I added an initial MANIFEST for you, but you'll want to get that working so you can push DP releases yourself...
thanks Termite!!
Posts: 27300
Termite, That works!
One small issue (only in debug mode) view my test site and you will see a 2 notices:
Notice: Undefined index: description in ......public_html/gallery2/modules/tags/VirtualAlbum.inc on line 68
Notice: Undefined index: themeSettingsId in ...../public_html/gallery2/modules/tags/VirtualAlbum.inc on line 104
This is going to be cool!
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 32509
Termite,
@perl String::CRC32
if you're not used to perl, you can install it easily with CPAN.
an example:
http://www.innerjoin.org/perlDesk/howto.html#cpan
nope, you can't access the item admin pages without edit rights.
you'd need to create a module page or so.
using an AJAX based item-summary interface à la the ratings interface would be an alternative approach.
cool. that should indeed work pretty nicely!
does the keyalbum module offer anything this module doesn't offer?
if not, we'll need to think about importing keywords into your tag module since most users will want to use the tag module instead.
--------------
Doumentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 53
As a new user it's great to see continuous development. Thanks to all. Keep up the good work!
Presa Canario
Posts: 1894
Thanks mindless . I guess using windows for my dev work isn't the best but I'll get that resolved.
Thanks !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 1894
Sweet !! I also think the new queries are even faster than before
Alright I saw these, I'll check why this is happening.
Thanks again !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 32509
Termite,
> I guess using windows for my dev work isn't the best but I'll get that resolved.
I'm using Windows for development as well.
for things that need to be done in the command line, i'm using cygwin (on windows).
--------------
Doumentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 1894
Thanks for that, i should be able to get CRC32 thing and create MANIFESTs
Ok I'm sure I can get that done, I have done the same for the ajax cart I made (btw it works great now )
- I did see the cloud being a block so it could be put everywhere
- Maybe I need to create a small maintenance task to move(or copy only) keywords -> tags
I'll check the keywordalbum module for the rest
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 1894
UPDATE:
- I have setup my linux box to create the MANIFEST (the windows one wouldn't cooperate, got fed-up :D:D)
- I have fixed the small warnings that Floridave found and I'll be uploading v 1.0.2 tonight to the gallery-contrib.
Changes - next release:
- 2 bocks, "Item Tags" & "Tag Cloud"
- "Item Tags" allow to display the tags for the current item and links to the respective virtual album
- "Tag Cloud" is a Tag cloud as a block that can be limited (# of tags) and displayed any place
- Maintenance task to copy the keywords into tags for each item, will not overwrite existing tags and will not duplicate
- album propagation functional
Few more tests and I'll upload v 1.1.0 with these new features
See you all !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 27300
Thanks for the great work,
fingers on the
buzzersDwnPlug button!Dave
_________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
I have created a skeleton codex page:
http://codex.gallery2.org/Gallery2:Modules:tags
now we need a new volunteer to add to it. Every little bit helps.
Even if you have no coding skill you can update the codex. Just login and you can edit.
This volunteer work is invaluable to the team and keeps the devs doing what they do best; coding (not writing documentation)
Any takers?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 1894
Thanks a million
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 1894
1.0.2 should be in SVN,
Can you guys verify:
1. That it works
2. That I have the right MANIFEST
3. That I setup my SVN client right
Hopefully I'm now all set and I should be putting 1.1.0 before sunday ends
See you !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 19
I have installed the Tags Module v1.01 in my installation and it works!
One issue though: The module doesn't take permissions into account? I have 1 public album, the rest can only be viewed when logged in. Clicking on the "tag cloud" icon underneath the public album when NOT logged in I get the tag cloud. Clicking on any of the tags I get a virtual album with pictures that should only be viewable when logged in.
Posts: 1894
Interesting, I;'ll take a look at that
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 27300
Yes it works so the rest must be right
upgraded via DP:
version 1.0.2 (build 967)
I think the cron job to update the DP list is only once a day.
Some UI suggestions to follow in a day or two.
Dave
___________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 1894
Yes the module does not take rights into account, fishy .... I fixed it and will be releasing the new version tomorrow or today time permitting
See you !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 19
I tried upgrading the Tags module today. I clicked on "get more plugins" which showed that there was a newer module (1.1.1 vs the 1.0.2 I already had installed). When upgrading the module, the orange bar went from left to right, but nothing happened after that. I was however able to go to other parts of Gallery that all work fine. If I now go to the "plugins" module with the list of installed plugins, the tag module is listed with the "upgrade required" icon. I click on the "upgrade" action, the line goes green and seemingly nothing happens. If I tail the error log at the same time, the following line shows up every time I click upgrade.
PHP Fatal error: Undefined class name 'tagshelper' in /path/to/gallery2/modules/tags/module.inc on line 182, referer: http://photo.graabek.com/admin/?g2_subView=core.AdminPlugins
It should be noted that I'm running in multisite mode, so TagsHelper.class which I'm guessing is needed is located at a different URL
Posts: 1894
Hello,
There is an error in the module.inc file that I just corrected, if you are using SVN, you can download it immediately, if not you'll have to wait for the cron job to run and 1.1.2 to show up
Thanks!
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 13
One thing that I noticed with the module is that the search block doesn't seem to search through the tags - it does find keywords though. Is there a how to somewhere that I missed that possibly discusses how to do this? If not please consider this for a potential improvement.
Thanks
Posts: 1894
I will make it happen also in the next version. Sorry about that
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 13
No worries, I appreciate all of the work you're doing on this!
Posts: 13451
BUG REPORT!!! ;-)
Seems that deleting comments on items with tags isn't such a good idea? ;-)
Edit:
Ok, so Valiant was to blame. Fixed.
h0bbel - Gallery Team
If you found my help useful, please consider donating to Gallery
http://h0bbel.p0ggel.org
Posts: 1894
Hello
What does this mean ? You deleted comments on a item with Tags and this error showed up ?
Let me know !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 1894
I was too slow
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 13451
Yep, and Valiant too quick. What a coincidence
h0bbel - Gallery Team
If you found my help useful, please consider donating to Gallery
http://h0bbel.p0ggel.org
Posts: 61
I have also been struggling with updating MANIFEST files over the past few days. I have a windows development environment. I managed to get it sorted out tonight using cygwin. If anyone is interested this is what I did to get the String::CRC32 perl module installed.
1. From the cygwin command prompt type in "cpan" - this should bring you to a "cpan>" command prompt. If this is the first time to run cpan you will need to configure your cpan environment.
2. Type "install String::CRC32" - this should install the module.
This appeared to be sucessful for me but I still could not update MANIFEST files. On further investigation I found that the module had not actually been installed. So to find out why I went through the module installation manually.
I unpacked the archive into my tmp directory and went through the installation manually:
"perl Makefile.PL"
"make"
"make test"
"make install"
At the make stage I discovered that I didn't have gcc installed in cygwin. After installing gcc through the cygwin setup I was able to complete the install.
I can now update MANIFEST files using cygwin.
------------------
NZ Digital Images | G2-Sites.com | NZ Web Hosting
Posts: 1894
Thx for the tips. It still doesn't work for me under windows in fact I had String:CRC32 fully installed but it's relying on a DLL MSVRT80.DLL (Something like that) and each tim I try to create a manifest it generates an error of a missing pointer in that DLL ...
I haven't tried cygwin coz I never got it installed and I could just ssh into my linux box.
I'll take a look at cygwin this week-end
Thanks !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 177
I seem to be having a problem with the import from keywords, The process runs fine with out any errors, but no tags are shown under Tags management. I am using a windows 2003 build on an internal only system, so cant give you a link. I have found the following error in my php logs
This repeats itself over and over in the logs.
Would you like any other info?
Tags - 1.2.0
Gallery version = 2.2.1 core 1.2.0.1
PHP version = 5.2.1 apache2handler
Webserver = Apache/2.2.4 (Win32) PHP/5.2.1
Database = mysql 5.0.27-community-nt, lock.system=database
Toolkits = Gd, LinkItemToolkit, Thumbnail, ImageMagick
Acceleration = none, none
Operating system = Windows NT ASNET-SR1 5.2 build 3790
Default theme = asmatrix
gettext = enabled
Locale = en_GB
Browser = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Rows in GalleryAccessMap table = 44
Rows in GalleryAccessSubscriberMap table = 2542
Rows in GalleryUser table = 24
Rows in GalleryItem table = 2529
Rows in GalleryAlbumItem table = 83
Rows in GalleryCacheMap table = 0
Posts: 13
I noticed a few bugs or other oddities that you might want to consider fixing in your next release. I'm using version 1.2.1 of the tags module.
1. The images for the tags module (especially in the edit screen) are relative to the current position \modules\tags\images\. - however if you use a multi-site install the tags\images folder can (usually is) in a different folder on the site and thus the images should be relative to the gallery source root
2. When adding the Item Tags block to the photos pages, the tags show up as integers under the image (probably the tag id) and if clicking on the picture from the tag cloud the tags don't show up at all. I have attached an image of this. The tags do show up however under the thumbnails in the images while browsing if enabled in the settings though.
A few things you might want to change if you get a chance
1. Put the edit tags link directly in the sidebar and as a photo action (don't have to go item edit->edit tags).
2. Have separate permissions for add tags so users can add tags but not change the image.
3. Possibly have the means to directly add tags from the specific photo page.
4. As I mentioned before have search search keywords as well.
Thanks for all your work on this, and I hope my observations and comments help.
Posts: 1894
This is due to the fact that you never had the keyword album module installed or it's currently uninstalled, please upgrade to the newest version in SVN (1.2.1) and this problem should go away
Thanks !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 1894
Thanks for all you comments I'll process them on Sunday and try to fix as much as I can
See you soon !
-------------------------
The Termite - - http://www.termitenshort.com/
Posts: 177
Thanks, that worked.
One thing that would make this module really handy would be to add the tag entry into the edit captions page. So Were you have Title Summary Keywords Description and then tags. This would make editing multiple images easy, and I can add my keywords at the same time.
Cheers
Posts: 13451
An interface to mass edit/apply tags would be great, as well as a method of applying tags on all images in an album. I want to tag all my photos with the year they were taken, and if I could add '2005' as a tag to all images in an album that would be great. Then I could go back in and mass edit to add other specific tags for each photo.
h0bbel - Gallery Team
If you found my help useful, please consider donating to Gallery
http://h0bbel.p0ggel.org