Podcast Generator

In redesigning my Church’s website,  it was requested of me to put a Sermon / Sunday School audio page on the site. The Church moved away from SermonAudio due to their price increase and the fact that SermonAudio hasn’t really served to bring people to our congregation. (This isn’t to say that their service is bad, or not worth the money for many congregations; just that it isn’t for our needs.)

I determined Podcast Generator would fit the bill, unfortunately, it doesn’t offer an easy embed option for existing sites. The author suggests an iframe for this, or to send him some support money and he will work it into an existing site.

While I may send some money his way at some point, I thought I would try my hand at it first. Along with fixing something else that was bugging me, the list doesn’t display categories for each individual mp3, to get the category one would have to go to the page for the individual mp3.

The first issue was resolved by whittling down the content displayed in the default theme. After hiding the image (it can be removed entirely, but I didn’t bother with that at this time), and removing the feed title and description it doesn’t look half bad.

The second issue required modifying the function.php from the core directory.  I copied lines 636 – 644 (between Show Long description and Buttons sections) from the showSingleEpisode function and inserted them at line 471. This is between the Short Description and Buttons sections of the showPodcastEpisodes function.

Finally, I had also found a bug with the iTunes image upload page. The UI says png files are acceptable, but does not actually accept them. I resolved that in /core/admin/itunesimg.php. I don’t know if other areas expect this image to be a jpg or if they too need correction. (see update)

This applies to Podcast Generator 2.4 released on Jan 13, 2015 8:53 AM. I can’t guarantee these changes will be appropriate in later versions.

My changes released under GPL. Podcast Generator without my modifications is available on SourceForge. I have submitted these to the author on SourceForge.

Update 3/5/2014: The author of Podcast Generator sent me a file that improves the iFrame display considerably, making theme alterations unnecessary. He has also informed me that there are other hard coded references to the iTunes image being a jpg, so I wouldn’t suggest using a png yet, unless you want to edit more of the PHP.

Files and diffs are below the break.

Files:

The modified functions.php including my minimal theme is included with the entire Podcast Generator 2.4 found here.

For the png fix and the above, go for this one. Note: I haven’t tested this beyond the upload, it might not show in the feed or in iTunes, or it may kill your cat.

The modified functions.php including my minimal theme is included with the entire Podcast Generator 2.4 found here.

For the png fix and the above, go for this one. Note: I haven’t tested this beyond the upload, it might not show in the feed or in iTunes, or it may kill your cat.

Diff if one wanted to patch their core/functions.php:

471,477d470
< /// Categories 
< $resulting_episodes .= '<p><em>'._("Categories").'</em> '; 
< if ($thisPodcastEpisodeData[8] != "") $resulting_episodes .= ' | <a href="?p=archive&cat='.$thisPodcastEpisodeData[8] .'">'.categoryNameFromID($absoluteurl,$thisPodcastEpisodeData[8]).'</a>';
< if ($thisPodcastEpisodeData[9] != "") $resulting_episodes .= ' | <a href="?p=archive&cat='.$thisPodcastEpisodeData[9].'">'.categoryNameFromID($absoluteurl,$thisPodcastEpisodeData[9]).'</a>';
< if ($thisPodcastEpisodeData[10] != "") $resulting_episodes .= ' | <a href="?p=archive&cat='.$thisPodcastEpisodeData[10].'">'.categoryNameFromID($absoluteurl,$thisPodcastEpisodeData[10]).'</a>';
< $resulting_episodes .= '</p>';
<

Diff for /core/admin/itunesimg.php

38,40c38
< 			
< 			//correcting not accepting png bug
< 			if ($img_ext[1]=="jpg" OR $img_ext[1]=="jpeg" OR $img_ext[1]=="JPG" OR $img_ext[1]=="JPEG" OR $img_ext[1]=="PNG" OR $img_ext[1]=="png") { // check image format --- > 			if ($img_ext[1]=="jpg" OR $img_ext[1]=="jpeg" OR $img_ext[1]=="JPG" OR $img_ext[1]=="JPEG") { // check image format
42,50c40
< 				switch(strtolower($img_ext[1]))
< 				{
< 					case 'jpg':
< 					case 'jpeg':
< 						$uploadFile2 = $absoluteurl.$img_dir."itunes_image.jpg";
< 						break;
< 					case 'png':
< 						$uploadFile2 = $absoluteurl.$img_dir."itunes_image.png";
< 				} --- > 				$uploadFile2 = $absoluteurl.$img_dir."itunes_image.jpg";