Shoutbox

Quick-quoting smilies - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: General (/forumdisplay.php?fid=11)
+---- Forum: Forum & Website (/forumdisplay.php?fid=13)
+----- Thread: Quick-quoting smilies (/showthread.php?tid=54640)

Quick-quoting smilies by Menthix on 01-05-2006 at 06:01 PM

When i quote a smilie for example ;) it will just give me (Smilie) as quoted text instead of the actual code for the smilie. It just to work perfect in the past. WDZ:p ?

Example in this message: http://shoutbox.menthix.net/showthread.php?tid=54...d=587174#pid587174

EDIT: Just noticed that it only goes wrong when you select a part of the message that you want to quote and then press QuickQuote. It's fine when don't select anything and just QuickQuote the entire message. But quickquoting a part of the message used to be fine in the past too, what changed? :o


RE: Quick-quoting smilies by Eljay on 01-05-2006 at 06:07 PM

it works in quotes, the only time you get "(Smilie)" is if you copy some text with a smilie in it as "(Smilie)" is the alt text for all smilies.

edit: was typing during your edit :( :P


RE: Quick-quoting smilies by John Anderton on 01-05-2006 at 06:13 PM

Imo the older one was good. Tho it wasnt totally xhtml compliant. Bah :P

Atfirst it gave me problems but then it became ok (random ones .... not related to the text showing up)

I was wondering it the alt for every image could have the smiley code for it. Then when the quick quote is posted ...... voila .... emotes again :cheesy:


RE: Quick-quoting smilies by WDZ on 01-05-2006 at 07:28 PM

quote:
Originally posted by John Anderton
I was wondering it the alt for every image could have the smiley code for it. Then when the quick quote is posted ...... voila .... emotes again :cheesy:
I wish, but that's difficult to implement.

The problem is that after one smilie is replaced, subsequent replaces might mess with the alt code. For example...

:dodgy:

gets replaced with...

<img src="dodgy.gif" alt=":dodgy:">

:dodgy: contains :d so now :d will be replaced...

<img src="dodgy.gif" alt="<img src="msn_grin.gif" alt=":d">odgy:">

It may be possible to overcome this issue by converting the alt codes to pure HTML entities... I'll have to think about it...
RE: Quick-quoting smilies by Menthix on 01-05-2006 at 08:01 PM

But why did it stop working in the first place? Like John Anderton said:"wasnt totally xhtml compliant"? I rather have a bit of incompliant code back that works fine than this dodgy (Smilie) thing :).


RE: Quick-quoting smilies by Plik on 01-05-2006 at 08:12 PM

could you use regexps to only parse text that isn't inside an <img> tag?


RE: Quick-quoting smilies by WDZ on 01-05-2006 at 08:15 PM

quote:
Originally posted by MenthiX
I rather have a bit of incompliant code back that works fine than this dodgy (Smilie) thing :).
I wouldn't... :p
RE: Quick-quoting smilies by John Anderton on 01-05-2006 at 08:22 PM

quote:
Originally posted by MenthiX
wasnt totally xhtml compliant"? I rather have a bit of incompliant code back that works fine than this dodgy (Smilie) thing
Thank god some one thinks like me :P
I tht people might think im odd :P
Bah dz is a perfectionist anways. He wont do it sad:

quote:
Originally posted by Madman
could you use regexps to only parse text that isn't inside an <img> tag?
:lol:
Dz using someone else's script ..... id like to see that day :P (i heard he never does that :P)
RE: Quick-quoting smilies by Menthix on 01-05-2006 at 08:24 PM

If it was the only piece of code to make this forum not validate, ok. But... MyBB is full of incompliant code anyway :p.


RE: Quick-quoting smilies by WDZ on 01-05-2006 at 08:50 PM

quote:
Originally posted by Madman
could you use regexps to only parse text that isn't inside an <img> tag?
I don't think so, unless all the <img> tags were actually stripped out then replaced afterwards, and that would be a crappy/inefficient way to do it.
quote:
Originally posted by MenthiX
If it was the only piece of code to make this forum not validate, ok. But... MyBB is full of incompliant code anyway :p.
It's the only thing that makes the shoutbox not validate. :d
RE: Quick-quoting smilies by Smethead on 02-20-2006 at 07:28 PM

quote:
Originally posted by MenthiX
When i quote a smilie for example ;) it will just give me (Smilie) as quoted text instead of the actual code for the smilie. It just to work perfect in the past. WDZ:p ?

Example in this message: http://shoutbox.menthix.net/showthread.php?tid=54...d=587174#pid587174

EDIT: Just noticed that it only goes wrong when you select a part of the message that you want to quote and then press QuickQuote. It's fine when don't select anything and just QuickQuote the entire message. But quickquoting a part of the message used to be fine in the past too, what changed? :o

Maybe this can be a solution: http://community.mybboard.net/showthread.php?tid=6906 But if WDZ doesn't want to, I'm ok with that.
RE: Quick-quoting smilies by ddunk on 02-20-2006 at 07:39 PM

quote:
Originally posted by MenthiX
But quickquoting a part of the message used to be fine in the past too, what changed?
Nah, before it didn't show the smilie at all. Because there was no alt text, when you selected a smilie, nothing would be quoted.
RE: Quick-quoting smilies by Lou on 02-20-2006 at 10:10 PM

quote:
Originally posted by Smethead
quote:
Originally posted by MenthiX
When i quote a smilie for example ;) it will just give me (Smilie) as quoted text instead of the actual code for the smilie. It just to work perfect in the past. WDZ:p ?

Example in this message: http://shoutbox.menthix.net/showthread.php?tid=54...d=587174#pid587174

EDIT: Just noticed that it only goes wrong when you select a part of the message that you want to quote and then press QuickQuote. It's fine when don't select anything and just QuickQuote the entire message. But quickquoting a part of the message used to be fine in the past too, what changed? :o

Maybe this can be a solution: http://community.mybboard.net/showthread.php?tid=6906 But if WDZ doesn't want to, I'm ok with that.
That looks like a great fix, and I love the fact that it has a case insensitive part in it:P
RE: Quick-quoting smilies by WDZ on 02-20-2006 at 10:26 PM

:-/

The point of that code is just to have the smilie code as the alt attribute? I think 7 preg_replace() calls per smilie just for that is pretty excessive... surely there's a better way... :p


RE: Quick-quoting smilies by brian on 02-20-2006 at 11:22 PM

To be honest, just alt=""

Why would it exactly matter if there is a smiley or not.