 |
 |
Fun [code] tags!
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Test...
<pre><font size = 1 face = courier>
<font color = green>int</font> <font color = green>void</font> <font color = purple>id</font>
</font></pre>
[This message has been edited by parallax (edited 05-31-2001).]
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Yee-haw.
Anyway, I added stuff so [ code ] tags now color C/ObjC-keywords, numbers, comments, &c. Removies smilies from within [ code ] tags.
<pre><font size = 1 face = courier>
Like this:
-(<font color = green>void</font>)method:(<font color = green>int</font>)param
{
<font color = green>int</font> a;
}
</font></pre>
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Eagan, MN
Status:
Offline
|
|
Lemme try:
<pre><font size = 1 face = courier>- (<font color = green>int</font>)coolMethod
{
<font color = green>return</font> [<font color = purple>self</font> coolMethod];
}</font></pre>
EDIT: Wow, spiffy  Good work parallax.
------------------
[This message has been edited by mr_sonicblue (edited 05-31-2001).]
|
|
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Nov 2000
Location: New Yawk
Status:
Offline
|
|
One problem is that it doesn't seem to like edits. The thing is, if you put some code in, and then you found you made a mistake (wrote maine instead of main or something), you have to go back and repaste all the code because HTML isn't allowed in these forums.
Any ideas on how to solve the parsing problem?
And if I'm completely wrong, feel free to yell at me in formatted Obj-C code.
------------------
the oddball newsletter
------------------
it's only after you lose everything that you're free to do anything
The gem cannot be polished without friction, nor man perfected without trials.
|
|
"Do not be too positive about things. You may be in error." (C. F. Lawlor, The Mixicologist)
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Eagan, MN
Status:
Offline
|
|
All you have to do is move the UBB-to-HTML code to where the forum thread is generated (which is where [B], [I], [URL], etc are converted).
------------------
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Feb 2001
Status:
Offline
|
|
oops, <pre><font size = 1 face = courier>int, <font color = purple>self</font>, <font color = purple>YES</font>, <font color = purple>NO</font>, <font color = green>null</font>, <font color = green>nil</font>, <font color = green>void</font>, boolean, <font color = purple>BOOL</font>, <font color = green>return</font>, <font color = purple>self</font>, this, <font color = green>static</font>, public, private, protected, @public</font></pre>
[This message has been edited by tie (edited 05-31-2001).]
|
|
The 4 o'clock train will be a bus.
It will depart at 20 minutes to 5.
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Wasn't anticipating edits.
All I really have to do is add one or two things... I'll do that today.
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
tie raises a good point. I was going to include C++ keywords, but I realized that I didn't know them all :-)
List any keywords that you feel may have been missed. They're easy to add.
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2001
Status:
Offline
|
|
That rules, will make things much easier in the forums.
<pre><font size = 1 face = courier><font color = green>int</font></font></pre>
[This message has been edited by rwc9785 (edited 05-31-2001).]
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2001
Status:
Offline
|
|
That rules, will make things much easier in the forums.
int
|
|
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Nov 2000
Location: New Yawk
Status:
Offline
|
|
parallax, another suggestion.
Maybe you could set off the code with <HR> as it was done before in addition to the color/font change. I know that I always found it easier to notice it when it was set off with an indent within horizontal rules.
Anybody else like this? Or just leave it the way he's done it?
------------------
the oddball newsletter
------------------
it's only after you lose everything that you're free to do anything
The gem cannot be polished without friction, nor man perfected without trials.
|
|
"Do not be too positive about things. You may be in error." (C. F. Lawlor, The Mixicologist)
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Yeah, an <HR> or <BLOCKQUOTE> and something like "code:<br>" after it will make it easy to pick out when I convert HTML back to UBB.
Would you guys prefer an <HR> or a <BLOCKQUOTE>?
(Or any other ideas)
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Eagan, MN
Status:
Offline
|
|
To make it easy to pick out for reverse conversion, just put "<!-- START UBBER CODISH STUFINK --> <!-- END DINK CODIN -->" around the generated HTML.
And I vote for <UL> (or <BLOCKQUOTE> ... but that indents the right edge as well, which decreases the usuable width by 2 times that of <UL> )
------------------
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Apr 2001
Status:
Offline
|
|
Try throwing in line breaks. If you don't want them too long, or want them a certain length use:
-------Start Code--------
-------End Code--------
or a simple image.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
Thought I should give it a whirl..
<pre><font size = 1 face = courier>
#import <Cocoa/Cocoa.h>
@protocol SomeProtocol
- (<font color = green>int</font>)someNumber;
<font color = purple>@end</font>
<font color = brown>// ...</font>
#import <font color = red>"SomeProtocol.h"</font>
#define SOME_NUMBER <font color = blue>12</font>
<font color = purple>@interface</font> SomeObject : NSObject <SomeProtocol>
{
}
- (<font color = green>int</font>)someNumber;
- (<font color = green>int</font>)anotherNumber;
<font color = purple>@end</font>
<font color = brown>// ...</font>
<font color = purple>@implementation</font> SomeObject
- (<font color = green>int</font>)someNumber
{
<font color = green>return</font> SOME_NUMBER;
}
- (<font color = green>int</font>)anotherNumber
{
<font color = green>return</font> <font color = blue>11</font>;
}
<font color = purple>@end</font></font></pre>
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator 
Join Date: Sep 2000
Location: Irvine, CA
Status:
Offline
|
|
Not bad. Not bad at all. I love the idea. I just posted something in the deveoper forum and I am rather impressed. Good work!
|
|
{{{ mindwaves }}}
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Thanks mindwaves :-)
Yeah, I should add really @protocol to the list :-)
If you see any keywords you'd like added (like @protocol), just post 'em here.
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
<pre><font size = 1 face = courier><font color = purple>@protocol</font> <font color = green>private</font> <font color = green>protected</font> <font color = green>public</font> <font color = green>this</font> <font color = green>boolean</font>
</font></pre>
Any others?
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
<pre><font size = 1 face = courier>#define, #include, #import, <font color = green>float</font>, <font color = green>short</font>, <font color = green>const</font>, <font color = green>char</font> // ...?</font></pre>
Looks good! 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
Hmm....
[This message has been edited by Synotic (edited 06-02-2001).]
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
This is<pre><font size = 1 face = courier><font color = red>"Interesting"</font></font></pre>.
[This message has been edited by Synotic (edited 06-02-2001).]
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
<pre><font size = 1 face = courier>This is a <b>test</b></font></pre>
[This message has been edited by Synotic (edited 06-02-2001).]
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Feb 2001
Status:
Offline
|
|
<pre><font size = 1 face = courier>But when I type a really <font color = green>long</font> line it doesn't seem to wrap and just disappears off the side of the screen.</font></pre>
Edit: I can't seem to reproduce it here, but look in the "Need help changing icons in Nib" thread that I posted to for an example (in OmniWeb).
[This message has been edited by tie (edited 06-02-2001).]
|
|
The 4 o'clock train will be a bus.
It will depart at 20 minutes to 5.
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Feb 2001
Location: Rochester, uk
Status:
Offline
|
|
[******* double post, sorry]
[This message has been edited by sadie (edited 06-02-2001).]
|
|
All words are lies. Including these ones.
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Feb 2001
Location: Rochester, uk
Status:
Offline
|
|
<pre><font size = 1 face = courier>#define #include #import '<font color = green>char</font>'
java.lang.String?</font></pre>
|
|
All words are lies. Including these ones.
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|