Support » Plugin: Automatic Post Tagger » Related Words for Tags

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Devtard

    (@devtard)

    Hi, users will be allowed to change the character limit themselves in the next version 1.6.

    If you don’t want to wait until it’s released, you can replace all occurrences of the number 255 in the main .php file. (You’ll need to reinstall the plugin afterwards so make sure that you have a backup of all your tags.)

    Thread Starter Duke

    (@davidsons)

    Hi, I downloaded the plugin, un-zipped it, changed all the 255’s to 5255 and zipped it back up. Then I removed the old plugin and installed this edited one.

    I then went to select ‘import existing tags’ and it says it has imported 45 tags, which is the correct number, but then they are not showing in the ‘manage tags’ area….it shows 0 tags.

    I also tried to add some tags manually and the same thing, not showing up in the ‘manage tags’ area.

    I went and downloaded the plugin again and tried to make sure I was doing it right. I found all the 255’s and changed them again to 5255. I installed that plugin and still same problem.

    I removed it and install the current plugin and everything works again.

    Maybe I missing something?

    Plugin Author Devtard

    (@devtard)

    The version 1.5 uses a custom table (“wp_apt_tags”) in the database where tags + related words are stored. The character limit for each table row is 255, which is why the table needs to be either modified or deleted and replaced by a new table with new properties (which is what reinstalling should do).

    You don’t have to upload a new version of the plugin by the way, it’s possible to edit the code directly from WP (Plugins > Editor). The plugin can be then reinstalled right from its options page (use the button “Restore default settings”). If you deactivate and delete the plugin via the WP admin interface then all its DB data should also be removed. If that does not happen for some reason, you need to delete the table manually (you can use e.g. phpMyAdmin to do that).

    Thread Starter Duke

    (@davidsons)

    Okay, this time around I went to the Plugin > Editor and on the automatic-post-tagger.php file, I change all occurrences of 255 to 5255 then saved the file.

    Then I went to the plugin settings and did ‘Restore Default Settings’, then saved that.

    Then I went to do the ‘Import Existing Tags’ function. It said it imported 45 tags, which is right, but I can’t see them in the ‘manage tags” area still, same as before.

    Thinking, like you said, that I needed to delete the table in the database before restoring defaults, I started looking in phpMyAdmin and found this senario happening…

    If I have the original plugin left ‘as-is’ with the original settings of 255, then the table (“wp_apt_tags”) is visible in the database and everything is functioning fine.

    If I delete the table, then change all the 255’s to 5255 in the php file and ‘Resort Default Settings’, I notice it doesn’t create the table in the database. So right now the plugin will create the table only if the file setting are kept at 255, if something other than 255 is used, then it doesn’t create the table, thus the reason why I am not seeing any of the tags in the ‘tag manager’ when I go to import the existing tags…hmm.

    So now I’m going to put everything back to original with the 255s and have the table created, then I am going to modify the table to make the character size more than 255. I want to see if that helps.

    Or maybe I’m missing something?

    EDIT:
    Okay I found out that I can not change the ‘tag’ field in the table…it errors out if I try to make it higher than 255. I was able to change the ‘related words’ to 5255 though. So now I went back to the plugin setting and imported the existing tags…all is good. But when I try to add many related words it looks like it still stops me at 255. Do I need to change a spot in the Php file?

    EDIT:
    If I leave the PHP file all with 255s and change the table in the database to 5255 for ‘related words’, I can’t enter more characters than 255 in the plugin settings under ‘related words’ so that means the plugin is restricting me. If I go to resort default settings it reverts the table back to 255. So it seems that the PHP file doesn’t need all the 255s changed. Just only change the ones that pertain to the ‘related words’. I don’t think people need tags to be more than 255, but we need the related words to be more than 255 for sure.

    Thanks

    Thread Starter Duke

    (@davidsons)

    delete this

    Thread Starter Duke

    (@davidsons)

    delete this

    Plugin Author Devtard

    (@devtard)

    Every input field has a “maxlength” property which prevents users from typing more than 255 characters – which is why all occurrences of this number must be replaced with something else.

    I probably found out why it doesn’t work for you – databases usually have a relatively low character limit for “unique keys” (the column “tag” also happens to be the unique key).

    So after you replace all “255”s go to line 97 and make sure that the character limit is 255 as before:

    tag VARCHAR (255),

    It should work just fine now.
    Sorry for the inconvenience.

    Thread Starter Duke

    (@davidsons)

    No problem. It works now leaving the tag VARCHAR at 255. Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Related Words for Tags’ is closed to new replies.