[sword-svn] r348 - trunk/webapp

refdoc at www.crosswire.org refdoc at www.crosswire.org
Tue Nov 11 17:33:29 MST 2008


Author: refdoc
Date: 2008-11-11 17:33:28 -0700 (Tue, 11 Nov 2008)
New Revision: 348

Modified:
   trunk/webapp/index.jsp
   trunk/webapp/init.jsp
Log:
links on front page are now dynamically loaded and configurable



Modified: trunk/webapp/index.jsp
===================================================================
--- trunk/webapp/index.jsp	2008-11-11 22:09:28 UTC (rev 347)
+++ trunk/webapp/index.jsp	2008-11-12 00:33:28 UTC (rev 348)
@@ -61,23 +61,17 @@
 <% } %>
 		</ul>
 </div>
+<div id="externallinks">
+<h2><t:t>External Links:</t:t></h2>
+		<ul>
+<% for (int i = 0; i < linkName.size(); i++) { %>
+			<li><a href="<%= linkAddress.get(i) %>" title="<%= (String) linkName.get(i) %>"><t:t><%= (String) linkName.get(i) %></t:t></a></li>
+<% } %>
+		</ul>
+</div>
 
 
-   <div id="externallinks">
-	<h2><t:t>External Links:</t:t></h2>
-        <ul>
-	<li><a href="http://crosswire.org/" title="CrossWire Bible Society"><t:t>CrossWire Bible Society</t:t></a></li>
-	<li><a href="http://www.americanbible.org/" title="American Bible Society"><t:t>American Bible Society</t:t></a></li>
-	<li><a href="http://sbl-site.org/" title="Society of Biblical Literature"><t:t>Society of Biblical Literature</t:t></a></li>
-	<li><a href="http://crosswire.org/sword/" title="The SWORD Project"><t:t>The SWORD Project</t:t></a></li>
-	<li><a href="http://www.bibletechnologies.net/" title="Open Scripture Information Standard">OSIS</a></li>
-</ul>
 
-
-
-   </div>
-
-
 	</tiles:put>
 
 	<tiles:put name="content" type="string">

Modified: trunk/webapp/init.jsp
===================================================================
--- trunk/webapp/init.jsp	2008-11-11 22:09:28 UTC (rev 347)
+++ trunk/webapp/init.jsp	2008-11-12 00:33:28 UTC (rev 348)
@@ -30,6 +30,10 @@
 	static String defaultStyle = null;
 	static Properties swordWebConfig = null;
 	static String languages = null;
+	static Vector linkName = null;
+	static Vector linkAddress = null;
+
+
 %>
 
 <%
@@ -139,6 +143,27 @@
 			rtolLangs.add("az_IR");
 			rtolLangs.add("div");
 			rtolLangs.add("ar");
+
+                        linkName = new Vector();
+                        linkAddress = new Vector();
+
+                        i = 0;
+                        while (swordWebConfig.getProperty("offeredLinkName." + i,"") != "") {
+                                linkName.add(swordWebConfig.getProperty("offeredLinkName." + i,""));
+                                linkAddress.add(swordWebConfig.getProperty("offeredLinkAddress." + i,""));
+                                i++;
+                        }
+                       if (i<1) {
+                                linkName.add("CrossWire Bible Society");
+                                linkAddress.add("http://www.crosswire.org");
+                                
+                                linkName.add("American Bible Society");
+                                linkAddress.add("http://www.americanbible.org");
+                                        
+                                linkName.add("Society of Biblical Literature");
+                                linkAddress.add("http://sbl-site.org");
+			}      
+
 		}
 	}
 




More information about the sword-cvs mailing list