Changeset 17316
- Timestamp:
- 08/23/07 10:31:49 (11 months ago)
- Files:
-
- a-year-before/tags/0.6 (added)
- a-year-before/tags/0.6/ayb_posts-de_DE.mo (copied) (copied from a-year-before/trunk/ayb_posts-de_DE.mo)
- a-year-before/tags/0.6/ayb_posts-de_DE.po (copied) (copied from a-year-before/trunk/ayb_posts-de_DE.po)
- a-year-before/tags/0.6/ayb_posts.php (copied) (copied from a-year-before/trunk/ayb_posts.php) (2 diffs)
- a-year-before/tags/0.6/ayb_posts.pot (copied) (copied from a-year-before/trunk/ayb_posts.pot)
- a-year-before/tags/0.6/readme.txt (copied) (copied from a-year-before/trunk/readme.txt) (2 diffs)
- a-year-before/tags/0.6beta2/ayb_posts.php (modified) (7 diffs)
- a-year-before/tags/0.6beta3/readme.txt (modified) (2 diffs)
- a-year-before/trunk/ayb_posts.php (modified) (2 diffs)
- a-year-before/trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
a-year-before/tags/0.6/ayb_posts.php
r17249 r17316 2 2 /* 3 3 Plugin Name: A Year Before 4 Version: 0.6 beta44 Version: 0.6 5 5 Plugin URI: http://wuerzblog.de/2006/12/27/wordpress-plugin-a-year-before/ 6 6 Author: Ralf Thees … … 12 12 $ayb_install_dir=basename(dirname(__FILE__)); 13 13 load_plugin_textdomain($ayb_posts_domain, "wp-content/plugins/$ayb_install_dir"); 14 15 16 14 17 15 function ayb_posts_init() { a-year-before/tags/0.6/readme.txt
r17245 r17316 5 5 Requires at least: 2.0.0 6 6 Tested up to: 2.2.2 7 Stable tag: 0. 5.37 Stable tag: 0.6 8 8 9 9 == Description == … … 69 69 == Changelog == 70 70 71 0.6 72 73 * Minor clean-up 74 71 75 0.6beta4 72 76 a-year-before/tags/0.6beta2/ayb_posts.php
r16351 r17316 2 2 /* 3 3 Plugin Name: A Year Before 4 Version: 0.6beta 24 Version: 0.6beta3 5 5 Plugin URI: http://wuerzblog.de/2006/12/27/wordpress-plugin-a-year-before/ 6 6 Author: Ralf Thees … … 15 15 if (preg_match("/sidebar/i",$para["name"])) $ayb_posts_is_widget=true; 16 16 17 //print_r( $para);18 17 global $wpdb; 19 18 if ($ayb_posts_is_widget) extract($para); … … 28 27 $para.="$key=$val&"; 29 28 } 30 //echo $para;31 29 } 32 30 … … 79 77 $datum = getdate(mktime(0, 0, 0, date("m")-$dmonth, date("d")-$dday, date("Y")-$dyear)); 80 78 81 82 $q="SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_status='publish' AND post_password='' AND YEAR(post_date_gmt)=YEAR(NOW()- INTERVAL $dyear YEAR) AND MONTH(post_date_gmt)=MONTH(NOW()- INTERVAL $dmonth MONTH) AND DAYOFMONTH(post_date_gmt)=DAYOFMONTH(NOW()- INTERVAL $dday DAY) ORDER BY post_date_gmt";83 79 $q="SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_status='publish' AND post_password='' AND YEAR(post_date_gmt)=".$datum['year']." AND MONTH(post_date_gmt)=".$datum['mon']." AND DAYOFMONTH(post_date_gmt)=".$datum['mday']." ORDER BY post_date_gmt"; 84 //echo $q;85 80 $result = $wpdb->get_results($q, OBJECT); 86 //print_r($result);87 81 88 82 //Ausgabe für's Widget … … 117 111 $options = get_option("ayb_posts"); 118 112 if ( !is_array($options) ) { 119 /*$options = array('title'=>'Vor einem Jahr');120 $options = array('day'=>0);121 $options = array('month'=>0);122 $options = array('year'=>1);123 $options = array('showdate'=>1);124 $options = array('dateformat'=>'d.m.Y');125 $options = array('notfound'=>'Kein Beitrag an diesem Tag');126 */127 113 $options = array('title'=>'Vor einem Jahr', 'day'=>0, 'month'=>0, 'year'=>1, 'showdate'=>1, 'dateformat'=>'d.m.Y', 'notfound'=>'Kein Beitrag an diesem Tag'); 128 114 … … 138 124 if ( $_POST['ayb_posts_submit'] ) { 139 125 140 // Remember to sanitize and format use input appropriately.141 126 $options['title'] = strip_tags(stripslashes($_POST['ayb_posts_title'])); 142 127 $options["day"]=strip_tags(stripslashes($_POST['ayb_posts_day'])); … … 149 134 } 150 135 151 // Be sure you format your options to be valid HTML attributes.152 136 $title = htmlspecialchars($options['title'], ENT_QUOTES); 153 137 154 // Here is our little form segment. Notice that we don't need a155 // complete form. This will be embedded into the existing form.156 138 echo '<p style="text-align:right;"><label for="ayb_posts_title">' . __('Title:') . ' <input style="width: 200px;" id="ayb_posts_title" name="ayb_posts_title" type="text" value="'.$title.'" /></label></p>'; 157 139 echo '<p style="text-align:right;"><label for="ayb_posts_day">' . __('Tage zuvor:') . ' <input style="width: 30px;" id="ayb_posts_day" name="ayb_posts_day" type="text" value="'.$day.'" /></label></p>'; a-year-before/tags/0.6beta3/readme.txt
r17220 r17316 4 4 Tags: date, posts, history 5 5 Requires at least: 2.0.0 6 Tested up to: 2.2. 16 Tested up to: 2.2.2 7 7 Stable tag: trunk 8 8 … … 62 62 The titles of the articles written half a year and two weeks before, also showing the date . If there was no article written on that day, the output will be »Nothing blogged on this day.« 63 63 64 == Styling==64 === Styling === 65 65 If you like CSS, you can style the date with the class `ayb_date`, the link of the article with the class `ayb_link` and the notfound-message by using the class `ayb_notfound`. 66 66 a-year-before/trunk/ayb_posts.php
r17249 r17316 2 2 /* 3 3 Plugin Name: A Year Before 4 Version: 0.6 beta44 Version: 0.6 5 5 Plugin URI: http://wuerzblog.de/2006/12/27/wordpress-plugin-a-year-before/ 6 6 Author: Ralf Thees … … 12 12 $ayb_install_dir=basename(dirname(__FILE__)); 13 13 load_plugin_textdomain($ayb_posts_domain, "wp-content/plugins/$ayb_install_dir"); 14 15 16 14 17 15 function ayb_posts_init() { a-year-before/trunk/readme.txt
r17245 r17316 5 5 Requires at least: 2.0.0 6 6 Tested up to: 2.2.2 7 Stable tag: 0. 5.37 Stable tag: 0.6 8 8 9 9 == Description == … … 69 69 == Changelog == 70 70 71 0.6 72 73 * Minor clean-up 74 71 75 0.6beta4 72 76
