T
the other john
I'm trying to enhance a script to do the following things.
1). detect the first four words of a paragraph and stylize them
(already does that)
2). Capitalize and stylize the first letter of each paragraph (already
does that via style sheet)
3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
I can insert a images in specific places (i.e. I want to dynamically
insert image 1 in paragraph 1, image 2 into para 2, etc.)
This third item I can't figure out. I've tried it a few ways but keep
running to problems.
Thanks!!!
The following script was provided by Mike Brind, thanks Mike. It
currently can produce results for the first 2 items I listed above but
not exactly the way I want it to. It places an image into the first
paragraph for each "record" but that's not what I want.
Dim str, i, spacepos, word
for wank = 1 to 7
if rsForums.EOF then exit for
if wank = 1 then
response.write "<img id='picFloat' src='testoboy.jpg'
class='picBorderThin'>"
End if
if wank = 2 then
response.write "<img id='picFloat' src='me.jpg'
class='picBorderThin'>"
End if
Response.Write "<p><span id='firstWords'>"
storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
for i = 1 to 4
spacepos = instr(story," " )
word = left(story,spacepos)
story = right(story,len(story)-spacepos)
response.write word
next
Response.Write "</span>"
Response.Write story
Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
rsForums.MoveNext
next
rsForums.Close
Set rsForums = nothing
1). detect the first four words of a paragraph and stylize them
(already does that)
2). Capitalize and stylize the first letter of each paragraph (already
does that via style sheet)
3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
I can insert a images in specific places (i.e. I want to dynamically
insert image 1 in paragraph 1, image 2 into para 2, etc.)
This third item I can't figure out. I've tried it a few ways but keep
running to problems.
Thanks!!!
The following script was provided by Mike Brind, thanks Mike. It
currently can produce results for the first 2 items I listed above but
not exactly the way I want it to. It places an image into the first
paragraph for each "record" but that's not what I want.
Dim str, i, spacepos, word
for wank = 1 to 7
if rsForums.EOF then exit for
if wank = 1 then
response.write "<img id='picFloat' src='testoboy.jpg'
class='picBorderThin'>"
End if
if wank = 2 then
response.write "<img id='picFloat' src='me.jpg'
class='picBorderThin'>"
End if
Response.Write "<p><span id='firstWords'>"
storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
for i = 1 to 4
spacepos = instr(story," " )
word = left(story,spacepos)
story = right(story,len(story)-spacepos)
response.write word
next
Response.Write "</span>"
Response.Write story
Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
rsForums.MoveNext
next
rsForums.Close
Set rsForums = nothing