DominoWiki update 02 Dec 2006
I have discovered a ridiculous bug in version 1.1, to do with page promotion. I must have been smoking crack when I tested this before. May my mother smack me upside the head and call me Nigel (no offence to any Nigels out there): the coding error is stupid.
The new release will be sooner rather than later… ;-)
("What did she say?"
"I don't know - I wasn't listening.")
Julian Woodward#
@3: Mark, nice one! Will take a gander, thanks very much!Ben Poole#
Not sure whether you'd rather I emailed this to you, added it here or in openntf?
This goes in the WikiPage.class of course. It works but is broken by block HTML elemeents like LI. It could use DIV rather than SPAN to counter that but then you couldn't have colours within a line. Would be nice to allow any colour as hex or if it could be done from the web to allow administrators to create their own set?
' Mark Bryson Dec 06. Char strings replaced by codes for images in db resources
' e.g. :oops: becomes
' to alter or add, adjust the split names below and resource area images accordingly
Public Function parseEmoticons (txt As String) As String
Dim t As String
Dim emoticons As Variant
emoticons = Split("angry ask doh eek hush laugh laff mad nono oops sick", " ")
t$ = txt$
Forall e In emoticons
t$ = Replace(t$, ":" & e & ":", {
End Forall
parseEmoticons = t$
End Function
' coloured text and coloured background, e.g. :red:this is red text::/red: and
' :byellow:this makes a yellow background:/byellow:
Public Function parseColours(txt As String) As String
Dim t As String
Dim txtcolours As Variant
txtcolours = Split("black green silver lime gray olive white yellow maroon navy red blue purple teal fuchsia aqua", " ")
t$ = txt$
Forall e In txtcolours
' background colours first
t$ = Replace( t$, ":b" & e & ":", {} )
t$ = Replace(t$, ":/b" & e & ":", {} )
' then text colours
t$ = Replace(t$, ":" & e & ":", {} )
t$ = Replace(t$, ":/" & e & ":", {} )
End Forall
parseColours = t$
End Function
mark#
http://oldblog.pmooney.net/blogsphe.nsf/d6plinks/PMOY-6X3QZNPaul Mooney#