Guest_imported
New member
- Jan 1, 1970
- 0
I have seen chats and other pages, that makes the smileys you type, into pictures. Does anyone no where to find that script ????
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
strOutput = replace(strOriginal,":-)","<IMG SRC=smile.gif>")
Response.Write(strOutput)
function smileyz(sSmiley)
'-- declare vars
dim sCreator, sName
'-- query db
oRs.Open "select * from smileyz where status=1 order by len(smileyText) desc",con,3,3
while not oRs.EOF
sCreator = replace(oRs("Creator"),"""",""")
sName = replace(oRs("smileyName"),"""",""")
sSmiley = replace(sSmiley,oRs("smileyText"),"<img src=""images/" & oRs("smileyImg") & """ title=""" & sName & " - " & sCreator & """ />")
oRs.MoveNext
wend
oRs.Close
'-- output
smileyz = sSmiley
end function
smileyz
Creator - (the smiley's artist - just for the alt text)
SmileyName - (uh.. the name of the image - Happy, Sad, whatever)
SmileyText - (the text to check for)
SmileyImg - (the image to replace that text with)
:))
)
:P
:p
lcase / ucase
msg="This would be a text :p :P :d :D"
set r=new RegExp
r.IgnoreCase=true
r.Global=true
r.Pattern="([:][p])"
set find=r.Execute(msg)
RetStr=""
For Each Match in find ' Iterate Matches collection.
msg=Replace(msg,Match.Value,"xyz")
Next
Response.Write msg
This can be easily extrapolated to more paterns to find