Hi All
I need your help, I want to apply RTE v3.0 to our news system :
This URL our add news URL. We use very bad text editor. But this is integrate our main page :
I trim first 350 character for summary. And if open <a tag and dont close this tag in first 350 chars, script will add 350 char (350+350=700)
But I can not do this for RTE v3.0 I see sometimes Response Buffer Limit Exceeded error. And RTE can include many HTML tag.
I want to trim first 350-400 char for summary and if <a or <img tag opened in first 350 chars and dont close, script auto add 350 chars for </a or >. Because dont closed tags harm our layout. Please help me. How to trim HTML tags but exclude <a and <img tags.. Check my works :
Text = Mid(Trim(Text),1,350)
CheckA=1
CheckSlashA=10
Do
CheckA = InStr(1, Text, "<")
CheckSlashA = InStr(1, Text, ">")+1
If CheckSlashA=1 then CheckSlashA = Len(Text)
If CheckA<>0 then
Text2 = Mid(Trim(Text),CheckA,CheckSlashA-CheckA)
Text = Replace(Text,Text2," ")
End if
Loop until CheckA=0
|
This is only trim < bla bla > codes. I am working... I want to exclude <a and <img tags. Thanks...
Edited by superlative - 20 March 2005 at 12:22pm