Auto tag plugin for cpg1.5.x (automatically add existing keywords to pictures) Auto tag plugin for cpg1.5.x (automatically add existing keywords to pictures)
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Auto tag plugin for cpg1.5.x (automatically add existing keywords to pictures)

Started by Αndré, June 24, 2014, 12:21:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Αndré

This plugin has been created based on a feature request:
Quote from: flapane on March 19, 2012, 12:39:24 PM
Example: I upload a photo of a church, and write the word "church" in the title or the description. Then cpg automatically scans for every word in the title and description fields, and check if one of those words already exist in the tag keyword list.
If the tag "church" already exists, it will be automatically added as a tag keyword for that photo.

It works exactly as requested. The "keyword list" is a list of all keywords that are added to pictures in your gallery. There's no configuration. The plugin checks for keywords each time you edit file information (editpics.php / edit_one_pic.php).

phill104

Great work on this. I think is a really useful plugin. In SEO terms tags are becoming ever more important.
It is a mistake to think you can solve any major problems just with potatoes.

flapane

Thanks, it works great and eases the process of adding photo details a lot.

My feedback:
Maybe the keyword's first letter should be uncapitalized, just in case it's at the beginning of a phrase or if it's a noun like in german.
I don't know if utf_strtolower() is a function which has already been defined in cpg core, but if I type "Chiesa" in the title, the result keyword is "Chiesa". I wonder whether "chiesa" should have been the expected result?

Dynamic suggestion (cfr. with Simple Tags for WP) would be a great feature in v1.6, even if I'm afraid it would require jquery.
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

Αndré

Quote from: flapane on June 24, 2014, 11:21:22 PM
Maybe the keyword's first letter should be uncapitalized
That's a matter of taste IMHO. Some people like to have the keyword in lowercase, others like to have them as entered. An earlier revision of that plugin used to set the keywords in lowercase. This might be configurable.

mitko

Hi Andre! Is it okay to use this plugin if number of tags us quite large? I.e. thousand etc

Αndré


mitko

I worry about gallery performance, as i understand it will search among the existing tags during every image editing, what if the number of tags would be really high (i.e. 1-2 thousand) would you recommend to use the plugin in this case?

Αndré

I haven't tested that, but it shouldn't affect the overall performance significantly. I assume the number of existing pictures will affect the performance more than the number of different keywords. Feel free to post your results (have a look at the debug output while editing - actually, directly after you submitted the form - a picture or several pictures). If you edit several pictures at a time (editpics.php), the plugin only searches (i.e. query the database) for existing pictures once when submitting the form.

mitko

Hi Andre!

Debug logs are attached.
Also find the issue - plugin doesn't work for keywords separated by "space".
And additionally feature request - is it possible to keep it for single-edit page (not for multiple-edit)?

mitko

Sorry, i clarify: if one keyword has space inside i.e. Great Britain - doesn't work.

Αndré

Quote from: mitko on July 24, 2014, 02:11:07 PM
Debug logs are attached.
Page query time is ~ 100ms for single and multiple files edit. Looks good to me.

Quote from: mitko on July 24, 2014, 02:11:07 PM
Also find the issue - plugin doesn't work for keywords separated by "space".
Correct, as the initial feature request was
Quote from: flapane on March 19, 2012, 12:39:24 PM
scans for every word in the title and description fields
and words are separated by spaces ;) This could be changed by inverting the check, i.e. check if already existing keywords occur in the title and description.

Quote from: mitko on July 24, 2014, 02:11:07 PM
is it possible to keep it for single-edit page (not for multiple-edit)
Should be possible, but I haven't checked that yet. I'll have a look when I try to fix the keywords with spaces issue.