diff options
Diffstat (limited to 'src/modules/filters/gbfhtmlhref.cpp')
-rw-r--r-- | src/modules/filters/gbfhtmlhref.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/modules/filters/gbfhtmlhref.cpp b/src/modules/filters/gbfhtmlhref.cpp index 3f25e3a..6df038e 100644 --- a/src/modules/filters/gbfhtmlhref.cpp +++ b/src/modules/filters/gbfhtmlhref.cpp @@ -1,11 +1,10 @@ /*************************************************************************** - * gbfhtmlhref.cpp - GBF to HTML filter with hrefs - * for strongs and morph tags - * ------------------- - * begin : 2001-09-03 - * copyright : 2001 by CrossWire Bible Society * - * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org) + * gbfhtmlhref.cpp - GBF to HTML filter with hrefs + * + * $Id: gbfhtmlhref.cpp 2833 2013-06-29 06:40:28Z chrislit $ + * + * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society * P. O. Box 2528 * Tempe, AZ 85280-2528 @@ -34,7 +33,7 @@ SWORD_NAMESPACE_START GBFHTMLHREF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) { if (module) { - version = module->Name(); + version = module->getName(); } } @@ -73,7 +72,8 @@ GBFHTMLHREF::GBFHTMLHREF() { addTokenSubstitute("JR", "<div align=\"right\">"); // right align begin addTokenSubstitute("JC", "<div align=\"center\">"); // center align begin addTokenSubstitute("JL", "</div>"); // align end - + + renderNoteNumbers = false; } @@ -231,6 +231,7 @@ bool GBFHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData else if (!strcmp(tag.getName(), "RF")) { SWBuf type = tag.getAttribute("type"); SWBuf footnoteNumber = tag.getAttribute("swordFootnote"); + SWBuf noteName = tag.getAttribute("n"); VerseKey *vkey = NULL; // see if we have a VerseKey * or descendant SWTRY { @@ -240,10 +241,11 @@ bool GBFHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData if (vkey) { // leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt. //char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'); - buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup class=\"n\">*n</sup></small></a> ", + buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup class=\"n\">*n%s</sup></small></a> ", URL::encode(footnoteNumber.c_str()).c_str(), URL::encode(u->version.c_str()).c_str(), - URL::encode(vkey->getText()).c_str()); + URL::encode(vkey->getText()).c_str(), + (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str(): "")); } u->suspendTextPassThru = true; } |