Topic RSS
7:54 pm
26 August, 2010
OfflineOur podcast has incorrect meta information on the iTunes store — the author is listed as "Unknown" and the category is listed as "Buddhism". Additionally, the main podcast picture is blank, and will not update.
I've tried everything I can think of — even manually edited the podcast.php file in the sermonbrowser plugin folder. All of the incorrect info was missing from the podcast.php file (there was no author, the category was "religion and spirituality" with no subcategory — which I understand makes it default to "buddhism" as it's the first subcategory alphabetically, etc).
It's been several months, and nothing at all works. Is there anyone who might have some insight as to why it's not changing.
Our iTunes link is http://itunes.apple.com/us/pod…..d306939248
And the link on the website is http://www.citychurchftl.com/w…..-teaching/
under the "sermon audio" option.
Thanks in advance!
You need to make some changes to podcast.php
Here is the one from my church:
<channel>
<atom:link href="<?php echo sb_xml_entity_encode(sb_get_option('podcast_url')) ?>" rel="self" type="application/rss+xml" />
<title><?php echo sb_xml_entity_encode(get_bloginfo('name')) ?> Podcast</title>
<itunes:author>City North Baptist Church</itunes:author>
<description><?php echo sb_xml_entity_encode(get_bloginfo('description')) ?></description>
<link><?php echo sb_xml_entity_encode(get_bloginfo('home')) ?></link>
<language>en-us</language>
<copyright>© 2010 City North Baptist Church</copyright>
<image>
<url>http://www.citynorthbaptist.com/wp-content/uploads/sermons/images/cnbclogo.jpg</url>
<title>City North Baptist Church</title>
<link>http://www.citynorthbaptist.com</link>
</image>
<itunes:explicit>no</itunes:explicit>
<itunes:owner>
<itunes:name>City North Baptist Church</itunes:name>
<itunes:email>office@citynorthbaptist.com</itunes:email>
</itunes:owner>
<itunes:image href="http://www.citynorthbaptist.com/wp-content/uploads/sermons/images/cnbclogo.jpg" />
<itunes:summary>City North Baptist – where people feel welcomed and challenged to get to know God better. Each week's morning and evening service is recorded and made available.</itunes:summary>
<lastBuildDate><?php sb_print_iso_date(isset($sermons[0]) ? $sermons[0]: time()) ?></lastBuildDate>
<pubDate><?php sb_print_iso_date(isset($sermons[0]) ? $sermons[0]: time()) ?></pubDate>
<generator>Wordpress Sermon Browser plugin <?php echo SB_CURRENT_VERSION ?> (http://www.4-14.org.uk/sermon-…..or>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<category>Religion & Spirituality</category>
<!– iTunes Browse Podcasts Category –>
<itunes:category text="Religion & Spirituality">
<!– iTunes Browse Podcasts Subcategory –>
<itunes:category text="Christianity"/>
</itunes:category>
<category>Christianity</category>
<itunes:keywords>City North Baptist Church, Murray Lean, Joe Khan, Dave Herron, Jesus, Church, brisbane, citynorthbaptist.com, jesus</itunes:keywords>
<?php
$mp3count = 0;
$accepted_extensions = array ('mp3', 'm4a', 'mp4', 'm4v','mov', 'wma', 'wmv');
foreach ($sermons as $sermon) {
if ($mp3count > 365)
break;
$media = sb_get_stuff($sermon);
if (is_array($media['Files']) | is_array($media['URLs'])) {
foreach ($media as $media_type => $media_names)
if (is_array($media_names) && $media_type != 'Code')
foreach ((array)$media_names as $media_name)
if (in_array(strtolower(substr($media_name, -3)), $accepted_extensions)) {
$mp3count++;
?>
<item>
<guid><?php echo sb_podcast_file_url($media_name, $media_type) ?></guid>
<title><?php echo sb_xml_entity_encode(stripslashes($sermon->title)) ?></title>
<link><?php echo sb_display_url().sb_query_char().'sermon_id='.$sermon->id ?></link>
<author><?php echo sb_xml_entity_encode(stripslashes($sermon->preacher)) ?></author>
<itunes:author><?php echo sb_xml_entity_encode(stripslashes($sermon->preacher)) ?></itunes:author>
<?php if ($sermon->description) { ?>
<description><![CDATA[<?php echo stripslashes($sermon->description) ?>]]></description>
<itunes:summary><![CDATA[<?php echo stripslashes($sermon->description) ?>]]></itunes:summary>
<?php } ?>
<enclosure url="<?php echo sb_podcast_file_url($media_name, $media_type).'" '.sb_media_size($media_name, $media_type).sb_mime_type($media_name); ?> />
<?php $duration = sb_mp3_duration($media_name, $media_type);
if ($duration) { ?>
<itunes:duration><?php echo $duration ?></itunes:duration>
<?php } ?>
<category><?php echo sb_xml_entity_encode(stripslashes($sermon->service)) ?></category>
<pubDate><?php sb_print_iso_date($sermon) ?></pubDate>
</item>
<?php
}
}
}
?>
</channel>
</rss>
5:59 pm
26 August, 2010
OfflineThanks @bookfreak — I'm afraid I still don't understand though. I'm pretty new to this.
Here's the contents of our podcast.php file — do you notice anything out of place?
Thanks again!
datetime));
} else
echo date('D, d M Y H:i:s O', strtotime($sermon));
}
//Prints size of file
function sb_media_size($media_name, $media_type) {
if ($media_type == 'URLs') {
if(ini_get('allow_url_fopen')) {
$headers = array_change_key_case(@get_headers($media_name, 1),CASE_LOWER);
$filesize = $headers['content-length'];
if ($filesize)
return "length="{$filesize}"";
}
} else
return 'length="'.@filesize(SB_ABSPATH.sb_get_option('upload_dir').$media_name).'"';
}
//Returns duration of .mp3 file
function sb_mp3_duration($media_name, $media_type) {
global $wpdb;
if (strtolower(substr($media_name, -3)) == 'mp3' && $media_type == 'Files') {
$duration = $wpdb->get_var("SELECT duration FROM {$wpdb->prefix}sb_stuff WHERE type = 'file' AND name = '{$media_name}'");
if ($duration)
return $duration;
else {
require_once('getid3/getid3.php');
$getID3 = new getID3;
$MediaFileInfo = $getID3->analyze(SB_ABSPATH.sb_get_option('upload_dir').$media_name);
$duration = isset($MediaFileInfo['playtime_string']) ? $MediaFileInfo['playtime_string'] : '';
$wpdb->query("UPDATE {$wpdb->prefix}sb_stuff SET duration = '{$duration}' WHERE type = 'file' AND name = '{$media_name}'");
return $duration;
}
}
}
//Replaces & with &
function sb_xml_entity_encode ($string) {
$string = str_replace('&', '&', str_replace('&', '&', $string));
$string = str_replace('"', '"', $string);
$string = str_replace("'", ''', $string);
$string = str_replace('', '>', $string);
return $string;
}
// Convert filename to URL, perhaps with stats
// Stats have to be turned off for iTunes compatibility
function sb_podcast_file_url($media_name, $media_type) {
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
if (stripos($user_agent, 'itunes') !== FALSE | stripos($user_agent, 'FeedBurner') !== FALSE)
$stats = FALSE;
else
$stats = TRUE;
if ($media_type == 'URLs') {
if ($stats)
$media_name=sb_display_url().sb_query_char().'show&url='.URLencode($media_name);
} else {
if (!$stats)
$media_name=get_bloginfo('wpurl').sb_get_option('upload_dir').URLencode($media_name);
else
$media_name=sb_display_url().sb_query_char().'show&file_name='.URLencode($media_name);
}
return sb_xml_entity_encode($media_name);
}
// Returns correct MIME type
function sb_mime_type($media_name) {
require ('filetypes.php');
$extension = strtolower(substr($media_name, strrpos($media_name, '.') + 1));
if (array_key_exists ($extension, $filetypes))
return ' type="'.$filetypes[$extension]['content-type'].'"';
}
$sermons = sb_get_sermons(
array(
'title' => isset($_REQUEST['title']) ? $_REQUEST['title'] : '',
'preacher' => isset($_REQUEST['preacher']) ? $_REQUEST['preacher'] : '',
'date' => isset($_REQUEST['date']) ? $_REQUEST['date'] : '',
'enddate' => isset($_REQUEST['enddate']) ? $_REQUEST['enddate'] : '',
'series' => isset($_REQUEST['series']) ? $_REQUEST['series'] : '',
'service' => isset($_REQUEST['service']) ? $_REQUEST['service'] : '',
'book' => isset($_REQUEST['book']) ? $_REQUEST['book'] : '',
'tag' => isset($_REQUEST['stag']) ? $_REQUEST['stag'] : '',
),
array(
'by' => 'm.datetime',
'dir' => 'desc',
),
1,
1000000
);
if (function_exists('wp_timezone_override_offset'))
wp_timezone_override_offset();
header('Content-Type: application/rss+xml');
echo ''."n";
?>
<atom:link href="" rel="self" type="application/rss+xml" />
CityChurch Fort Lauderdale
For the benefit of the city – spiritually, socially, culturally
en-us
© CityChurch Fort Lauderdale
no
Wordpress Sermon Browser plugin (http://www.4-14.org.uk/sermon-browser)
http://blogs.law.harvard.edu/tech/rss
Religion & Spirituality
15)
break;
$media = sb_get_stuff($sermon);
if (is_array($media['Files']) | is_array($media['URLs'])) {
foreach ($media as $media_type => $media_names)
if (is_array($media_names) && $media_type != 'Code')
foreach ((array)$media_names as $media_name)
if (in_array(strtolower(substr($media_name, -3)), $accepted_extensions)) {
$mp3count++;
?>
id ?>
preacher)) ?>
description) { ?>
<![CDATA[description) ?>]]>
<![CDATA[description) ?>]]>
<enclosure url=" />
service)) ?>
Send it in a message to me, or use the code tags, as the important bits have been cut off by the forum!
3:44 am
26 August, 2010
OfflineHere's a link to download the current version of the file.
http://dl.dropbox.com/u/314411…..odcast.php
Just to make sure that I'm sending (and editing) the correct file, this is from /wordpress/wp-content/plugins/sermon-browser/sb-includes/
Thanks again!
Yep that;s the right one!
I've edited your file for you, and changed the right stuff, have a quick scan to see if I've left any of my church info in it. But it should be fine to just drop on top of the old file.
Download: public.me.com/thebookfreak58
Tim
Most Users Ever Online: 40
Currently Online: 0be1, sim
15 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:
There have been 7 guest posters
There are 1937 members
There are 1 moderators
There are 1 admins
Forum Stats:
Groups: 1
Forums: 2
Topics: 973
Posts: 3782
Newest Members: damianv, twinton, ellison13579, Daigh, mchunful, jesua
Moderators: Ben Miller (383 )
Administrators: Mark Barnes (425)
Log In
Register
Home



