Changeset 193166
- Timestamp:
- 01/12/2010 01:58:28 PM (16 years ago)
- Location:
- mm-did-you-know/trunk
- Files:
-
- 3 edited
-
changelog.txt (modified) (1 diff)
-
mm-did-you-know.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mm-did-you-know/trunk/changelog.txt
r192047 r193166 1 2010-01-11 ver 0.2.1, Milan Milosevic 2 Bugfix: Problem with Cyrillic letters solved 3 1 4 2010-01-08 ver 0.2, Milan Milosevic 2 5 Options page added. -
mm-did-you-know/trunk/mm-did-you-know.php
r192047 r193166 6 6 * Plugin URI: http://www.mmilan.com/did-you-know/ 7 7 * Description: Adds a sidebar widget that display interesting quotes from posts with link to the post. 8 * Version: 0.2 8 * Version: 0.2.1 9 9 * Author: Milan Milosevic 10 10 * Author URI: http://www.mmilan.com/ … … 303 303 // Create the table if it doesn't already exist 304 304 if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { 305 $results = $wpdb->query("CREATE TABLE IF NOT EXISTS $table_name(id INT(11) NOT NULL AUTO_INCREMENT, quotes VARCHAR(2048) DEFAULT NULL, post_id INT(11) NOT NULL, link VARCHAR(255) DEFAULT NULL, PRIMARY KEY (id));");305 $results = $wpdb->query("CREATE TABLE IF NOT EXISTS $table_name(id INT(11) NOT NULL AUTO_INCREMENT, quotes VARCHAR(2048) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, post_id INT(11) NOT NULL, link VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (id)) DEFAULT CHARSET=utf8;"); 306 306 $wpdb->insert( $table_name, array( 'quotes' => 'MM Did You Know? Wordpress plugin by Milan Milosevic.', 'post_id' => 0, 'link' => 'http://www.mmilan.com/')); 307 307 $wpdb->insert( $table_name, array( 'quotes' => 'A rat can last longer without water than a camel.', 'post_id' => 0, 'link' => '')); … … 315 315 $wpdb->insert( $table_name, array( 'quotes' => 'Charlie Chaplin once won third prize in a Charlie Chaplin look-alike contest.', 'post_id' => 0, 'link' => '')); 316 316 $wpdb->insert( $table_name, array( 'quotes' => 'The Guinness Book of Records holds the record for being the book most often stolen from public libraries.', 'post_id' => 0, 'link' => '')); 317 } 317 } else { 318 $results = $wpdb->query("alter table $table_name' default collate utf8_unicode_ci;"); 319 $results = $wpdb->query("ALTER TABLE $table_name CHANGE quotes quotes VARCHAR(2048) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;"); 320 $results = $wpdb->query("ALTER TABLE $table_name CHANGE link link VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;"); 321 } 322 318 323 } 319 324 -
mm-did-you-know/trunk/readme.txt
r192047 r193166 15 15 Changelog: 16 16 17 2010-01-11, version 0.2.1 18 Bugfix: Problem with Cyrillic letters solved 19 17 20 2010-01-08, version 0.2 18 21 Options page added.
Note: See TracChangeset
for help on using the changeset viewer.