WordPress.org

Plugin Directory


Ignore:
Timestamp:
07/30/08 23:48:16 (6 years ago)
Author:
mark8barnes
Message:
 
Location:
sermon-browser/branches/0.10-0.23
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sermon-browser/branches/0.10-0.23/dictionary.php

    r57039 r57040  
    5757    '[sameday_sermon]' => '<?php bb_print_sameday_sermon_link($sermon["Sermon"]) ?>', 
    5858    '[tags]' => '<?php bb_print_tags($sermon["Tags"]) ?>', 
    59     '[esvtext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo add_esv_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i]); endfor ?>', 
     59    '[esvtext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "esv"); endfor ?>', 
     60    '[kjvtext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "kjv"); endfor ?>', 
     61    '[asvtext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "asv"); endfor ?>', 
     62    '[ylttext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "asv"); endfor ?>', 
     63    '[webtext]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "asv"); endfor ?>', 
    6064    '[biblepassage]' => '<?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): print_bible_passage ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i]); endfor ?>', 
    6165    '[creditlink]' => '<div id="poweredbysermonbrowser">Powered by <a href="http://www.4-14.org.uk/sermon-browser">Sermon Browser</a></div>', 
  • sermon-browser/branches/0.10-0.23/frontend.php

    r57039 r57040  
    1414add_action('widgets_init', 'widget_sermon_init'); 
    1515 
    16 //Add ESV text 
    17 function add_esv_text ($start, $end) { 
     16//Fix for AudioPlayer v2 
     17if (!function_exists('ap_insert_player_widgets') & function_exists('insert_audio_player')) { 
     18    function ap_insert_player_widgets($params) { 
     19        return insert_audio_player($params); 
     20    } 
     21} 
     22 
     23//Download external webpage 
     24function sb_download_page ($page_url) { 
     25    if (function_exists(curl_init)) { 
     26        $curl = curl_init(); 
     27        curl_setopt ($curl, CURLOPT_URL, $page_url); 
     28        curl_setopt ($curl, CURLOPT_TIMEOUT, 2); 
     29        curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); 
     30        curl_setopt ($curl, CURLOPT_HTTPHEADER, array('Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7')); 
     31        $contents = curl_exec ($curl); 
     32        $content_type = curl_getinfo( $curl, CURLINFO_CONTENT_TYPE ); 
     33        curl_close ($curl); 
     34        preg_match( '@([\w/+]+)(;\s+charset=(\S+))?@i', $content_type, $matches ); 
     35        if (isset($matches[3])) {$charset = $matches[3];} 
     36            else {$charset = 'ISO-8859-1';} //Assume this charset for non-esv texts 
     37        $blog_charset = get_option('blog_charset'); 
     38        if (strcasecmp($blog_charset, $charset)<>0) $contents = iconv ($charset, $blog_charset, $contents); 
     39    } 
     40    else 
     41        { 
     42        $handle = @fopen ($page_url, 'r'); 
     43        if ($handle) { 
     44            stream_set_blocking($handle, TRUE ); 
     45            stream_set_timeout($handle, 2); 
     46            $info = socket_get_status($handle); 
     47            while (!feof($handle) && !$info['timed_out']) { 
     48                $contents .= fread($handle, 8192); 
     49                $info = socket_get_status($handle); 
     50            } 
     51        fclose($handle); 
     52        } 
     53    } 
     54    return $contents; 
     55} 
     56 
     57//Tidy Bible reference 
     58function sb_tidy_reference ($start, $end) { 
    1859    $r1 = $start['book']; 
    1960    $r2 = $start['chapter']; 
     
    3273    }    
    3374    else $reference =  "$r1 $r2:$r3 - $r4 $r5:$r6"; 
     75    return $reference; 
     76} 
     77 
     78//Add ESV text 
     79function add_esv_text ($start, $end) { 
    3480    // If you are experiencing errors, you should sign up for an ESV API key, and insert the name of your key in place of the letters IP in the URL below (.e.g. ...passageQuery?key=YOURAPIKEY&passage=...) 
    35     $handle = @fopen ('http://www.esvapi.org/v2/rest/passageQuery?key=IP&passage='.urlencode($reference).'&include-headings=false&include-footnotes=false', 'r'); 
    36     if ($handle) { 
    37         stream_set_blocking($handle, TRUE ); 
    38         stream_set_timeout($handle, 2); 
    39         $info = socket_get_status($handle); 
    40         while (!feof($handle) && !$info['timed_out']) { 
    41             $contents .= fread($handle, 8192); 
    42             $info = socket_get_status($handle); 
    43         } 
    44     fclose($handle); 
    45     } 
    46     return $contents; 
     81    $esv_url = 'http://www.esvapi.org/v2/rest/passageQuery?key=IP&passage='.urlencode(sb_tidy_reference ($start, $end)).'&include-headings=false&include-footnotes=false'; 
     82    return sb_download_page ($esv_url); 
     83} 
     84 
     85function add_bible_text ($start, $end, $version) { 
     86    if ($version == "esv") { 
     87        return add_esv_text ($start, $end); 
     88    } 
     89    else { 
     90        global $books; 
     91        $r1 = array_search($start['book'], $books)+1; 
     92        $r2 = $start['chapter']; 
     93        $r3 = $start['verse']; 
     94        $r4 = array_search($end['book'], $books)+1; 
     95        $r5 = $end['chapter']; 
     96        $r6 = $end['verse']; 
     97        if (empty($start['book'])) { 
     98            return ''; 
     99        } 
     100        $ls_url = '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; 
     101        $content = sb_download_page ($ls_url); 
     102        if ($content != '') { 
     103            $r1++; 
     104            for (; $r4>=$r1; $r1++) { 
     105                $searchstring = '<BookNum>'.$r1.'</BookNum>'; 
     106                $findpos = strpos($content, $searchstring); 
     107                $content=substr_replace($content, '</p><p><span class="chapter-num">'.$books[$r1-1].' 1:1</span>', $findpos, strlen($searchstring)); 
     108                $searchstring = '<Verse>1</Verse>'; 
     109                $findpos = strpos($content, $searchstring); 
     110                $content=substr_replace($content, '', $findpos, strlen($searchstring)); 
     111            } 
     112            if ($r2 > 1) {$r2++;} else {$closepara = '</p><p>';} 
     113            for (; $r5>=$r2; $r2++) { 
     114                $searchstring = '<Chapter>'.$r2.'</Chapter>'; 
     115                $findpos = strpos($content, $searchstring); 
     116                $content=substr_replace($content, $closepara.'<span class="chapter-num">'.$r2.':1</span>', $findpos, strlen($searchstring)); 
     117                $searchstring = '<Verse>1</Verse>'; 
     118                $findpos = strpos($content, $searchstring); 
     119                $content=substr_replace($content, '', $findpos, strlen($searchstring)); 
     120            } 
     121            $patterns = array ( 
     122                '/<!--(.)*?-->/', 
     123                '/<.?(Result|Results)>/', 
     124                '/<ShortBook>(.*)<\/ShortBook>/', 
     125                '/<Book>(.*)<\/Book>/', 
     126                '/<Copyright>(.*)<\/Copyright>/', 
     127                '/<VersionName>(.*)<\/VersionName>/', 
     128                '/<Title>(.*)<\/Title>/', 
     129                '/<TotalResults>(.*)<\/TotalResults>/', 
     130                '/<BookNum>(.*)<\/BookNum>/', 
     131                '/<Chapter>(.*)<\/Chapter>/', 
     132                '/<Verse>/', 
     133                '/<\/Verse>\n/', 
     134                '/<Text>/', 
     135                '/<\/Text>\n/', 
     136                '/\n/', 
     137            ); 
     138            $replace = array ( 
     139                '', '', '', '', '', '', '', '', '', '', '<span class="verse-num">', ' </span>', '', '', ' ' 
     140            ); 
     141            $content = preg_replace ($patterns, $replace, $content); 
     142            while (strpos($content, '  ')!==FALSE) { 
     143                $content = str_replace('  ', ' ', $content); 
     144            } 
     145            return '<div class="'.$version.'"><h2>'.sb_tidy_reference ($start, $end). '</h2><p>'.$content.' (<a href="http://biblepro.bibleocean.com/dox/default.aspx">'. strtoupper($version). '</a>)</p></div>'; 
     146        } 
     147    } 
    47148} 
    48149 
     
    143244        $pageid = $wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE post_content = '[sermons]' AND post_status = 'publish' AND post_date < NOW();"); 
    144245    } 
    145     $sef = substr(get_permalink($pageid),0,-1); 
     246    $sef = get_permalink($pageid); 
     247    if (substr($sef, -1) == '/') $sef=substr($sef, 0, -1); 
    146248    $foo = array_merge((array) $_GET, (array) $_POST, $arr); 
    147249    foreach ($foo as $k => $v) { 
  • sermon-browser/branches/0.10-0.23/readme.txt

    r57039 r57040  
    5656You need to install and activate the 1pixelout audio player plugin. You can also customise the plugin so that its colours match your site. 
    5757 
    58 =Can I have different bible versions from the ESV?= 
     58=How do I change the Bible version from the ESV?= 
    5959 
    60 The ESV translation is the only one that provides an API which allows for this functionality. However, if you’re desperate to use other versions, you can manage it using other Wordpress plugins (albeit with reduced functionality). The eBibleicious plugin allows for NASB, MSG, KJV, NKJV, ESV, HCSB, and NCV (use it in ’snippet’ mode). However, there are three disadvantages. (1) To use it, you’ll need to register for an API key (although it is free). (2) It uses Javascript so search engines won’t see the Bible text, and nor will users with javascript turned off. (3) Most importantly, it only shows a maximum of four verses (the ESV shows up to 500 verses!). 
     60Five Bible versions are supported by Sermon Browser: the English Standard Version, American Standard Version, King James Version, Young's Literal Transaltion and the World English Bible. To change to one of these other versions, go to Options, and edit the single template. Replace [esvtext] with [asvtext], [kjvtext], [ylttext] or [webtext]. Thanks go to Crossway for providing access to the ESV, and Living Stones Ministries for the other versions. 
    6161 
    62 You can also use the RefTagger plugin, though this shows even few verses. Even worse (for our purposes) the bible passage only shows when you hover over a special link with your mouse. It does, however, provide an even longer list of translations. Please be aware that both RefTagger and eBibleicious will add bible text to bible references across your whole website, not just your sermons pages. 
     62If you're desperate to use other versions not currently supported, you can manage it using other Wordpress plugins (albeit with reduced functionality). However, if you're desperate to use other versions, you can manage it using other Wordpress plugins (albeit with reduced functionality). The eBibleicious plugin allows for NASB, MSG, KJV, NKJV, ESV, HCSB, and NCV (use it in 'snippet' mode). However, there are three disadvantages. (1) To use it, you'll need to register for an API key (although it is free). (2) It uses Javascript so search engines won't see the Bible text, and nor will users with javascript turned off. (3) Most importantly, it only shows a maximum of four verses (the ESV shows up to 500 verses!). 
    6363 
    64 To use either of these alternatives, just download, install and activate them as you would for any other plugin. Check their settings (make sure you enter get an API key if you’re using eBiblicious). You then need to make one change to your SermonBrowser options. In the Single Sermon form, look for [esvtext] and replace it with [biblepassage]. (By default it’s right at the end of the code.) 
     64You can also use the RefTagger plugin, though this shows even fewer verses. Even worse (for our purposes) the bible passage only shows when you hover over a special link with your mouse. It does, however, provide an even longer list of translations. Please be aware that both RefTagger and eBibleicious will add bible text to bible references across your whole website, not just your sermons pages. 
     65 
     66To use either of these alternatives, just download, install and activate them as you would for any other plugin. Check their settings (make sure you enter get an API key if you're using eBiblicious). You then need to make one change to your SermonBrowser options. In the *Single Sermon form*, look for **[esvtext]** and replace it with **[biblepassage]**. (By default it's right at the end of the code.) 
    6567 
    6668=When using the 1pixelout audio player, my pastor sounds like a chipmunk! What’s going on?= 
     
    112114The search form is set to roughly 500 pixels, which should be about right for most WordPress templates. To change it, look for a line in the CSS stylesheet that begins table.sermonbrowser td.field input, and change the width specified after it. To make the form narrower, reduce the width. To make it bigger, increase the width. You’ll also need to change the width of the date fields on the line below, which should be 20 pixels smaller. 
    113115 
    114 =Why is sometimes the ESV Bible text missing?= 
     116=Why is sometimes the Bible text missing?= 
    115117 
    116 This usually happens for one of three reasons: (1) If the ESV’s website is down. If you can’t see Genesis 1 then the problem is with the ESV website. It’s rarely down for long. (2) If you specify an invalid bible passage (e.g. Romans 22). If this is the case your sermon page will display ERROR: No results were found for your search. (3) If your webhost has disabled allow_url_fopen. This is a feature of PHP that some cheaper webhosts have switched off. There is an alternative that can be used - curl - but SermonBrowser doesn’t support that method at the moment. If your webhost has disabled allow_url_fopen, but does support curl, leave a message in the SermonBrowser comments. If there’s enough demand, it could perhaps be added. 
     118This usually happens for one of three reasons: (1) If the website providing the service is down. They're rarely down for long. (2) If you specify an invalid bible passage (e.g. Romans 22). If this is the case your sermon page will display <em>ERROR: No results were found for your search.</em> (3) If you never get the bible passages for any bible version, it's probably your webhost has disabled <strong>allow_url_fopen</strong> and cURL. Some cheaper webhosts have these essential features switched off. If they have, you won't be able to use this facility. 
    117119 
    118120=Why does my sermon page say I have exceeded my quota for ESV lookups?= 
     
    182184* [tags] - Displays the tags for that sermons 
    183185* [esvtext] - Displays the full text of the ESV Bible for all passages linked to that sermon. 
     186* [asvtext] - Displays the full text of the ASV Bible for all passages linked to that sermon. 
     187* [kjvtext] - Displays the full text of the KJV Bible for all passages linked to that sermon. 
     188* [ylttext] - Displays the full text of the YLT Bible for all passages linked to that sermon. 
     189* [webtext] - Displays the full text of the WEB Bible for all passages linked to that sermon. 
    184190* [biblepassage] - Displays the reference of the bible passages for that sermon. Useful for utilising other bible plugins (see FAQ). 
  • sermon-browser/branches/0.10-0.23/sermon.php

    r57039 r57040  
    476476 
    477477ul.sermon-widget li span.sermon-title{ 
     478    font-weight:bold;.sermon-browser h2 { 
     479    clear: both; 
     480} 
     481 
     482div.sermon-browser table.sermons { 
     483    width: 100%; 
     484    clear:both; 
     485} 
     486 
     487div.sermon-browser table.sermons td.sermon-title { 
     488    font-weight:bold; 
     489    font-size: 140%; 
     490    padding-top: 2em; 
     491} 
     492 
     493div.sermon-browser table.sermons td.sermon-passage { 
     494    font-weight:bold; 
     495    font-size: 110%; 
     496} 
     497 
     498div.sermon-browser table.sermons td.preacher { 
     499    border-bottom: 1px solid #444444; 
     500} 
     501 
     502div.sermon-browser table.sermons td.files img { 
     503    border: none; 
     504    margin-right: 24px; 
     505} 
     506 
     507table.sermonbrowser td.fieldname { 
     508    font-weight:bold; 
     509    padding-right: 10px; 
     510    vertical-align:bottom; 
     511} 
     512 
     513table.sermonbrowser td.field input, table.sermonbrowser td.field select{ 
     514    width: 170px; 
     515} 
     516 
     517table.sermonbrowser td.field  #date, table.sermonbrowser td.field #enddate { 
     518    width: 150px; 
     519} 
     520 
     521table.sermonbrowser td { 
     522    white-space: nowrap; 
     523    padding-top: 5px; 
     524    padding-bottom: 5px; 
     525} 
     526 
     527table.sermonbrowser td.rightcolumn { 
     528    padding-left: 10px; 
     529} 
     530 
     531div.sermon-browser div.floatright { 
     532    float: right 
     533} 
     534 
     535div.sermon-browser div.floatleft { 
     536    float: left 
     537} 
     538 
     539img.sermon-icon , img.site-icon { 
     540    border: none; 
     541} 
     542 
     543div.podcastall { 
     544    float:left; 
     545    border: 2px solid #FC9328; 
     546    background: #fff0c8 url(icons/podcast_background.png) repeat-x; 
     547    padding: 0.3em; 
     548} 
     549 
     550div.podcastall img.podcasticon, div.podcastcustom img.podcasticon { 
     551    float:left; 
     552    margin-right: 1em; 
     553    border: none; 
     554} 
     555 
     556div.podcastall span a{ 
     557    color: #FC9328; 
     558    font-weight: bold; 
     559    font-size:125%; 
     560} 
     561 
     562div.podcastcustom { 
     563    float:right; 
     564    border: 2px solid #b83ee5; 
     565    background: #fce4ff url(icons/podcast_custom_background.png) repeat-x; 
     566    padding: 0.3em; 
     567} 
     568div.podcastcustom span a{ 
     569    color: #b83ee5; 
     570    font-weight: bold; 
     571    font-size:125%; 
     572} 
     573 
     574div.sermon-browser-results span.preacher { 
     575    font-size: 120%; 
     576} 
     577 
     578div.sermon-browser-results span.scripture { 
     579    font-size: 80%; 
     580} 
     581 
     582span.chapter-num { 
     583    font-weight: bold; 
     584    font-size: 150%; 
     585} 
     586 
     587span.verse-num { 
     588    vertical-align:super; 
     589    line-height: 1em; 
     590    font-size: 65%; 
     591} 
     592 
     593div.esv span.small-caps { 
     594    font-variant: small-caps; 
     595} 
     596 
     597 
     598div.sermon-browser #poweredbysermonbrowser { 
     599    text-align:center; 
     600} 
     601div.sermon-browser-results #poweredbysermonbrowser { 
     602    text-align:right; 
     603} 
     604 
     605table.nearby-sermons { 
     606    width: 100%; 
     607} 
     608 
     609table.nearby-sermons td, table.nearby-sermons th { 
     610    text-align: center; 
     611} 
     612 
     613table.nearby-sermons .earlier { 
     614    padding-right: 1em; 
     615    text-align: left; 
     616} 
     617 
     618table.nearby-sermons .later { 
     619    padding-left: 1em; 
     620    text-align:right; 
     621} 
     622 
     623table.nearby-sermons td { 
     624    width: 33%; 
     625    vertical-align: top; 
     626} 
     627 
     628ul.sermon-widget { 
     629    list-style-type:none; 
     630    margin:0; 
     631    padding: 0; 
     632} 
     633 
     634ul.sermon-widget li { 
     635    list-style-type:none; 
     636    margin:0; 
     637    padding: 0.25em 0; 
     638} 
     639 
     640ul.sermon-widget li span.sermon-title{ 
    478641    font-weight:bold; 
    479642} 
     
    9611124            <li><a href="#uploaderrors">SermonBrowser spends a long time attempting to upload files, but the file is never uploaded. What's happening?</a></li> 
    9621125            <li><a href="#audioplayer">Why are my MP3 files are appearing as an icon, rather than as a player, as I've seen on other SermonBrowser sites?</a></li> 
    963             <li><a href="#differentversions">Can I have different bible versions from the ESV?</a></li> 
     1126            <li><a href="#differentversions">How do I change the Bible version from the ESV?</a></li> 
    9641127            <li><a href="#chipmunk">When using the 1pixelout audio player, my pastor sounds like a chipmunk! What's going on?</a> 
    9651128            <li><a href="#sidebar">How do I get recent sermons to display in my sidebar?</a></li> 
     
    9741137            <li><a href="#changedisplay">Can I change the way sermons are displayed?</a></li> 
    9751138            <li><a href="#changesearchform">The search form is too big/too small for my layout. How do I make it narrower/wider?</a></li> 
    976             <li><a href="#esvtextmissing">Why is sometimes the ESV Bible text missing?</a></li> 
     1139            <li><a href="#bibletextmissing">Why is sometimes the Bible text missing?</a></li> 
    9771140            <li><a href="#exceededquota">Why does my sermon page say I have exceeded my quota for ESV lookups?</a></li> 
    9781141            <li><a href="#icons">How can I change the icons that Sermon Browser uses, or add new icons?</a></li> 
     
    9931156        <h4 id="audioplayer">Why are my MP3 files are appearing as an icon, rather than as a player, as I've seen on other SermonBrowser sites?</h4> 
    9941157        <p>You need to install and activate the <a href="http://www.1pixelout.net/code/audio-player-wordpress-plugin/">1pixelout audio player</a> plugin. You can also customise the plugin so that its colours match your site.</p> 
    995         <h4 id="differentversions">Can I have different bible versions from the ESV?</h4> 
    996         <p>The ESV translation is the only one that provides an API which allows for this functionality. However, if you're desperate to use other versions, you can manage it using other Wordpress plugins (albeit with reduced functionality). The <a href="http://wordpress.org/extend/plugins/ebibleicious/">eBibleicious</a> plugin allows for NASB, MSG, KJV, NKJV, ESV, HCSB, and NCV (use it in 'snippet' mode). However, there are three disadvantages. (1) To use it, you'll need to register for an API key (although it is free). (2) It uses Javascript so search engines won't see the Bible text, and nor will users with javascript turned off. (3) Most importantly, it only shows a maximum of four verses (the ESV shows up to 500 verses!). 
    997         <p>You can also use the <a href="http://www.logos.com/reftagger">RefTagger</a> plugin, though this shows even few verses. Even worse (for our purposes) the bible passage only shows when you hover over a special link with your mouse. It does, however, provide an even longer list of translations. Please be aware that both RefTagger and eBibleicious will add bible text to bible references across your whole website, not just your sermons pages.</p> 
     1158        <h4 id="differentversions">How do I change the Bible version from the ESV?</h4> 
     1159        <p>Five Bible versions are supported by Sermon Browser: the English Standard Version, American Standard Version, King James Version, Young's Literal Transaltion and the World English Bible. To change to one of these other versions, go to Options, and edit the single template. Replace [esvtext] with [asvtext], [kjvtext], [ylttext] or [webtext]. Thanks go to <a href="http://www.crosswaybibles.org/" target="_blank">Crossway</a> for providing access to the ESV, and <a href="http://www.lstones.com/" target="_blank">Living Stones Ministries</a> for the other versions.</p> 
     1160        <p>If you're desperate to use other versions not currently supported, you can manage it using other Wordpress plugins (albeit with reduced functionality).  However, if you're desperate to use other versions, you can manage it using other Wordpress plugins (albeit with reduced functionality). The <a href="http://wordpress.org/extend/plugins/ebibleicious/">eBibleicious</a> plugin allows for NASB, MSG, KJV, NKJV, ESV, HCSB, and NCV (use it in 'snippet' mode). However, there are three disadvantages. (1) To use it, you'll need to register for an API key (although it is free). (2) It uses Javascript so search engines won't see the Bible text, and nor will users with javascript turned off. (3) Most importantly, it only shows a maximum of four verses (the ESV shows up to 500 verses!). 
     1161        <p>You can also use the <a href="http://www.logos.com/reftagger">RefTagger</a> plugin, though this shows even fewer verses. Even worse (for our purposes) the bible passage only shows when you hover over a special link with your mouse. It does, however, provide an even longer list of translations. Please be aware that both RefTagger and eBibleicious will add bible text to bible references across your whole website, not just your sermons pages.</p> 
    9981162        <p>To use either of these alternatives, just download, install and activate them as you would for any other plugin. Check their settings (make sure you enter get an API key if you're using eBiblicious). You then need to make one change to your SermonBrowser options. In the <i>Single Sermon form</i>, look for <b>[esvtext]</b> and replace it with <b>[biblepassage]</b>. (By default it's right at the end of the code.)</p> 
    9991163        <h4 id="chipmunk">When using the 1pixelout audio player, my pastor sounds like a chipmunk! What's going on?</h4> 
     
    10011165        <h4 id="sidebar">How do I get recent sermons to display in my sidebar?</h4> 
    10021166        <p>If your WordPress theme supports widgets, just go to Design and choose <a href="widgets.php">Widgets</a>. There you easily can add the Sermons widget to your sidebar. If your theme doesn't support widgets, you'll need to edit your theme manually. Usually, you'll be editing a file called <b>sidebar.php</b>, but your theme may give it a different name. Add the following code:</p> 
    1003             <p style="font-family:monospace">&lt;?php if (function_exists('display_sermons')) display_sermons(array('display_preacher' => 0, 'display_passage' => 1, 'preacher' => 0, 'service' => 0, 'series' => 0, 'limit' => 5)) ?></code> 
     1167        <p style="font-family:monospace">&lt;?php if (function_exists('display_sermons')) display_sermons(array('display_preacher' => 0, 'display_passage' => 1, 'preacher' => 0, 'service' => 0, 'series' => 0, 'limit' => 5)) ?></code> 
    10041168        <p>Each of the numbers in that line can be changed. <b>display_preacher</b> and <b>display_passage</b> affect what is displayed (0 is off, 1 is on). <b>preacher</b>, <b>service</b> and <b>series</b> allow you to limit the output to a particular preacher, service or series. Simply change the number of the ID of the preacher/services/series you want to display. You can get the ID from the Preachers page, or the Series & Services page. 0 shows all preachers/services/series. <b>limit</b> is simply the maximum number of sermons you want displayed.</p> 
    10051169        <h4 id="diskspace">My host only allows me a certain amount of disk space, and I have so many sermons uploaded, I've run out of space! What can I do?</h4> 
     
    10241188        <h4 id="changesearchform">The search form is too big/too small for my layout. How do I make it narrower/wider?</h4> 
    10251189        <p>The search form is set to roughly 500 pixels, which should be about right for most WordPress templates. To change it, look for a line in the CSS stylesheet that begins <b>table.sermonbrowser td.field input</b>, and change the width specified after it. To make the form narrower, reduce the width. To make it bigger, increase the width. You'll also need to change the width of the date fields on the line below, which should be 20 pixels smaller.</p> 
    1026         <h4 id="esvtextmissing">Why is sometimes the ESV Bible text missing?</h4> 
    1027         <p>This usually happens for one of three reasons: (1) If the ESV's website is down. If you can't see <a href="http://www.esvapi.org/v2/rest/passageQuery?key=IP&passage=Gen+1&include-headings=false">Genesis 1</a> then the problem is with the ESV website. It's rarely down for long. (2) If you specify an invalid bible passage (e.g. Romans 22). If this is the case your sermon page will display <i>ERROR: No results were found for your search.</i> (3) If your webhost has disabled <b>allow_url_fopen</b>. This is a feature of PHP that some cheaper webhosts have switched off. There is an alternative that can be used - curl - but SermonBrowser doesn't support that method at the moment. If your webhost has disabled <b>allow_url_fopen</b>, but does support curl, leave a message in the <a href="http://www.4-14.org.uk/sermonbrowser#comments">SermonBrowser comments</a>. If there's enough demand, it could perhaps be added.</p> 
     1190        <h4 id="bibletextmissing">Why is sometimes the Bible text missing?</h4> 
     1191        <p>This usually happens for one of three reasons: (1) If the website providing the service is down. If you can't see Genesis 1 in the <a href="http://www.esvapi.org/v2/rest/passageQuery?key=IP&amp;passage=Gen+1&amp;include-headings=false">ESV</a> or <a href="http://api.seek-first.com/v1/BibleSearch.php?type=lookup&appid=seekfirst&startbooknum=1&startchapter=1&startverse=1&endbooknum=1&endchapter=1&endverse=30&version=KJV">the other versions</a>then the problem is with those websites. They're rarely down for long. (2) If you specify an invalid bible passage (e.g. Romans 22). If this is the case your sermon page will display <em>ERROR: No results were found for your search.</em> (3) If your webhost has disabled <strong>allow_url_fopen</strong> and cURL. Some cheaper webhosts have these essential features switched off. If they have, you won't be able to use this facility.</p> 
    10281192        <h4 id="exceededquota">Why does my sermon page say I have exceeded my quota for ESV lookups?</h4> 
    10291193        <p>The ESV website only allows 5,000 lookups per day from each IP address. That should be enough for most users of SermonBrowser. However, if you are using a shared host, there will be hundreds (perhaps thousands) of other websites on the same IP address as you. If any are also using the ESV API, they also get counted towards that total. If you are using less than 5,000 lookups per day (i.e. you are having less than 5,000 pageviews of your sermon pages), and you receive the error message you'll need to do two things in order to continue to display the text. (1) Sign up for an <a href="http://www.esvapi.org/signup">ESV API key</a>. (2) Edit frontend.php (one of the SermonBrowser files). Look for line 66, and replace <i>&hellip;passageQuery?key=<b>IP</b>&passage=&hellip;</i> with <i>&hellip;passageQuery?key=<b>YOURAPIKEY</b>&passage=&hellip;</i>.</p> 
     
    10721236            <li><b>[tags]</b> - Displays the tags for that sermons</li> 
    10731237            <li><b>[esvtext]</b> - Displays the full text of the ESV Bible for all passages linked to that sermon.</li> 
     1238            <li><b>[asvtext]</b> - Displays the full text of the ASV Bible for all passages linked to that sermon.</li> 
     1239            <li><b>[kjvtext]</b> - Displays the full text of the KJV Bible for all passages linked to that sermon.</li> 
     1240            <li><b>[ylttext]</b> - Displays the full text of the YLT Bible for all passages linked to that sermon.</li> 
     1241            <li><b>[webtext]</b> - Displays the full text of the WEB Bible for all passages linked to that sermon.</li> 
    10741242            <li><b>[biblepassage]</b> - Displays the reference of the bible passages for that sermon. Useful for utilising other bible plugins (see <a href="#otherversions">FAQ</a>).</li> 
    10751243    </div> 
     
    11761344        </form> 
    11771345    </div> 
    1178 <? 
     1346<?php 
    11791347        return; 
    11801348    } 
     
    24392607        if ($fp) { 
    24402608            //Delete this test file 
     2609            fclose($fp); 
     2610            unset($fp); 
    24412611            @unlink($sermonUploadDir.'sermontest.txt'); 
    2442             fclose($fp); 
    24432612            return 'writeable';          
    24442613        } else { 
  • sermon-browser/branches/0.10-0.23/single.php

    r57039 r57040  
    5353    </table> 
    5454 
    55     <?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo add_esv_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i]); endfor ?> 
     55    <?php for ($i = 0; $i < count($sermon["Sermon"]->start); $i++): echo add_bible_text ($sermon["Sermon"]->start[$i], $sermon["Sermon"]->end[$i], "kjv"); endfor ?> 
    5656 
    5757    <div id="poweredbysermonbrowser">Powered by <a href="http://www.4-14.org.uk/sermon-browser">Sermon Browser</a></div> 
  • sermon-browser/branches/0.10-0.23/style.css

    r57039 r57040  
    11.sermon-browser h2 { 
     2    clear: both; 
     3} 
    24 
    3     clear: both; 
     5div.sermon-browser table.sermons { 
     6    width: 100%; 
     7    clear:both; 
     8} 
    49 
     10div.sermon-browser table.sermons td.sermon-title { 
     11    font-weight:bold; 
     12    font-size: 140%; 
     13    padding-top: 2em; 
     14} 
     15 
     16div.sermon-browser table.sermons td.sermon-passage { 
     17    font-weight:bold; 
     18    font-size: 110%; 
     19} 
     20 
     21div.sermon-browser table.sermons td.preacher { 
     22    border-bottom: 1px solid #444444; 
     23} 
     24 
     25div.sermon-browser table.sermons td.files img { 
     26    border: none; 
     27    margin-right: 24px; 
     28} 
     29 
     30table.sermonbrowser td.fieldname { 
     31    font-weight:bold; 
     32    padding-right: 10px; 
     33    vertical-align:bottom; 
     34} 
     35 
     36table.sermonbrowser td.field input, table.sermonbrowser td.field select{ 
     37    width: 170px; 
     38} 
     39 
     40table.sermonbrowser td.field  #date, table.sermonbrowser td.field #enddate { 
     41    width: 150px; 
     42} 
     43 
     44table.sermonbrowser td { 
     45    white-space: nowrap; 
     46    padding-top: 5px; 
     47    padding-bottom: 5px; 
     48} 
     49 
     50table.sermonbrowser td.rightcolumn { 
     51    padding-left: 10px; 
     52} 
     53 
     54div.sermon-browser div.floatright { 
     55    float: right 
     56} 
     57 
     58div.sermon-browser div.floatleft { 
     59    float: left 
     60} 
     61 
     62img.sermon-icon , img.site-icon { 
     63    border: none; 
     64} 
     65 
     66div.podcastall { 
     67    float:left; 
     68    border: 2px solid #FC9328; 
     69    background: #fff0c8 url(icons/podcast_background.png) repeat-x; 
     70    padding: 0.3em; 
     71} 
     72 
     73div.podcastall img.podcasticon, div.podcastcustom img.podcasticon { 
     74    float:left; 
     75    margin-right: 1em; 
     76    border: none; 
     77} 
     78 
     79div.podcastall span a{ 
     80    color: #FC9328; 
     81    font-weight: bold; 
     82    font-size:125%; 
     83} 
     84 
     85div.podcastcustom { 
     86    float:right; 
     87    border: 2px solid #b83ee5; 
     88    background: #fce4ff url(icons/podcast_custom_background.png) repeat-x; 
     89    padding: 0.3em; 
     90} 
     91div.podcastcustom span a{ 
     92    color: #b83ee5; 
     93    font-weight: bold; 
     94    font-size:125%; 
     95} 
     96 
     97div.sermon-browser-results span.preacher { 
     98    font-size: 120%; 
     99} 
     100 
     101div.sermon-browser-results span.scripture { 
     102    font-size: 80%; 
     103} 
     104 
     105span.chapter-num { 
     106    font-weight: bold; 
     107    font-size: 150%; 
     108} 
     109 
     110span.verse-num { 
     111    vertical-align:super; 
     112    line-height: 1em; 
     113    font-size: 65%; 
     114} 
     115 
     116div.esv span.small-caps { 
     117    font-variant: small-caps; 
    5118} 
    6119 
    7120 
    8  
    9 div.sermon-browser table.sermons { 
    10  
    11     width: 100%; 
    12  
    13     clear:both; 
    14  
     121div.sermon-browser #poweredbysermonbrowser { 
     122    text-align:center; 
     123} 
     124div.sermon-browser-results #poweredbysermonbrowser { 
     125    text-align:right; 
    15126} 
    16127 
    17  
    18  
    19 div.sermon-browser table.sermons td.sermon-title { 
    20  
    21     font-weight:bold; 
    22  
    23     font-size: 140%; 
    24  
    25     padding-top: 2em; 
    26  
     128table.nearby-sermons { 
     129    width: 100%; 
    27130} 
    28131 
    29  
    30  
    31 div.sermon-browser table.sermons td.sermon-passage { 
    32  
    33     font-weight:bold; 
    34  
    35     font-size: 110%; 
    36  
     132table.nearby-sermons td, table.nearby-sermons th { 
     133    text-align: center; 
    37134} 
    38135 
    39  
    40  
    41 div.sermon-browser table.sermons td.preacher { 
    42  
    43     border-bottom: 1px solid #444444; 
    44  
     136table.nearby-sermons .earlier { 
     137    padding-right: 1em; 
     138    text-align: left; 
    45139} 
    46140 
    47  
    48  
    49 div.sermon-browser table.sermons td.files img { 
    50  
    51     border: none; 
    52  
    53     margin-right: 24px; 
    54  
     141table.nearby-sermons .later { 
     142    padding-left: 1em; 
     143    text-align:right; 
    55144} 
    56145 
    57  
    58  
    59 table.sermonbrowser td.fieldname { 
    60  
    61     font-weight:bold; 
    62  
    63     padding-right: 10px; 
    64  
    65     vertical-align:bottom; 
    66  
     146table.nearby-sermons td { 
     147    width: 33%; 
     148    vertical-align: top; 
    67149} 
    68150 
    69  
    70  
    71 table.sermonbrowser td.field input, table.sermonbrowser td.field select{ 
    72  
    73     width: 170px; 
    74  
     151ul.sermon-widget { 
     152    list-style-type:none; 
     153    margin:0; 
     154    padding: 0; 
    75155} 
    76156 
    77  
    78  
    79 table.sermonbrowser td.field  #date, table.sermonbrowser td.field #enddate { 
    80  
    81     width: 150px; 
    82  
     157ul.sermon-widget li { 
     158    list-style-type:none; 
     159    margin:0; 
     160    padding: 0.25em 0; 
    83161} 
    84162 
    85  
    86  
    87 table.sermonbrowser td { 
    88  
    89     white-space: nowrap; 
    90  
    91     padding-top: 5px; 
    92  
    93     padding-bottom: 5px; 
    94  
     163ul.sermon-widget li span.sermon-title{ 
     164    font-weight:bold; 
    95165} 
    96  
    97  
    98  
    99 table.sermonbrowser td.rightcolumn { 
    100  
    101     padding-left: 10px; 
    102  
    103 } 
    104  
    105  
    106  
    107 div.sermon-browser div.floatright { 
    108  
    109     float: right 
    110  
    111 } 
    112  
    113  
    114  
    115 div.sermon-browser div.floatleft { 
    116  
    117     float: left 
    118  
    119 } 
    120  
    121  
    122  
    123 img.sermon-icon , img.site-icon { 
    124  
    125     border: none; 
    126  
    127 } 
    128  
    129  
    130  
    131 div.podcastall { 
    132  
    133     float:left; 
    134  
    135     border: 2px solid #FC9328; 
    136  
    137     background: #fff0c8 url(icons/podcast_background.png) repeat-x; 
    138  
    139     padding: 0.3em; 
    140  
    141 } 
    142  
    143  
    144  
    145 div.podcastall img.podcasticon, div.podcastcustom img.podcasticon { 
    146  
    147     float:left; 
    148  
    149     margin-right: 1em; 
    150  
    151     border: none; 
    152  
    153 } 
    154  
    155  
    156  
    157 div.podcastall span a{ 
    158  
    159     color: #FC9328; 
    160  
    161     font-weight: bold; 
    162  
    163     font-size:125%; 
    164  
    165 } 
    166  
    167  
    168  
    169 div.podcastcustom { 
    170  
    171     float:right; 
    172  
    173     border: 2px solid #b83ee5; 
    174  
    175     background: #fce4ff url(icons/podcast_custom_background.png) repeat-x; 
    176  
    177     padding: 0.3em; 
    178  
    179 } 
    180  
    181 div.podcastcustom span a{ 
    182  
    183     color: #b83ee5; 
    184  
    185     font-weight: bold; 
    186  
    187     font-size:125%; 
    188  
    189 } 
    190  
    191  
    192  
    193 div.sermon-browser-results span.preacher { 
    194  
    195     font-size: 120%; 
    196  
    197 } 
    198  
    199  
    200  
    201 div.sermon-browser-results span.scripture { 
    202  
    203     font-size: 80%; 
    204  
    205 } 
    206  
    207  
    208  
    209 div.esv span.chapter-num { 
    210  
    211     font-weight: bold; 
    212  
    213     font-size: 150%; 
    214  
    215 } 
    216  
    217  
    218  
    219 div.esv span.verse-num { 
    220  
    221     vertical-align:super; 
    222  
    223     line-height: 1em; 
    224  
    225     font-size: 65%; 
    226  
    227 } 
    228  
    229  
    230  
    231 div.sermon-browser #poweredbysermonbrowser { 
    232  
    233     text-align:center; 
    234  
    235 } 
    236  
    237 div.sermon-browser-results #poweredbysermonbrowser { 
    238  
    239     text-align:right; 
    240  
    241 } 
    242  
    243  
    244  
    245 table.nearby-sermons { 
    246  
    247     width: 100%; 
    248  
    249 } 
    250  
    251  
    252  
    253 table.nearby-sermons td, table.nearby-sermons th { 
    254  
    255     text-align: center; 
    256  
    257 } 
    258  
    259  
    260  
    261 table.nearby-sermons .earlier { 
    262  
    263     padding-right: 1em; 
    264  
    265     text-align: left; 
    266  
    267 } 
    268  
    269  
    270  
    271 table.nearby-sermons .later { 
    272  
    273     padding-left: 1em; 
    274  
    275     text-align:right; 
    276  
    277 } 
    278  
    279  
    280  
    281 table.nearby-sermons td { 
    282  
    283     width: 33%; 
    284  
    285     vertical-align: top; 
    286  
    287 } 
    288  
    289  
    290  
    291 ul.sermon-widget { 
    292  
    293     list-style-type:none; 
    294  
    295     margin:0; 
    296  
    297     padding: 0; 
    298  
    299 } 
    300  
    301  
    302  
    303 ul.sermon-widget li { 
    304  
    305     list-style-type:none; 
    306  
    307     margin:0; 
    308  
    309     padding: 0.25em 0; 
    310  
    311 } 
    312  
    313  
    314  
    315 ul.sermon-widget li span.sermon-title{ 
    316  
    317     font-weight:bold; 
    318  
    319 } 
Note: See TracChangeset for help on using the changeset viewer.