WordPress.org

Plugin Directory


Ignore:
Timestamp:
10/02/09 01:54:46 (5 years ago)
Author:
mark8barnes
Message:

Version 0.43.2 - More bug fixes

Location:
sermon-browser/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • sermon-browser/trunk/sb-includes/admin.php

    r156082 r159840  
    2828    global $wpdb, $sermon_domain; 
    2929    //Security check 
    30     if (function_exists('current_user_can')&&!current_user_can('manage_options')) 
     30    if (!current_user_can('manage_options')) 
    3131            wp_die(__("You do not have the correct permissions to edit the SermonBrowser options", $sermon_domain)); 
    3232    //Reset options to default 
     
    23432343*/ 
    23442344function sb_import_options_set () { 
    2345     if (!sb_get_option('import_title') && !sb_get_option('import_artist') && !sb_get_option('import_album') && !sb_get_option('import_comments') && sb_get_option('import_filename') == 'none') 
     2345    if (!sb_get_option('import_title') && !sb_get_option('import_artist') && !sb_get_option('import_album') && !sb_get_option('import_comments') && (!sb_get_option('import_filename') || sb_get_option('import_filename') == 'none')) 
    23462346        return false; 
    23472347    else 
  • sermon-browser/trunk/sb-includes/dictionary.php

    r156082 r159840  
    6969        '[lbrvtext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo sb_add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "rv1909"); endfor ?>', 
    7070        '[cornilescutext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo sb_add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "cornilescu"); endfor ?>', 
     71        '[synodaltext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo sb_add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "synodal"); endfor ?>', 
    7172        '[biblepassage]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): sb_print_bible_passage ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i]); endfor ?>', 
    7273        '[editlink]' => '<?php sb_edit_link($_GET["sermon_id"]) ?>', 
  • sermon-browser/trunk/sb-includes/frontend.php

    r156082 r159840  
    1515        'series' => 0, 
    1616        'limit' => 5, 
     17        'url_only' => 0, 
    1718    ); 
    1819    $options = array_merge($default, (array) $options); 
    1920    extract($options); 
     21    if ($url_only == 1) 
     22        $limit = 1; 
    2023    $sermons = sb_get_sermons(array( 
    2124            'preacher' => $preacher, 
     
    2528        array(), 1, $limit       
    2629    ); 
    27     echo "<ul class=\"sermon-widget\">\r"; 
    28     foreach ((array) $sermons as $sermon) { 
    29         echo "\t<li>"; 
    30         echo "<span class=\"sermon-title\"><a href=\""; 
    31         sb_print_sermon_link($sermon); 
    32         echo "\">".stripslashes($sermon->title)."</a></span>"; 
    33         if ($display_passage) { 
    34             $foo = unserialize($sermon->start); 
    35             $bar = unserialize($sermon->end); 
    36             echo "<span class=\"sermon-passage\"> (".sb_get_books($foo[0], $bar[0]).")</span>"; 
    37         } 
    38         if ($display_preacher) { 
    39             echo "<span class=\"sermon-preacher\">".__('by', $sermon_domain)." <a href=\""; 
    40             sb_print_preacher_link($sermon); 
    41             echo "\">".stripslashes($sermon->preacher)."</a></span>"; 
    42         } 
    43         if ($display_date) 
    44             echo " <span class=\"sermon-date\">".__('on', $sermon_domain)." ".sb_formatted_date ($sermon)."</span>"; 
    45         if ($display_player) 
    46             sb_display_mini_player($sermon); 
    47         echo ".</li>\r"; 
    48     } 
    49     echo "</ul>\r"; 
     30    if ($url_only == 1) 
     31        sb_print_sermon_link($sermons[0]); 
     32    else { 
     33        echo "<ul class=\"sermon-widget\">\r"; 
     34        foreach ((array) $sermons as $sermon) { 
     35            echo "\t<li>"; 
     36            echo "<span class=\"sermon-title\"><a href=\""; 
     37            sb_print_sermon_link($sermon); 
     38            echo "\">".stripslashes($sermon->title)."</a></span>"; 
     39            if ($display_passage) { 
     40                $foo = unserialize($sermon->start); 
     41                $bar = unserialize($sermon->end); 
     42                echo "<span class=\"sermon-passage\"> (".sb_get_books($foo[0], $bar[0]).")</span>"; 
     43            } 
     44            if ($display_preacher) { 
     45                echo "<span class=\"sermon-preacher\">".__('by', $sermon_domain)." <a href=\""; 
     46                sb_print_preacher_link($sermon); 
     47                echo "\">".stripslashes($sermon->preacher)."</a></span>"; 
     48            } 
     49            if ($display_date) 
     50                echo " <span class=\"sermon-date\">".__('on', $sermon_domain)." ".sb_formatted_date ($sermon)."</span>"; 
     51            if ($display_player) 
     52                sb_display_mini_player($sermon); 
     53            echo ".</li>\r"; 
     54        } 
     55        echo "</ul>\r"; 
     56    } 
    5057} 
    5158 
     
    130137    if ($options['display_sermons']) { 
    131138        $sermons = $wpdb->get_results("SELECT sermons.id, sermons.title, sum(stuff.count) AS total 
    132                                        FROM wp_sb_stuff AS stuff 
     139                                       FROM {$wpdb->prefix}sb_stuff AS stuff 
    133140                                       LEFT JOIN wp_sb_sermons AS sermons ON stuff.sermon_id = sermons.id 
    134141                                       GROUP BY sermons.id ORDER BY total DESC LIMIT 0, {$options['limit']}"); 
     
    154161    if ($options['display_series']) { 
    155162        $series1 = $wpdb->get_results("SELECT series.id, series.name, avg(stuff.count) AS average 
    156                                        FROM wp_sb_stuff AS stuff 
    157                                        LEFT JOIN wp_sb_sermons AS sermons ON stuff.sermon_id = sermons.id 
    158                                        LEFT JOIN wp_sb_series AS series ON sermons.series_id = series.id 
     163                                       FROM {$wpdb->prefix}sb_stuff AS stuff 
     164                                       LEFT JOIN {$wpdb->prefix}sb_sermons AS sermons ON stuff.sermon_id = sermons.id 
     165                                       LEFT JOIN {$wpdb->prefix}sb_series AS series ON sermons.series_id = series.id 
    159166                                       GROUP BY series.id ORDER BY average DESC"); 
    160167        $series2 = $wpdb->get_results("SELECT series.id, sum(stuff.count) AS total 
    161                                        FROM wp_sb_stuff AS stuff 
    162                                        LEFT JOIN wp_sb_sermons AS sermons ON stuff.sermon_id = sermons.id 
    163                                        LEFT JOIN wp_sb_series AS series ON sermons.series_id = series.id 
     168                                       FROM {$wpdb->prefix}sb_stuff AS stuff 
     169                                       LEFT JOIN {$wpdb->prefix}sb_sermons AS sermons ON stuff.sermon_id = sermons.id 
     170                                       LEFT JOIN {$wpdb->prefix}sb_series AS series ON sermons.series_id = series.id 
    164171                                       GROUP BY series.id ORDER BY total DESC"); 
    165172        if ($series1) { 
     
    198205    if ($options['display_preachers']) { 
    199206        $preachers1 = $wpdb->get_results("SELECT preachers.id, preachers.name, avg(stuff.count) AS average 
    200                                           FROM wp_sb_stuff AS stuff 
    201                                           LEFT JOIN wp_sb_sermons AS sermons ON stuff.sermon_id = sermons.id 
    202                                           LEFT JOIN wp_sb_preachers AS preachers ON sermons.preacher_id = preachers.id 
     207                                          FROM {$wpdb->prefix}sb_stuff AS stuff 
     208                                          LEFT JOIN {$wpdb->prefix}sb_sermons AS sermons ON stuff.sermon_id = sermons.id 
     209                                          LEFT JOIN {$wpdb->prefix}sb_preachers AS preachers ON sermons.preacher_id = preachers.id 
    203210                                          GROUP BY preachers.id 
    204211                                          ORDER BY average DESC"); 
    205212        $preachers2 = $wpdb->get_results("SELECT preachers.id, sum(stuff.count) AS total 
    206                                           FROM wp_sb_stuff AS stuff 
    207                                           LEFT JOIN wp_sb_sermons AS sermons ON stuff.sermon_id = sermons.id 
    208                                           LEFT JOIN wp_sb_preachers AS preachers ON sermons.preacher_id = preachers.id 
     213                                          FROM {$wpdb->prefix}sb_stuff AS stuff 
     214                                          LEFT JOIN {$wpdb->prefix}sb_sermons AS sermons ON stuff.sermon_id = sermons.id 
     215                                          LEFT JOIN {$wpdb->prefix}sb_preachers AS preachers ON sermons.preacher_id = preachers.id 
    209216                                          GROUP BY preachers.id 
    210217                                          ORDER BY total DESC"); 
     
    475482// Adds javascript and CSS where required 
    476483function sb_add_headers() { 
    477     global $sermon_domain, $post, $wpdb; 
     484    global $sermon_domain, $post, $wpdb, $wp_scripts; 
    478485    if (isset($post->ID) && $post->ID != '') { 
    479486        echo "<!-- Added by SermonBrowser (version ".SB_CURRENT_VERSION.") - http://www.4-14.org.uk/sermon-browser -->\r"; 
    480487        echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"".__('Sermon podcast', $sermon_domain)."\" href=\"".sb_get_option('podcast_url')."\" />\r"; 
    481         wp_enqueue_script('jquery');                          
    482         $sidebars_widgets = wp_get_sidebars_widgets(); 
    483         if (isset($sidebars_widgets['wp_inactive_widgets'])) 
    484             unset($sidebars_widgets['wp_inactive_widgets']); 
    485         foreach ($sidebars_widgets as $sb_w) 
    486             if (array_key_exists('sermon-browser-popular', $sb_w)) { 
    487                 wp_enqueue_script('jquery'); 
    488                 break; 
     488        wp_enqueue_style('sb_style'); 
     489        $pageid = $wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE post_content LIKE '%[sermons%' AND (post_status = 'publish' OR post_status = 'private') AND ID={$post->ID} AND post_date < NOW();"); 
     490        if ($pageid !== NULL) { 
     491            if (sb_get_option('filter_type') == 'dropdown') { 
     492                wp_enqueue_script('sb_datepicker'); 
     493                wp_enqueue_style ('sb_datepicker'); 
    489494            } 
    490         $pageid = $wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE post_content LIKE '%[sermons%' AND (post_status = 'publish' OR post_status = 'private') AND ID={$post->ID} AND post_date < NOW();"); 
    491         if ($pageid !== NULL) { 
    492             wp_enqueue_script('sb_datepicker'); 
    493             wp_enqueue_style ('sb_datepicker'); 
    494             wp_enqueue_style ('sb_style'); 
    495             if (isset($_REQUEST['title']) || isset($_REQUEST['preacher']) || isset($_REQUEST['date']) || isset($_REQUEST['enddate']) || isset($_REQUEST['series']) || isset($_REQUEST['service']) || isset($_REQUEST['book']) || isset($_REQUEST['stag'])) 
    496                 echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"".__('Custom sermon podcast', $sermon_domain)."\" href=\"".sb_podcast_url()."\" />\r"; 
    497         } 
     495            if (isset($_REQUEST['title']) || isset($_REQUEST['preacher']) || isset($_REQUEST['date']) || isset($_REQUEST['enddate']) || isset($_REQUEST['series']) || isset($_REQUEST['service']) || isset($_REQUEST['book']) || isset($_REQUEST['stag'])) 
     496                echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"".__('Custom sermon podcast', $sermon_domain)."\" href=\"".sb_podcast_url()."\" />\r"; 
     497            wp_enqueue_script('jquery'); 
     498        } else { 
     499            $sidebars_widgets = wp_get_sidebars_widgets(); 
     500            if (isset($sidebars_widgets['wp_inactive_widgets'])) 
     501                unset($sidebars_widgets['wp_inactive_widgets']); 
     502            if (is_array($sidebars_widgets)) 
     503                foreach ($sidebars_widgets as $sb_w) 
     504                    if (is_array($sb_w) && in_array('sermon-browser-popular', $sb_w)) 
     505                        wp_enqueue_script('jquery'); 
     506        } 
    498507    } 
    499508} 
     
    514523// Returns podcast URL 
    515524function sb_podcast_url() { 
    516     return str_replace(' ', '%20', sb_build_url(array('podcast' => 1, 'dir'=>'desc', 'sortby'=>'m.datetime'))); 
     525    return str_replace(' ', '%20', sb_build_url(array('podcast' => 1, 'dir'=>'desc', 'sortby'=>'m.datetime'), true)); 
    517526} 
    518527 
     
    956965                                    <option value="0" <?php echo isset($_REQUEST['service']) && $_REQUEST['service'] != 0 ? '' : 'selected="selected"' ?>><?php _e('[All]', $sermon_domain) ?></option> 
    957966                                    <?php foreach ($services as $service): ?> 
    958                                     <option value="<?php echo $service->id ?>" <?php echo isset($_REQUEST['service']) == $service->id ? 'selected="selected"' : '' ?>><?php echo stripslashes($service->name).' ('.$service->count.')' ?></option> 
     967                                    <option value="<?php echo $service->id ?>" <?php echo isset($_REQUEST['service']) && $_REQUEST['service'] == $service->id ? 'selected="selected"' : '' ?>><?php echo stripslashes($service->name).' ('.$service->count.')' ?></option> 
    959968                                    <?php endforeach ?> 
    960969                                </select> 
     
    966975                                    <option value=""><?php _e('[All]', $sermon_domain) ?></option> 
    967976                                    <?php foreach ($book_count as $book): ?> 
    968                                     <option value="<?php echo $book->name ?>" <?php echo $_REQUEST['book'] == $book->name ? 'selected=selected' : '' ?>><?php echo stripslashes($book->name). ' ('.$book->count.')' ?></option> 
     977                                    <option value="<?php echo $book->name ?>" <?php echo isset($_REQUEST['book']) && $_REQUEST['book'] == $book->name ? 'selected=selected' : '' ?>><?php echo stripslashes($book->name). ' ('.$book->count.')' ?></option> 
    969978                                    <?php endforeach ?> 
    970979                                </select> 
     
    974983                                    <option value="0" <?php echo $_REQUEST['series'] != 0 ? '' : 'selected="selected"' ?>><?php _e('[All]', $sermon_domain) ?></option> 
    975984                                    <?php foreach ($series as $item): ?> 
    976                                     <option value="<?php echo $item->id ?>" <?php echo $_REQUEST['series'] == $item->id ? 'selected="selected"' : '' ?>><?php echo stripslashes($item->name).' ('.$item->count.')' ?></option> 
     985                                    <option value="<?php echo $item->id ?>" <?php echo isset($_REQUEST['series']) && $_REQUEST['series'] == $item->id ? 'selected="selected"' : '' ?>><?php echo stripslashes($item->name).' ('.$item->count.')' ?></option> 
    977986                                    <?php endforeach ?> 
    978987                                </select> 
  • sermon-browser/trunk/sb-includes/php4compat.php

    r154761 r159840  
    22 
    33// Emulates stripos 
    4 if (!function_exists("stripos")) { 
     4if (!function_exists('stripos')) { 
    55    function stripos($haystack, $needle, $offset=0) { 
    66        return strpos(strtolower($haystack), strtolower($needle), $offset); 
  • sermon-browser/trunk/sb-includes/podcast.php

    r154761 r159840  
    1414            $headers = array_change_key_case(@get_headers($media_name, 1),CASE_LOWER); 
    1515            $filesize = $headers['content-length']; 
    16             if ($filesize) return "length=\"{$filesize}\""; 
     16            if ($filesize) 
     17                return "length=\"{$filesize}\""; 
    1718        } 
    1819    } else 
  • sermon-browser/trunk/sb-includes/readme.txt

    r156082 r159840  
    252511. Support for [Wordpress MU](http://mu.wordpress.org/) (WPMU). 
    262612. Extensive **help** and [tutorial screencasts](http://www.4-14.org.uk/wordpress-plugins/sermon-browser#tutorial). 
    27 13. English and Spanish translations included. 
     2713. English, Spanish, Romanian and Russian translations included. 
    2828 
    2929== Installation == 
     
    6060== Changelog == 
    6161 
    62 = 0.43.1 = 
    63 * New feature: The Romanian Cornilescu Bible version has been added. Use the template tag [cornliescutext] 
    64 * Optimisation: Most bible texts now served from SermonBrowser's own API service, not Living Stones Ministries (ESV and NET continue to be supplied direct from the publisher). Unfortunately the Hebrew Names Version is no longer available, but *it makes possible the addition of bibles in dozens of other languages*. If you would like your language included, please ask. 
    65 * Optimisation: Improved Spanish translation (thanks to Marvin Ortega). 
    66 * Bug fix: Removed error with wp_timezone_supported() on Wordpress 2.6 and 2.7. 
    67 * Bug fix: Warning message now correctly displays in admin when [sermons] shortcode is missing. 
    68 * Bug fix: Stylesheet now loaded correctly even with default permalinks. 
    69 * Bug fix: Fixed link to podcast background image. 
    70  
    71 = 0.43 = 
    72 * New feature: Automatically populate entry fields using the ID3 tags in MP3 files (thanks to James Hudson who helped with this feature). 
    73 * New feature: New widget that displays most popular sermons/series/preachers. Can also be added to your theme by calling sb&#95;print&#95;most&#95;popular(), or to the SermonBrowser template by using [most_popular] 
    74 * New feature: Optionally hide sermons that do not have files attached. 
    75 * New feature: Copy MP3 files from other websites to your server. 
    76 * New feature: Contextual help in admin (Wordpress 2.7+ only). 
    77 * New feature: Thank you page for those who have donated. 
    78 * Optimisation: Sermon length now stored in the database. 
    79 * Optimisation: Major changes to coding structure for better performance and easier updates. 
    80 * Optimisation: Tidied up code to enable WP_DEBUG to be set without throwing up dozens of notices. 
    81 * Bug fix: Sort by date now takes proper account of service times. 
    82 * Bug fix: Double-quotes in sermon titles don't disappear when editing. 
    83 * Bug fix: Now displays friendly error with invalid sermon_id. 
    84 * Bug fix: Links to series/service/preacher now work correctly on individual sermon page. 
    85 * Bug fix: Multiple bible passages and same-day sermons now display more neatly on individual sermon page. 
    86 * Bug fix: Widgets now link to shortcode pages if there is no [sermons] page. 
    87  
    88 = 0.42.4 = 
    89 * Bug fix: Fixed several problems in Admin caused by incompatibilities with Wordpress 2.8. 
    90  
    91 = 0.42.3 = 
    92 * Bug fix: Missing dates now display correctly. 
    93 * Bug fix: Podcast now works even with PHP4. 
    94 * Bug fix: Definitely no more SQL warnings on install. 
    95  
    96 = 0.42.2 = 
    97 * Bug fix: Fixed weird error preventing audio plays on some set-ups. 
    98  
    99 = 0.42.1 = 
    100 * Bug fix: Fixed SQL error with embedded URLs. 
    101 * Bug fix: Possible fix for download failure on some set-ups. 
    102 * Bug fix: Podcast now works even if some URLs are invalid. 
    103 * Bug fix: No more SQL warnings on install. 
    104  
    105 = 0.42 = 
    106 * New feature: Sermon Browser shortcodes allow you to include single sermons or lists of sermons on any post or page on your website. For example, adding the shortcode [sermons preacher=1 id=latest] to your pastor's page would display full details of his most recent sermon on that page. 
    107 * Optimisation: Consolidated various help and tutorial pages to avoid having to keep three different versions up to date! 
    108 * Bug fix: External URLs now display on the search page alongside attached files. 
    109 * Bug fix: No more SQL errors on Wordpress custom pages. 
    110  
    111 = 0.41.2 = 
    112 * Bug fix: Some dates displaying incorrectly after Daylight Savings Time change. 
    113  
    114 = 0.41.1 = 
    115 * Bug fix: URLs (and not just files) now show up in podcast feeds. Multiple files/URLs per sermon are now also supported, as are some non-mp3 files such as .mov and .mp4 
    116 * Bug fix: Minor bug affecting people who have renamed their Wordpress database. 
    117  
    118 = 0.41 = 
    119 * New feature: Alternative 'one-click' filtering system. Go to SermonBrowser/Options to select it. 
    120 * New feature: Filter can now be 'minimised' to make better use of space. 
    121 * New feature: NET Bible can now be used, bringing the total to nine translations. 
    122 * New feature: Podcast feed now displays sermon length and preacher's name in iTunes. 
    123 * Optimisation: Less javascript loaded on front-end. 
    124 * Optimisation: Icon added to admin pages in Wordpress 2.7. 
    125 * Optimisation: Much more subtle podcast icons should display better in most themes (reset template to default to benefit). 
    126 * Bug fix: Sermons now display in admin even if there are no bible references or series. 
    127 * Bug fix: Single verse references now display correctly (thanks to Mark Bouchard). 
    128 * Bug fix: More error checks for bad data in podcast feed. 
    129 * Bug fix: Mini-player now displays in correct colour when used with AudioPlayer v2. 
    130 * Change: The plugin now requires Wordpress 2.5 or above. 
    131  
    132 = 0.40.2 = 
    133 * Bug fix: Further fix to ensure valid podcast feeds. 
    134  
    135 = 0.40.1 = 
    136 * Bug fix: Fixed bug introduced in previous version that prevented podcasts working in iTunes. 
    137  
    138 = 0.40 = 
    139 * New feature: Added sermon browser tag cloud widget. 
    140 * New feature: Optional mini audio player now in the sidebar widget. Go to the widget options to turn it on. 
    141 * Optimisation: Admin pages now display correctly in Wordpress 2.7. 
    142 * Optimisation: Added workaround to ensure iTunes works with Feedburner. 
    143 * Bug fix: Hopefully finally fixed the podcast problems for those not using permalinks. You may need to resave your options, or even reset your options if upgrading from an earlier version. 
    144  
    145 = 0.39 = 
    146 * New feature: Sermon Browser in Spanish. Thanks to Juan for providing the translation. 
    147 * New feature: If you have 'Update services' enabled in Wordpress, a special web-service is now 'pinged' when sermons are edited. This will help your sermons be found by search engines. 
    148 * Bug fix: Calendar now displays correctly in admin (removed CSS clash). 
    149 * Bug fix: Bible books and dates now appear correctly in non-English languages. You may need to reset the options to default to make this work. 
    150  
    151 = 0.38 = 
    152 * New Feature: Spanish Reina Valera Bible now available (use the code [lbrvtext] in the template). Thanks to Juan and Living Stones Ministries. 
    153 * New Feature: Podcast now displays the time a sermon was preached, as well as the date. 
    154 * Optimisation: Administrators and editors can now include any HTML code in sermon descriptions without it being stripped. 
    155 * Optimisation: Reminder in admin to install AudioPlayer plugin. 
    156 * Optimisation: Podcast now only includes sermons that have MP3 attachments. 
    157 * Bug fix: The Uploads page now works correctly. Files can be named and deleted, and the search facility works again. Deleted files no longer show up in the list of unlinked files. Thanks to Matthew Hiatt for solving this. 
    158 * Bug fix: Users in all timezones should see sermon dates correctly. 
    159 * Bug fix: File downloads should be much more reliable, and no more randomly corrupted filenames. Filenames with spaces should also no longer present a problem. 
    160 * Bug fix: Sermon Browser can now be displayed on private pages. 
    161 * Bug fix: Office 2007 files now have correct MIME-type. 
    162 * Bug fix: Javascript error in admin due to jQuery conflict is now fixed. 
    163  
    164 = 0.37.3 = 
    165 * Bug fix: HTML should now validate (ampersands in URLs now correct). 
    166 * Bug fix: Podcast feed on sites without pretty permalinks should now work. 
    167  
    168 = 0.37.2 = 
    169 * Bug fix: Fixed incompatibilities with a few more plug-ins introduced in the previous version. 
    170  
    171 = 0.37.1 = 
    172 * Bug fix: Now compatible with the Gengo plugin. 
    173  
    174 = 0.37 = 
    175 * Optimisation: Download stats are no longer counted for blog authors/admins (thanks Matthew Hiatt) 
    176 * Optimisation: Sermon Browser now deactivates itself when it is uninstalled. 
    177 * Bug fix: Rogue slashes no longer display in filter. 
    178 * Bug fix: Divide by zero error on dashboard fixed (thanks Matthew Hiatt). 
    179 * Bug fix: User templates now updated after upgrade if dictionary.php is changed. 
    180 * Bug fix: Sermon Browser now uses the date format from Wordpress settings. 
    181  
    182 = 0.36 = 
    183 * Added: Two new Bible versions (American King James [AKJV], and the Hebrew Names Version [HNV]) 
    184 * Fixed: Filter now works even when sermons page is the front page of site. 
    185 * Fixed: Non-ESV bibles now display. 
    186  
    187 = 0.35 = 
    188 * Added: Simple statistics on Dashboard (Wordpress 2.5+) 
    189 * Optimisation: Large download files less likely to cause errors. 
    190 * Optimisation: More robust tag handling. 
    191 * Fixed: Closed security loophole. 
    192 * Fixed: Duplicate indexes bug. 
    193 * Fixed: PHP errors when adding sermons with no bible passage. 
    194  
    195 = 0.34 = 
    196 * Added: Support for WordPress MU! 
    197 * Changed: Will now create 'uploads' folder if it doesn't already exist. 
    198 * Fixed: YLT and WEB Bibles now display correctly. 
    199 * Fixed: Minor bug affecting those who have renamed their Wordpress database. 
    200  
    201 = 0.33 = 
    202 * Fixed: Two minor bugs affecting users with Wordpress installs away from their root directory. 
    203  
    204 = 0.32 = 
    205 * Fixed: Sermons now download correctly in iTunes (although iTunes downloads won't count towards your stats due to an iTunes limitation). 
    206 * Fixed: You can now add more than three bible passages to a sermon. 
    207 * Fixed: ALT text now correct on file icons. 
    208 * Fixed: Links now work correctly even when Wordpress is not in the root. 
    209 * Fixed: Double-path bug for podcast URL fixed. 
    210 * Added: Compatibility with Wordpress 2.6 custom plug-in folders. 
    211 * Added: Auto-discovery for custom podcasts. 
    212 * Optimisation: Additional files are now inserted into <HEAD> only when required, rather than on every page. 
    213  
    214 = 0.31 = 
    215 * Added: The sermon description now preserves lines breaks and allows most HTML code. 
    216 * Added: More helpful warnings if permissions on image uploads folder are incorrect, or if [sermons] tag not included in a page/post. 
    217 * Added: Option to change how many sermons are displayed per page. 
    218 * Added: Better security to prevent unauthorised users from editing data. 
    219 * Changed: Plug-in no longer uses single.php, multi.php and style.css. This should reduce the number of people having file permission problems. Users of older versions can now safely delete those files. 
    220 * Changed: Templates now have their own menu. Some of the other options screens have been tweaked slightly. 
    221 * Changed: Podcast now attaches linked URLs as well as uploaded files. 
    222 * Changed: Tag cloud now uses proportional, not fixed size fonts. 
    223 * Changed: Default template should display podcast links better on most sites. (It now uses TABLEs rather than DIVs.) Reset the templates to default to benefit. 
    224 * Fixed: Bible books are now displayed in the filter even for previous users of older versions. 
    225 * Fixed: Newly uploaded files now save correctly to sermon. 
    226 * Fixed: Next/previous buttons now display correctly. 
    227 * Fixed: Prevented 'Maximum time for script is -1 seconds' message on older versions of PHP. 
    228 * Optimisation: Better commenting throughout PHP. 
    229  
    230 = 0.30.1 = 
    231 * Fixed: Three bugs - one that prevented uploading, one that made series/sermons/preachers appear in the filters even if they had not been assign to any sermons, and one that prevented downloads when pretty permalinks were not used. 
    232  
    233 = 0.30 = 
    234 * Added: Statistics! See how often a sermon has been listened to in the admin section. Works for sermons that are downloaded or played inline with the AudioPlayer. It doesn't work (and never can) for embedded files (e.g. videos). At the moment the stats are only there in the admin section, but feel free to suggest ways they could be helpful to viewers of your website. 
    235 * Added: The drop-down menus for the search options are now more intelligent. (1) They display the number of sermons recorded for each preacher/series/services/bible book. (2) They only display bible books that have sermons listed. (3) The more important preachers/series/services are displayed higher up in the drop-down list. 
    236 * Changed: Some significant optimisations. The main database queries are now twenty times faster than before. On my server the database activity to display the sermon-browser page takes less than seven hundredths of a second (it was about half a second). This is with 180 sermons in the database. 
    237 * Fixed: Preacher's name now displays correctly in page title. 
    238 * Fixed: All links now work correctly even when permalinks are turned off. 
    239  
    240 = 0.25 = 
    241 * Added: [editlink] tag adds an 'Edit sermon' link if the currently logged-in user has edit privileges. 
    242 * Added: [sermon_description] tag now displays description of sermon on sermon page 
    243 * Added: [file_with&#95;download] tag is similar to [file], but adds a download link if the AudioPlayer is displayed 
    244 * Changed: External URLs and local files are now treated in the same way. 
    245  
    246 = 0.24 = 
    247 * Added: Plug-in now updates automatically on Wordpress 2.3 and above 
    248 * Added: Podcasts now include filesizes of MP3 files 
    249 * Fixed: Now able to delete and rename linked files 
    250 * Fixed: Custom podcast now always returns most recent sermons 
    251 * Fixed: Podcasts now return a maximum of 15 sermons 
    252  
    253 = 0.23 = 
    254 * Added: Individual sermon pages now show sermon details in page title for better navigation and SEO. 
    255 * Added: Several checks for settings in php.ini that might cause uploads to fail. 
    256 * Added: Support for cURL (provides better compatibility for displaying bible texts). 
    257 * Fixed: Now able to display images and descriptions of preachers on their sermons. 
    258 * Optimisation: Several other minor bug fixes. 
    259  
    260 = 0.22 = 
    261 * Added: Four new Bible versions: ASV, KJV, YLT and WEB (in addition to ESV) 
    262 * Added: Support for version 2 of the 1PixelOut Audio Player 
    263 * Optimisation: Two minor bug fixes. 
    264  
    265 = 0.21 = 
    266 * Added: Template tags for iTunes specific podcast links. 
    267 * Changed: Non-administrators can now use Sermon Browser (although only Administrators can change the options). 
    268 * Changed: Updated default template and CSS. Reset to defaults in Options to use it. 
    269 * Changed: More options in sidebar widget. 
    270 * Optimisation: Reduced number of database queries, reducing page-creation time by around 15%. 
    271 * Fixed: Links in the widget give 'Page not found errors' 
    272 * Fixed: Filter by date gives incorrect results 
    273  
    274 = 0.2 = 
    275 * Added: Podcasting support 
    276 * Added: Sidebar widget 
    277 * Added: Now possible to edit CSS 
    278 * Added: Support for embedded video and linked files 
    279 * Added: Option to display ESV text 
    280 * Added: Option to allow filtering by Bible book 
    281 * Fixed: 'Page not found' errors when linking to individual sermons 
    282 * Changed: Display of bible references is now more intelligent 
    283 * Optimisation: Many other bug fixes and minor enhancements 
    284  
    285 = 0.1 = 
    286 * Initial release 
     62= 0.43.2 (2 October 2009) = 
     63* **New feature:** Added `url_only` option to sb_display_sermons. 
     64* **New feature:** Added [most_popular] template tag. Displays the data from the 'most popular' widget, but on your sermon search page. 
     65* **New feature:** Added Russian and Romanian translations (thanks to [FatCow](http://www.fatcow.com/) and [Lucian Mihailescu](http://intercer.net)). 
     66* **New feature:** The Russian Synodal Bible version has been added. Use the template tag [synodaltext]. 
     67* **Optimisation:** Added error checking for possible bug with PHPs `unserialize` function which caused multiple upgrades to SermonBrowser's database. 
     68* **Optimisation:** More intelligent caching for SermonBrowser's style sheet, meaning quicker page loads. 
     69* **Bug fix:** Podcast fixed for PHP4. 
     70* **Bug fix:** Stopped the SermonBrowser help menu showing for registered users who do not have permissions to use SermonBrowser. 
     71* **Bug fix:** `array_key_exists` error no longer displayed on sidebarless pages. 
     72* **Bug fix:** Series drop down now shows correct search result. 
     73* **Bug fix:** Fixed bug which set the wrong upload path if Wordpress' own upload feature had never been used. 
     74* **Bug fix:** ID3 uploader now hidden until upload options set. 
     75* **Bug fix:** Popular sermons widget now works with non-standard database prefixes. 
     76 
     77= 0.43.1 (18 September 2009) = 
     78* **New feature:** The Romanian Cornilescu Bible version has been added. Use the template tag [cornliescutext] 
     79* **Optimisation:** Most bible texts now served from SermonBrowser's own API service, not Living Stones Ministries (ESV and NET continue to be supplied direct from the publisher). Unfortunately the Hebrew Names Version is no longer available, but *it makes possible the addition of bibles in dozens of other languages*. If you would like your language included, please ask. 
     80* **Optimisation:** Improved Spanish translation (thanks to Marvin Ortega). 
     81* **Bug fix:** Removed error with wp&#95;timezone&#95;supported() on Wordpress 2.6 and 2.7. 
     82* **Bug fix:** Warning message now correctly displays in admin when [sermons] shortcode is missing. 
     83* **Bug fix:** Stylesheet now loaded correctly even with default permalinks. 
     84* **Bug fix:** Fixed link to podcast background image. 
     85 
     86= 0.43 (14 September 2009) = 
     87* **New feature:** Automatically populate entry fields using the ID3 tags in MP3 files (thanks to James Hudson who helped with this feature). 
     88* **New feature:** New widget that displays most popular sermons/series/preachers. Can also be added to your theme by calling sb&#95;print&#95;most&#95;popular(), or to the SermonBrowser template by using [most_popular] 
     89* **New feature:** Optionally hide sermons that do not have files attached. 
     90* **New feature:** Copy MP3 files from other websites to your server. 
     91* **New feature:** Contextual help in admin (Wordpress 2.7+ only). 
     92* **New feature:** Thank you page for those who have donated. 
     93* **Optimisation:** Sermon length now stored in the database. 
     94* **Optimisation:** Major changes to coding structure for better performance and easier updates. 
     95* **Optimisation:** Tidied up code to enable WP_DEBUG to be set without throwing up dozens of notices. 
     96* **Bug fix:** Sort by date now takes proper account of service times. 
     97* **Bug fix:** Double-quotes in sermon titles don't disappear when editing. 
     98* **Bug fix:** Now displays friendly error with invalid sermon_id. 
     99* **Bug fix:** Links to series/service/preacher now work correctly on individual sermon page. 
     100* **Bug fix:** Multiple bible passages and same-day sermons now display more neatly on individual sermon page. 
     101* **Bug fix:** Widgets now link to shortcode pages if there is no [sermons] page. 
     102 
     103= 0.42.4 (21 June 2009) = 
     104* **Bug fix:** Fixed several problems in Admin caused by incompatibilities with Wordpress 2.8. 
     105 
     106= 0.42.3 (17 April 2009) = 
     107* **Bug fix:** Missing dates now display correctly. 
     108* **Bug fix:** Podcast now works even with PHP4. 
     109* **Bug fix:** Definitely no more SQL warnings on install. 
     110 
     111= 0.42.2 (13 April 2009) = 
     112* **Bug fix:** Fixed weird error preventing audio plays on some set-ups. 
     113 
     114= 0.42.1 (13 April 2009) = 
     115* **Bug fix:** Fixed SQL error with embedded URLs. 
     116* **Bug fix:** Possible fix for download failure on some set-ups. 
     117* **Bug fix:** Podcast now works even if some URLs are invalid. 
     118* **Bug fix:** No more SQL warnings on install. 
     119 
     120= 0.42 (10 April 2009) = 
     121* **New feature:** Sermon Browser shortcodes allow you to include single sermons or lists of sermons on any post or page on your website. For example, adding the shortcode [sermons preacher=1 id=latest] to your pastor's page would display full details of his most recent sermon on that page. 
     122* **Optimisation:** Consolidated various help and tutorial pages to avoid having to keep three different versions up to date! 
     123* **Bug fix:** External URLs now display on the search page alongside attached files. 
     124* **Bug fix:** No more SQL errors on Wordpress custom pages. 
     125 
     126= 0.41.2 (9 April 2009) = 
     127* **Bug fix:** Some dates displaying incorrectly after Daylight Savings Time change. 
     128 
     129= 0.41.1 (9 April 2009) = 
     130* **Bug fix:** URLs (and not just files) now show up in podcast feeds. Multiple files/URLs per sermon are now also supported, as are some non-mp3 files such as .mov and .mp4 
     131* **Bug fix:** Minor bug affecting people who have renamed their Wordpress database. 
     132 
     133= 0.41 (8 April 2009) = 
     134* **New feature:** Alternative 'one-click' filtering system. Go to SermonBrowser/Options to select it. 
     135* **New feature:** Filter can now be 'minimised' to make better use of space. 
     136* **New feature:** NET Bible can now be used, bringing the total to nine translations. 
     137* **New feature:** Podcast feed now displays sermon length and preacher's name in iTunes. 
     138* **Optimisation:** Less javascript loaded on front-end. 
     139* **Optimisation:** Icon added to admin pages in Wordpress 2.7. 
     140* **Optimisation:** Much more subtle podcast icons should display better in most themes (reset template to default to benefit). 
     141* **Bug fix:** Sermons now display in admin even if there are no bible references or series. 
     142* **Bug fix:** Single verse references now display correctly (thanks to Mark Bouchard). 
     143* **Bug fix:** More error checks for bad data in podcast feed. 
     144* **Bug fix:** Mini-player now displays in correct colour when used with AudioPlayer v2. 
     145* **Change:** The plugin now requires Wordpress 2.5 or above. 
     146 
     147= 0.40.2 (3 January 2009) = 
     148* **Bug fix:** Further fix to ensure valid podcast feeds. 
     149 
     150= 0.40.1 (30 December 2008) = 
     151* **Bug fix:** Fixed bug introduced in previous version that prevented podcasts working in iTunes. 
     152 
     153= 0.40 (12 December 2008) = 
     154* **New feature:** Added sermon browser tag cloud widget. 
     155* **New feature:** Optional mini audio player now in the sidebar widget. Go to the widget options to turn it on. 
     156* **Optimisation:** Admin pages now display correctly in Wordpress 2.7. 
     157* **Optimisation:** Added workaround to ensure iTunes works with Feedburner. 
     158* **Bug fix:** Hopefully finally fixed the podcast problems for those not using permalinks. You may need to resave your options, or even reset your options if upgrading from an earlier version. 
     159 
     160= 0.39 (1 December 2008) = 
     161* **New feature:** Sermon Browser in Spanish. Thanks to Juan for providing the translation. 
     162* **New feature:** If you have 'Update services' enabled in Wordpress, a special web-service is now 'pinged' when sermons are edited. This will help your sermons be found by search engines. 
     163* **Bug fix:** Calendar now displays correctly in admin (removed CSS clash). 
     164* **Bug fix:** Bible books and dates now appear correctly in non-English languages. You may need to reset the options to default to make this work. 
     165 
     166= 0.38 (29 November 2008) = 
     167* **New Feature:** Spanish Reina Valera Bible now available (use the code [lbrvtext] in the template). Thanks to Juan and Living Stones Ministries. 
     168* **New Feature:** Podcast now displays the time a sermon was preached, as well as the date. 
     169* **Optimisation:** Administrators and editors can now include any HTML code in sermon descriptions without it being stripped. 
     170* **Optimisation:** Reminder in admin to install AudioPlayer plugin. 
     171* **Optimisation:** Podcast now only includes sermons that have MP3 attachments. 
     172* **Bug fix:** The Uploads page now works correctly. Files can be named and deleted, and the search facility works again. Deleted files no longer show up in the list of unlinked files. Thanks to Matthew Hiatt for solving this. 
     173* **Bug fix:** Users in all timezones should see sermon dates correctly. 
     174* **Bug fix:** File downloads should be much more reliable, and no more randomly corrupted filenames. Filenames with spaces should also no longer present a problem. 
     175* **Bug fix:** Sermon Browser can now be displayed on private pages. 
     176* **Bug fix:** Office 2007 files now have correct MIME-type. 
     177* **Bug fix:** Javascript error in admin due to jQuery conflict is now fixed. 
     178 
     179= 0.37.3 (14 Octoboer 2008) = 
     180* **Bug fix:** HTML should now validate (ampersands in URLs now correct). 
     181* **Bug fix:** Podcast feed on sites without pretty permalinks should now work. 
     182 
     183= 0.37.2 (9 October 2008) = 
     184* **Bug fix:** Fixed incompatibilities with a few more plug-ins introduced in the previous version. 
     185 
     186= 0.37.1 (8 October 2008) = 
     187* **Bug fix:** Now compatible with the Gengo plugin. 
     188 
     189= 0.37 (6 October 2008) = 
     190* **Optimisation:** Download stats are no longer counted for blog authors/admins (thanks Matthew Hiatt) 
     191* **Optimisation:** Sermon Browser now deactivates itself when it is uninstalled. 
     192* **Bug fix:** Rogue slashes no longer display in filter. 
     193* **Bug fix:** Divide by zero error on dashboard fixed (thanks Matthew Hiatt). 
     194* **Bug fix:** User templates now updated after upgrade if dictionary.php is changed. 
     195* **Bug fix:** Sermon Browser now uses the date format from Wordpress settings. 
     196 
     197= 0.36 (1 October 2008) = 
     198* **Added:** Two new Bible versions (American King James [AKJV], and the Hebrew Names Version [HNV]) 
     199* **Fixed:** Filter now works even when sermons page is the front page of site. 
     200* **Fixed:** Non-ESV bibles now display. 
     201 
     202= 0.35 (4 August 2008) = 
     203* **Added:** Simple statistics on Dashboard (Wordpress 2.5+) 
     204* **Optimisation:** Large download files less likely to cause errors. 
     205* **Optimisation:** More robust tag handling. 
     206* **Fixed:** Closed security loophole. 
     207* **Fixed:** Duplicate indexes bug. 
     208* **Fixed:** PHP errors when adding sermons with no bible passage. 
     209 
     210= 0.34 (31 July 2008) = 
     211* **Added:** Support for WordPress MU! 
     212* **Changed:** Will now create 'uploads' folder if it doesn't already exist. 
     213* **Fixed:** YLT and WEB Bibles now display correctly. 
     214* **Fixed:** Minor bug affecting those who have renamed their Wordpress database. 
     215 
     216= 0.33 (28 July 2008) = 
     217* **Fixed:** Two minor bugs affecting users with Wordpress installs away from their root directory. 
     218 
     219= 0.32 (28 July 2008) = 
     220* **Fixed:** Sermons now download correctly in iTunes (although iTunes downloads won't count towards your stats due to an iTunes limitation). 
     221* **Fixed:** You can now add more than three bible passages to a sermon. 
     222* **Fixed:** ALT text now correct on file icons. 
     223* **Fixed:** Links now work correctly even when Wordpress is not in the root. 
     224* **Fixed:** Double-path bug for podcast URL fixed. 
     225* **Added:** Compatibility with Wordpress 2.6 custom plug-in folders. 
     226* **Added:** Auto-discovery for custom podcasts. 
     227* **Optimisation:** Additional files are now inserted into <HEAD> only when required, rather than on every page. 
     228 
     229= 0.31 (3 July 2008) = 
     230* **Added:** The sermon description now preserves lines breaks and allows most HTML code. 
     231* **Added:** More helpful warnings if permissions on image uploads folder are incorrect, or if [sermons] tag not included in a page/post. 
     232* **Added:** Option to change how many sermons are displayed per page. 
     233* **Added:** Better security to prevent unauthorised users from editing data. 
     234* **Changed:** Plug-in no longer uses single.php, multi.php and style.css. This should reduce the number of people having file permission problems. Users of older versions can now safely delete those files. 
     235* **Changed:** Templates now have their own menu. Some of the other options screens have been tweaked slightly. 
     236* **Changed:** Podcast now attaches linked URLs as well as uploaded files. 
     237* **Changed:** Tag cloud now uses proportional, not fixed size fonts. 
     238* **Changed:** Default template should display podcast links better on most sites. (It now uses TABLEs rather than DIVs.) Reset the templates to default to benefit. 
     239* **Fixed:** Bible books are now displayed in the filter even for previous users of older versions. 
     240* **Fixed:** Newly uploaded files now save correctly to sermon. 
     241* **Fixed:** Next/previous buttons now display correctly. 
     242* **Fixed:** Prevented 'Maximum time for script is -1 seconds' message on older versions of PHP. 
     243* **Optimisation:** Better commenting throughout PHP. 
     244 
     245= 0.30.1 (25 June 2008) = 
     246* **Fixed:** Three bugs - one that prevented uploading, one that made series/sermons/preachers appear in the filters even if they had not been assign to any sermons, and one that prevented downloads when pretty permalinks were not used. 
     247 
     248= 0.30 (25 June 2008) = 
     249* **Added:** Statistics! See how often a sermon has been listened to in the admin section. Works for sermons that are downloaded or played inline with the AudioPlayer. It doesn't work (and never can) for embedded files (e.g. videos). At the moment the stats are only there in the admin section, but feel free to suggest ways they could be helpful to viewers of your website. 
     250* **Added:** The drop-down menus for the search options are now more intelligent. (1) They display the number of sermons recorded for each preacher/series/services/bible book. (2) They only display bible books that have sermons listed. (3) The more important preachers/series/services are displayed higher up in the drop-down list. 
     251* **Changed:** Some significant optimisations. The main database queries are now twenty times faster than before. On my server the database activity to display the sermon-browser page takes less than seven hundredths of a second (it was about half a second). This is with 180 sermons in the database. 
     252* **Fixed:** Preacher's name now displays correctly in page title. 
     253* **Fixed:** All links now work correctly even when permalinks are turned off. 
     254 
     255= 0.25 (24 June 2008) = 
     256* **Added:** [editlink] tag adds an 'Edit sermon' link if the currently logged-in user has edit privileges. 
     257* **Added:** [sermon_description] tag now displays description of sermon on sermon page 
     258* **Added:** [file_with&#95;download] tag is similar to [file], but adds a download link if the AudioPlayer is displayed 
     259* **Changed:** External URLs and local files are now treated in the same way. 
     260 
     261= 0.24 (21 June 2008) = 
     262* **Added:** Plug-in now updates automatically on Wordpress 2.3 and above 
     263* **Added:** Podcasts now include filesizes of MP3 files 
     264* **Fixed:** Now able to delete and rename linked files 
     265* **Fixed:** Custom podcast now always returns most recent sermons 
     266* **Fixed:** Podcasts now return a maximum of 15 sermons 
     267 
     268= 0.23 (13 June 2008) = 
     269* **Added:** Individual sermon pages now show sermon details in page title for better navigation and SEO. 
     270* **Added:** Several checks for settings in php.ini that might cause uploads to fail. 
     271* **Added:** Support for cURL (provides better compatibility for displaying bible texts). 
     272* **Fixed:** Now able to display images and descriptions of preachers on their sermons. 
     273* **Optimisation:** Several other minor bug fixes. 
     274 
     275= 0.22 (12 June 2008) = 
     276* **Added:** Four new Bible versions: ASV, KJV, YLT and WEB (in addition to ESV) 
     277* **Added:** Support for version 2 of the 1PixelOut Audio Player 
     278* **Optimisation:** Two minor bug fixes. 
     279 
     280= 0.21 (12 June 2008) = 
     281* **Added:** Template tags for iTunes specific podcast links. 
     282* **Changed:** Non-administrators can now use Sermon Browser (although only Administrators can change the options). 
     283* **Changed:** Updated default template and CSS. Reset to defaults in Options to use it. 
     284* **Changed:** More options in sidebar widget. 
     285* **Optimisation:** Reduced number of database queries, reducing page-creation time by around 15%. 
     286* **Fixed:** Links in the widget give 'Page not found errors' 
     287* **Fixed:** Filter by date gives incorrect results 
     288 
     289= 0.2 (10 June 2008) = 
     290* **Added:** Podcasting support 
     291* **Added:** Sidebar widget 
     292* **Added:** Now possible to edit CSS 
     293* **Added:** Support for embedded video and linked files 
     294* **Added:** Option to display ESV text 
     295* **Added:** Option to allow filtering by Bible book 
     296* **Fixed:** 'Page not found' errors when linking to individual sermons 
     297* **Changed:** Display of bible references is now more intelligent 
     298* **Optimisation:** Many other bug fixes and minor enhancements 
     299 
     300= 0.1 (13 May 2008) = 
     301* **Initial release** 
  • sermon-browser/trunk/sb-includes/sb-install.php

    r156082 r159840  
    153153    sb_update_option('import_prompt',true); 
    154154    sb_update_option('hide_no_attachments',false); 
    155 } 
     155    sb_update_option('import_title', false); 
     156    sb_update_option('import_artist', false); 
     157    sb_update_option('import_album', false); 
     158    sb_update_option('import_comments', false); 
     159    sb_update_option('import_filename', 'none'); 
    156160 
    157161//Default template for search results 
  • sermon-browser/trunk/sb-includes/style.php

    r154761 r159840  
    1212} else { 
    1313    $gmtDate = gmdate("D, d M Y H:i:s\G\M\T",$lastModifiedDate); 
    14     header('Last-Modified: '.$gmtDate); 
     14    header('Last-Modified: '.$gmtDate, 200); 
    1515} 
     16$expires = 60*60*24*7; 
     17header("Cache-Control: max-age=".$expires); 
     18header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT'); 
    1619print (sb_get_option('css_style')); 
    1720die(); 
  • sermon-browser/trunk/sb-includes/upgrade.php

    r154761 r159840  
    137137            } 
    138138            sb_update_option('import_prompt', true); 
     139            sb_update_option('import_title', false); 
     140            sb_update_option('import_artist', false); 
     141            sb_update_option('import_album', false); 
     142            sb_update_option('import_comments', false); 
     143            sb_update_option('import_filename', 'none'); 
    139144            sb_update_option('hide_no_attachments', false); 
    140145            sb_update_option('db_version', '1.6'); 
  • sermon-browser/trunk/sermon.php

    r156094 r159840  
    55Description: Add sermons to your Wordpress blog. Thanks to <a href="http://codeandmore.com/">Tien Do Xuan</a> for initial coding. 
    66Author: Mark Barnes 
    7 Version: 0.43.1 
     7Version: 0.43.2 
    88Author URI: http://www.4-14.org.uk/ 
    99 
     
    5454* @package common_functions 
    5555*/ 
    56 define('SB_CURRENT_VERSION', '0.43.1'); 
     56define('SB_CURRENT_VERSION', '0.43.2'); 
    5757define('SB_DATABASE_VERSION', '1.6'); 
    5858add_action ('plugins_loaded', 'sb_hijack'); 
     
    6767*/ 
    6868function sb_hijack() { 
    69      
     69 
    7070    global $filetypes, $wpdb; 
    7171    sb_define_constants(); 
    72      
     72 
    7373    if (function_exists('wp_timezone_supported') && wp_timezone_supported()) 
    7474        wp_timezone_override_offset(); 
     
    101101        exit(); 
    102102    } 
    103      
     103 
    104104    //Forces sermon download of external URL 
    105105    if (isset($_REQUEST['download']) AND isset($_REQUEST['url'])) { 
     
    178178        setlocale(LC_ALL, WPLANG.'.UTF-8'); 
    179179 
     180    if (version_compare(PHP_VERSION, '5.0.0', '<')) 
     181        require('sb-includes/php4compat.php'); 
     182 
    180183    //Display the podcast if that's what's requested 
    181184    if (isset($_GET['podcast'])) 
     
    187190    wp_register_style('sb_datepicker', SB_PLUGIN_URL.'/sb-includes/datepicker.css', false, SB_CURRENT_VERSION); 
    188191    if (get_option('permalink_structure') == '') 
    189         wp_register_style('sb_style', get_option('siteurl').'?sb-style&', false, sb_get_option('style_date_modified')); 
     192        wp_register_style('sb_style', trailingslashit(get_option('siteurl')).'?sb-style&', false, sb_get_option('style_date_modified')); 
    190193    else 
    191194        wp_register_style('sb_style', trailingslashit(get_option('siteurl')).'sb-style.css', false, sb_get_option('style_date_modified')); 
     
    209212 
    210213    // Check whether upgrade required 
    211     if (get_option('sb_sermon_db_version')) 
    212         $db_version = get_option('sb_sermon_db_version'); 
    213     else 
    214         $db_version = sb_get_option('db_version'); 
    215     if ($db_version && $db_version != SB_DATABASE_VERSION) { 
    216         require_once ('sb-includes/upgrade.php'); 
    217         sb_database_upgrade ($db_version); 
    218     } elseif (!$db_version) { 
    219         require ('sb-includes/sb-install.php'); 
    220         sb_install(); 
     214    if (current_user_can('manage_options') && is_admin()) { 
     215        if (get_option('sb_sermon_db_version')) 
     216            $db_version = get_option('sb_sermon_db_version'); 
     217        else 
     218            $db_version = sb_get_option('db_version'); 
     219        if ($db_version && $db_version != SB_DATABASE_VERSION) { 
     220            require_once ('sb-includes/upgrade.php'); 
     221            sb_database_upgrade ($db_version); 
     222        } elseif (!$db_version) { 
     223            require ('sb-includes/sb-install.php'); 
     224            sb_install(); 
     225        } 
     226        $sb_version = sb_get_option('code_version'); 
     227        if ($sb_version != SB_CURRENT_VERSION) { 
     228            require_once ('sb-includes/upgrade.php'); 
     229            sb_version_upgrade ($sb_version, SB_CURRENT_VERSION); 
     230        } 
    221231    } 
    222     $sb_version = sb_get_option('code_version'); 
    223     if ($sb_version != SB_CURRENT_VERSION) { 
    224         require_once ('sb-includes/upgrade.php'); 
    225         sb_version_upgrade ($sb_version, SB_CURRENT_VERSION); 
    226     } 
     232 
    227233     
    228234    // Load shared (admin/frontend) features 
    229     if (version_compare(PHP_VERSION, '5.0.0', '<')) 
    230         require('sb-includes/php4compat.php'); 
    231235    add_action ('save_post', 'update_podcast_url'); 
    232  
    233236 
    234237    // Check to see what functions are required, and only load what is needed 
     
    269272    add_submenu_page(__FILE__, __('Templates', $sermon_domain), __('Templates', $sermon_domain), 'manage_options', 'sermon-browser/templates.php', 'sb_templates'); 
    270273    add_submenu_page(__FILE__, __('Uninstall', $sermon_domain), __('Uninstall', $sermon_domain), 'edit_plugins', 'sermon-browser/uninstall.php', 'sb_uninstall'); 
    271     add_submenu_page(__FILE__, __('Help', $sermon_domain), __('Help', $sermon_domain), 'read', 'sermon-browser/help.php', 'sb_help'); 
     274    add_submenu_page(__FILE__, __('Help', $sermon_domain), __('Help', $sermon_domain), 'edit_posts', 'sermon-browser/help.php', 'sb_help'); 
    272275} 
    273276 
     
    333336    switch ($default_type) { 
    334337        case 'sermon_path': 
    335             return trailingslashit(get_option('upload_path')).'sermons/'; 
     338            $upload_path = wp_upload_dir(); 
     339            $upload_path = $upload_path['basedir']; 
     340            if (substr($upload_path, 0, strlen(ABSPATH)) == ABSPATH) 
     341                $upload_path = substr($upload_path, strlen(ABSPATH)); 
     342            return trailingslashit($upload_path).'sermons/'; 
    336343        case 'attachment_url': 
    337             return trailingslashit(get_bloginfo('wpurl')).trailingslashit(get_option('upload_path')).'sermons/'; 
     344            $upload_dir = wp_upload_dir(); 
     345            $upload_dir = $upload_dir['baseurl']; 
     346            return trailingslashit($upload_dir).'sermons/'; 
    338347        case 'bible_books': 
    339348            return array(__('Genesis', $sermon_domain), __('Exodus', $sermon_domain), __('Leviticus', $sermon_domain), __('Numbers', $sermon_domain), __('Deuteronomy', $sermon_domain), __('Joshua', $sermon_domain), __('Judges', $sermon_domain), __('Ruth', $sermon_domain), __('1 Samuel', $sermon_domain), __('2 Samuel', $sermon_domain), __('1 Kings', $sermon_domain), __('2 Kings', $sermon_domain), __('1 Chronicles', $sermon_domain), __('2 Chronicles',$sermon_domain), __('Ezra', $sermon_domain), __('Nehemiah', $sermon_domain), __('Esther', $sermon_domain), __('Job', $sermon_domain), __('Psalm', $sermon_domain), __('Proverbs', $sermon_domain), __('Ecclesiastes', $sermon_domain), __('Song of Solomon', $sermon_domain), __('Isaiah', $sermon_domain), __('Jeremiah', $sermon_domain), __('Lamentations', $sermon_domain), __('Ezekiel', $sermon_domain), __('Daniel', $sermon_domain), __('Hosea', $sermon_domain), __('Joel', $sermon_domain), __('Amos', $sermon_domain), __('Obadiah', $sermon_domain), __('Jonah', $sermon_domain), __('Micah', $sermon_domain), __('Nahum', $sermon_domain), __('Habakkuk', $sermon_domain), __('Zephaniah', $sermon_domain), __('Haggai', $sermon_domain), __('Zechariah', $sermon_domain), __('Malachi', $sermon_domain), __('Matthew', $sermon_domain), __('Mark', $sermon_domain), __('Luke', $sermon_domain), __('John', $sermon_domain), __('Acts', $sermon_domain), __('Romans', $sermon_domain), __('1 Corinthians', $sermon_domain), __('2 Corinthians', $sermon_domain), __('Galatians', $sermon_domain), __('Ephesians', $sermon_domain), __('Philippians', $sermon_domain), __('Colossians', $sermon_domain), __('1 Thessalonians', $sermon_domain), __('2 Thessalonians', $sermon_domain), __('1 Timothy', $sermon_domain), __('2 Timothy', $sermon_domain), __('Titus', $sermon_domain), __('Philemon', $sermon_domain), __('Hebrews', $sermon_domain), __('James', $sermon_domain), __('1 Peter', $sermon_domain), __('2 Peter', $sermon_domain), __('1 John', $sermon_domain), __('2 John', $sermon_domain), __('3 John', $sermon_domain), __('Jude', $sermon_domain), __('Revelation', $sermon_domain)); 
     
    491500    if (!$options = sb_get_option('sermons_widget_options')) 
    492501        $options = array(); 
    493     $widget_ops = array('classname' => 'sermon', 'description' => __('Sermon', $sermon_domain)); 
     502    $widget_ops = array('classname' => 'sermon', 'description' => __('Display a list of recent sermons.', $sermon_domain)); 
    494503    $control_ops = array('width' => 400, 'height' => 350, 'id_base' => 'sermon'); 
    495504    $name = __('Sermons', $sermon_domain); 
    496505    $registered = false; 
    497     foreach ( array_keys($options) as $o ) { 
    498         if ( !isset($options[$o]['limit']) ) 
     506    foreach (array_keys($options) as $o) { 
     507        if (!isset($options[$o]['limit'])) 
    499508            continue; 
    500509        $id = "sermon-$o"; 
    501510        $registered = true; 
    502         wp_register_sidebar_widget( $id, $name, 'sb_widget_sermon_wrapper', $widget_ops, array( 'number' => $o ) ); 
    503         wp_register_widget_control( $id, $name, 'sb_widget_sermon_control', $control_ops, array( 'number' => $o ) ); 
    504     } 
    505     if ( !$registered ) { 
    506         wp_register_sidebar_widget( 'sermon-1', $name, 'sb_widget_sermon_wrapper', $widget_ops, array( 'number' => -1 ) ); 
    507         wp_register_widget_control( 'sermon-1', $name, 'sb_widget_sermon_control', $control_ops, array( 'number' => -1 )); 
     511        wp_register_sidebar_widget($id, $name, 'sb_widget_sermon_wrapper', $widget_ops, array('number' => $o)); 
     512        wp_register_widget_control($id, $name, 'sb_widget_sermon_control', $control_ops, array('number' => $o)); 
     513    } 
     514    if (!$registered) { 
     515        wp_register_sidebar_widget('sermon-1', $name, 'sb_widget_sermon_wrapper', $widget_ops, array('number' => -1)); 
     516        wp_register_widget_control('sermon-1', $name, 'sb_widget_sermon_control', $control_ops, array('number' => -1)); 
    508517    } 
    509518    //Tags Widget 
     
    566575        return stripslashes(base64_decode(get_option("sermonbrowser_{$type}"))); 
    567576    } else { 
    568         if (!$sermonbrowser_options) 
    569             $sermonbrowser_options = unserialize(base64_decode(get_option('sermonbrowser_options'))); 
     577        if (!$sermonbrowser_options) { 
     578            $options = get_option('sermonbrowser_options'); 
     579            if ($options === FALSE) 
     580                return FALSE; 
     581            $sermonbrowser_options = unserialize(base64_decode($options)); 
     582            if ($sermonbrowser_options === FALSE) 
     583                wp_die ('Failed to get SermonBrowser options '.base64_decode(get_option('sermonbrowser_options'))); 
     584        } 
    570585        if (isset($sermonbrowser_options[$type])) 
    571586            return $sermonbrowser_options[$type]; 
     
    590605        return update_option ("sermonbrowser_{$type}", base64_encode($val)); 
    591606    else { 
    592         if (!$sermonbrowser_options) 
    593             $sermonbrowser_options = unserialize(base64_decode(get_option('sermonbrowser_options'))); 
     607        if (!$sermonbrowser_options) { 
     608            $options = get_option('sermonbrowser_options'); 
     609            if ($options !== FALSE) { 
     610                $sermonbrowser_options = unserialize(base64_decode($options)); 
     611                if ($sermonbrowser_options === FALSE) 
     612                    wp_die ('Failed to get SermonBrowser options '.base64_decode(get_option('sermonbrowser_options'))); 
     613            } 
     614        } 
    594615        if (!isset($sermonbrowser_options[$type]) || $sermonbrowser_options[$type] !== $val) { 
    595616            $sermonbrowser_options[$type] = $val; 
Note: See TracChangeset for help on using the changeset viewer.