Ben,
I've changed/added to the DominoWiki code that I'm hoping will get added into the main code stream. Here's what I've done:
(See attached file: WikiQuerySave Initialize.lss)
Fixed a bug where the Links field used for back-link indexing didn't remove outdated links.
(See attached file: WikiPage.class - JSmart updates.lss)
Performance increase - Added saveNeeded property, used by wikiFormat & updateLinks so that doc is not saved repeatedly (instead of saving once per internal wiki link)
Changed convertSingleBracket to allow links with "notes:", "mailto:" or "email:"
Changed allowSafeHTML to allow ul, ol, and li tags
Changed ParseLineFeeds to remove extra <br> tags near ul, ol, and li tags
All links are now classed so that they can be individually styled using CSS. (wiki-filelink, wiki-httplink, wiki-httpslink, wiki-mailtolink, wiki-inavlidlink, wiki-pagelink… wiki-newpagelink already existed) This way you can style external links vs internal ones, etc.
Added read-write public property "document" for use by scripts that might run docs other than session.DocumentContext
Links to new pages are now the whole link title instead of straight text with a linked question mark at the end. I left the old code there, commented, for others who like the old style, but it's outdated, IMO. Unfortunately the new way is ugly with the old CSS. To do something like wikipedia where new page links are dark red, change the .css from
.wiki-newpagelink
{
background-color: #ffff00; <br/>
}
to
a.wiki-newpagelink / note: the “a” is necessary to give it a high enough priority vs competing rules. /
{
color: #990000; <br/>
}
and replace mentions of new page links being question marks to new page links being dark red.
(See attached file: WikiPageCollection.class.lss)
New script library that extends WikiPage class to accept a NotesDocumentCollection and includes GetFirst, GetNext, GetPrev, GetLast, and a method called RecomputeLinks that clears and rebuilds all existing backlinks.
(See attached file: My Reset Links agent.lss)
New agent, meant to be named "Reset Links", Notes only, run on selected documents, simple selection to only include wiki pages. Bascially does:
Set wpc = New WikiPageCollection(session.CurrentDatabase.UnprocessedDocuments)
call wpc.RecomputeLinks
Send an email to me at greyduck.com if you have any questions!