WordPress.org

Plugin Directory


Ignore:
Timestamp:
09/18/09 17:49:04 (5 years ago)
Author:
mark8barnes
Message:

Version 0.43.1 - minor bug fixes, bible API change and Romanian Bible added

Location:
sermon-browser/trunk
Files:
6 edited

Legend:

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

    r154761 r156082  
    3333    if (isset($_POST['resetdefault'])) { 
    3434        $dir = sb_get_default('sermon_path'); 
    35         if (sb_display_url()=="") { 
     35        if (sb_display_url()=="#") { 
    3636            sb_update_option('podcast_url', get_bloginfo('wpurl').sb_query_char(false).'podcast'); 
    3737        } else { 
     
    188188            <tr> 
    189189                <td align="right"><?php _e('Private podcast feed', $sermon_domain) ?>: </td> 
    190                 <td><?php if (sb_display_url()=="") { echo get_bloginfo('wpurl'); } else { echo sb_display_url(); } echo sb_query_char(); ?>podcast</td> 
     190                <td><?php if (sb_display_url()=="#") { echo get_bloginfo('wpurl'); } else { echo sb_display_url(); } echo sb_query_char(); ?>podcast</td> 
    191191            </tr> 
    192192            <tr> 
     
    12301230                <th scope="col"><?php _e('Series', $sermon_domain) ?></th> 
    12311231                <th scope="col" style="text-align:center"><?php _e('Stats', $sermon_domain) ?></th> 
    1232                 <th scope="col"><?php _e('Actions', $sermon_domain) ?></th> 
     1232                <th scope="col" style="text-align:center"><?php _e('Actions', $sermon_domain) ?></th> 
    12331233            </tr> 
    12341234            </thead>     
     
    12471247                            <?php //Security check 
    12481248                                    if (function_exists('current_user_can')&&current_user_can('edit_posts')) { ?> 
    1249                                     <a href="<?php echo $_SERVER['PHP_SELF']?>?page=sermon-browser/new_sermon.php&mid=<?php echo $sermon->id ?>"><?php _e('Edit', $sermon_domain) ?></a> | <a onclick="return confirm('Are you sure?')" href="<?php echo $_SERVER['PHP_SELF']?>?page=sermon-browser/sermon.php&mid=<?php echo $sermon->id ?>"><?php _e('Delete', $sermon_domain); ?></a> 
    1250                             <?php } else { ?>&nbsp;<?php } ?> 
     1249                                    <a href="<?php echo $_SERVER['PHP_SELF']?>?page=sermon-browser/new_sermon.php&mid=<?php echo $sermon->id ?>"><?php _e('Edit', $sermon_domain) ?></a> | <a onclick="return confirm('Are you sure?')" href="<?php echo $_SERVER['PHP_SELF']?>?page=sermon-browser/sermon.php&mid=<?php echo $sermon->id ?>"><?php _e('Delete', $sermon_domain); ?></a> |  
     1250                            <?php } ?> 
     1251                            <a href="<?php echo sb_display_url().sb_query_char(true).'sermon_id='.$sermon->id;?>">View</a> 
    12511252                        </td> 
    12521253                    </tr> 
     
    19981999        <ul style="list-style-type:circle; margin-left: 2em"> 
    19992000            <li>James Hudson, Matthew Hiatt, Mark Bouchard (code contributions)</li> 
    2000             <li>Juan Carlos (Spanish translation)</li> 
    2001             <li>Living Stones Ministries (access to several Bible versions)</li> 
     2001            <li>Juan Carlos and Marvin Ortega (Spanish translation)</li> 
    20022002            <li>Numerous <a href="http://www.4-14.org.uk/forum/sermon-browser-support/">forum contributors</a> for feature suggestions and bug reports</li> 
    20032003        </ul> 
     
    20362036function sb_do_alerts() { 
    20372037    global $wpdb, $sermon_domain; 
    2038     if (sb_display_url() == "") { 
    2039         echo '<div id="message" class="updated"><p><b>'.__('You must create a post or preferably a page that includes the code [sermons] in order for your sermons to be displayed on your site.', $sermon_domain).'</b></div>'; 
     2038    if (sb_display_url() == "#") { 
     2039        echo '<div id="message" class="updated"><p><b>'.__('Hint:', $sermon_domain).'</b> '.sprintf(__('%sCreate a page%s that includes the shortcode [sermons], so that SermonBrowser knows where to display the sermons on your site.', $sermon_domain), '<a href="'.get_bloginfo('wpurl').'/wp-admin/page-new.php">', '</a>').'</div>'; 
    20402040    } else { 
    20412041        if (!function_exists('ap_insert_player_widgets')) { 
  • sermon-browser/trunk/sb-includes/dictionary.php

    r154761 r156082  
    6767        '[akjvtext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo sb_add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "akjv"); endfor ?>', 
    6868        '[hnvtext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo sb_add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "hnv"); endfor ?>', 
    69         '[lbrvtext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo sb_add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "lbrv"); endfor ?>', 
     69        '[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 ?>', 
     70        '[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 ?>', 
    7071        '[biblepassage]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): sb_print_bible_passage ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i]); endfor ?>', 
    7172        '[editlink]' => '<?php sb_edit_link($_GET["sermon_id"]) ?>', 
  • sermon-browser/trunk/sb-includes/frontend.php

    r154761 r156082  
    370370        return sb_add_net_text ($start, $end); 
    371371    else 
    372         return sb_add_seek_first_text ($start, $end, $version); 
     372        return sb_add_other_bibles ($start, $end, $version); 
    373373} 
    374374     
     
    424424} 
    425425 
    426 //Returns Bible text using the Living Stones API 
    427 function sb_add_seek_first_text ($start, $end, $version) { 
    428     $books = sb_get_bible_books(); 
    429     $r1 = array_search($start['book'], $books)+1; 
    430     $r2 = $start['chapter']; 
    431     $r3 = $start['verse']; 
    432     $r4 = array_search($end['book'], $books)+1; 
    433     $r5 = $end['chapter']; 
    434     $r6 = $end['verse']; 
    435     if (empty($start['book'])) 
    436         return; 
    437     else { 
    438         $content = sb_download_page ('http://api.seek-first.com/v1/BibleSearch.php?type=lookup&appid=seekfirst&startbooknum='.$r1.'&startchapter='.$r2.'&startverse='.$r3.'&endbooknum='.$r4.'&endchapter='.$r5.'&endverse='.$r6.'&version='.$version); 
    439         if ($content != '') { 
    440             $patterns = array ( 
    441                 '/<!--(.)*?-->/', 
    442                 '/<Copyright>(.*)<\/Copyright>/', 
    443                 '/<VersionName>(.*)<\/VersionName>/', 
    444                 '/<TotalResults>(.*)<\/TotalResults>/', 
    445             ); 
    446             $replace = array ('', '', '', ''); 
    447             $content = trim(preg_replace ($patterns, $replace, $content)); 
    448             $old_chapter = $start['chapter']; 
    449             $content = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n".$content; 
    450             $xml = sb_get_xml($content); 
    451             $output=''; 
    452             $items = array(); 
    453             $items = $xml->Result; 
    454             foreach ($items as $item) { 
    455                 if ($old_chapter == $item->Chapter) { 
    456                     $output .= " <span class=\"verse-num\">{$item->Verse}</span>"; 
    457                 } else { 
    458                     $output .= " <span class=\"chapter-num\">{$item->Chapter}:{$item->Verse}</span> "; 
    459                     $old_chapter = strval($item->Chapter); 
    460                 } 
    461                 $output .=  $item->Text; 
    462             } 
    463         } 
    464         return '<div class="'.$version.'"><h2>'.sb_tidy_reference ($start, $end). '</h2><p>'.$output.' (<a href="http://biblepro.bibleocean.com/dox/default.aspx">'. strtoupper($version). '</a>)</p></div>'; 
    465     } 
     426//Returns Bible text using SermonBrowser's own API 
     427function sb_add_other_bibles ($start, $end, $version) { 
     428    if ($version == 'hnv') 
     429        return '<div class="'.$version.'"><p>Sorry, the Hebrew Names Version is no longer available.</p></div>'; 
     430    $reference = str_replace(' ', '+', sb_tidy_reference ($start, $end)); 
     431    $old_chapter = $start['chapter']; 
     432    $url = "http://api.preachingcentral.com/bible.php?passage={$reference}&version={$version}"; 
     433    $xml = sb_get_xml(sb_download_page($url)); 
     434    $output=''; 
     435    $items = array(); 
     436    $items = $xml->range->item; 
     437    if ($xml->range->item) 
     438        foreach ($xml->range->item as $item) { 
     439            if ($item->text != '[[EMPTY]]') { 
     440                if ($old_chapter == $item->chapter) { 
     441                    $output .= " <span class=\"verse-num\">{$item->verse}</span>"; 
     442                } else { 
     443                    $output .= " <span class=\"chapter-num\">{$item->chapter}:{$item->verse}</span> "; 
     444                    $old_chapter = strval($item->chapter); 
     445                } 
     446                $output .=     $item->text; 
     447            } 
     448        } 
     449    return '<div class="'.$version.'"><h2>'.sb_tidy_reference ($start, $end). '</h2><p>'.$output.' (<a href="http://biblepro.bibleocean.com/dox/default.aspx">'. strtoupper($version). '</a>)</p></div>'; 
    466450} 
    467451 
  • sermon-browser/trunk/sb-includes/readme.txt

    r154784 r156082  
    19195. **Embed videos** and other flash files from sites such as [YouTube](http://www.youtube.com/) or [Vimeo](http://www.vimeo.com/). 
    20206. **Other file types** can also be uploaded, including PDF, Powerpoint, Word, text and RTF. Multiple files can be attached to single sermons. 
    21 7. The **full Bible text** of the passage being preached on can be included on each sermon page (nine different versions, including ESV). 
     217. The **full Bible text** of the passage being preached on can be included on each sermon page (eight different versions, including ESV). 
    22228. Files can be uploaded to your own site **through the browser or via FTP**. Alternatively you can use other free audio hosting sites. 
    23239. Powerful **templating function** allows complete customisation to complement the look of your site. 
     
    5959 
    6060== Changelog == 
     61 
     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. 
    6170 
    6271= 0.43 = 
  • sermon-browser/trunk/sb-includes/sb-install.php

    r154761 r156082  
    322322.podcastall { 
    323323    float:left; 
    324     background: #fff0c8 url(icons/podcast_background.png) repeat-x; 
     324    background: #fff0c8 url(wp-content/plugins/sermon-browser/sb-includes/icons/podcast_background.png) repeat-x; 
    325325    padding: 0.5em; 
    326326    font-size: 1em; 
     
    331331.podcastcustom { 
    332332    float:right; 
    333     background: #fce4ff url(icons/podcast_custom_background.png) repeat-x; 
     333    background: #fce4ff url(wp-content/plugins/sermon-browser/sb-includes/icons/podcast_custom_background.png) repeat-x; 
    334334    padding: 0.5em; 
    335335    font-size: 1em; 
  • sermon-browser/trunk/sermon.php

    r154761 r156082  
    5454* @package common_functions 
    5555*/ 
    56 define('SB_CURRENT_VERSION', '0.43'); 
     56define('SB_CURRENT_VERSION', '0.43.1'); 
    5757define('SB_DATABASE_VERSION', '1.6'); 
    5858add_action ('plugins_loaded', 'sb_hijack'); 
     
    7171    sb_define_constants(); 
    7272     
    73     if (wp_timezone_supported()) 
     73    if (function_exists('wp_timezone_supported') && wp_timezone_supported()) 
    7474        wp_timezone_override_offset(); 
    7575 
    7676    if (isset($_POST['sermon']) && $_POST['sermon'] == 1) 
    7777        require('sb-includes/ajax.php'); 
    78     if (stripos($_SERVER['REQUEST_URI'], 'sb-style.css') !== FALSE) 
     78    if (stripos($_SERVER['REQUEST_URI'], 'sb-style.css') !== FALSE || isset($_GET['sb-style'])) 
    7979        require('sb-includes/style.php'); 
    8080 
     
    186186    wp_register_script('sb_datepicker', SB_PLUGIN_URL.'/sb-includes/datePicker.js', array('jquery'), SB_CURRENT_VERSION); 
    187187    wp_register_style('sb_datepicker', SB_PLUGIN_URL.'/sb-includes/datepicker.css', false, SB_CURRENT_VERSION); 
    188     wp_register_style('sb_style', trailingslashit(get_option('siteurl')).'sb-style.css', false, sb_get_option('style_date_modified')); 
     188    if (get_option('permalink_structure') == '') 
     189        wp_register_style('sb_style', get_option('siteurl').'?sb-style&', false, sb_get_option('style_date_modified')); 
     190    else 
     191        wp_register_style('sb_style', trailingslashit(get_option('siteurl')).'sb-style.css', false, sb_get_option('style_date_modified')); 
    189192 
    190193    // Register [sermon] shortcode handler 
Note: See TracChangeset for help on using the changeset viewer.