Changeset 908748
- Timestamp:
- 05/06/2014 08:39:49 AM (12 years ago)
- Location:
- rsskingpro
- Files:
-
- 38 added
- 4 edited
-
tags/1.0.6 (added)
-
tags/1.0.6/css (added)
-
tags/1.0.6/css/font-awesome.min.css (added)
-
tags/1.0.6/css/rsskingpro-styles.css (added)
-
tags/1.0.6/css/rsskp_default.css (added)
-
tags/1.0.6/fonts (added)
-
tags/1.0.6/fonts/FontAwesome.otf (added)
-
tags/1.0.6/fonts/fontawesome-webfont.eot (added)
-
tags/1.0.6/fonts/fontawesome-webfont.svg (added)
-
tags/1.0.6/fonts/fontawesome-webfont.ttf (added)
-
tags/1.0.6/fonts/fontawesome-webfont.woff (added)
-
tags/1.0.6/images (added)
-
tags/1.0.6/images/ajax-loader.gif (added)
-
tags/1.0.6/images/kpp-icon_16x16.png (added)
-
tags/1.0.6/images/kpp-icon_16x16_sat.png (added)
-
tags/1.0.6/images/kpp-icon_32x32.png (added)
-
tags/1.0.6/images/kpp-icon_32x32_sat.png (added)
-
tags/1.0.6/images/kpp_akp.jpg (added)
-
tags/1.0.6/images/kpp_dkp.jpg (added)
-
tags/1.0.6/images/kpp_invkp.jpg (added)
-
tags/1.0.6/images/kpp_relkp.jpg (added)
-
tags/1.0.6/images/kpp_rsskp.jpg (added)
-
tags/1.0.6/images/kpp_smtpkp.jpg (added)
-
tags/1.0.6/images/rsskp-icon_16x16.png (added)
-
tags/1.0.6/images/rsskp-icon_16x16_sat.png (added)
-
tags/1.0.6/images/rsskp-icon_32x32.png (added)
-
tags/1.0.6/images/rsskp-icon_32x32_sat.png (added)
-
tags/1.0.6/includes (added)
-
tags/1.0.6/includes/admin_area.php (added)
-
tags/1.0.6/includes/output.php (added)
-
tags/1.0.6/includes/screens (added)
-
tags/1.0.6/includes/screens/kpp.php (added)
-
tags/1.0.6/includes/screens/settings.php (added)
-
tags/1.0.6/includes/widget.php (added)
-
tags/1.0.6/js (added)
-
tags/1.0.6/js/rsskp-functions.js (added)
-
tags/1.0.6/readme.txt (added)
-
tags/1.0.6/rsskingpro.php (added)
-
trunk/includes/output.php (modified) (4 diffs)
-
trunk/includes/widget.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/rsskingpro.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rsskingpro/trunk/includes/output.php
r908480 r908748 1 1 <?php 2 // [rsskingpro feedaddress="no feed" display=5 order="desc" dateformat="j F Y, g:i a" target="_self" titlelength="all" descriptionlength="all" contentlength="all" format="<div class='rsskp_itemhead'><span class='rsskp_date'>##PUBDATE##</span><h1 class='entry_title'>##LINK##</h1></div><div class='rsskp_content'>##DESCRIPTION##</div>" class="" timezone="UTC" paging=true ajax=false nextpagetext="Next Page" prevpagetext="Previous Page" nextpageclass="rss_pagination_next" prevpageclass="rss_pagination_prev"]2 // [rsskingpro feedaddress="no feed" display=5 order="desc" dateformat="j F Y, g:i a" target="_self" titlelength="all" descriptionlength="all" contentlength="all" format="<div class='rsskp_itemhead'><span class='rsskp_date'>##PUBDATE##</span><h1 class='entry_title'>##LINK##</h1></div><div class='rsskp_content'>##DESCRIPTION##</div>" class="" timezone="UTC" paging=true pagingtype='paging' ajax=false nextpagetext="Next Page" prevpagetext="Previous Page" nextpageclass="rss_pagination_next" prevpageclass="rss_pagination_prev" activeclass="rss_pagination_active"] 3 3 4 4 function rsskingpro_func($atts) { … … 16 16 'timezone' => 'UTC', 17 17 'paging' => true, 18 'pagingtype' => 'paging', 18 19 'ajax' => false, 19 20 'nextpagetext' => 'Next Page', 20 21 'prevpagetext' => 'Previous Page', 21 22 'nextpageclass' => 'rss_pagination_next', 22 'prevpageclass' => 'rss_pagination_prev' 23 'prevpageclass' => 'rss_pagination_prev', 24 'activeclass' => 'rss_pagination_active' 23 25 ), $atts ) ); 24 26 … … 179 181 $pagination = ''; 180 182 if ($paging) { 183 $pages = ceil($totalitems / $display); 181 184 if ($ajax) { 182 185 // Button to load feed via ajax … … 185 188 } else { 186 189 // Button for next page 187 if ($page > 1) 188 $pagination .= "<a href='".(strstr($_SERVER['REQUEST_URI'], '?') ? $_SERVER['REQUEST_URI'].'&' : $_SERVER['REQUEST_URI'].'?')."rsskppage=".($page-1)."' class='".$prevpageclass."'>".$prevpagetext."</a>"; 189 if ($totalitems > ($page * $display)) 190 $pagination .= "<a href='".(strstr($_SERVER['REQUEST_URI'], '?') ? $_SERVER['REQUEST_URI'].'&' : $_SERVER['REQUEST_URI'].'?')."rsskppage=".($page+1)."' class='".$nextpageclass."'>".$nextpagetext."</a>"; 190 if ($pagingtype == 'numbers') { 191 for ($p = 1; $p <= $pages; $p++) { 192 $active = ''; 193 if ($page == $p) $active = $activeclass; 194 $pagination .= "<a href='".(strstr($_SERVER['REQUEST_URI'], '?') ? $_SERVER['REQUEST_URI'].'&' : $_SERVER['REQUEST_URI'].'?')."rsskppage=".($p)."' class='".$active."'>".$p."</a>"; 195 } 196 } else if ($pagingtype == 'both') { 197 if ($page > 1) 198 $pagination .= "<a href='".(strstr($_SERVER['REQUEST_URI'], '?') ? $_SERVER['REQUEST_URI'].'&' : $_SERVER['REQUEST_URI'].'?')."rsskppage=".($page-1)."' class='".$prevpageclass."'>".$prevpagetext."</a>"; 199 for ($p = 1; $p <= $pages; $p++) { 200 $active = ''; 201 if ($page == $p) $active = $activeclass; 202 $pagination .= "<a href='".(strstr($_SERVER['REQUEST_URI'], '?') ? $_SERVER['REQUEST_URI'].'&' : $_SERVER['REQUEST_URI'].'?')."rsskppage=".($p)."' class='".$active."'>".$p."</a>"; 203 } 204 if ($totalitems > ($page * $display)) 205 $pagination .= "<a href='".(strstr($_SERVER['REQUEST_URI'], '?') ? $_SERVER['REQUEST_URI'].'&' : $_SERVER['REQUEST_URI'].'?')."rsskppage=".($page+1)."' class='".$nextpageclass."'>".$nextpagetext."</a>"; 206 } else { 207 if ($page > 1) 208 $pagination .= "<a href='".(strstr($_SERVER['REQUEST_URI'], '?') ? $_SERVER['REQUEST_URI'].'&' : $_SERVER['REQUEST_URI'].'?')."rsskppage=".($page-1)."' class='".$prevpageclass."'>".$prevpagetext."</a>"; 209 if ($totalitems > ($page * $display)) 210 $pagination .= "<a href='".(strstr($_SERVER['REQUEST_URI'], '?') ? $_SERVER['REQUEST_URI'].'&' : $_SERVER['REQUEST_URI'].'?')."rsskppage=".($page+1)."' class='".$nextpageclass."'>".$nextpagetext."</a>"; 211 } 191 212 } 192 213 } -
rsskingpro/trunk/includes/widget.php
r799657 r908748 20 20 <?php 21 21 if (function_exists('rsskingpro_func')){ 22 echo do_shortcode('[rsskingpro feedaddress="'.$feedaddress.'" display='.$display.' groupby='.$groupby.' order="'.$order.'" dateformat="'.$dateformat.'" target="'.$target.'" titlelength="'.$titlelength.'" descriptionlength="'.$descriptionlength.'" contentlength="'.$contentlength.'" format="'.$format.'" class="'.$class.'" timezone="'.$timezone.'" paging='.$paging.' ajax='.$ajax.' nextpagetext="'.$nextpagetext.'" prevpagetext="'.$prevpagetext.'" nextpageclass="'.$nextpageclass.'" prevpageclass="'.$prevpageclass.'"]');22 echo do_shortcode('[rsskingpro feedaddress="'.$feedaddress.'" display='.$display.' groupby='.$groupby.' order="'.$order.'" dateformat="'.$dateformat.'" target="'.$target.'" titlelength="'.$titlelength.'" descriptionlength="'.$descriptionlength.'" contentlength="'.$contentlength.'" format="'.$format.'" class="'.$class.'" timezone="'.$timezone.'" paging='.$paging.' pagingtype="'.$pagingtype.'" ajax='.$ajax.' nextpagetext="'.$nextpagetext.'" prevpagetext="'.$prevpagetext.'" nextpageclass="'.$nextpageclass.'" prevpageclass="'.$prevpageclass.'" activeclass="'.$activeclass.'"]'); 23 23 } 24 24 ?> … … 67 67 else $paging = true; 68 68 69 if ( isset( $instance[ 'pagingtype' ] ) ) $pagingtype = $instance[ 'pagingtype' ]; 70 else $pagingtype = 'paging'; 71 69 72 if ( isset( $instance[ 'ajax' ] ) ) $ajax = $instance[ 'ajax' ]; 70 73 else $ajax = false; … … 81 84 if ( isset( $instance[ 'prevpageclass' ] ) ) $prevpageclass = $instance[ 'prevpageclass' ]; 82 85 else $prevpageclass = __( 'rss_pagination_prev', 'text_domain' ); 86 87 if ( isset( $instance[ 'activeclass' ] ) ) $activeclass = $instance[ 'activeclass' ]; 88 else $activeclass = __( 'rss_pagination_active', 'text_domain' ); 83 89 84 90 ?> … … 153 159 </p> 154 160 <p> 161 <label for="<?php echo $this->get_field_name( 'pagingtype' ); ?>"><?php _e( 'Paging Type:' ); ?></label> 162 <select class="widefat" id="<?php echo $this->get_field_id( 'pagingtype' ); ?>" name="<?php echo $this->get_field_name( 'pagingtype' ); ?>"> 163 <option value='paging'<?= (esc_attr( $pagingtype ) == 'pagingtype') ? ' selected' : '' ?>>Paging</option> 164 <option value='numbers'<?= (esc_attr( $pagingtype ) == 'numbers') ? ' selected' : '' ?>>Numbers</option> 165 <option value='both'<?= (esc_attr( $pagingtype ) == 'both') ? ' selected' : '' ?>>Both</option> 166 </select> 167 </p> 168 <p> 155 169 <label for="<?php echo $this->get_field_name( 'ajax' ); ?>"><?php _e( 'Enable Ajax:' ); ?></label> 156 170 <input type="hidden" name="<?php echo $this->get_field_name( 'ajax' ); ?>" value="0" /> … … 172 186 <label for="<?php echo $this->get_field_name( 'prevpageclass' ); ?>"><?php _e( '"Next Page" Link Class:' ); ?></label> 173 187 <input class="widefat" id="<?php echo $this->get_field_id( 'prevpageclass' ); ?>" name="<?php echo $this->get_field_name( 'prevpageclass' ); ?>" type="text" value="<?php echo esc_attr( $prevpageclass ); ?>" /> 188 </p> 189 <p> 190 <label for="<?php echo $this->get_field_name( 'activeclass' ); ?>"><?php _e( '"Active" Link Class:' ); ?></label> 191 <input class="widefat" id="<?php echo $this->get_field_id( 'activeclass' ); ?>" name="<?php echo $this->get_field_name( 'activeclass' ); ?>" type="text" value="<?php echo esc_attr( $activeclass ); ?>" /> 174 192 </p> 175 193 <?php … … 191 209 $instance['timezone'] = ( !empty( $new_instance['timezone'] ) ) ? strip_tags( $new_instance['timezone'] ) : 'UTC'; 192 210 $instance['paging'] = ( !empty( $new_instance['paging'] ) || $new_instance['paging'] == '1' ) ? true : false; 211 $instance['pagingtype'] = ( !empty( $new_instance['pagingtype'] ) ) ? strip_tags( $new_instance['pagingtype'] ) : 'paging'; 193 212 $instance['ajax'] = ( !empty( $new_instance['ajax'] ) || $new_instance['ajax'] == '1' ) ? true : false; 194 213 $instance['nextpagetext'] = ( !empty( $new_instance['nextpagetext'] ) ) ? strip_tags( $new_instance['nextpagetext'] ) : 'Next Page'; … … 196 215 $instance['nextpageclass'] = ( !empty( $new_instance['nextpageclass'] ) ) ? strip_tags( $new_instance['nextpageclass'] ) : 'rss_pagination_next'; 197 216 $instance['prevpageclass'] = ( !empty( $new_instance['prevpageclass'] ) ) ? strip_tags( $new_instance['prevpageclass'] ) : 'rss_pagination_prev'; 217 $instance['activeclass'] = ( !empty( $new_instance['activeclass'] ) ) ? strip_tags( $new_instance['activeclass'] ) : 'rss_pagination_active'; 198 218 199 219 return $instance; -
rsskingpro/trunk/readme.txt
r908480 r908748 5 5 Requires at least: 3.0.1 6 6 Tested up to: 3.9 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 81 81 * paging 82 82 `Default = true` | Enable paging of the RSS. The 'display' option then becomes how many items per page. Options are true or false 83 * pagingtype 84 `Default = paging` | Choice of the type of paging output. Options are 'paging', 'numbers' or 'both' 83 85 * ajax 84 86 `Default - false` | Enable AJAX loading. Instead of previous and next links for paging, this will display a 'view more posts' link which will allow the following page to load in underneath the existing list, and will continue to do so until the list is complete. 85 87 * nextpagetext 86 `Default - 'Next Page'` | Text on the 'next page' link (only displays when paging is on and ajax is off).88 `Default - 'Next Page'` | Text on the 'next page' link (only displays when paging is on, pagingtype is 'paging' or 'both' and ajax is off). 87 89 * prevpagetext 88 `Default - 'Previous Page'` | Text on the 'previous page' link (only displays when paging is on and ajax is off).90 `Default - 'Previous Page'` | Text on the 'previous page' link (only displays when paging is on, pagingtype is 'paging' or 'both' and ajax is off). 89 91 * nextpageclass 90 `Default - 'rss_pagination_next'` | Class on the 'next page' link (only displays when paging is on and ajax is off).92 `Default - 'rss_pagination_next'` | Class on the 'next page' link (only displays when paging is on, pagingtype is 'paging' or 'both' and ajax is off). 91 93 * prevpageclass 92 `Default - 'rss_pagination_prev'` | Class on the 'previous page' link (only displays when paging is on and ajax is off). 94 `Default - 'rss_pagination_prev'` | Class on the 'previous page' link (only displays when paging is on, pagingtype is 'paging' or 'both' and ajax is off). 95 * activeclass 96 `Default - 'rss_pagination_active'` | Class on the 'active page' link (only displays when paging is on, pagingtype is 'numbers' or 'both' and ajax is off). 93 97 = Format Variables = 94 98 <p>You can control the output by defining what information is output in the format by using variables. These variables are defined by an uppercase word surrounded by hashes (2 hashes on either side). The available variables are: … … 138 142 == Changelog == 139 143 144 = 1.0.6 = 145 * Addition of pagingtype and activeclass shortcode options to output numbers pages. 146 140 147 = 1.0.5 = 141 148 * Fix to URL output on pagination to handle existing GET variables … … 161 168 == Upgrade Notice == 162 169 170 = 1.0.6 = 171 * Addition of pagingtype and activeclass shortcode options to output numbers pages. 172 163 173 = 1.0.5 = 164 174 * Fix to URL output on pagination to handle existing GET variables -
rsskingpro/trunk/rsskingpro.php
r908480 r908748 4 4 Plugin URI: http://kingpro.me/plugins/rss-king-pro/ 5 5 Description: RSS King Pro allows you display and format a RSS feed on a page 6 Version: 1.0. 56 Version: 1.0.6 7 7 Author: Ash Durham 8 8 Author URI: http://durham.net.au/ … … 28 28 29 29 global $rsskp_db_version; 30 $rsskp_db_version = "1.0. 5";30 $rsskp_db_version = "1.0.6"; 31 31 32 32 function rsskp_install() {
Note: See TracChangeset
for help on using the changeset viewer.