Topic RSS
8:38 pm
30 August, 2011
OfflineI want to include our sermon discussion questions along with the audio. I got it to work by adding an attachment that is a file. However, I have a few questions.
1. How can I control the order. It appears to be last in equal first out when using it first if I am us [sermons_loop].
2. I see some folks have a nice button like download or notes associated with the mp3 or pdf. Can you do that through the templates or does that require a custom page? At a minimum, I'd like to have the link to the notes be 'Discussion Questions'.
Thanks for your support.
Rob
rperry@lifepointechurch.org
7:49 pm
3 September, 2010
OfflineRob,
I'd love an answer to the ordering of the attachments thing, too. Here's what I did to get a custom icon link to the sermon notes we publish each week. Maybe it will help you:
1.) Add the attachment (using the methods described in the documentation for Sermon Browser.
2.) Then I created a custom image in Photoshop to replace the generic pdf icon that is being used. You can find this file in the sermon browser plugin folder (wp-content/plugins/sermonbrowser/sb-includes/icons/pdf.png). You can make it whatever you want. I just extended the width of the graphic so it would include the words "Sermon Notes" beside the PDF icon. Then I uploaded it back to the server in the same folder, making sure it replaced pdf.png on the server. Now, whenever there's a pdf attachment in addition to a sermon, it will show up with the PDF icon AND have the words "Sermon Notes" beside it.
3.) It felt a little scrunched in there from a page layout / graphic design point of view. So I added a litte space in the stylesheet. From the WordPress dashboard, expand the Sermons menu in the left sidebar. Choose "Templates." I messed with the "Style" box, because we seldom display single sermons (we use a single post for each series, and call the sermons with the shortcode bit, so the post is updated as we add new sermons to the series). I just looked for the style that controls the sermon files (see below) and added some padding to the style (the line in bold is the line I added):
div.sermon-browser table.sermons td.files img {
border: none;
padding: 10px;
margin-right: 24px;
}
The results can be seen here. I prefer them in Chrome or Safari, because they stack the sermon notes file on top of the player, while Firefox seems to render them side by side, with the player slightly lower. If you want, just right-click on the Sermon Notes icon, and Save Image As… — you're welcome to use the image I made.
One Downside:
- if you ever put MORE than a single pdf file linked to a sermon, they will both show up with the identical icon that just says Sermon Notes. I read on another post that Mark is working on 0.46 which will let us put a filename beside each attached file — which will be a much better solution than the hack above, and render all of the above instructions delightfully obsolete.
Hope this helps,
In Christ,
Tim
Community Church of East Gloucester
Gloucester, MA, USA.
4:20 pm
25 August, 2010
OfflineSetting the order, thanks to a friend here at work who understands this stuff.
To set the order for the attachments: In sermon.php, replace this code:
$stuff = $wpdb->get_results("SELECT f.type, f.name FROM {$wpdb->prefix}sb_stuff as f WHERE sermon_id = $sermon->id AND name LIKE '%.mp3' ORDER BY id desc");
} else {
$stuff = $wpdb->get_results("SELECT f.type, f.name FROM {$wpdb->prefix}sb_stuff as f WHERE sermon_id = $sermon->id ORDER BY id desc");
}
with this
$stuff = $wpdb->get_results("SELECT f.type, f.name FROM {$wpdb->prefix}sb_stuff as f WHERE sermon_id = $sermon->id AND name LIKE '%.mp3' ORDER BY id desc");
} else {
$stuff = $wpdb->get_results("SELECT f.type, f.name FROM {$wpdb->prefix}sb_stuff as f WHERE sermon_id = $sermon->id ORDER BY RIGHT(f.name,3)");
}
Basically changing "ORDER BY id desc" to "ORDER BY RIGHT(f.name,3)". I'm not sure exactly what that's doing, but the MP3 is always listed first now, then the PDF. Here's our page: http://www.familylife.net
Most 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



