What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » Forum & Website » [code][/code] suggestion

Pages: (6): « First « 1 2 [ 3 ] 4 5 6 » Last »
[code][/code] suggestion
Author: Message:
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [code][/code] suggestion
quote:
Originally posted by Eljay
I'm assuming this is meant for code snippets pasted in rather than typing code in directly.
'this' as in the original post or my post? In case of the latter, I meant typing code in directly.

Edit: I get it, you were referring to the first post. I guess I just didn't read it properly.

This post was edited on 07-25-2008 at 11:52 AM by Felu.
07-25-2008 11:51 AM
Profile E-Mail PM Web Find Quote Report
John Anderton
Elite Member
*****

Avatar

Posts: 3908
Reputation: 80
37 / Male / Flag
Joined: Nov 2004
Status: Away
RE: [code][/code] suggestion
quote:
Originally posted by Nathan
And add colour formatting if you're feeling in a good mood :p

And remove smilies out of anything in the code (ive requested this before)

code:
:)


use noparse. I already had asked WDZ and he said there are times when you need highlighting in code tags and some people apparently want smileys too :P Anyway, you can noparse it when you want :) Its not a big deal :)

Also, 4 spaces is fine. Anything more than that would be too much imo :P
[

KarunAB.com
]

[img]http://gamercards.exophase.com/459422.png[
/img]
07-25-2008 01:15 PM
Profile E-Mail PM Web Find Quote Report
andrewdodd13
Senior Member
****

Avatar
Oh so retro

Posts: 870
Reputation: 16
34 / Male / Flag
Joined: Jan 2005
RE: [code][/code] suggestion
Tabs represent tab stops, not spaces, according to the ASCII standard. On Windows a tab stop is defined as 4 spaces, on some Unix systems it's 8.

Besides. To preserve tabs, 1 tab = 	 .

Of course, this only really works with Mono-spaced fonts.
[Image: AndrewsStyle.png]
07-25-2008 04:00 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [code][/code] suggestion
When tabs are used in code text lines (which is what we're talking about here; not about switching controls or technical ascii standards or whatever other context), then the only purpose of them is to indend the codelines so they are better structured.

Doing this by spaces, preseving tab stops, or whatever else doesn't matter, even mono-spaced or variable spaced fonts doesn't matter, just as long as the codelines are indended. So I don't see no harm done in a simple replace of a tab character into a few spaces.

Code highlighting would be nice too, but that isn't going to happen anytime soon. Automatic enclosing with [noparse] and using the <pre> tag is going to be worse, since then we can not use any highlighting or formatting (eg: bold) ourselfs anymore, which is very important.

A simple replace of the tab character on the other hand is quite straightforward and easy to implement I think. And at least saves us from doing a manual ReplaceAll all the time when pasting code.

This post was edited on 07-26-2008 at 03:42 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-26-2008 03:37 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. RE: [code][/code] suggestion
quote:
Originally posted by CookieRevised
Code highlighting would be nice too, but that isn't going to happen anytime soon. Automatic enclosing with [noparse] and using the <pre> tag is going to be worse, since then we can not use any highlighting or formatting (eg: bold) ourselfs anymore, which is very important.
Simple implemention of GeSHi would be suffice.

[Image: codetk6.jpg]



For instance you could use:

[code=js][/code=js] or [code=php][/code=php] or [code=xml][/code=xml] and so on this will allow the forum to highlight different languages :)

This post was edited on 07-30-2008 at 04:27 AM by WDZ.
07-26-2008 03:47 PM
Profile E-Mail PM Find Quote Report
mattisdada
Full Member
***

Avatar
RRElive.com

Posts: 359
Reputation: 4
32 / Male / Flag
Joined: Jan 2007
RE: [code][/code] suggestion
Yeah ive seen GeSHi being used on a few forums(or at least GeSHi like). Its really good, its an easy way to show your code.
[Image: Siggy.png]


http://www.rrelive.com/RRElivev2

If you would like my theme for your phpBB3, please contact me.

Thy shouldnt be judged by thy rep givin to you, but by thy rep that you give.
07-29-2008 07:21 AM
Profile E-Mail PM Web Find Quote Report
Chrono
forum admin
*******

Avatar
;o

Posts: 6022
Reputation: 116
39 / Male / Flag
Joined: Apr 2002
Status: Away
RE: [code][/code] suggestion
WDZ already said once he wouldnt use geshi (you know he'd want to go through the source code of that, fixing bugs and stuff :P). But it is, indeed, a good idea.

WDZ, don't be lazy and fix the damn thing. I dont see the purpose of using the code tags if they still preserve smilies :P

This post was edited on 07-29-2008 at 11:23 AM by Chrono.
[Image: wdz_discrate.png]
07-29-2008 11:22 AM
Profile PM Web Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: [code][/code] suggestion
wait... has anyone even seen WDZ around? o.0
07-29-2008 11:41 AM
Profile PM Find Quote Report
Vilkku
Veteran Member
*****

Avatar

Posts: 1411
Reputation: 27
35 / Male / Flag
Joined: Mar 2003
RE: RE: [code][/code] suggestion
quote:
Originally posted by NanaFreak
wait... has anyone even seen WDZ around? o.0
Nitro scared him off with his talks about MyBB upgrade :dodgy:
[Image: signature.php]
07-29-2008 12:35 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. RE: [code][/code] suggestion
Well maybe he should implement it just for now until he upgrades the forums to the latest MyBB which supports it.
07-29-2008 12:53 PM
Profile E-Mail PM Find Quote Report
Pages: (6): « First « 1 2 [ 3 ] 4 5 6 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On