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
bad5star View Drop Down
Groupie
Groupie


Joined: 29 July 2005
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote bad5star Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2006 at 5:50pm
Hi

can anyone tell me EXACTLY what page I need to go and modify this code below to fix the problem

Thank you in advance for your time

B5


Originally posted by edesigner edesigner wrote:

 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 ", "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
 
 
Chris
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: 15 December 2006 at 6:25pm
functions_edit_post.asp
Back to Top
bad5star View Drop Down
Groupie
Groupie


Joined: 29 July 2005
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote bad5star Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2006 at 7:14pm
Originally posted by edesigner edesigner wrote:

functions_edit_post.asp


Thank you friend.Big%20smile
Back to Top
bad5star View Drop Down
Groupie
Groupie


Joined: 29 July 2005
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote bad5star Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2006 at 7:51pm
Originally posted by edesigner edesigner wrote:

 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 ", "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
 
 
Chris



The above code only fixed the [/IMG] problem.. no more />

BUT

the sig still doesnt show when user posts in a thread... it shows in profile ONLY

help - thanks
Back to Top
mrg1 View Drop Down
Newbie
Newbie


Joined: 12 April 2006
Location: Romania
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrg1 Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2007 at 9:32pm
I've checked briefly the forum amd this seems to be closest match of my problem:
When a user insert this code as signature:
[_IMG_]http://tickers.TickerFactory.com/ezt/d/4;10501;4/st/20070404/e/Examen/dt/6/k/3ce0/event.png[/_IMG_]
and presses preview it shows like image's path is following:
[_IMG_]http://tickers.tickerfactory.com/ezt/d/4105014/st/20070404/e/Examen/dt/6/k/3ce0/event.png[/_IMG_]
Those semicolons are trimmed. I'm using 8.05 version...

Edited by mrg1 - 17 March 2007 at 9:36pm
Back to Top
MrMellie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 December 2006
Location: United Kingdom
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote MrMellie Quote  Post ReplyReply Direct Link To This Post Posted: 19 March 2007 at 1:36pm
mrg1, your problem isn't related to the quote bug (which IIRC is fixed in 8.05). It's down to the security in place to prevent SQL injection and XSS. The semi-colon get's stripped out to help prevent injection attacks. There's not a lot you can really do about it. If you disabled the code that did it, then you'd be making a hole in the WWF security on your forum, not something that's advisable.
Back to Top
mrg1 View Drop Down
Newbie
Newbie


Joined: 12 April 2006
Location: Romania
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrg1 Quote  Post ReplyReply Direct Link To This Post Posted: 19 March 2007 at 8:34pm
I guessed that was the reason... An workaround is to insert by myself the code into db, using sql manager, but I was hopping it might be something else... Unfortunately, a lot of signatures coming from tickerfactory will generate this problem...
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.