Changeset 355766
- Timestamp:
- 03/05/2011 04:05:05 PM (15 years ago)
- Location:
- simple-quotes
- Files:
-
- 2 added
- 2 edited
- 3 copied
-
tags/1.02 (copied) (copied from simple-quotes/trunk)
-
tags/1.02/calendar.png (added)
-
tags/1.02/index.php (copied) (copied from simple-quotes/trunk/index.php) (7 diffs)
-
tags/1.02/readme.txt (copied) (copied from simple-quotes/trunk/readme.txt) (3 diffs)
-
trunk/calendar.png (added)
-
trunk/index.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-quotes/tags/1.02/index.php
r355576 r355766 4 4 * Plugin URI: http://www.jasonernst.com/projects/quotes/ 5 5 * Description: Creates a custom post type for quotes which will show up in the administrative interface within wordpress. The quotes are then return randomly in an associative array using the function 'quote_random()'. Extremely simple plugin takes only a quote and the quote author. Note: The author icon is taken from the famfamfam icon pack (http://www.famfamfam.com/) 6 * Version: 1.0 16 * Version: 1.02 7 7 * Author: Jason B. Ernst 8 8 * Author URI: http://www.jasonernst.com/ … … 85 85 function quote_addfields() 86 86 { 87 add_meta_box('quote- author-meta','Quote Author','quote_author_meta','quote','normal','high');88 do_meta_boxes('quote- author-meta','normal',null);87 add_meta_box('quote-meta','Quote Information','quote_meta','quote','normal','high'); 88 do_meta_boxes('quote-meta','normal',null); 89 89 } 90 90 … … 92 92 * Adds the html to the admin page for the quote author 93 93 */ 94 function quote_ author_meta()94 function quote_meta() 95 95 { 96 96 //used to get to the plugin folder … … 98 98 global $post; 99 99 $quote_author = get_post_meta($post->ID, 'quote_author', true); 100 $quote_date = get_post_meta($post->ID, 'quote_date', true); 101 100 102 //create a nonce for security 101 103 echo '<input type="hidden" name="quote_noncename" id="quote_noncename" value="' . wp_create_nonce( plugin_basename(__FILE__) ) . '" />'; … … 105 107 <label for="quote_author"><img src="<?=$base?>/author.png" alt="Quote Author"/> Quote Author: </label> 106 108 <input type="text" name="quote_author" tabindex="3" style="width: 100%;" value="<?=$quote_author?>"/> 107 <p>The quote author is the original author of the quote, and does not have to be a blog author.</p> 109 110 <div style="margin-bottom:10px;"> </div> 111 112 <label for="quote_date"><img src="<?=$base?>/calendar.png" alt="Quote Date"/> Quote Date: </label> 113 <input type="text" name="quote_date" tabindex="3" style="width: 100%;" value="<?=$quote_date?>"/> 114 <p>All of the fields here except the quote itself is optional, you may use as much of the information in your template as you wish.</p> 108 115 </div> <!-- /form-field --> 109 116 </div> <!-- /inside --> … … 134 141 * quote["content"] is the quote itself 135 142 * quote["author"] is the author 143 * quote["date"] is the date of the quote 136 144 */ 137 145 function quote_random() … … 144 152 $quote["content"] = the_title("", "", false); 145 153 $quote["author"] = get_post_meta($post->ID, 'quote_author', true ); 154 $quote["date"] = get_post_meta($post->ID, 'quote_date', true ); 146 155 wp_reset_query(); 147 156 return $quote; 148 157 } 149 158 } 150 ?> 159 160 /* 161 * Outputs a styled quote using the default style 162 * Use quote_random() if you would like to style the 163 * quote yourself 164 */ 165 function quote_display_random() 166 { 167 $quote = quote_random(); 168 ?> 169 <div class="quote"><em><?=$quote['content']?></em> 170 <div style='text-align:right;'><?=$quote['author']?> - <?=$quote['date']?></div> 171 </div> 172 <? 173 } 174 ?> -
simple-quotes/tags/1.02/readme.txt
r355576 r355766 5 5 Requires at least: 3.0 6 6 Tested up to: 3.1 7 Stable tag: 1.0 17 Stable tag: 1.02 8 8 9 9 Just a simple project that flexibly prints random quotes anywhere on a wordpress page. … … 13 13 <p>Just a simple project that prints random quotes anywhere on a wordpress page. Essentially it is just a custom post type that includes the quote and the author. A single function call returns the random quote which can then be displayed wherever you like on your pages.</p> 14 14 15 <p>To use the plugin just add the quotes using the WordPress admin interface on your site. Then to get the quotes to display on the site, call the quote_random() function which will return an associative array with both the content and authorin it. For more details see <a href="http://www.jasonernst.com/projects/quotes/">www.jasonernst.com/projects/quotes/</a> for more details.</p>15 <p>To use the plugin just add the quotes using the WordPress admin interface on your site. Then to get the quotes to display on the site, call quote_dispaly_random() to display a default styling or the quote_random() function which will return an associative array with both the content, author and date in it. For more details see <a href="http://www.jasonernst.com/projects/quotes/">www.jasonernst.com/projects/quotes/</a> for more details.</p> 16 16 17 17 The reason why this format was chosen, was to create the most flexibility for use in a template. It is easy to stick these inside of a div or apply css styling to it. … … 21 21 1. Upload `simple-quotes` directory to the `/wp-content/plugins/` directory 22 22 1. Activate the plugin through the 'Plugins' menu in WordPress 23 1. Place `<?php $quote = quote_random(); echo $quote['content']; echo $quote['author']; ?>` in your templates 23 1. Place `<?php $quote = quote_random(); echo $quote['content']; echo $quote['author']; echo $quote['date']; ?>` in your templates if you would like to style the quote yourself or 24 1. Alternatively place `<?php quote_display_random(); ?> in your template to have the default quote style displayed 24 25 25 26 == Frequently Asked Questions == 26 27 27 28 == Changelog == 29 30 = 1.02 = 31 * Added an optional date field for the quotes 32 * Added a function `quote_display_random()` which will display a default styled quote to make it easier to use 28 33 29 34 = 1.01 = -
simple-quotes/trunk/index.php
r355576 r355766 4 4 * Plugin URI: http://www.jasonernst.com/projects/quotes/ 5 5 * Description: Creates a custom post type for quotes which will show up in the administrative interface within wordpress. The quotes are then return randomly in an associative array using the function 'quote_random()'. Extremely simple plugin takes only a quote and the quote author. Note: The author icon is taken from the famfamfam icon pack (http://www.famfamfam.com/) 6 * Version: 1.0 16 * Version: 1.02 7 7 * Author: Jason B. Ernst 8 8 * Author URI: http://www.jasonernst.com/ … … 85 85 function quote_addfields() 86 86 { 87 add_meta_box('quote- author-meta','Quote Author','quote_author_meta','quote','normal','high');88 do_meta_boxes('quote- author-meta','normal',null);87 add_meta_box('quote-meta','Quote Information','quote_meta','quote','normal','high'); 88 do_meta_boxes('quote-meta','normal',null); 89 89 } 90 90 … … 92 92 * Adds the html to the admin page for the quote author 93 93 */ 94 function quote_ author_meta()94 function quote_meta() 95 95 { 96 96 //used to get to the plugin folder … … 98 98 global $post; 99 99 $quote_author = get_post_meta($post->ID, 'quote_author', true); 100 $quote_date = get_post_meta($post->ID, 'quote_date', true); 101 100 102 //create a nonce for security 101 103 echo '<input type="hidden" name="quote_noncename" id="quote_noncename" value="' . wp_create_nonce( plugin_basename(__FILE__) ) . '" />'; … … 105 107 <label for="quote_author"><img src="<?=$base?>/author.png" alt="Quote Author"/> Quote Author: </label> 106 108 <input type="text" name="quote_author" tabindex="3" style="width: 100%;" value="<?=$quote_author?>"/> 107 <p>The quote author is the original author of the quote, and does not have to be a blog author.</p> 109 110 <div style="margin-bottom:10px;"> </div> 111 112 <label for="quote_date"><img src="<?=$base?>/calendar.png" alt="Quote Date"/> Quote Date: </label> 113 <input type="text" name="quote_date" tabindex="3" style="width: 100%;" value="<?=$quote_date?>"/> 114 <p>All of the fields here except the quote itself is optional, you may use as much of the information in your template as you wish.</p> 108 115 </div> <!-- /form-field --> 109 116 </div> <!-- /inside --> … … 134 141 * quote["content"] is the quote itself 135 142 * quote["author"] is the author 143 * quote["date"] is the date of the quote 136 144 */ 137 145 function quote_random() … … 144 152 $quote["content"] = the_title("", "", false); 145 153 $quote["author"] = get_post_meta($post->ID, 'quote_author', true ); 154 $quote["date"] = get_post_meta($post->ID, 'quote_date', true ); 146 155 wp_reset_query(); 147 156 return $quote; 148 157 } 149 158 } 150 ?> 159 160 /* 161 * Outputs a styled quote using the default style 162 * Use quote_random() if you would like to style the 163 * quote yourself 164 */ 165 function quote_display_random() 166 { 167 $quote = quote_random(); 168 ?> 169 <div class="quote"><em><?=$quote['content']?></em> 170 <div style='text-align:right;'><?=$quote['author']?> - <?=$quote['date']?></div> 171 </div> 172 <? 173 } 174 ?> -
simple-quotes/trunk/readme.txt
r355576 r355766 5 5 Requires at least: 3.0 6 6 Tested up to: 3.1 7 Stable tag: 1.0 17 Stable tag: 1.02 8 8 9 9 Just a simple project that flexibly prints random quotes anywhere on a wordpress page. … … 13 13 <p>Just a simple project that prints random quotes anywhere on a wordpress page. Essentially it is just a custom post type that includes the quote and the author. A single function call returns the random quote which can then be displayed wherever you like on your pages.</p> 14 14 15 <p>To use the plugin just add the quotes using the WordPress admin interface on your site. Then to get the quotes to display on the site, call the quote_random() function which will return an associative array with both the content and authorin it. For more details see <a href="http://www.jasonernst.com/projects/quotes/">www.jasonernst.com/projects/quotes/</a> for more details.</p>15 <p>To use the plugin just add the quotes using the WordPress admin interface on your site. Then to get the quotes to display on the site, call quote_dispaly_random() to display a default styling or the quote_random() function which will return an associative array with both the content, author and date in it. For more details see <a href="http://www.jasonernst.com/projects/quotes/">www.jasonernst.com/projects/quotes/</a> for more details.</p> 16 16 17 17 The reason why this format was chosen, was to create the most flexibility for use in a template. It is easy to stick these inside of a div or apply css styling to it. … … 21 21 1. Upload `simple-quotes` directory to the `/wp-content/plugins/` directory 22 22 1. Activate the plugin through the 'Plugins' menu in WordPress 23 1. Place `<?php $quote = quote_random(); echo $quote['content']; echo $quote['author']; ?>` in your templates 23 1. Place `<?php $quote = quote_random(); echo $quote['content']; echo $quote['author']; echo $quote['date']; ?>` in your templates if you would like to style the quote yourself or 24 1. Alternatively place `<?php quote_display_random(); ?> in your template to have the default quote style displayed 24 25 25 26 == Frequently Asked Questions == 26 27 27 28 == Changelog == 29 30 = 1.02 = 31 * Added an optional date field for the quotes 32 * Added a function `quote_display_random()` which will display a default styled quote to make it easier to use 28 33 29 34 = 1.01 =
Note: See TracChangeset
for help on using the changeset viewer.