Module: BatchTag
rWatcher
Joined: 2005-09-06
Posts: 722 |
Posted: Wed, 2011-03-02 21:28 | |||
I've made some updates to the batch tag module, which I've just pushed out to github. For some reason I can't post in the old batch tag thread, so I'm starting this one. I've updated how the module alerts admins that the tags module is required to work with Gallery 3.0.2. I've also modified the sidebar form to use the tag module's autocomplete function. The current version can be downloaded from this post, or from github. ---
|
||||
Posts: 428
Feature request - Select photos to tag
This module is very valuable, and would be even more so if instead of only tagging whole album contents, there are checkboxes next to each photo and admin can select which photos to tag..
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 428
Defect report - Problem with special characters
http://gallery.menalto.com/node/101241
I am trying to use batchtag to tag an album with "testfestő világfesztivál" however batchtag converts this to "testfest_ világfesztivál"
If I use G3's normal edit function to tag items individually, "testfestő világfesztivál" works fine.
Seems batch tag has trouble handling "special characters"
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 1857
After you batch tag them (and they change) go into the admin panel and rename the tag.
It's a workaround (not a fix), but it should help.
Posts: 428
How do I rename it?
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 1857
Go to Content > Tags
Click on the name of the tag
Type the new name and hit save.
Posts: 428
Ah, I see now! On the tags page there is no indication that they are editable. Also, I tried clicking on tag names earlier and the edit textboxes didn't open - seems like there is a delay built into that...hence the confusion.
Many thanks for the workaround tempg!
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 1857
I didn't initially know the tags were editable there either. I just happened to click and it worked.
Glad you got it working!
Posts: 3
This is a great tool! Ideally, this could be integrated into the "Organize Album" UI to allow users to block select photos in a given album and apply tags by typing them directly or by selecting from a most-recently-used or most-popular tag list. More of a long-term project though.
[edit]Previously reported "bug" was user error.[/edit]
Posts: 428
I second that motion
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 428
Now I have assigned "testfestő világfesztivál" to photos in an album, but need to do the same in another album now. Problem is batchtag will create a new *wrong* tag, and even if I somehow correct the tag, it won't perform the function of the tag properly as it will have a different tag id...and therefore there will be 2 "testfestő világfesztivál" tags each showing only part of the photos with that tag....
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 1857
Not commenting on the whole "*wrong* tag" thing, but if you start typing the tag name, it should autocomplete. Just go to the second album, start typing (the first few characters) the tag name that you've already assigned to the first album, and select the tag from the drop down list. That should ensure that the tags are the same.
Posts: 428
It does autocomplete. Problem is it doesn't save the autocompleted "correct" tag - it saves with messy characters./..
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources
Posts: 1857
That's a separate issue that may have to do with installed localizations or something. But you mentioned having two wrong tags. The autocomplete will at least make sure that they use the same tag.
Might want to look at http://codex.gallery2.org/Gallery3:Localization
Posts: 1857
Similar issue, good advice from nivekiam: http://gallery.menalto.com/node/101809#comment-372905
Posts: 28
This module is essential and great!!! Thanks a lot for making it!! I wish I had the time to do some coding for it... (maybe in the future)
I've got an idea for those who want to batch-tag only a few photos inside an album: move them to another album, batch tag, move back to the original album! (Haven't tested it yet, but should work) As long as batchtag doesn't support "checking" the pictures you want to tag (instead of the whole folder)
Posts: 428
@rWatcher: Any luck with fixing the "special characters" issue?
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
HennaLap.com
Posts: 722
I just batch tagged an album with "testfestő világfesztivál" -- as far as I can tell, it worked fine for me:
http://eric2001.brinkster.net/gallery3/index.php/tag/63/testfest%C5%91+vil%C3%A1gfesztiv%C3%A1l
Posts: 428
Seems ok on your site. Have you released a new version since March? (in which case I'll update mine)
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
HennaLap.com
Posts: 722
No, the version in the first post was the last update.
Posts: 32
Thanks for this batchtag, "module man" rWatcher .
Posts: 428
@rWatcher: Any chance you are thinking of taking this to the next logical step i.e. show checkboxes next to all photos (and of course, select all/ select none links) in the album so that users can select which photos to apply the batch tag to?
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
HennaLap.com
Posts: 428
Also, any chance you can make it play nice with multilingual support module?
http://gallery.menalto.com/node/100679
SoosKriszta
Csillamvilag.com
Bodypainting, Facepainting, Glitter, Henna
HennaLap.com
Posts: 3
Nice module, but on my server it causes a redirect loop error on >150 item albums.
It even caused my IP address to be blacklisted due to DoS attempt in my provider's (IMH) firewall.
Isn't it possible to do this stuff in SQL rather than routing?
Posts: 722
When I tried doing this module with just SQL I was getting complaints that the php script was timing out on large albums.
If you have a better suggestion for dealing with large albums I'd be happy to consider it.
Posts: 27
Is there a way to restrict this to only admins?
Posts: 2
Hi rWatcher,
I got the batch tag module, but it doesn't quite do what I would like to do. I would like to be able to batch tag (tag and custum fields) selected item in an album. Would that be possible. Is so, it would be amazing!
Thanks for your help.
Melanie
Posts: 1
Solution for special characters problem:
Change line 28 in modules/batchtag/controllers/batchtag.php
url::redirect(url::abs_site("batchtag/tagitems2?name={$input->post('name')}&item_id={$input->post('item_id')}&tag_subitems={$input->post('tag_subitems')}&csrf={$input->post('csrf')}"));
to this:
url::redirect(url::abs_site("batchtag/tagitems2?name=".urlencode($input->post('name'))."&item_id={$input->post('item_id')}&tag_subitems={$input->post('tag_subitems')}&csrf={$input->post('csrf')}"));
And replace 113 line with
url::redirect(url::abs_site("batchtag/tagitems2?name=".urlencode($input->post('name'))."&item_id={$input->get('item_id')}&tag_subitems={$input->get('tag_subitems')}&batchtag_items_processed=$children_count&batchtag_max=$batchtag_max&csrf={$input->get('csrf')}"));
This is not a localization problem, but just a forgotten character escaping
Posts: 5
Asper, thanks a lot! Now it works as expected