| Author |
Topic Search Topic Options
|
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 26 September 2006 at 11:15am |
What you would need to do is open the file functions/functions_edit_post.asp in notepad and chnage the code between lines 166 and 192 to:-
'Loop through the message till all or any IMAGE links are converted back into codes Do While InStr(1, strMessage, "<img ", 1) > 0 'Find the start position in the image tag lngStartPos = InStr(1, strMessage, "<img ", 1) 'Find the position in the message for the image closing tag lngEndPos = InStr(lngStartPos, strMessage, "/>", 1) + 3 'Make sure the end position is not in error If lngEndPos - lngStartPos =< 10 Then lngEndPos = lngStartPos + 10 'Read in the code to be converted back into the forum codes strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos))) 'Place the image tag into the tempoary message variable strTempMessage = strMessageLink 'Format the HTML image tag back into forum codes strTempMessage = Replace(strTempMessage, "src=""", "", 1, -1, 1) strTempMessage = Replace(strTempMessage, "<img ", " strTempMessage = Replace(strTempMessage, """ />", "">", 1, -1, 1) 'Place the new fromatted codes into the message string body strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1) Loop
|
|
|
|
 |
kiklop
Groupie
Joined: 14 July 2005
Status: Offline
Points: 137
|
Post Options
Thanks(0)
Quote Reply
Posted: 26 September 2006 at 11:33am |
|
Thanks Borg,
i have updated the code will report back if this isn't working.
|
|
|
 |
kiklop
Groupie
Joined: 14 July 2005
Status: Offline
Points: 137
|
Post Options
Thanks(0)
Quote Reply
Posted: 26 September 2006 at 12:27pm |
Borg,
this doesn't work.
Can you please check this line
strTempMessage = Replace(strTempMessage, "<img ", " strTempMessage = Replace(strTempMessage, """ />", "">", 1, -1, 1)
|
Thanks
|
|
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 26 September 2006 at 4:15pm |
|
Thats the code for the next version to fix this issue, there maybe more changes in the code but it was a bit of a re-write so you may need to wait for the next version to be released or use the RTE.
|
|
|
 |
edesigner
Newbie
Joined: 30 September 2006
Location: Greece
Status: Offline
Points: 10
|
Post Options
Thanks(0)
Quote Reply
Posted: 05 October 2006 at 3:52pm |
This is the code corrected, you had forgoten to Disable "Forum Codes" -boRg- , and the last lines destroyed.
'Loop through the message till all or any IMAGE links are converted back into codes Do While InStr(1, strMessage, "<img ", 1) > 0 'Find the start position in the image tag lngStartPos = InStr(1, strMessage, "<img ", 1) 'Find the position in the message for the image closing tag lngEndPos = InStr(lngStartPos, strMessage, "/>", 1) + 3
'Make sure the end position is not in error If lngEndPos - lngStartPos =< 10 Then lngEndPos = lngStartPos + 10 'Read in the code to be converted back into the forum codes strMessageLink = Trim(Mid(strMessage, lngStartPos, (lngEndPos - lngStartPos))) 'Place the image tag into the tempoary message variable strTempMessage = strMessageLink
'Format the HTML image tag back into forum codes
strTempMessage = Replace(strTempMessage, "src=""", "", 1, -1, 1) strTempMessage = Replace(strTempMessage, "<img ", "[IMG]", 1, -1, 1) strTempMessage = Replace(strTempMessage, """ />", "[/IMG]", 1, -1, 1)
'Place the new fromatted codes into the message string body strMessage = Replace(strMessage, strMessageLink, strTempMessage, 1, -1, 1) Loop
|
Chris
Edited by edesigner - 05 October 2006 at 4:08pm
|
 |
kiklop
Groupie
Joined: 14 July 2005
Status: Offline
Points: 137
|
Post Options
Thanks(0)
Quote Reply
Posted: 05 October 2006 at 8:46pm |
|
Oh, i apologize for not reporting back about it (i thought i did)
The (corrected) code Chris has just posted is resolving this issue (I’m using it for a week now and it’s working great)
|
|
|
 |
javi712
Senior Member
Joined: 22 May 2003
Location: United States
Status: Offline
Points: 488
|
Post Options
Thanks(0)
Quote Reply
Posted: 09 October 2006 at 11:48pm |
|
Hello,
I noticed that this is also happening each time a member edits thir profile. If they have an image code in the signature window, the code will reset to /> and remove the [/img].
Does this piece of code also correct the page that deals with the profile?
Thanks in advance!
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 10 October 2006 at 8:06am |
|
Yes
|
|
|
 |