Changeset 1217898
- Timestamp:
- 08/11/2015 06:25:00 AM (11 years ago)
- Location:
- aimojo/trunk
- Files:
-
- 2 added
- 3 edited
-
affinitomics.php (modified) (8 diffs)
-
changelog.txt (modified) (1 diff)
-
readme.txt (modified) (8 diffs)
-
views (added)
-
views/notice.php (added)
Legend:
- Unmodified
- Added
- Removed
-
aimojo/trunk/affinitomics.php
r1211141 r1217898 4 4 Plugin URI: http://prefrent.com 5 5 Description: Apply Affinitomic Descriptors, Draws, and Distance to Posts and Pages. Shortcode to display Affinitomic relationships. Google CSE with Affinitomics. 6 Version: 1.1 6 Version: 1.1.1 7 7 Author: Prefrent 8 8 Author URI: http://prefrent.com … … 30 30 // +----------------------------------------------------------------------+ 31 31 32 define( 'AI_MOJO__VERSION', '1.1. 0' );32 define( 'AI_MOJO__VERSION', '1.1.1' ); 33 33 define( 'AI_MOJO__TYPE', 'aimojo_wp' ); 34 34 define( 'AI_MOJO__MINIMUM_WP_VERSION', '3.5' ); … … 50 50 add_action( 'init', 'my_script_enqueuer' ); 51 51 52 // add an admin notice if aimojo isn't setup 53 add_action( is_network_admin() ? 'network_admin_notices' : 'admin_notices', 'display_notice' ); 52 54 53 55 … … 55 57 * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook() 56 58 */ 57 function plugin_activation() 59 function plugin_activation() 58 60 { 59 61 $message = ''; 60 if ( version_compare( $GLOBALS['wp_version'], AI_MOJO__MINIMUM_WP_VERSION, '<' ) ) 62 if ( version_compare( $GLOBALS['wp_version'], AI_MOJO__MINIMUM_WP_VERSION, '<' ) ) 61 63 { 62 64 load_plugin_textdomain( 'aimojo' ); 63 65 64 66 $message = sprintf(esc_html__( 'aimojo %s requires WordPress %s or higher.' , 'aimojo'), AI_MOJO__VERSION, AI_MOJO__MINIMUM_WP_VERSION ).sprintf(__('Please upgrade WordPress to a current version.', 'aimojo'), 'https://codex.wordpress.org/Upgrading_WordPress', 'http://wordpress.org/extend/plugins/aimojo/download/'); 65 67 66 68 } 67 else 69 else 68 70 { 69 af_check_for_errors(); 71 af_check_for_errors(); 70 72 71 73 $af_errors = get_option('af_errors', ''); … … 88 90 } 89 91 90 function plugin_deactivation( ) 92 function plugin_deactivation( ) 91 93 { 92 //TODO: 94 //TODO: 93 95 } 94 96 … … 202 204 if (!isset($af_cloud_url) || $af_cloud_url == "") 203 205 { 204 $af_cloud_url = 'www.affinitomics.com'; 206 $af_cloud_url = 'www.affinitomics.com'; 205 207 update_option( 'af_cloud_url' , $af_cloud_url ); 206 208 } … … 712 714 } 713 715 716 if ( isset( $_GET['dismissNotice'] ) ) 717 { 718 update_option( 'af_banner_notice_dismissed' , 'true' ); 719 } 720 721 714 722 af_verify_key(); 715 723 echo '<div class="wrap">'; … … 867 875 register_setting('af-cloud-settings-group', 'af_cloudify'); 868 876 } 877 878 879 function extraView( $name, array $args = array() ) 880 { 881 $args = apply_filters( 'aimojo_view_arguments', $args, $name ); 882 883 foreach ( $args AS $key => $val ) 884 { 885 $$key = $val; 886 } 887 888 load_plugin_textdomain( 'aimojo' ); 889 890 $file = AI_MOJO__PLUGIN_DIR . 'views/'. $name . '.php'; 891 892 include( $file ); 893 } 894 895 function display_notice() 896 { 897 // only show notice if we're either a super admin on a network or an admin on a single site 898 $show_notice = current_user_can( 'manage_network_plugins' ) || ( ! is_multisite() && current_user_can( 'install_plugins' ) ); 899 900 if ( !$show_notice ) 901 return; 902 903 $af_key = af_verify_key(); 904 $af_cloud_url = af_verify_provider(); 905 906 $dismissed = get_option( 'af_banner_notice_dismissed', '' ); 907 if ($dismissed != 'true') 908 { 909 $registerLink = 'http://' . $af_cloud_url . '/users/sign_up?key=' . $af_key; 910 $postOptionsUrl = 'edit.php?post_type=archetype&page=affinitomics&dismissNotice=1'; 911 $bannerImage = 'register-aimojo-mod.jpg'; 912 913 914 extraView( 'notice', array( 'bannerLink' => $registerLink, 'postOptionsUrl' => $postOptionsUrl, 'bannerImage' => $bannerImage ) ); 915 } 916 } 917 869 918 870 919 /* -
aimojo/trunk/changelog.txt
r1211126 r1217898 5 5 ---------------------------------------------------------------------- 6 6 ---------------------------------------------------------------------- 7 8 1.1.1 9 ---------------------------------------------------------------------- 10 - added admin notices for the plugin 7 11 8 12 1.1 -
aimojo/trunk/readme.txt
r1211141 r1217898 3 3 Donate link: http://prefrent.com/ 4 4 Tags: match, sort, rank, related, related posts, relational, relate, tags, posts, post-types, types, ai, a.i., artificial intelligence, filter, filtering, micro format, context, contextual, contextually, search, data, freeform, construct, descriptors, draws, distance, support-vector, parse, discover, classifier, affinitomics, ai mojo, cognitive, decision support, big data, cookies 5 5 6 Requires at least: 3.6 6 Tested up to: 4. 2.37 Stable tag: 1.1 7 Tested up to: 4.1.1 8 Stable tag: 1.1.1 8 9 License: GPLv2 9 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 11 11 Aimojo™ - Match, Rank, Relate anything! 12 Aimojo™ - Match, Rank, Relate anything! 12 13 **Replaces Affinitomics for Wordpress** 13 14 … … 38 39 1. Install the plugin 39 40 1. In the admin panel, find the “Affinitomics” menu (usually below Posts) and select “settings” 40 1. Make sure that there is an API key present in the field. If the field is empty, or no key is recognized, register the plugin and claim your key via http://affinitomics.com/register 41 1. Make sure that there is an API key present in the field. If the field is empty, or no key is recognized, register the plugin and claim your key via http://affinitomics.com/register 41 42 1. From the resulting page, copy the API key and paste it in the API field in your settings. 42 43 1. Next, under “To which Post-types would you like to apply your Affinitomics™?” check the boxes for the post-types you want to use with Affinitomics. … … 53 54 1. For your Google Custom Search Engine (CSE) ID follow the instructions here [https://developers.google.com/custom-search/](https://developers.google.com/custom-search/) 54 55 55 = NOTE: Existing pages and posts (rather, the Affinitomics placed on them) must be exported to the Affinitomics cloud before any of them will work. = 56 = NOTE: Existing pages and posts (rather, the Affinitomics placed on them) must be exported to the Affinitomics cloud before any of them will work. = 56 57 1. Under the Affinitomics menu choose “Cloud Export.” 57 58 2. Check “Make it so” and wait for a bit. It won’t take too long, but we haven’t bothered to give you a spinner yet, sorry. You’ll see an output list when it’s done. … … 60 61 = Configure individual Posts, Pages, or Archetypes™ = 61 62 62 1. For existing pages or posts, either copy or move tags to the “Descriptors” field in the page or post editor. 63 1. For existing pages or posts, either copy or move tags to the “Descriptors” field in the page or post editor. 63 64 1. If you want like objects to attract like objects in your system, copy the tags to both “Descriptors” and “Draw”. 64 65 1. It is a best practice (not a requirement) to include a Descriptor of Person, Place, Thing, Concept or Construct in the Descriptors, especially if the Affinitomics are to be exported later, and shared. … … 100 101 101 102 Users are granted space for 1000 Affinitomic™ constructs and 5,000 transactions per month. 102 Larger accounts are available at [Prefrent.com](http://prefrent.com). 103 Larger accounts are available at [Prefrent.com](http://prefrent.com). 103 104 104 105 = How many “Archetypes” will I need? = … … 119 120 120 121 == Changelog == 121 122 =1.1=123 * updated domain assignment for unregistered users124 * add version syncing code for communication with server125 * resolved issue for legacy users with ajax pointing to wrong directory126 * updated pathing from WP_PLUGIN_URL to recommended best practices plugins_url()127 * added plugin_activation function so the plugin can perform immediate, necessary actions upon the plugin being activated by the user in wordpress128 122 129 123 =1.0.0= … … 149 143 It’s easy to derive Affinitomics from these tags. “dog, big, k9, furry” are all easily recognizable as Descriptors. The Draws are easy to recognize as well, and we can take a shortcut in writing them that will differentiate them from Descriptors. They become: +eating, +kids, +snow. We also take a shortcut on what are easy to spot as Distances, and they become: -cars, -cats. By separating the tags into three types of Affinitomics, not only have they become more useful for the computer system, they are actually easier to write and take up less space. 150 144 151 Traditional Tags look like this: 145 Traditional Tags look like this: 152 146 = dog, big, k9, furry, eats a lot, good with kids, likes snow, chases cars, chases cats = 153 147 154 Whereas the features in an Affinitomic Archetype look like this: 148 Whereas the features in an Affinitomic Archetype look like this: 155 149 = dog, big, k9, furry, +eating, +kids, +snow, -cars, -cats = 156 150 157 So now you know how to write Affinitomics, you can see that it takes much less time than writing tags, and by categorizing tags into Descriptors, Draws and Distances, you’ve made the computer much happier. 151 So now you know how to write Affinitomics, you can see that it takes much less time than writing tags, and by categorizing tags into Descriptors, Draws and Distances, you’ve made the computer much happier. 158 152 159 153 = It’s like sorting laundry – it takes the same amount of time and results come out in the wash. With these Affinitomics instead of tags, algorithms can much more quickly determine matches, affinities, and sort values. = … … 161 155 = Extra Credit = 162 156 163 Affinitomics are even more valuable with attenuation – telling the system how much to value Draws and Distances. For example: How much does the dog like to eat? Or which does it hate more; cars or cats? The attenuated Affinitomics for the St. Bernard answer those questions like this: 157 Affinitomics are even more valuable with attenuation – telling the system how much to value Draws and Distances. For example: How much does the dog like to eat? Or which does it hate more; cars or cats? The attenuated Affinitomics for the St. Bernard answer those questions like this: 164 158 = dog, big, k9, furry, +eating2, +kids, +snow4, -cars2, -cats5 = 165 159 166 You’ll notice that it’s still less data than the tags, even though the Affinitomics now represent a three dimensional feature space which is far more valuable for knowledge retrieval, discovery, and machine learning. Because of this, Affinitomics can be evaluated, sorted, and grouped much faster and more accurately than tags. In addition, since the Affinitomics essentially make the information self-ranking and self-sorting, systems that use Affinitomics don’t require categories. 160 You’ll notice that it’s still less data than the tags, even though the Affinitomics now represent a three dimensional feature space which is far more valuable for knowledge retrieval, discovery, and machine learning. Because of this, Affinitomics can be evaluated, sorted, and grouped much faster and more accurately than tags. In addition, since the Affinitomics essentially make the information self-ranking and self-sorting, systems that use Affinitomics don’t require categories. 167 161 168 162 There you have it. You now know how to create Affinitomic Archetypes – a fancy way of saying that you understand how and why you should sort your laundry, errr, tags.
Note: See TracChangeset
for help on using the changeset viewer.