WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Simple Tags] Auto Terms/Auto Tags – should find whole words

[Plugin: Simple Tags] Auto Terms/Auto Tags – should find whole words

  • overall i have to say this is really a great plugin, however the one major problem i have with it is the way Auto Tags/Auto Terms works.

    if you have a tag ‘CIA’ in your keyword list and a post with the word ‘facial’ in it, it gets tagged with ‘CIA’. this can cause a huge number of non-relevant tags to be assigned to posts which can only frustrate readers and, i assume, is not good for SEO either.

    until this is resolved, if the dev chooses to do so, i’m wondering if anyone can provide a quick hack to force Auto Tags to only consider whole words?

    i’ve poked around in the code a bit but i’m not familiar enough with PHP to even find the relevant code.

    http://wordpress.org/extend/plugins/simple-tags/

Viewing 7 replies - 1 through 7 (of 7 total)
  • had another stab at looking through the code and found this in ‘admin.php’, line #235:

    function pageAutoTags() {
    		$action = false;
    		if ( isset($_POST['update_auto_list']) ) {
    			// Tags list
    			$tags_list = stripslashes($_POST['auto_list']);
    			$tags = explode(',', $tags_list);

    and #276:

    $tags_list = '';
    		$tags = maybe_unserialize($this->options['auto_list']);
    		if ( is_array($tags) ) {
    			$tags_list = implode(', ', $tags);
    		}

    seems like one or both of these lines is where change needs to be made???

    $tags = explode(',', $tags_list);
    $tags_list = implode(', ', $tags);

    any help is appreciated

    i’m lost i think. found this on line #937 – the ‘regexEscape’ looks interesting, but i don’t know what i’m looking at for sure 🙂

    // Return Tags
    		$matches = $tags = array();
    		preg_match_all('/(' . $this->regexEscape($this->options['start_embed_tags']) . '(.*?)' . $this->regexEscape($this->options['end_embed_tags']) . ')/is', $object->post_content, $matches);
    
    		foreach ( $matches[2] as $match) {
    			foreach( (array) explode(',', $match) as $tag) {
    				$tags[] = $tag;
    			}
    		}

    any advice would be appreciated

    still hoping someone can help

    The larger problem I just discovered is that the autolink feature, while helpful, breaks video because it also tries to add autolink to file URLs.

    Obviously this is a huge problem, and wp.Man is right, replacing whole words only would help, but the code should also automatically avoid replacing words within code.

    I’ve seen issues as well where the autolink feature replaces links in galleries.

    Perhaps some of these issues can be addressed for the next update? Anyone have advice on keeping autolink on but keeping it from messing up video/links?

    Kind of surprised more people aren’t complaining about this. It’s a pretty huge flaw if you post video.

    Is it possible validate keywords separated by commas?
    Example: apple and apple,
    if the word apple is set to a comma is not inserted tag.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Simple Tags] Auto Terms/Auto Tags – should find whole words’ is closed to new replies.
Skip to toolbar