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:
©
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.