GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Sources/Citations tweak

Click to view RSS...
Author Improvements in the report to display sources & citations
Posted Saturday, May 21, 2011 - Post #28406
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

FamilyTrees.GenoPro.com
Customers
GenoPro version: 3.1.0.1

Last Login: Thursday, June 2, 2022
Posts: 108, Visits: 1,280
I've made a little change to the layout of the sources & citations for the individuals and families pages in my custom template.

It promotes this part of the page to a section, so it can be expanded and collapsed, it also tweaks the layout of the unreferenced sources, so they're listed one per line below the referenced sources.

Example before & after screenshots, and code changes (based on Narrative_2011.05.13) are below if you decide it is a useful tweak.

Before
http://support.genopro.com/Uploads/Images/7493077e-1e34-4c54-b570-4c74.jpg

After
http://support.genopro.com/Uploads/Images/acf6f002-3fc5-4c67-b5a8-7b91.jpg

The modified subroutine code for this in util.vbs is:


Sub WriteHtmlAllFootnotes(oSources)
Dim collSources
Set collSources = Util.NewGenoCollection()
If Not Util.IsNothing(OSources) Then collSources.Add(oSources.ToGenoCollection)
If (g_collFootnotes.Count > 0) Or (collSources.Count > 0) Then
        Report.WriteBr    "<div class='clearleft'><ul class='xT'>"
        Report.WriteFormattedLn "    <li class='xT2-{} xT-h' onclick='xTclk(event,""2"")'>", Util.IfElse(g_fCollapseReferences, "c", "o")
        Report.WriteFormattedLn "<a name='Sources & Citations'></a><h3 class='xT-i inline'>{&t}</h3><ul class='xT-h'><li>", Dic("SourceCitations")
        Report.WriteLn "<div class='footnote clearleft'>"

        If (g_collFootnotes.Count > 0) Then
            Dim iFootnote, oFootnote, strTitle, strSep, s
            iFootnote = 0
            For Each oFootnote In g_collFootnotes
                iFootnote = iFootnote + 1
                strTitle = StrPlainText(oFootnote, Util.FirstNonEmpty(oFootnote.Subtitle, oFootnote.Description, oFootnote.QuotedText, Dic("SourceInformation")))
                If (strTitle <> "") Then
                    strTitle = Util.FormatString(" title='{}'", strTitle)
                End If
                Report.WriteFormattedBr "<sup><a name='{0}'></a>{0} </sup> <a href='source-{&t}.htm' onclick='showPopUpFrame("""");' target='popup' {}><i>{}</i></a>", iFootnote, oFootnote.ID, strTitle, JoinSourceCitationNames(oFootnote, StrFormatText(oFootnote, StrParseText(oFootnote.title, True)), true)
                ' remove referenced source from list
                collSources.Remove(oFootnote)
            Next
            g_collFootnotes.clear
        End If
        If collSources.Count > 0 Then ' write details of remaining source/citations
            strSep = ""
            For Each oFootnote in collSources
                strTitle = StrPlainText(oFootnote, Util.FirstNonEmpty(oFootnote.Subtitle, oFootnote.Description, oFootnote.QuotedText, Dic("SourceInformation")))
                If (strTitle <> "") Then
                    strTitle = Util.FormatString(" title='{}'", strTitle)
                End If
                Report.WriteFormattedbr "<a href='source-{&t}.htm' onclick='showPopUpFrame("""");' target='popup' {}><i>{}</i></a>", oFootnote.ID, strTitle, JoinSourceCitationNames(oFootnote, StrFormatText(oFootnote, StrParseText(oFootnote.title, True)), true)
            Next
        End If
        Report.WriteLn "</div>"
    End If
End Sub


An addition is needed in the dictionary.xml

<SourceCitations T="Sources/Citations"/>





Edited: Monday, May 23, 2011 by GenoProSupport



Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse