Thanks a lot Dan!
The bible sort function works great now.  And thanks for uploading your
Bible recipe.  I really like it!  It is very simple and works well.
I also really like the way the highlight function works!  It helps the
search results look good.
Thanks for your help!
~Shawn



On Thu, Oct 9, 2014 at 12:30 PM, The Editor <[email protected]> wrote:

> Hey Shawn,
>
> A small mistake in the script I sent you. Change sort($out) to
> asort($out).
>
> Alternately, you can use my Bible, which doesn't require a special sort
> function (I use book numbers). I just updated it and released it as a
> plugin at http://www.boltwire.com/index.php?p=docs.plugins.bible
>
> It comes with everything you need for an out of the box Bible including a
> search function and jump menu's. Everything should work right away except I
> use a highlight function in the search template that I'm planning to add to
> the core in the next release. You will want to add this to your core
> manually... Just go to functions.php and insert this in the code somewhere:
>
> function BOLTFhighlight($args) {
> $text = strtoupper(BOLTinit($args[1]));
> $page = BOLTinit($args[2], $args['page']);
> $content = BOLTloadpage($page);
> $lines = explode("\n", $content);
> foreach($lines as $l => $line) {
> if (stripos($line, $text) === false) continue;
> $out[] = '* ' . preg_replace("/\b($text)\b/i", "||$text||", $line);
> }
> return implode("\n", $out);
> }
>
> Don't put it in config.php or when you upgrade next time, the function
> will be defined twice and your installation will break.
>
> Let me know if you have any questions.  :)
>
> Cheers,
> Dan
>
>
>
> On Wed, Oct 8, 2014 at 6:47 PM, S. & A. <[email protected]> wrote:
>
>> Thank you so much for the help Dan and Tiffany! It works great now. The
>> only thing that I didn’t get to work was the custom sort plugin. I created
>> a config.php file in the root/bible/config/ folder. I added the “<?php” at
>> the beginning of the file (which I guess marks it as a php file?). And I
>> added “sort=bible” to the search line. But the search results now come back
>> with 0? 1? 2?, etc. So something’s not working quite right. Any ideas?
>>
>> Dan, the Bible you have on your website looks nice. Do you have each
>> chapter of each book in a separate page? I probably wouldn’t need all the
>> pages that run it since mine is about finished, but it would be great if I
>> could get the book and chapter pages from you. Then I wouldn’t have to make
>> them all up myself. If it’s too much trouble though, don’t worry about it.
>>
>>
>>  Thanks a lot,
>>
>> Shawn
>>
>> PS. Enabling UTF-8 in the skin fixed the special character problem.
>>
>>
>>
>>
>>
>> Sent using Hushmail
>>
>>
>>
>> On 10/7/2014 at 4:02 PM, "The Editor" <[email protected]> wrote:
>>
>> Hi Shawn,
>>
>> I might be able to zip up my Bible program. You can see it here:
>> https://www.fast.st/fast/index.php?p=bible.1.1
>>
>> I have it stored in a separate page library so all my sites can use it
>> without having to put a copy in each one. It has a few custom plugins to
>> make it work.  You'll notice I numbered my books so I don't have to worry
>> about sorting. Just use titles for each book. But as for your questions:
>>
>> 1) By default, search results are separated by a line return. You can
>> change it like this:
>>
>> [([(search group=bible.genesis fmt=[[{+p}|+]] join=' | ')]
>>
>> You can change the join to ' ' if you prefer.
>>
>> 2. Tiffany gave you good code for the prev and next. Two notes though:
>>
>> a) an easy way to check if a page exists is [if exists bible.{p2}.{
>> {p3}+1 }]...  Same with -1
>> b) to use the math operator, make sure you have a space inside the
>> brackets around your expression. ie { 1+2 } not {1+2}. The markup rule
>> requires it.
>>
>> 3) For the search order you need a custom plugin. It would look something
>> like this:
>>
>> function BOLTsortBible($in) {
>>      $bibleorder = array('genesis'=>1,'exodus'=>2,...,'revelation'=>66);
>>  // fill this in...
>>      foreach($in as $link) {
>>           $parts = explode('.', $link);
>>           $out[$link] = $bibleorder['$parts[1]];
>>           }
>>      sort($out);
>>      return array_keys($out);
>>      }
>>
>> I didn't test it out, but you might be able to get it working from this.
>> Put this in your config.php file and then you just add sort=bible to your
>> search function.
>>
>> 4) Make sure you have your encoding set to UTF-8 in your skin. Everything
>> in BoltWire is UTF-8. For copyright, you can also try using the html code:
>> &copy;
>>
>> You can also setup a test page on BoltWire and see if there are problems
>> there. If not, you know it is your skin or configuration. If it doesn't
>> work there, give me the url, and I may be able to track down the bug.
>>
>> Cheers,
>> Dan
>>
>>
>> On Tue, Oct 7, 2014 at 1:25 PM, Tiffany Grenier <
>> [email protected]> wrote:
>>
>>> Hi Shawn,
>>>
>>> 1) In order to get "siblings chapters", you can call [(search
>>> group={p1}.{p2}.+ count=false)]. For displaying the results "in a row", I
>>> have already achieve this when I did not wanted to, but could not tell you
>>> how to reproduce this, sorry.
>>> 2) You could add to bible.side the following piece of code
>>> [if equal {+p0} 3] /*if currently in a chapter*/
>>> [if more {p3} 1][[{p1}.{p2}.{{p3}-1}|Previous Chapter]][if] /*I did not
>>> test hat, but I think the {} for mathematical operations should work*/
>>> [[{p1}.{p2}.{{p3}+1}|Next Chapter]]/*I don't know how to easily check if
>>> the page {p1}.{p2}.{{p3}+1} exists, as this would be easier than counting
>>> the number of subpages from the current book */
>>> [if]
>>> 3) I think you would need to add a data variable to your book pages
>>> indicating the order of the book, and then sort on this data field.
>>> 4) I don't get you, here, as I have no problem with that on my own
>>> website. Sorry...
>>>
>>> Hope this helps. Good luck for the rest.
>>>
>>> Regards,
>>> Tiffany
>>>
>>> Le mardi 7 octobre 2014 20:10:55 UTC+2, Shawn H. a écrit :
>>>
>>>> Hello all,
>>>> I’m back around again to check out how boltwire is doing.  It looks
>>>> like it has some nice new advancements since last time I worked with it!  I
>>>> was reminded again of how much I like the way it works. :-)
>>>>
>>>> Anyway, I am working on setting up a simple little website where people
>>>> can read and search the Bible.  There are a few things that I’m guessing
>>>> are very simple, but I haven’t been able to figure out how to do them yet.
>>>> So I wondered if I could get a little help.
>>>>
>>>> I have the books of the Bible arrange in hierarchical format.  Each
>>>> chapter is on it’s own page.  So the pages are arranged like this:
>>>>
>>>> bible
>>>> bible.genesis
>>>> bible.genesis.1
>>>> bible.genesis.2
>>>> etc.
>>>>
>>>> So here are the things I would like to do, that I haven’t been able to
>>>> figure out yet:
>>>>
>>>>
>>>> 1.) In the header and the footer I would like to have the chapter
>>>> numbers of the current book listed out in a row, so the reader can click on
>>>> any chapter they want to jump to.  The chapter number is the third element
>>>> in the page name.  So I think I would use a command like this:
>>>>
>>>> [(search group=all chapters in current book fmt=all in a row)]
>>>>
>>>> But I don’t know how to write this properly to accomplish that,
>>>> although I’m guessing it is fairly simple.
>>>>
>>>>
>>>> 2.)  I would like to have a “Previous Chapter” link and a “Next
>>>> Chapter” link in the side menu, which would only be visible if the reader
>>>> was currently in a book.  I don’t know if it would be best to use the
>>>> search function to create these links, or have it be a regular link with an
>>>> [if] statement that would only show it if a book was open and would also
>>>> check if the reader was in the first chapter or last chapter (in which case
>>>> only one of the links would be displayed).
>>>>
>>>>
>>>> 3.)  I would also like to have a page where I list all the books of the
>>>> Bible in order.  I can use [(search group={p} exclude={p2} fmt='<(toc {+p}
>>>> offset=2)>[[{+p}|+]]' type=-{zones})].  But this lists them in alphabetical
>>>> order.  And I would like to list them in the order they are in the Bible.
>>>> Is there any way to specify a certain order for the search function to list
>>>> them in?
>>>>
>>>>
>>>> 4.)  Is there a way to display special characters in boltwire?  Right
>>>> now it doesn’t display or save special characters properly.  Just as an
>>>> example, the copyright symbol in code.settings gets strange characters
>>>> added to it every time I do any editing in that file, and re-save it.  And
>>>> if I try to insert special characters into any of my pages it does the same
>>>> thing to them.  (I’m running my webserver on windows if that makes any
>>>> difference).
>>>>
>>>>
>>>> Thanks a lot to anybody who can give me some help figuring these things
>>>> out.  If anybody else wants to use this recipe when I am done let me know!
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "BoltWire" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/boltwire.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "BoltWire" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/boltwire.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "BoltWire" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/boltwire.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "BoltWire" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/boltwire.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*"Blessed are they that do his commandments, that they may have right to
the tree of life, and may enter in through the gates into the city."
(Revelation 22:14)*

*http://www.SanctuaryofYeshua.wordpress.com
<http://www.SanctuaryofYeshua.wordpress.com>*

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/boltwire.
For more options, visit https://groups.google.com/d/optout.

Reply via email to