Topic RSS
2:00 am
7 October, 2009
OfflineHi Mark, I saw that adding the dir and limit shortcode attributes was on the list of future attributes. I needed those for a current project, so I went ahead and implemented them myself. In case you hadn't yet, here's the patch to add support for these:
===================================================================
— sermon.php (revision 161077)
+++ sermon.php (working copy)
@@ -452,6 +454,8 @@
global $wpdb, $record_count, $sermon_domain;
ob_start();
$atts = shortcode_atts(array(
+ 'limit' => '0',
+ 'dir' => isset($_REQUEST['dir']) ? $_REQUEST['dir'] : '',
'filter' => sb_get_option('filter_type'),
'filterhide' => sb_get_option('filter_hide'),
'id' => isset($_REQUEST['sermon_id']) ? $_REQUEST['sermon_id'] : '',
@@ -483,8 +487,8 @@
$sort_criteria = $_REQUEST['sortby'];
else
$sort_criteria = 'm.datetime';
- if (isset($_REQUEST['dir']))
- $dir = $_REQUEST['dir'];
+ if (!empty($atts['dir']))
+ $dir = $atts['dir'];
elseif ($sort_criteria == 'm.datetime')
$dir = 'desc';
else
@@ -495,7 +499,7 @@
else
$page = 1;
$hide_empty = sb_get_option('hide_no_attachments');
- $sermons = sb_get_sermons($atts, $sort_order, $page, 0, $hide_empty);
+ $sermons = sb_get_sermons($atts, $sort_order, $page, (int)$atts['limit'], $hide_empty);
$output = '?>'.sb_get_option('search_output');
eval($output);
}
2:06 am
7 October, 2009
Offlinehmmm… the forum didn't like the svn patch at all. here's a link:
Add support for limit and dir shortcode attributes
Along with it, here's a couple other fixes I've made, in case you want them:
Include jQuery
2:34 pm
1 April, 2011
OfflineMost Users Ever Online: 125
Currently Online: Ben Meredith
11 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Rich Brown: 336
Matt Schlueter: 91
Don Johnson: 58
anointed: 57
0be1: 55
Mindy: 54
Member Stats:
Guest Posters: 7
Members: 2401
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 2
Topics: 1348
Posts: 5500
Newest Members: kclagge, Ben Meredith, jasegbert, Rebecca Moehring, Sam Mathews, Oliver Redmond
Moderators: Ben Miller (903)
Administrators: Mark Barnes (435)
Log In
Register
Home


