Changeset 945433
- Timestamp:
- 07/09/2014 08:16:30 AM (11 years ago)
- Location:
- ad-buttons/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ad-buttons/trunk/adbuttons.php
r945406 r945433 5 5 Description: Plugin to add ad buttons to your blog 6 6 Author: Nico 7 Version: 2.2 7 Version: 2.2.1 8 8 Author URI: http://www.blogio.net/blog/ 9 9 Questions, sugestions, problems? Let me know at [email protected] … … 71 71 dbDelta($structure); 72 72 73 $ad_buttons_version = "2.2 ";73 $ad_buttons_version = "2.2.1"; 74 74 update_option("ad_buttons_version", $ad_buttons_version); 75 75 76 $ad_buttons_db_version = "2.2 ";76 $ad_buttons_db_version = "2.2.1"; 77 77 update_option("ad_buttons_db_version", $ad_buttons_db_version); 78 78 … … 82 82 83 83 register_activation_hook(__FILE__,'ad_buttons_install'); 84 85 $ad_buttons_db_version = get_option("ad_buttons_db_version"); 86 87 if($ad_buttons_db_version <> "2.2.1"){ 88 // update database 89 90 //set the options 91 $newoptions = get_option('widget_adbuttons_cfg'); 92 $newoptions['ab_dspcnt'] = '1'; 93 $newoptions['ab_target'] = 'bnk'; 94 $newoptions['ab_powered'] = '1'; 95 $newoptions['ab_count'] = '1'; 96 add_option('widget_adbuttons_cfg', $newoptions); 97 98 // create table 99 global $wpdb; 100 $table = $wpdb->prefix."ad_buttons"; 101 $structure = "CREATE TABLE $table ( 102 id INT(9) NOT NULL AUTO_INCREMENT, 103 ad_picture VARCHAR(100) NOT NULL, 104 ad_link VARCHAR(500) NOT NULL, 105 ad_text VARCHAR(80) NOT NULL, 106 ad_strdat DATE NOT NULL, 107 ad_enddat DATE NOT NULL, 108 ad_views INT(9) DEFAULT 0, 109 ad_clicks INT(9) DEFAULT 0, 110 ad_active TINYINT(1) NOT NULL DEFAULT 0, 111 adg_count VARCHAR(500) NOT NULL, 112 adg_show tinytext NOT NULL, 113 ad_pos INT(9) DEFAULT 0, 114 115 UNIQUE KEY id (id) 116 );"; 117 118 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 119 dbDelta($structure); 120 121 $ab_plugindir = get_option('siteurl').'/'.PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)); 122 123 $wpdb->query("INSERT INTO $table(id, ad_picture, ad_link, ad_text, ad_views, ad_clicks, ad_active) 124 VALUES(1, '".$ab_plugindir."/ab125.jpg', 'http://wordpress.org/plugins/ad-buttons/', 'ads powered by Ad Buttons', 1, 0, 1)"); 125 126 $table = $wpdb->prefix."ad_buttons_stats"; 127 $structure = "CREATE TABLE $table ( 128 abs_dat date NOT NULL, 129 abs_ip int(10) NOT NULL, 130 abs_view tinyint(4) NOT NULL, 131 abs_click tinyint(4) NOT NULL, 132 KEY abs_dat (abs_dat) 133 );"; 134 135 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 136 dbDelta($structure); 137 138 $table = $wpdb->prefix."ad_buttons_stats_hst"; 139 $structure = "CREATE TABLE $table ( 140 abs_dat date NOT NULL, 141 abs_view int(11) NOT NULL, 142 abs_click int(11) NOT NULL 143 );"; 144 145 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 146 dbDelta($structure); 147 148 $ad_buttons_version = "2.2.1"; 149 update_option("ad_buttons_version", $ad_buttons_version); 150 151 $ad_buttons_db_version = "2.2.1"; 152 update_option("ad_buttons_db_version", $ad_buttons_db_version); 153 154 $ip2nation_db_version = "2.2"; 155 update_option("ip2nation_db_available", $ip2nation_db_version); 156 } 84 157 85 158 //check if user is a bot of some sort -
ad-buttons/trunk/readme.txt
r944869 r945433 5 5 Requires at least: 2.0.2 6 6 Tested up to: 3.9 7 Stable tag: 2.2 7 Stable tag: 2.2.1 8 8 9 9 The Ad Buttons plugin displays a number of graphical ads in a sidebar widget. … … 39 39 40 40 == Changelog == 41 42 = 2.2.1 = 43 * 09-07-2014 44 * bugfix to the database upgrade process 41 45 42 46 = 2.2 =
Note: See TracChangeset
for help on using the changeset viewer.