Changeset 484445
- Timestamp:
- 01/04/2012 12:27:12 PM (14 years ago)
- Location:
- wp-content-slideshow
- Files:
-
- 10 added
- 4 edited
-
tags/2.2 (added)
-
tags/2.2/content-slideshow.php (added)
-
tags/2.2/options.php (added)
-
tags/2.2/readme.txt (added)
-
tags/2.2/screenshot-1.png (added)
-
tags/2.2/screenshot-2.png (added)
-
tags/2.2/scripts (added)
-
tags/2.2/scripts/jquery.cycle.all.2.72.js (added)
-
tags/2.2/scripts/slideshow.js (added)
-
tags/2.2/wp-content-slideshow.php (added)
-
trunk/content-slideshow.php (modified) (7 diffs)
-
trunk/options.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/wp-content-slideshow.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-content-slideshow/trunk/content-slideshow.php
r401366 r484445 120 120 121 121 #content-slideshow .slideshow-nav li.on a { 122 background-color: # CCC;122 background-color: #<?php $nav_bg_active_color = get_option('content_nav_active_bg'); if(!empty($nav_bg_active_color)) {echo $nav_bg_active_color;} else {echo "CCC";}?>; 123 123 color:#fff; 124 124 } … … 127 127 #content-slideshow .slideshow-nav li a:active { 128 128 color:#<?php $nav_color = get_option('content_nav_active_color'); if(!empty($nav_color)) {echo $nav_color;} else {echo "FFF";}?>; 129 background-color: #<?php $nav_bg_active_color = get_option('content_nav_active_bg'); if(!empty($nav_bg_active_color)) {echo $nav_bg_active_color;} else {echo "CCC";}?>; 129 130 } 130 131 … … 140 141 141 142 <?php 142 global $wpdb; 143 144 $counting = 1; 145 146 $querystr = " 147 SELECT wposts.* 148 FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta 149 WHERE wposts.ID = wpostmeta.post_id 150 AND wpostmeta.meta_key = 'content_slider' 151 AND wpostmeta.meta_value = '1' 152 AND wposts.post_status = 'publish' 153 AND (wposts.post_type = 'post' OR wposts.post_type = 'page')"; 154 155 $pageposts = $wpdb->get_results($querystr, OBJECT); ?> 156 157 <?php if ($pageposts): ?> 158 159 <?php global $post; ?> 160 161 <?php foreach ($pageposts as $post): ?> 162 163 <?php $do_not_duplicate[$post->ID] = $post->ID; ?> 164 165 <?php setup_postdata($post); 166 143 144 $counting = 1; 145 146 $sort = get_option('content_sort'); if(empty($sort)){$sort = "post_date";} 147 $order = get_option('content_order'); if(empty($order)){$order = "DESC";} 148 149 global $wpdb; 150 151 global $post; 152 153 $args = array( 'meta_key' => 'content_slider', 'meta_value'=> '1', 'suppress_filters' => 0, 'post_type' => array('post', 'page'), 'orderby' => $sort, 'order' => $order); 154 155 $myposts = get_posts( $args ); 156 157 foreach( $myposts as $post ) : setup_postdata($post); 158 167 159 $custom = get_post_custom($post->ID); 168 160 … … 180 172 181 173 endforeach; ?> 182 183 <?php endif; ?>184 174 185 175 </ul> … … 190 180 191 181 <?php 182 192 183 global $wpdb; 193 184 194 185 $counting = 1; 195 186 196 $querystr = " 197 SELECT wposts.* 198 FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta 199 WHERE wposts.ID = wpostmeta.post_id 200 AND wpostmeta.meta_key = 'content_slider' 201 AND wpostmeta.meta_value = '1' 202 AND wposts.post_status = 'publish' 203 AND (wposts.post_type = 'post' OR wposts.post_type = 'page')"; 204 205 $pageposts = $wpdb->get_results($querystr, OBJECT); ?> 206 207 <?php if ($pageposts): ?> 208 209 <?php global $post; ?> 210 211 <?php foreach ($pageposts as $post): ?> 212 213 <?php $do_not_duplicate[$post->ID] = $post->ID; ?> 214 215 <?php setup_postdata($post); 216 187 global $post; 188 189 $args = array( 'meta_key' => 'content_slider', 'meta_value'=> '1', 'suppress_filters' => 0, 'post_type' => array('post', 'page'), 'orderby' => $sort, 'order' => $order); 190 191 $myposts = get_posts( $args ); 192 193 foreach( $myposts as $post ) : setup_postdata($post); 194 217 195 $custom = get_post_custom($post->ID); 218 219 ?>196 197 ?> 220 198 221 199 <?php if ( $counting == 1 ) { ?> 222 200 <li class="on clearfix" id="post-<?php echo $counting; ?>"> 223 201 <a href="#main-post-<?php echo $counting; ?>" title="<?php the_title(); ?>"> 224 <?php the_title(); ?><br />202 <?php echo cut_content_feat(get_the_title(), 35, ""); ?><br /> 225 203 <?php $excerpt = get_the_excerpt();?> 226 204 <p><?php echo cut_content_feat($excerpt, 48, "..."); ?> </p> … … 230 208 <li id="post-<?php echo $counting; ?>" class="clearfix"> 231 209 <a href="#main-post-<?php echo $counting; ?>" title="<?php the_title(); ?>"> 232 <?php the_title(); ?><br />210 <?php echo cut_content_feat(get_the_title(), 35, ""); ?><br /> 233 211 <?php $excerpt = get_the_excerpt();?> 234 212 <p><?php echo cut_content_feat($excerpt, 48, "..."); ?> </p> … … 242 220 243 221 endforeach; ?> 244 245 <?php endif; ?>246 222 247 223 </ul> 248 224 249 225 </div> 250 251 <div class="slideme"><a href="http://www.iwebix.de" title="webdesign" target="_blank">Webdesign</a></div> -
wp-content-slideshow/trunk/options.php
r378272 r484445 7 7 <p>Adjust Design and Layout of WP-Content Slideshow. You can easily set a Post or a Page for the Slideshow by hitting "Feature in WP Content Slideshow" on Edit Page/Post.</p> 8 8 9 <div style="margin-left:0px;"> 10 <form method="post" action="options.php"><?php wp_nonce_field('update-options'); ?> 11 <div class="inside"> 12 <table class="form-table"> 13 <tr> 14 <th><label for="content_width">Set Slideshow Width</label></th> 15 <td><input type="text" name="content_width" value="<?php $width = get_option('content_width'); if(!empty($width)) {echo $width;} else {echo "570";}?>"></td> 16 </tr> 17 <tr> 18 <th><label for="content_height">Set Slideshow Height</label></th> 19 <td><input type="text" name="content_height" value="<?php $height = get_option('content_height'); if(!empty($height)) {echo $height;} else {echo "250";}?>"></td> 20 </tr> 21 <tr> 22 <th><label for="content_bg">Set BG Color (hexadecimal)</label></th> 23 <td><input type="text" name="content_bg" value="<?php $bg = get_option('content_bg'); if(!empty($bg)) {echo $bg;} else {echo "FFF";}?>"></td> 24 </tr> 25 <tr> 26 <th><label for="content_img_width">Set Image Width</label></th> 27 <td><input type="text" name="content_img_width" value="<?php $img_width = get_option('content_img_width'); if(!empty($img_width)) {echo $img_width;} else {echo "300";}?>"></td> 28 </tr> 29 <tr> 30 <th><label for="content_img_height">Set Image Height</label></th> 31 <td><input type="text" name="content_img_height" value="<?php $height = get_option('content_height'); if(!empty($height)) {echo $height;} else {echo "250";}?>"></td> 32 </tr> 33 <tr> 34 <th><label for="content_nav_width">Set Navigation Width</label></th> 35 <td><input type="text" name="content_nav_width" value="<?php $content_nav_width = get_option('content_nav_width'); if(!empty($content_nav_width)) {echo $content_nav_width;} else {echo "270";}?>"></td> 36 </tr> 37 <tr> 38 <th><label for="content_nav_height">Set Navigation Height</label></th> 39 <td><input type="text" name="content_nav_height" value="<?php $content_nav_height = get_option('content_nav_height'); if(!empty($content_nav_height)) {echo $content_nav_height;} else {echo "31";}?>"></td> 40 </tr> 41 <tr> 42 <th><label for="content_nav_bg">Set Navigation Background Color</label></th> 43 <td><input type="text" name="content_nav_bg" value="<?php $content_nav_bg = get_option('content_nav_bg'); if(!empty($content_nav_bg)) {echo $content_nav_bg;} else {echo "EEE";}?>"></td> 44 </tr> 45 <tr> 46 <th><label for="content_nav_color">Set Navigation Color</label></th> 47 <td><input type="text" name="content_nav_color" value="<?php $content_nav_color = get_option('content_nav_color'); if(!empty($content_nav_color)) {echo $content_nav_color;} else {echo "333";}?>"></td> 48 </tr> 49 <tr> 50 <th><label for="content_nav_active_color">Set Navigation Hover Color</label></th> 51 <td><input type="text" name="content_nav_active_color" value="<?php $nav_color = get_option('content_nav_active_color'); if(!empty($nav_color)) {echo $nav_color;} else {echo "FFF";}?>"></td> 52 </tr> 53 </table> 9 <div style="margin-left:0px; float: left; width: 400px;"> 10 <form method="post" action="options.php"><?php wp_nonce_field('update-options'); ?> 11 <div class="inside"> 12 <table class="form-table"> 13 <tr> 14 <th><label for="content_sort">Choose Sorting of Posts/Pages</label></th> 15 <td> 16 <select name="content_sort"> 17 <option value="post_date" <?php if(get_option('content_sort') == "post_date") {echo "selected=selected";} ?>>Date</option> 18 <option value="title" <?php if(get_option('content_sort') == "title") {echo "selected=selected";} ?>>Title</option> 19 <option value="rand" <?php if(get_option('content_sort') == "rand") {echo "selected=selected";} ?>>Random</option> 20 </select> 21 </td> 22 </tr> 23 <tr> 24 <th><label for="content_order">Choose Order of Posts/Pages</label></th> 25 <td> 26 <select name="content_order"> 27 <option value="ASC" <?php if(get_option('content_order') == "ASC") {echo "selected=selected";} ?>>Ascending</option> 28 <option value="DESC" <?php if(get_option('content_order') == "DESC") {echo "selected=selected";} ?>>Descending</option> 29 </select> 30 </td> 31 </tr> 32 <tr> 33 <th><label for="content_width">Set Slideshow Width</label></th> 34 <td><input type="text" name="content_width" value="<?php $width = get_option('content_width'); if(!empty($width)) {echo $width;} else {echo "570";}?>"></td> 35 </tr> 36 <tr> 37 <th><label for="content_height">Set Slideshow Height</label></th> 38 <td><input type="text" name="content_height" value="<?php $height = get_option('content_height'); if(!empty($height)) {echo $height;} else {echo "250";}?>"></td> 39 </tr> 40 <tr> 41 <th><label for="content_bg">Set BG Color (hexadecimal)</label></th> 42 <td><input type="text" name="content_bg" value="<?php $bg = get_option('content_bg'); if(!empty($bg)) {echo $bg;} else {echo "FFF";}?>"></td> 43 </tr> 44 <tr> 45 <th><label for="content_img_width">Set Image Width</label></th> 46 <td><input type="text" name="content_img_width" value="<?php $img_width = get_option('content_img_width'); if(!empty($img_width)) {echo $img_width;} else {echo "300";}?>"></td> 47 </tr> 48 <tr> 49 <th><label for="content_img_height">Set Image Height</label></th> 50 <td><input type="text" name="content_img_height" value="<?php $height = get_option('content_height'); if(!empty($height)) {echo $height;} else {echo "250";}?>"></td> 51 </tr> 52 <tr> 53 <th><label for="content_nav_width">Set Navigation Width</label></th> 54 <td><input type="text" name="content_nav_width" value="<?php $content_nav_width = get_option('content_nav_width'); if(!empty($content_nav_width)) {echo $content_nav_width;} else {echo "270";}?>"></td> 55 </tr> 56 <tr> 57 <th><label for="content_nav_height">Set Navigation Height</label></th> 58 <td><input type="text" name="content_nav_height" value="<?php $content_nav_height = get_option('content_nav_height'); if(!empty($content_nav_height)) {echo $content_nav_height;} else {echo "31";}?>"></td> 59 </tr> 60 <tr> 61 <th><label for="content_nav_bg">Set Navigation Background Color</label></th> 62 <td><input type="text" name="content_nav_bg" value="<?php $content_nav_bg = get_option('content_nav_bg'); if(!empty($content_nav_bg)) {echo $content_nav_bg;} else {echo "EEE";}?>"></td> 63 </tr> 64 <tr> 65 <th><label for="content_nav_active_bg">Set Navigation Background Active Color</label></th> 66 <td><input type="text" name="content_nav_active_bg" value="<?php $nav_bg_active_color = get_option('content_nav_active_bg'); if(!empty($nav_bg_active_color)) {echo $nav_bg_active_color;} else {echo "CCC";}?>"></td> 67 </tr> 68 <tr> 69 <th><label for="content_nav_color">Set Navigation Color</label></th> 70 <td><input type="text" name="content_nav_color" value="<?php $content_nav_color = get_option('content_nav_color'); if(!empty($content_nav_color)) {echo $content_nav_color;} else {echo "333";}?>"></td> 71 </tr> 72 <tr> 73 <th><label for="content_nav_active_color">Set Navigation Hover Color</label></th> 74 <td><input type="text" name="content_nav_active_color" value="<?php $nav_color = get_option('content_nav_active_color'); if(!empty($nav_color)) {echo $nav_color;} else {echo "FFF";}?>"></td> 75 </tr> 76 77 </table> 78 </div> 79 <input type="hidden" name="action" value="update" /> 80 <input type="hidden" name="page_options" value="content_nav_active_bg, content_sort, content_order, content_width, content_height, content_bg, content_img_width, content_img_height, content_nav_width, content_nav_height, content_nav_bg, content_nav_color, content_nav_active_color" /> 81 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p> 82 </form> 54 83 </div> 55 <input type="hidden" name="action" value="update" /> 56 <input type="hidden" name="page_options" value="content_width, content_height, content_bg, content_img_width, content_img_height, content_nav_width, content_nav_height, content_nav_bg, content_nav_color, content_nav_active_color" /> 57 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p> 58 </form> 84 <div style="margin-left:0px; float: left; width: 300px;"> 85 86 <a href="http://www.wp-shopified.com" target="_blank"><img style="border: 2px solid #CCC;" src="http://www.wp-shopified.com/images/banners/shopified_plugin.jpg" /></a> 87 88 </div> 59 89 </div> -
wp-content-slideshow/trunk/readme.txt
r378272 r484445 5 5 Requires at least: 3.0 6 6 Tested up to: 3.1.2 7 Stable tag: 2. 17 Stable tag: 2.2 8 8 9 9 WP Content Slideshow is the perfect Slideshow for Wordpress. It displays up to 5 Posts or Pages with Tile, Description and Image for every Post. 10 10 11 11 == Description == 12 13 * Added Post/Page Order/Sort Support! * 12 14 13 15 WP Content Slideshow shows up to 5 Posts or Pages in a very nice and powerful Javascript Slideshow. On the left side of the Slideshow it displays a Image for every Post. On the right side, there are all the Titles (and a small description under the Title) of the Posts/Pages. The Slideshow highlights the active Post and repeats automatically after getting to the 5th Post. … … 18 20 * Image for every different Post (No need for timthumb anymore!) 19 21 * Supporting Pages now! 22 * Order/Sort Post/Pages by date, title, random 20 23 * Powerful Administration for Posts and Styles of the Slideshow 21 24 * Javascript Effects between different Posts … … 73 76 * Not using timthumb anymore to avoid thumbnail problems 74 77 * Using Wordpress built-in thumbnail function 78 79 = 2.2 = 80 * Added Option to Sort/Order Post/Pages 81 * Added Background Active Color Option -
wp-content-slideshow/trunk/wp-content-slideshow.php
r378272 r484445 4 4 Plugin URI: http://www.iwebix.de/wp-content-slideshow-javascript-slideshow-plugin/ 5 5 Description: This Plugin shows up to 5 Posts or Pages with a short description and a title at the right, and a image for every post/page on the left. 6 Version: 2. 16 Version: 2.2 7 7 Author: Dennis Nissle, IWEBIX 8 8 Author URI: http://www.iwebix.de/ … … 41 41 add_action("admin_init", "content_init"); 42 42 add_action('save_post', 'save_content'); 43 44 if (!function_exists('fs_slide_credit')) { 45 46 function fs_slide_credit() { 47 48 echo '<div class="copy_wrap" style="display: block; margin: 0px; clear: both;"><p style="font-size: 8px; text-align: right; display: block;">Slideshow by <a style="font-size: 8px; text-align: right;" href="http://www.iwebix.de/" target="_blank" title="webdesign">webdesign</a></p></div>'; 49 50 } 51 52 53 add_action('wp_footer', 'fs_slide_credit'); 54 55 } 43 56 44 57 function content_init(){
Note: See TracChangeset
for help on using the changeset viewer.