Описание плагина [see also English description below] Плагин подсвечивае? ссылки на ?екс? Библии с помощью гиперссылок на сай? Православной эн?? иклопедии “Азбука веры” (http://azbyka.ru/biblia). Текс? Библии предс?авлен на ?? ерковнославянском, русском, греческом, еврейском и ла?инском языках. В нас?ройках Вы може?е переопредели?ь э?и гиперссылки на свой собс?венный сай? или даже о?ключи?ь их. А ?акже на ?олкования Свя?ого Писания Свя?ыми о??? ами и Учи?елями Церкви на сай?е монас?ыря Оп?ина Пус?ынь (http://bible.optina.ru). В нас?ройках Вы ?акже може?е включи?ь о?ображение ссылок на параллельные мес?а в Библии. Ссылки на параллельные мес?а указаны в кон?? е каждого с?иха в фигурных скобках. Плагин обраба?ывае? ссылки следующего форма?а: (Ин. 3:16), где «Ин.» – э?о название книги, 3 – э?о глава, а 16 – э?о номер с?иха; (Ин. 3:16—18) (Книга. Глава: с э?ого [—] по э?о? с?их); (Ин. 3:16—18, 21, 34—36) (Книга. Глава: с э?ого [—] по э?о? с?их, э?о? с?их, с э?ого [—] по э?о? с?их); (Ин. 3:16—18, 4:4—6) (Книга. Глава: с э?ого [—] по э?о? с?их, глава: с э?ого [—] по э?о? с?их); (Ин. 3:16—4:6) (Книга. Глава: э?о? с?их [—] по глава: э?о? с?их); (Мф. 5—6) (Книга. С э?ой [—] по э?у главу). Допускае?ся указание ссылок в квадра?ных скобках и без ?очки после наименования книги. При указании номера главы (сразу после названия книги) можно использова?ь запя?ую вмес?о двое?очия. Также допускае?ся указыва?ь несколько книг вподряд,используя ?очку с запя?ой в качес?ве раздели?еля (см.: Зах.4; 2Кор.1:21; 1Ин.2:27). Плагин поддерживае? с?арую но?а?? ию с римскими ?? ифрами в обозначении книг и глав. Пробелы игнорирую?ся. В нас?ройках плагина Вы може?е выбра?ь языки, на ко?орых буде? о?обража?ься ?екс? Библии: ?? ерковно-славянский, русский, греческий, ла?инский и иври?. Для ?? ерковно-славянского языка можно ?акже выбра?ь шриф?: ?? ерковно-славянский шриф?, русские буквы (“с?арый” с?иль) или HIP-с?андар?. Вы ?акже може?е указа?ь, где о?крыва?ь с?рани?? у с ?екс?ом Библии – в новом или ?екущем окне. Для нас?ройки вида ссылок используй?е класс bg_bibrefs. Вы може?е измени?ь имя класса в нас?ройках. При наведении курсора мыши на ссылку о?ображае?ся всплывающая подсказка содержащая с?ихи Библии. Вы може?е выбра?ь язык о?ображения подсказки: ?? ерковно-славянский (Елизаве?инская Библия) русский (Синодальный перевод) украинский (перевод И.И.Огиенко) белорусский (Новый Заве? в переводе Библейской Комиссии при Белорусском Экзарха?е) английский (King James Version) При о?ключении э?ой оп?? ии вмес?о с?ихов о?ображае?ся номер главы и номера с?ихов. Вы може?е выбра?ь язык о?ображения с?ихов Библии в нас?ройках, по умолчанию ус?анавливае?ся язык WP. Если Вам необходимо переопредели?ь язык для о?дельной заме?ки, создай?е для заме?ки произвольное поле с именем bible_lang и присвой?е ему двухбуквенное обозначение языка. В нас?ройках можно включи?ь оп?? ию позволяющую показыва?ь оригинальные номера с?ихов в скобках после номера с?ихов русского Синодального перевода в подсказках и ?? и?а?ах. С?ихи, помеченные звездочкой * о?су?с?вую? в оригинальном переводе. * – о?ображаю?ся всегда! Для ч?ения файлов Библии использую?ся PHP file_get_contents() или fopen() или cURL. Плагин пы?ае?ся загружа?ь файлы Библии э?ими ме?одами в указанном порядке. Ч?обы сдела?ь загрузку более быс?рой о?ключи?е лишние ме?оды. Предупреждение: Неко?орые ме?оды могу? бы?ь недос?упны на Вашем сервере. Если Вы размес?или свой блог на медленном сервере попробуй?е оп?? ию “Предвари?ельная загрузка с?ихов из Библии во всплывающие подсказки”. Предупреждение: Вы може?е име?ь проблемы с ограничениями Ajax-запросов на сервере. Если Вы включи?е оп?? ию ‘Преобразовыва?ь ссылки к нормализованному виду’, ?о ссылки на Библию буду? заключены в круглые скобки, в них буду? удалены лишние пробелы, а названия книг, обозначения глав и с?ихов буду? приведены к с?андар?ному виду, соо?ве?с?вующему вос?очной ?ради?? ии. Самозакрывающийся шор?-код [bible book=’Mt’ ch=’2:3-6′ type=’verses’ lang=’ru’ prll=’on’ /] выводи? ?? и?а?ы из Библии в ?екс?е с?рани?? ы. Здесь: book – обозначение книги, ch – номера глав и с?ихов, type – форма? вывода, lang – язык ?екс?а Библии (по умолчанию, язык Библии пос?а), prll=’on’|’off’ – вкл.|выкл. о?ображение ссылок на паралельные мес?а в Библии. Допускае?ся вмес?о book и ch указа?ь полную ссылку в параме?ре ref. В э?ом случае параме?ры book и ch игнорирую?ся. Если ref=’rnd’, ?о выводи?ся случайная ?? и?а?а из перечня, предс?авленного в файле quotes.txt. Если ref=’days’, ?о выводи?ся ?? и?а?а дня в соо?ве?с?вии с порядковым номером дня в ?екущем году. Если ref – любое ?? елое число, ?о выводи?ся ?? и?а?а, с соо?ве?с?вующим порядковым номером. Вы може?е ?акже созда?ь свой собс?венный перечень ?? и?а? в о?дельном ?екс?овом файле, разделяя ссылки любыми пробельными символами (пробел, ?абуля?? ия, перевод с?роки и ?.д.) и указа?ь имя э?ого файла в нас?ройках плагина. Если type=’book’, ?о о?ображаю?ся наименование книги, заголовки глав и с?ихи, каждый о?дельным абза?? ем, с указанием его номера. Если type=’verses’, ?о о?ображаю?ся ?олько с?ихи, каждый о?дельным абза?? ем, с указанием номера главы и номера с?иха. Если type=’b_verses’, ?о о?ображаю?ся ?олько с?ихи, каждый о?дельным абза?? ем, с указанием коро?кого названия книги, номера главы и номера с?иха. Если type=’t_verses’, ?о о?ображаю?ся наименование книги и с?ихи, каждый о?дельным абза?? ем, с указанием номера главы и номера с?иха. Если type=’quote’, ?о о?ображаю?ся ?олько с?ихи без деления их на абза?? ы. Если type=’link’, ?о о?ображае?ся ссылка на Библию. Ограждающий шор?-код [bible type=’verses’ lang=’ru’]…[/bible] преобразуе? все ссылки в содержимом в ?? и?а?ы из Библии. При э?ом параме?ры book и ch игнорирую?ся. Шор?-код [bible_epigraph ref=’rnd’ lang=’ru’] выводи? на экран ?? и?а?у в форме эпиграфа. Шор?-код [bible_search context=’О?че наш’ type=’verses’ lang=’ru’ prll=’on’ /] выводи? на экран резуль?а?ы поиска указанной в параме?ре ‘context’ фразы. В поисковом запросе можно использова?ь спе?? иальные символы: “$” – 1 любая буква, “%” – 0 или 1 любая буква, “*” – несколько любых букв. Шор?-код [bible_omnisearch lang=’ru’ page='{URL}’/] выводи? на экран элемен? формы, позволяющий пользова?елю вводи?ь поисковый запрос (см. [bible_search]). В параме?ре ‘page’ необходимо указа?ь URL с?рани?? ы, на ко?орой буду? выведены резуль?а?ы поиска (указан шор?-код [bible_search]). Если параме?р ‘page’ не задан, ?о подразумевае?ся э?а же с?рани?? а. Шор?-код [references type=’list’ separator=’, ‘ list=’o’ col=1 /] выводи? список ссылок на Библию, вс?речающиеся в с?а?ье. Здесь: type – форма? о?ображения списка (по умолчанию ‘list’). Если type=’string’, ?о список о?ображае?ся в виде с?роки в ?егах <p>...</p>, при э?ом используе?ся дополни?ельный параме?р ‘separator’, в ко?ором указывае?ся раздели?ель между ссылками (по умолчанию запя?ая и пробел). Если type=’list’, ?о список о?ображае?ся в виде списка, при э?ом если дополни?ельному параме?ру ‘list’ присвоено значение ‘u’, ?о э?о ненумерованный список, а если ‘o’, ?о – нумерованный(по умолчанию ‘o’). В дополни?ельном параме?ре ‘col’ указывае?ся количес?во колонок(по умолчанию 1). Если type=’table’, ?о список о?ображае?ся в виде ?абли?? ы, в дополни?ельном параме?ре ‘col’ указывае?ся количес?во колонок(по умолчанию 1). Список ссылок выводи?ся в ?абли?? е пос?рочно. Список ссылок выводи?ся на экран в кон?ейнере <div class=”bg_refs_list”>…</div>. Используй?е класс bg_refs_list для задания свойс?в об? ек?ов списка. Шор?-код [norefs]…[/norefs] запрещае? подсве?ку гиперссылок на Библию в ?екс?е, ограниченном э?им шор?-кодом. Если необходимо запре?и?ь подсве?ку в заме?ке в ?? елом создай?е рубрику или ме?ку с ярлыком norefs и помес?и?е заме?ку в э?у рубрику/ме?ку, или создай?е для заме?ки произвольное поле с именем norefs и присвой?е ему произвольное значение. Ч?обы выдели?ь ?екс? с?ихов в подсказке для последующего копирования в буфер обмена прос?о щелки?е мышью в облас?и с?ихов, например, по номеру с?иха. А за?ем используй?е Ctrl+C или кон?екс?ное меню для копирования. Плагин содержи? 3 видже?а: * Видже? “Ссылки на Библию” позволяе? размес?и?ь в сайдбаре форму для вывода ?екс?а ?? и?а? из Библии на с?рани?? е Вашего сай?а. * Видже? “Поиск в Библии” позволяе? размес?и?ь в сайдбаре форму для поиска слова или фразы Библии. * Видже? “Ци?а?а из Библии” выводи? в сайдбаре Случайную Ци?а?у или Ци?а?у Дня из Библии, аналогично ?ому, как э?о делае? шор?-код [bible_epigraph]. Нас?ройки плагина включаю? файловый менеджер для библейских книг. Вы може?е добавля?ь и удаля?ь папки с книгами Библии на вашем сай?е. Вы ?акже може?е получа?ь о?рывки из Библии о? внешнего AJAX Proxy. Введи?е пу?ь к внешнему AJAX Proxy (например, http://my-ajax-server.com/wp-admin/admin-ajax.php) в нас?ройках. Кроме ?ого, добавь?е в functions.php на э?ом сервере следующий PHP-код: function allow_origin () { header ( “Access-Control-Allow-Origin: http://my-site1.com ” ); header ( “Access-Control-Allow-Origin: http://my-site2.com ” ); … header ( “Access-Control-Allow-Origin: http://my-siteN.com ” ); } add_action ( “init”, “allow_origin” ); English plugin discription The plugin will highlight references to the Bible text with links to site of Orthodox encyclopedia “The Alphabet of Faith” (http://azbyka.ru/biblia). The Bible is presented in Church, Russian, Greek, Hebrew and Latin. In the settings, you can redirect the hyperlink to your own website, or even turn off them. And also on the interpretation of Holy Scripture by the Holy Fathers and Doctors of the Church on the site of Optina Pustyn monastery (http://bible.optina.ru). In the settings you can also choose to display references to parallel passages in the Bible. Links to parallel passages are listed at the end of each verse in the curly brackets. The plugin handles the references with the format: (Ин. 3:16), where «Ин.» – book title, 3 – chapter, а 16 – verse number; (Ин. 3:16—18) (Book. Chapter: from this verse [—] till this verse); (Ин. 3:16—18, 21, 34—36) (Book. Chapter: from this verse [—] till this verse, this verse, from this verse [—] till this verse); (Ин. 3:16—18, 4:4—6) (Book. Chapter: from this verse [—] till this verse, chapter: from this verse [—] till this verse); (Ин. 3:16—4:6) (Book. Chapter: this verse [—] till chapter: this verse); (Мф. 5—6) (Book. From this chapter [—] till this chapter). You can specify the reference in brackets and without a point after the title of the book. If you specify a chapter (after the title of the book), you can use comma instead of colon. Also you can specify a few books in row using semicolon as the separator (см.: Зах.4; 2Кор.1:21; 1Ин.2:27). The plugin supports the old notation with Roman numerals in naming books and in chapters. Spaces are ignored. In the plugin settings you can select the languages in which the text will be displayed Bible: Church Slavic, Russian, Greek, Latin and Hebrew. For the Church Slavonic language, you can also select a font: Church Slavic font, Russian letters (the “old” style) or HIP-standard. You can also specify where to open a page with the Bible text – in new or current window. To customize the appearance of reference links, use class bg_bibrefs. You can change the class name in the settings. When you hover your mouse over the link displayed tooltip containing the Bible verses. You can select the language for tooltip: Church Slavic (Elizabeth Bible) Russian (Synodal translation) Ukrainian (translation by I.I.Ogienko) Belarusian (New Testament translated by Biblical Commission of the Belarusian Exarchate) English (King James Version) If you disable this option, the number of the chapter and verse numbers will displayed instead of verses. You can change the language for display of the Bible verses in the settings (default – language WP). If you need to override the language for a single post, create a custom field for the post with a name bible_lang and set it two-letter language code. In the settings you can turn on the option allows you to show the original verse numbers in parentheses after the verse numbers of Russian Synodal Translation in the tooltips and quotes. Verses marked with asterisk ‘‘ are absent in the original translation. ‘‘ – always visible! To read Bible files used PHP-functions cURL or file_get_contents() or fopen(). Plugin tries to read Bible files with one of this methods in the order listed. To do the reading faster, disable unnecessary methods in settings – you need one only. Warning: Some methods may not be available on your server. If you placed your blog on a slow server try the option “Preload Bible verses in tooltips”. Warning: you can have problem with ajax-requests limiting on the server. If you enable the ‘Convert References to the normalized form’, the Bible references will within brackets, there are removed extra spaces, and the book titles, chapters and verses will be have the standard form corresponding to the Eastern tradition. Self-closing shortcode [bible book = ‘Mt’ ch = ‘2 :3-6 ‘type =’ verses’ lang=’ru’ prll=’on’ /] displays quotes from the Bible in the text of the page. Here: book – the designation of the book, ch – numbers of chapters and verses, type – the output format, lang – language of the Bible, prll=’on’|’off’ – turn on|off links to parallel passages in the Bible. Allowed instead of ‘book’ and ‘ch’ specify the full reference in the parameter ‘ref’. In this case, the parameters ‘book’ and ‘ch’ are ignored. If ref = ‘rnd’, it displays a random quote from the list in the file quotes.txt. If ref = ‘days’, it displays the quote of the day according with the serial number of the day in the current year. If ref – any integer, it displays a quote with the appropriate serial number. Also you can create your own list of quotes in a text file, by separating references with any white spaces (space, tab, newline, etc.), and then specify filename in the plugin settings. If type = ‘book’, it displays the name of the book, chapter and verse in separate paragraph with verse number. If type = ‘verses’, it displays only the verses in separate paragraph with chapter number and verse number. If type = ‘b_verses’, it displays only the verses in separate paragraph with short book title, chapter number and verse number. If type = ’t_verses’, it displays the name of the book and verse in separate paragraph with chapter number and verse number. If type = ‘quote’, it displays only the verses without dividing them into paragraphs. If type=’link’, it displays Bible reference. Enclosing shortcode [bible type = ‘verses’ lang=’ru’] … [/ bible] converts all references in content to quotes from the Bible. The parameters of the book and ch ignored. Shortcode [bible_epigraph ref = ‘rnd’ lang = ‘ru’] displays the quote in the format of epigraph. Shortcode [bible_search context = ‘Our Father’ type = ‘verses’ lang = ‘ru’ prll=’on’ /] displays the search results of phrase (parameter ‘context’). In the search query you can use wildcards: “$” – 1 аny letter, “%” – 0 or 1 аny letter, “*” – more any letters. Shortcode [bible_omnisearch lang = ‘ru’ page = ‘{URL}’ /] displays a form element, allowing the user to enter a search query (see: [Bible_search]). In the parameter ‘page’ you must specify the URL of the page where search results will be displayed (specified shortcode [bible_search]). If the parameter ‘page’ is not set, it means the same page. Shortcode [references type = ‘list’ separator = ‘,’ list = ‘o’ col = 1 /] displays list of Bible references are finded in the article. Here : type – list display format(default ‘list’). If type = ‘string’, the list is displayed as string in tags <p>...</p>, the additional parameter ‘separator’ contains the separator between the references (default comma and space). If type = ‘list’, the list is displayed as list, if the additional parameter ‘list’ is set to ‘u’, then this is an unordered list, and if it is ‘o’, then – numbered (default ‘o’). Аdditional parameter ‘col’ specifies the number of columns (default 1). If type = ‘table’, the list is displayed as table, additional parameter ‘col’ specifies the number of columns (default 1). List of links displayed in the table by line. A list of references displayed in the container <div class="bg_refs_list"> ... </div>. Use bg_refs_list class to set the properties of list objects. Shortcode [norefs]…[/norefs] prohibits highlighting the Bible references in the text enclosed with this shortcode. If you want to disable highlight of Bible references in the whole post, create a category or tag with a label norefs and place a post in this category/tag, or create custom field with name norefs for this post and set it any value. To select verses text in tooltip for later copying to the clipboard click the left mouse button in the verse field, for example, on verse number. And then use Ctrl+C or the context menu for copy. The plugin contains 3 widgets: * Bible References Widget allows you to place the form in the sidebar to display Bible quotes on the page of your site. * Bible Search Widget allows you to place the form in the sidebar to search for words or phrases in the Bible. * Bible Quote Widget in the sidebar displays a Random Quote or Day’s Quote from the Bible the same way as it makes the shortcode [bible_epigraph]. Plugin settings include the file manager for Bible books. You can add and delete folders with Bible books on your site. You can receive Bible verses from external AJAX Proxy. Enter path to external AJAX Proxy (e.g. http://my-ajax-server.com/wp-admin/admin-ajax.php) in settings. Also add into functions.php on this server the following PHP-code function allow_origin () { header ( “Access-Control-Allow-Origin: http://my-site1.com ” ); header ( “Access-Control-Allow-Origin: http://my-site2.com ” ); … header ( “Access-Control-Allow-Origin: http://my-siteN.com ” ); } add_action ( “init”, “allow_origin” ); Notes for Translators You can translate this plugin using POT-file in languages folder with program PoEdit (http://www.poedit.net/). More in detail about translation WordPress plugins, see “Translating WordPress” (https://codex.wordpress.org/Translating_WordPress). Send me your PO-files. I will insert them in plugin in next version. License GNU General Public License v2