[sword-cvs] sword/src/modules/filters gbfwebif.cpp,1.8,1.9 osiswebif.cpp,1.3,1.4 thmlwebif.cpp,1.9,1.10

sword@www.crosswire.org sword@www.crosswire.org
Tue, 18 Nov 2003 13:54:18 -0700


Update of /usr/local/cvsroot/sword/src/modules/filters
In directory www:/tmp/cvs-serv2838/src/modules/filters

Modified Files:
	gbfwebif.cpp osiswebif.cpp thmlwebif.cpp 
Log Message:



Index: gbfwebif.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfwebif.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- gbfwebif.cpp	29 Oct 2003 08:46:14 -0000	1.8
+++ gbfwebif.cpp	18 Nov 2003 20:54:16 -0000	1.9
@@ -51,7 +51,11 @@
 					for (tok = val; *tok; tok++) {
 						url += *tok;
 					}
-					buf.appendFormatted("<a href=\"%s?showStrong=%s\">", passageStudyURL.c_str(), encodeURL(url).c_str());
+					if ((url.length() > 1) && strchr("GH", url[0])) {
+						if (isdigit(url[1]))
+							url = url.c_str()+1;
+					}
+					buf.appendFormatted("<a href=\"%s?showStrong=%s#cv\">", passageStudyURL.c_str(), encodeURL(url).c_str());
 
 					for (tok = (!isdigit(*val))?val+1:val; *tok; tok++) {
 						buf += *tok;
@@ -71,7 +75,7 @@
 				// normal robinsons tense
 					buf += *tok;
 				}
-				buf.appendFormatted("<a href=\"%s?showMorph=%s\">", passageStudyURL.c_str(), encodeURL(url).c_str());
+				buf.appendFormatted("<a href=\"%s?showMorph=%s#cv\">", passageStudyURL.c_str(), encodeURL(url).c_str());
 
 				for (tok = val; *tok; tok++) {
 					buf += *tok;
@@ -87,7 +91,11 @@
 			for (tok = token+1; *tok; tok++) {
 				url += *tok;
 			}
-			buf.appendFormatted("<a href=\"%s?showStrong=%s\">", passageStudyURL.c_str(), encodeURL(url).c_str());
+			if ((url.length() > 1) && strchr("GH", url[0])) {
+				if (isdigit(url[1]))
+					url = url.c_str()+1;
+			}
+			buf.appendFormatted("<a href=\"%s?showStrong=%s#cv\">", passageStudyURL.c_str(), encodeURL(url).c_str());
 
 			for (tok = token + 2; *tok; tok++) {
 				buf += *tok;
@@ -102,7 +110,11 @@
 				if(*tok != '\"')
 					url += *tok;
 			}
-			buf.appendFormatted("<a href=\"%s?showStrong=%s\">", passageStudyURL.c_str(), encodeURL(url).c_str());
+			if ((url.length() > 1) && strchr("GH", url[0])) {
+				if (isdigit(url[1]))
+					url = url.c_str()+1;
+			}
+			buf.appendFormatted("<a href=\"%s?showStrong=%s#cv\">", passageStudyURL.c_str(), encodeURL(url).c_str());
 
 			for (tok = token + 3; *tok; tok++)
 				if(*tok != '\"')
@@ -116,7 +128,7 @@
 				if(*tok != '\"')
 					buf += *tok;
 			}
-			buf.appendFormatted("<a href=\"%s?showMorph=%s\">", passageStudyURL.c_str(), encodeURL(url).c_str());
+			buf.appendFormatted("<a href=\"%s?showMorph=%s#cv\">", passageStudyURL.c_str(), encodeURL(url).c_str());
 
 			for (tok = token + 2; *tok; tok++) {
 				if(*tok != '\"')

Index: osiswebif.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osiswebif.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- osiswebif.cpp	29 Oct 2003 08:46:14 -0000	1.3
+++ osiswebif.cpp	18 Nov 2003 20:54:16 -0000	1.4
@@ -80,7 +80,7 @@
 							val2++;
 						if ((!strcmp(val2, "3588")) && (lastText.length() < 1))
 							show = false;
-						else	buf.appendFormatted(" <small><em>&lt;<a href=\"%s?showStrong=%s\">%s</a>&gt;</em></small> ", passageStudyURL.c_str(), encodeURL(val2).c_str(), val2);
+						else	buf.appendFormatted(" <small><em>&lt;<a href=\"%s?showStrong=%s#cv\">%s</a>&gt;</em></small> ", passageStudyURL.c_str(), encodeURL(val2).c_str(), val2);
 					} while (++i < count);
 				}
 				if ((attrib = tag.getAttribute("morph")) && (show)) {
@@ -98,7 +98,7 @@
 							const char *val2 = val;
 							if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2])))
 								val2+=2;
-							buf.appendFormatted(" <small><em>(<a href=\"%s?showMorph=%s\">%s</a>)</em></small> ", passageStudyURL.c_str(), encodeURL(val2).c_str(), val2);
+							buf.appendFormatted(" <small><em>(<a href=\"%s?showMorph=%s#cv\">%s</a>)</em></small> ", passageStudyURL.c_str(), encodeURL(val2).c_str(), val2);
 						} while (++i < count);
 					}
 				}

Index: thmlwebif.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlwebif.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- thmlwebif.cpp	29 Oct 2003 08:46:14 -0000	1.9
+++ thmlwebif.cpp	18 Nov 2003 20:54:16 -0000	1.10
@@ -19,6 +19,7 @@
 #include <swmodule.h>
 #include <utilweb.h>
 #include <utilxml.h>
+#include <ctype.h>
 
 SWORD_NAMESPACE_START
 
@@ -36,9 +37,14 @@
 		if (!strcmp(tag.getName(), "sync")) {
 			const char* value = tag.getAttribute("value");
 			url = value;
+			if ((url.length() > 1) && strchr("GH", url[0])) {
+				if (isdigit(url[1]))
+					url = url.c_str()+1;
+			}
 
 			if(tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "morph")){
 				buf += "<small><em> (";
+				buf.appendFormatted("<a href=\"%s?showMorph=%s#cv\">", passageStudyURL.c_str(), encodeURL(url).c_str() );
 			}
 			else {
 				if (value) {
@@ -47,9 +53,9 @@
 				}
 
 				buf += "<small><em> &lt;";
+				buf.appendFormatted("<a href=\"%s?showStrong=%s#cv\">", passageStudyURL.c_str(), encodeURL(url).c_str() );
 			}
 
-			buf.appendFormatted("<a href=\"%s?showStrong=%s\">", passageStudyURL.c_str(), encodeURL(url).c_str() );
 			buf += value;
 			buf += "</a>";
 
@@ -68,7 +74,7 @@
 				}
 				else { // end of scripRef like "<scripRef>John 3:16</scripRef>"
 					url = u->lastTextNode;
-					buf.appendFormatted("<a href=\"%s?key=%s\">", passageStudyURL.c_str(), encodeURL(url).c_str());
+					buf.appendFormatted("<a href=\"%s?key=%s#cv\">", passageStudyURL.c_str(), encodeURL(url).c_str());
 					buf += u->lastTextNode.c_str();
 					buf += "</a>";
 
@@ -79,7 +85,7 @@
 			else if (tag.getAttribute("passage")) { //passage given
 				u->inscriptRef = true;
 
-				buf.appendFormatted("<a href=\"%s?key=%s\">", passageStudyURL.c_str(), encodeURL(tag.getAttribute("passage")).c_str());
+				buf.appendFormatted("<a href=\"%s?key=%s#cv\">", passageStudyURL.c_str(), encodeURL(tag.getAttribute("passage")).c_str());
 			}
 			else { //no passage given
 				u->inscriptRef = false;