WordPress.org

Plugin Directory

Changeset 794818


Ignore:
Timestamp:
10/28/13 14:25:14 (6 months ago)
Author:
Strictly Software
Message:

Added some of the old donate only features into the free version and fixed bug that caused tags in the format of [youtube blah] to be messed up

Location:
strictly-autotags/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • strictly-autotags/trunk/readme.txt

    r767862 r794818  
    55Tags: tags, autotag, taxonomy, smarttag 
    66Requires at least: 2.0.2                     
    7 Tested up to: 3.4.2 
    8 Stable tag: 2.8.5 
     7Tested up to: 3.6.1 
     8Stable tag: 2.8.7 
    99 
    1010Strictly AutoTags is a plugin that automatically adds the most relevant tags to posts. 
     
    204204* Removed unneccessary regular expressions which are not needed now. 
    205205* Added details about all the sexy new features for version 2.8.5 which is donate and deliver only! 
     206 
     207= 2.8.6 = 
     208* DONATION ONLY VERSION - Contact me from my site www.strictly-software.com or donate from admin panel £40 to get your hands on this version 
     209* Updated storage to handle new data-blah and data-blah-blah attributes so they don't get tagged inside images by mistake 
     210* Added new tag equivalent functionality using a simple method so that you can match instances of certain words BUT use a different tag for example [Snowden, NSA, PRISM]=[Police State] would allow the system to match the words Snowden, Prism and NSA but add a tag "Police State" (if relevant of course). You can use as many replacements as you want using a simple markup format. Allows for you to add a tag that may never appear in the article but is related to other words that do. 
     211* I've added an option to set the minimum number of letters a tag must have before it is used as a tag. This applies to stored tags or newly found ones. 
     212* Added option to tell system whether or not to convert plain text links e.g www.msnbc.com into real links before tagging e.g <a href="http://www.msnbc.com">msnbc.com</a> 
     213* Created a new name function to match names like al-Qaeda or al-Nusra Front or even words with commas in like 1,000 Guineas which would be tagged as 1000 Guineas. 
     214* Allows for storing tags in the [youtube youtube.com?v=345345] format so that words within those tags don't get messed up 
     215 
     216= 2.8.7 = 
     217* Updated the free version storage function to store new data-blah and data-blah-blah attributes so they don't get tagged inside images by mistak 
     218* Updated the storage fnction to store [youtube blah] [somesite blah] tags so they don't get tagged by accident 
  • strictly-autotags/trunk/strictlyautotags.class.php

    r767864 r794818  
    33/** 
    44 * Plugin Name: Strictly Auto Tags 
    5  * Version: 2.8.5 
     5 * Version: 2.8.7 
    66 * Plugin URI: http://www.strictly-software.com/plugins/strictly-auto-tags/ 
    77 * Description: This plugin automatically detects tags to place against posts using existing tags as well as a simple formula that detects common tag formats such as Acronyms, names and countries. Whereas other smart tag plugins only detect a single occurance of a tag within a post this plugin will search for the most used tags within the content so that only the most relevant tags get added. 
     
    2626    * @var string 
    2727    */ 
    28     protected $version = "2.8.5"; 
     28    protected $version = "2.8.7"; 
    2929 
    3030    /** 
     
    726726             
    727727            unset($this->storage); 
    728              
    729             preg_match_all('@((?:title|src|href|alt)\s?=\s?)(")([\s\S]*?)(")@',$content,$matches,PREG_SET_ORDER); 
     728     
     729            // handle new data-title data-description tags 
     730            preg_match_all('@((?:title|src|href|alt|data-\w+|data-\w+-\w+)\s?=\s?)(")([\s\S]*?)(")@i',$content,$matches,PREG_SET_ORDER); 
     731         
    730732            $x = 0; 
    731733 
     
    747749            } 
    748750 
    749             preg_match_all("@((?:title|src|href|alt)\s?=\s?)(')([\s\S]*?)(')@",$content,$matches,PREG_SET_ORDER); 
     751            preg_match_all("@((?:title|src|href|alt|data-\w+|data-\w+-\w+)\s?=\s?)(')([\s\S]*?)(')@i",$content,$matches,PREG_SET_ORDER); 
    750752             
    751753            if($matches) 
     
    788790 
    789791 
     792            ShowDebugAutoTag("match [youtube video]"); 
     793 
     794            // store wordpress crap [youtube=blah] as convert to links will screw it up 
     795            // store stuff already in <a> <strong> <h4> etc 
     796            preg_match_all("@(\[\S+?\s+\S+?\])@",$content,$matches,PREG_SET_ORDER); 
     797             
     798            if($matches) 
     799            { 
     800                ShowDebugAutoTag("got matches"); 
     801 
     802                foreach($matches as $match) 
     803                { 
     804                    $word = $match[0]; 
     805 
     806                    ShowDebugAutoTag("store TAG $word"); 
     807 
     808                    $this->storage[] = $word; 
     809 
     810                    $content = str_replace($word, "##M".$x."##", $content); 
     811                    $x++; 
     812                } 
     813            } 
     814 
     815 
    790816            ShowDebugAutoTag($this->storage); 
    791817 
     
    799825 
    800826                $x = 0; 
     827                 
     828                // we loop twice incase we stored a title/alt inside a bold/strong tag so we need to replace both 
    801829                foreach($this->storage as $match) 
    802830                { 
     
    24352463        } 
    24362464 
    2437         echo "<p><strong>Important Notice about Strictly AutoTags 2.8.6</strong></p><p>As I haven't been getting enough donations to make this plugin worthwhile (apart from my own use) I have decided to <strong>only make future versions available to people who donate &pound;40 (or above). The donation button is at the bottom of this form.</strong></p><p>Version 2.8.6 is out already and in use on my own sites and some of the features include the following:</p><p><ul><li>Ability to set a minimum character length a tag must have before being used as a tag.</li><li>New functions to allow for the tagging of words like al-Qaeda or 1,000 Guineas (as 1000 Guineas).</li><li>The ability to use a basic markup format to match certain words but tag another. For example <strong>[Snowden,NSA,PRISM]=[Police State]</strong> would allow the system to match the words Snowden, Prism or NSA <strong>but</strong> add the tag Police State to the article.</li><li>The ability to convert plain text hrefs and urls into real anchors e.g www.msnbc.com would become a real clickable link.</li></ul></p><p>New features will be added in future including text spinning and other HTML reformatting but from now on versions of this plugin will only be available to people who donate <strong>at least &pound;40 only!</strong></p>"; 
     2465        echo "<p><strong>Important Notice about Strictly AutoTags 2.8.6</strong></p><p>As I haven't been getting enough donations to make this plugin worthwhile (apart from my own use) I have decided to <strong>only make future versions available to people who donate &pound;40 (or above). The donation button is at the bottom of this form.</strong></p><p>Version 2.8.6 is out already and in use on my own sites and some of the features include the following:</p><p><ul><li>Ability to set a minimum character length a tag must have before being used as a tag.</li><li>New functions to allow for the tagging of words like al-Qaeda or 1,000 Guineas (as 1000 Guineas).</li><li>The ability to use a basic markup format to match certain words but tag another. For example <strong>[Snowden,NSA,PRISM]=[Police State]</strong> would allow the system to match the words Snowden, Prism or NSA <strong>but</strong> add the tag Police State to the article.</li><li>The ability to convert plain text hrefs and urls into real anchors e.g www.msnbc.com would become a real clickable link.</li></ul></p><p>New features will be added in future including text spinning and other HTML reformatting but from now on versions of this plugin will only be available to people who donate <strong>at least &pound;40 only!</strong></p><p>However I may still release free version from time to time with older features from the donate only plugin plus bug fixes.</p>"; 
    24382466 
    24392467        echo    '<p>'.__('Strictly AutoTags is designed to do one thing and one thing only - automatically add relevant tags to your posts.', 'strictlyautotags').'</p>'; 
Note: See TracChangeset for help on using the changeset viewer.