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: 40
Currently Online:
17 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
malpan: 2453
jogen: 2440
VanWatterson: 652
GeraldSebring: 364
LucasWoltman: 362
RandellFeenstra: 362
Member Stats:
Guest Posters: 7
Members: 2066
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 2
Topics: 1071
Posts: 4045
Newest Members: Nixon Designs, zolaperry, tanec69, lbakyl, richdorm, Aaron Velasquez
Moderators: Ben Miller (387)
Administrators: Mark Barnes (425)
Log In
Register
Home



