Shoutbox

Emoticon parsing in code - 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: Emoticon parsing in code (/showthread.php?tid=67982)

Emoticon parsing in code by Baggins on 11-02-2006 at 10:35 PM

Many times i have seen code and not been able to read it because of emoticons. it also makes it impossible to cut and paste. it should be made to not parse emoticons. should still parse for MyCode though


RE: Emoticon parsing in code by Supersonicdarky on 11-02-2006 at 10:36 PM

when posting code, click disable smilieys and when copying code, click quote and copy from there ;)


RE: Emoticon parsing in code by Ezra on 11-02-2006 at 10:39 PM

on the forums or in msn?

on the forums just select Disable Smilies or use[ code][ noparse]code...[/noparse ][/code ]


RE: Emoticon parsing in code by Baggins on 11-02-2006 at 10:41 PM

that would be alot of work, it wouldn't take to long to make it not parse emticons

EDIT: what if you wanted some part of the code bold?


RE: Emoticon parsing in code by Supersonicdarky on 11-02-2006 at 10:42 PM

typing non-parsing tags or clicking a checkbox is a lot of work? :/

edit: checkbox..., then add bold tags


RE: Emoticon parsing in code by Baggins on 11-02-2006 at 10:46 PM

easier if it did it automaticly,  What if you also wanted emoticons in anothe part of post that was not code?


RE: Emoticon parsing in code by andrey on 11-02-2006 at 11:12 PM

quote:
Originally posted by Baggins
What if you also wanted emoticons in anothe part of post that was not code?
quote:
Originally posted by Ezra
use[ code][ noparse]code...[/noparse ][/code ]

RE: Emoticon parsing in code by Baggins on 11-02-2006 at 11:54 PM

what if you wanted some of the code BOLD putting [code][noparse] ... [/code][/noparse] would not allow this, if you clicked the no emoticon thinger it would diable smileys in the whole post.  Both methods have flaws, and the only way to do it properly would be to modify the forums to disable smilies in between the code tags.  clicking quote would be alot of work i mean.


RE: Emoticon parsing in code by Supersonicdarky on 11-03-2006 at 01:35 AM

jeeeeeeeez, dont disable smileys just do:

[code][noparse]123[/noparse]:Dn3wb[noparse]123[/code][/noparse]


RE: Emoticon parsing in code by haydos on 11-03-2006 at 07:02 AM

Question - What code needs emoticons in the first place? Maybe emote parsing should actually be disabled for code tags...


RE: Emoticon parsing in code by NanaFreak on 11-03-2006 at 07:05 AM

umm the codes like catch(e) for jscript and alot of other things... i think for the [code] tags the only thing that should work is color tags and bold tags because they help out to show when you have edited stuff in the code but other than that i think no other tags should work[/code]


RE: Emoticon parsing in code by WDZ on 11-03-2006 at 07:30 AM

quote:
Originally posted by Baggins
Many times i have seen code and not been able to read it because of emoticons. it also makes it impossible to cut and paste. it should be made to not parse emoticons. should still parse for MyCode though
Making MyBB RC2 not parse smilies would require rewriting quite a bit of code, and I'm not willing to do that. You can use the [noparse] tags around the entire code block, or around each individual smilie.

In MyBB 1.2, smilies and MyCode are never parsed in code blocks (you don't have any options).

quote:
Originally posted by haydn
Question - What code needs emoticons in the first place?
None, that I can think of. Smilies should definitely be disabled in code blocks, but it's kind of tricky to allow MyCode and not allow smilies.
RE: Emoticon parsing in code by Baggins on 11-08-2006 at 12:49 AM

quote:
Originally posted by haydn

Question - What code needs emoticons in the first place?

Exactly my point!8-)
RE: Emoticon parsing in code by WDZ on 11-08-2006 at 05:15 AM

quote:
Originally posted by Baggins
quote:
Originally posted by haydn

Question - What code needs emoticons in the first place?

Exactly my point!8-)
Well, it's not as if someone made a conscious decision to parse smilies inside code tags... :dodgy:
RE: RE: Emoticon parsing in code by CookieRevised on 11-08-2006 at 09:10 AM

quote:
Originally posted by WDZ
In MyBB 1.2, smilies and MyCode are never parsed in code blocks (you don't have any options).
:( :( :(

I could live with parsed emoticons. Because that happens only occasionally. But I couldn't live with not parsing other MyCode like bold, italics, colors, etc as that quite often enhances and clarifies the actual code.

In fact, more requests have been made to auto-parse code so the syntax is automatically colored for example, than requests for not parsing emoticons automatically...

If one takes a look around the forum and look at all the code bits, you will also see that many times formatting is used inside the code tags to clarify certain bits, etc. Only once or twice an emoticon got slipped thru and was parsed...

in a nutshell: if the code tags in MyBB1.2 indeed don't parse formatting, I don't like 1.2 ...
RE: Emoticon parsing in code by Ezra on 11-08-2006 at 10:24 AM

Yeah, I still want to see that indeed, Syntax Coloring for Jscript, I don't think it would be very hard to do. You don't need big and slow libraries for a lot of languages just JScript then, cause that's mostly used because of the scripts...


RE: Emoticon parsing in code by WDZ on 11-08-2006 at 05:15 PM

* WDZ goes to his dev board and takes screenshot :D

[Image: ssb1fxgr-mybb12-dev-screenshot.png]

It's not done yet, and there are some issues that need to be worked out, but it looks promising. I'm using GeSHi BTW, with syntax caching similar to how the phpBB mod works.


RE: Emoticon parsing in code by Matti on 11-08-2006 at 05:49 PM

Indeed: that looks great! :D
Finally we won't have to color our Plus! scripts ourselves anymore. :)

Go go WDZ!!! (H) :P


RE: Emoticon parsing in code by CookieRevised on 11-08-2006 at 07:22 PM

but... but... but... can we still highlight or emphasize a certain line in the code??? (<= which I actually find more important (and certainly on a support forum) than color syntaxing)


RE: Emoticon parsing in code by WDZ on 11-08-2006 at 07:31 PM

I thought you might ask that, so I borrowed another feature from the phpBB mod. Important lines can be marked >>>like this<<<.

[Image: fkgwywms-highlighted-lines.png]

Note that all the colors and styles can be tweaked easily by changing a CSS file.


RE: Emoticon parsing in code by Ezra on 11-08-2006 at 07:41 PM

<3 WDZ

Good to see you really making sure the transfer to the new myBB version will be very good. Can't wait for it :d


RE: Emoticon parsing in code by CookieRevised on 11-08-2006 at 08:22 PM

quote:
Originally posted by WDZ
I thought you might ask that, so I borrowed another feature from the phpBB mod. Important lines can be marked >>>like this<<<.

[Image: fkgwywms-highlighted-lines.png]

Note that all the colors and styles can be tweaked easily by changing a CSS file.
:drool:
:drool:
:drool:

ok.... /me wipes of desk....
and can you highlight two seperate blocks? :P (just pushing here :D)




EDIT:
quote:
Originally posted by WDZ
The highlighting works on a per-line basis, so you can highlight any lines you want...
oh mamma....

I love you (k)...



RE: Emoticon parsing in code by WDZ on 11-08-2006 at 08:34 PM

The highlighting works on a per-line basis, so you can highlight any lines you want...

[Image: qfbbywsj-multi-highlighted-lines.png]


RE: Emoticon parsing in code by NanaFreak on 11-08-2006 at 08:38 PM

you rock WDZ now i cant wait for you to finish it so code will look better