Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Problem quoting/editing emoticons (smileys)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem quoting/editing emoticons (smileys)

 Post Reply Post Reply Page  <123>
Author
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
kiklop View Drop Down
Groupie
Groupie


Joined: 14 July 2005
Status: Offline
Points: 137
Post Options Post Options   Thanks (0) Thanks(0)   Quote kiklop Quote  Post ReplyReply Direct Link To This Post Posted: 26 September 2006 at 11:33am
Thanks Borg,

i have updated the code will report back if this isn't working.
Back to Top
kiklop View Drop Down
Groupie
Groupie


Joined: 14 July 2005
Status: Offline
Points: 137
Post Options Post Options   Thanks (0) Thanks(0)   Quote kiklop Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
edesigner View Drop Down
Newbie
Newbie


Joined: 30 September 2006
Location: Greece
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote edesigner Quote  Post ReplyReply Direct Link To This Post Posted: 05 October 2006 at 3:52pm

 This is the code corrected, you had forgoten to Disable "Forum Codes"  -boRg- Wink, 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
Back to Top
kiklop View Drop Down
Groupie
Groupie


Joined: 14 July 2005
Status: Offline
Points: 137
Post Options Post Options   Thanks (0) Thanks(0)   Quote kiklop Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
javi712 View Drop Down
Senior Member
Senior Member


Joined: 22 May 2003
Location: United States
Status: Offline
Points: 488
Post Options Post Options   Thanks (0) Thanks(0)   Quote javi712 Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 10 October 2006 at 8:06am
Yes
Back to Top
 Post Reply Post Reply Page  <123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.