<%@ page import="org.crosswire.xml.*" %> <%@ include file="init.jsp" %> <% session.setAttribute("lastModType", "Bible"); String []delMods = request.getParameterValues("del"); if (delMods != null) { for (int i = 0; i < delMods.length; i++) { String delModule = delMods[i]; if ("all".equals(delModule)) { parDispModules.clear(); break; } if ( (delModule != null) && parDispModules.contains(delModule)) { parDispModules.remove(delModule); } } } String []addMods = request.getParameterValues("add"); if (addMods != null) { for (int i = 0; i < addMods.length; i++) { String addModule = addMods[i]; if (addModule != null) { SWModule m = mgr.getModuleByName(addModule); if (!"".equals(m.getName())) { parDispModules.remove(addModule); parDispModules.add(parDispModules.size(), addModule); } } } } if (parDispModules.size() == 0) { parDispModules.add(0, defaultBible); //our standard, fallback module } SWModule activeModule = mgr.getModuleByName((String)parDispModules.get(0)); SWModule eusVs = mgr.getModuleByName("Eusebian_vs"); SWModule eusNum = mgr.getModuleByName("Eusebian_num"); String resetKey = request.getParameter("key"); if (resetKey != null) { resetKey = new String(resetKey.getBytes("iso8859-1"), "UTF-8"); activeModule.setKeyText(resetKey); session.setAttribute("ActiveKey", activeModule.getKeyText()); } String activeKey = (String) session.getAttribute("ActiveKey"); if (activeKey == null) { activeKey = "jas 1:19"; session.setAttribute("ActiveKey", activeKey); } // be sure it's formatted nicely if (activeModule != null) { activeModule.setKeyText(activeKey); activeKey = activeModule.getKeyText(); } //taken from passagestudy.jsp. It's here useful, too. boolean strongs = "on".equals((String) session.getAttribute("strongs")); String buf = request.getParameter("strongs"); strongs = (buf != null) ? "on".equalsIgnoreCase(buf) : strongs; session.setAttribute("strongs", (strongs)?"on":"off"); boolean morph = "on".equals((String) session.getAttribute("morph")); buf = request.getParameter("morph"); morph = (buf != null) ? "on".equalsIgnoreCase(buf) : morph; session.setAttribute("morph", (morph)?"on":"off"); boolean startList = false; boolean usedCV = false; %> <%-- override lookup URL, so this script is used to display the keys --%> <%= activeKey %> - Parallel Bible study

Translations:

Displayed modules

click to remove

<% startList = false; for (int i = 0; i < parDispModules.size(); i++) { SWModule module = mgr.getModuleByName((String)parDispModules.get(i)); if (module != null && ((module.getCategory().equals(SwordOrb.BIBLES))||(module.getCategory().equals("Cults / Unorthodox / Questionable Material")))) { if (!startList) { out.print(""); startList = true; } %>

Available modules

click to add

<% startList = false; for (int i = 0; i < modInfo.length; i++) { if (modInfo[i].category.equals(SwordOrb.BIBLES)) { SWModule module = mgr.getModuleByName(modInfo[i].name); if ( parDispModules.contains(module.getName()) ) { continue; } if (!startList) { out.print(""); startList = true; } %> <% startList = false; for (int i = 0; i < modInfo.length; i++) { if (modInfo[i].category.equals("Cults / Unorthodox / Questionable Material")) { SWModule module = mgr.getModuleByName(modInfo[i].name); if ( parDispModules.contains(module.getName()) ) { continue; } if (!startList) { startList = true; %>

Cults / Unorthodox / Questionable Material

click to add

"); startList = true; } %>

Commentaries:

Displayed modules

click to remove

<% startList = false; for (int i = 0; i < parDispModules.size(); i++) { SWModule module = mgr.getModuleByName((String)parDispModules.get(i)); if (module != null && module.getCategory().equals(SwordOrb.COMMENTARIES)) { if (!startList) { out.print(""); startList = true; } %>

Available modules

click to add

<% startList = false; for (int i = 0; i < modInfo.length; i++) { if (modInfo[i].category.equals(SwordOrb.COMMENTARIES)) { SWModule module = mgr.getModuleByName(modInfo[i].name); if ( parDispModules.contains(module.getName()) ) { continue; } if (!startList) { out.print(""); startList = true; } %>
<% //insert module - specific styles at the top. This doesn't make much sense if styles overlap for (int i = 0; i < parDispModules.size(); i++) { SWModule mod = mgr.getModuleByName((String)parDispModules.get(i)); %> <% } %>

Parallel Viewing: <%= activeKey %>

Presets: [OT Scholar] [NT Scholar] <% startList = false; for (int i = 0; i < parDispModules.size(); i++) { SWModule module = mgr.getModuleByName((String)parDispModules.get(i)); if (!startList) { out.print("Link to this view "); startList = true; } %>

Parallel viewing allows you to see two or more texts side by side. For example, you could view two Bible versions of the same verse next to each other, or a verse from a specific translation and what a commentary has to say about that specific verse.

<% //insert next and previous chapter links // activeKey contains the current key ATM // Split up into book, chapter and verse. // Then add and subtract 1 to the chapter to the next and previous one String bookname = activeKey.substring(0, activeKey.lastIndexOf(" ")); int chapter = Integer.parseInt( activeKey.substring(activeKey.lastIndexOf(" ")+1, activeKey.indexOf(":")) ); //int verse = Integer.parseInt(activeKey.substring(activeKey.indexOf(":")+1)); String prevChapterString = bookname + " " + String.valueOf(chapter-1) + ":1"; String nextChapterString = bookname + " " + String.valueOf(chapter+1) + ":1"; %> <%-- table which contains all verse items --%> <% //setup col attributes for (int i = 0; i < parDispModules.size(); i++) { SWModule mod = mgr.getModuleByName((String)parDispModules.get(i)); %> <% } %> <% activeModule = mgr.getModuleByName((String)parDispModules.get(0)); if (activeModule.getCategory().equals(SwordOrb.BIBLES) || activeModule.getCategory().equals(SwordOrb.COMMENTARIES) || activeModule.getCategory().equals("Cults / Unorthodox / Questionable Material")) { %> <% //insert module names at the top for (int i = 0; i < parDispModules.size(); i++) { SWModule mod = mgr.getModuleByName((String)parDispModules.get(i)); %> <% } %> <% String chapterPrefix = activeKey.substring(0, activeKey.indexOf(":")); int activeVerse = Integer.parseInt(activeKey.substring(activeKey.indexOf(":")+1)); String lastEusNum = ""; String myEusNum = ""; for (activeModule.setKeyText(chapterPrefix + ":1"); (activeModule.error() == (char)0); activeModule.next()) { String keyText = activeModule.getKeyText(); if (!chapterPrefix.equals(keyText.substring(0, keyText.indexOf(":")))) { break; } boolean intro = false; // for possible future support of intro int curVerse = Integer.parseInt(keyText.substring(keyText.indexOf(":")+1)); mgr.setGlobalOption("Strong's Numbers", ((strongs) && (curVerse >= activeVerse -1) && (curVerse <= activeVerse + 1)) ? "on" : "off"); mgr.setGlobalOption("Morphological Tags", ((morph) && (curVerse >= activeVerse -1) && (curVerse <= activeVerse + 1)) ? "on" : "off"); if (eusVs != null) { myEusNum = ""; if (!intro) { eusVs.setKeyText(keyText); myEusNum = eusVs.getStripText().trim(); if (!lastEusNum.equals(myEusNum)) { lastEusNum = myEusNum; eusNum.setKeyText(myEusNum); XMLTag d = new XMLBlock(eusNum.getRawEntry()); myEusNum = myEusNum.substring(myEusNum.indexOf(".")+1) + "
" + d.getAttribute("table"); } else myEusNum = ""; } } boolean currentVerse = keyText.equals(activeKey); %> > <% for (int i = 0; i < parDispModules.size(); i++) { SWModule mod = mgr.getModuleByName((String)parDispModules.get(i)); boolean rtol = ("RtoL".equalsIgnoreCase(mod.getConfigEntry("Direction"))); String modLang = mod.getConfigEntry("Lang"); String font = mod.getConfigEntry("Font"); String style = (!"".equals(font))?"font-family:"+font:""; if (mod != activeModule) { mod.setKeyText(keyText); } %> <% } %> <% } %> <% //insert module names at the top for (int i = 0; i < parDispModules.size(); i++) { SWModule mod = mgr.getModuleByName((String)parDispModules.get(i)); String copyLine = mod.getConfigEntry("ShortCopyright"); String promoLine = mod.getConfigEntry("ShortPromo"); if (copyLine.equalsIgnoreCase("")) { copyLine = ""; } if (promoLine.equalsIgnoreCase("")) { promoLine = ""; } if (mod.getCategory().equals("Cults / Unorthodox / Questionable Material")) { copyLine = "WARNING: This text is considered unorthodox by most of Christendom. " + copyLine; } %> <% } %> <% } %>
<%= mod.getDescription().replaceAll("&", "&") %>
<% if (currentVerse) usedCV = true; if (myEusNum.length() > 0) { %> "><%= myEusNum %> <% } %>
class="<%= modLang %> <%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>"> <% String[] heads = mod.getEntryAttribute("Heading", "Preverse", "", true); for (int h = 0; h < heads.length; h++) { %>

<%= heads[h] %>

<% } %> <%= keyText.substring(keyText.indexOf(":")+1) %> <% String lang = mod.getConfigEntry("Lang"); // <%= mod.getRenderText() %> <% // %>
<%= copyLine %>
<%= promoLine %>