Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,491,895
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-27-24 09:29 AM
Guest: Register | Login

0 users currently in General Chat | 1 guest

Main - General Chat - [code] tag, go! New thread | New reply

Pages: 1 2

blackhole89
Posted on 07-08-07 12:54 AM Link | Quote | ID: 53078


The Guardian
Moloch whose eyes are a thousand blind windows!
Level: 124

Posts: 254/4196
EXP: 21534556
Next: 302045

Since: 02-19-07
From: Ithaca, NY, US

Last post: 472 days
Last view: 85 days



Since things like this have proven useful in the past...

[code]...[/code] now yields
template <class T> class CLookupTable {
private:
T **tbl;
int max_alloc;
public:
CLookupTable() { tbl=(T**)malloc(4); max_alloc=1; *tbl=(T*)0; }

// find a free spot for a new T* to add and return the new ID
int Set(T *x)
{
for(int i=0;i<max_alloc;++i)
{
if(tbl[i]==(T*)0)
{
tbl[i]=x;
return i;
}
}
tbl=(T**)realloc(tbl,4*max_alloc+4);
tbl[max_alloc] = x;
++max_alloc;
return (max_alloc-1);
}
}


There's a number of limitations to this right now - for instance, it does not bypass wordfilters, emoticons or other code tags; I hope to get this fixed soon though.

Syntax highlighting might be an option too if there is demand for it. Also, if you run into any problems with this, tell me.

____________________



Tyty
Posted on 07-08-07 01:05 AM Link | Quote | ID: 53079


Vire
Jizz Danmaku
Level: 77

Posts: 297/1381
EXP: 4046324
Next: 144805

Since: 04-20-07
From: Canada

Last post: 4448 days
Last view: 3720 days
 Cool! 


On code tags though I always liked the black background with green text to give it a more codey look.

____________________

stag019
Posted on 07-08-07 01:11 AM Link | Quote | ID: 53081


Snifit
Level: 40

Posts: 154/299
EXP: 409626
Next: 31683

Since: 02-19-07

Last post: 4281 days
Last view: 2167 days
There seems to be a top and left border, but no others. Make the table class c1?

Also, PHP has a built in highlighter for PHP code only, which shouldn't be too hard to implement at all.

There's a number of limitations to this right now - for instance, it does not bypass wordfilters, emoticons or other code tags; I hope to get this fixed soon though.
I hope that gets fixed soon, as it shows in your example even. ([i] => <i>)

HyperHacker
Posted on 07-08-07 01:19 AM (rev. 3 of 07-08-07 01:28 AM) Link | Quote | ID: 53083

...
Level: 73

Posts: 1092/1220
EXP: 3367039
Next: 118829

Since: 03-25-07
From: no

Last post: 6092 days
Last view: 6076 days
Nice. Highlighting would be a bonus, I guess, but I think you'd want to have a language specified [code=php] to avoid nonsense highlighting in other languages.

Hm, the code is a bit ugly though:
<table cellspacing=0 width=90%><tr><td class="b n3"><pre><font style=font-size:9pt;>lol code</table>

Could be better done with CSS:
hey
it's code



hey
it's code


Of course for this to work in this post one would have to either create new rules for .b and .n3 to apply to divs as they do to table cells or not filter <style> from posts. Here's what it should look like though:

hey
it's code

...in the Fish theme anyway.

Xkeeper
Posted on 07-08-07 01:57 AM Link | Quote | ID: 53093


Level: 105

Posts: 2513/2846
EXP: 12029143
Next: 233117

Since: 02-19-07

Last post: 6061 days
Last view: 2798 days
You could always use <code>:

This is some
sample code
in the code tag
although you would just have to add some other small cCSS tweaks


____________________
I dealt with it.

Darkdata
Posted on 07-08-07 02:00 AM Link | Quote | ID: 53095


Mole
Level: 43

Posts: 338/366
EXP: 554758
Next: 10288

Since: 02-19-07
From:

Last post: 6126 days
Last view: 6125 days
Posted by Xkeeper
You could always use <code>:

This is some
sample code
in the code tag
although you would just have to add some other small cCSS tweaks



I like the border. The color rocks too.

The board has always had both css and bbcode, why stop now?

____________________

blackhole89
Posted on 07-08-07 02:18 AM Link | Quote | ID: 53102


The Guardian
Moloch whose eyes are a thousand blind windows!
Level: 124

Posts: 255/4196
EXP: 21534556
Next: 302045

Since: 02-19-07
From: Ithaca, NY, US

Last post: 472 days
Last view: 85 days



Fixed the smiley/tag override part of it.
As for switching the frame to <code>, this will require some themechanging work, so I'll leave that for tomorrow...

____________________



Tweaker
Posted on 07-08-07 02:31 AM Link | Quote | ID: 53105


Red Koopa
Level: 28

Posts: 111/139
EXP: 129837
Next: 1501

Since: 02-19-07
From: Rochester, NY

Last post: 5796 days
Last view: 5702 days
Awesome, it uses actual tabs in it. The IPB code tag converts tabs to multiple space, which is by far the most counterproductive and retarded thing ever.

____________________
Messenger info:
AIM: SonicTweaker
MSN: nibesto@gmail.com
GTalk: nibesto@gmail.com
Cool IRC Channels:
#retro | #cult | #acmlm

Cool Sites:
Sonic Retro | S2Beta | CulT | SGMC | Something Awful | HPZ | Hacking CulT | Acmlm's Board II

Ailure
Posted on 07-08-07 02:54 AM Link | Quote | ID: 53111

Hats
Steam Board2 group
Level: 121

Posts: 1040/3965
EXP: 19780596
Next: 276100

Since: 02-19-07
From: Sweden, Skåne

Last post: 3302 days
Last view: 2053 days
public class Main {
public static void main(String[] args) {
System.out.println("Hai world");
}
}

Small java program I made to test my Java installation in Ubuntu Linux. Works quite nicely with this new tag.

____________________
AIM: gamefreak1337, MSN: Emil_sim@spray.se, XMPP: ailure@xmpp.kafuka.org


Kawa
Posted on 07-08-07 10:31 AM Link | Quote | ID: 53213


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 410/5344
EXP: 30947189
Next: 715792

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
	if(Cont & B_BUTTON)
{
SetNewPlayer("KAWA",1);
CreateMonsterInParty(25,20);
CreateMonsterInParty(1,18);
Fighters[0] = &MyParty[0];
Fighters[1] = &MyParty[1];
Battle();
}
Heeeey...

____________________
Wife make lunch - Shampoo
Opera - give it a spin
Spare some of your free time?
<GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered
Kawa rocks — byuu

HyperHacker
Posted on 07-08-07 12:20 PM Link | Quote | ID: 53219

...
Level: 73

Posts: 1095/1220
EXP: 3367039
Next: 118829

Since: 03-25-07
From: no

Last post: 6092 days
Last view: 6076 days
Posted by Darkdata
Posted by Xkeeper
You could always use <code>:

This is some
sample code
in the code tag
although you would just have to add some other small cCSS tweaks



I like the border. The color rocks too.
Yes, but it's not translucent.

Xkeeper
Posted on 07-08-07 04:58 PM Link | Quote | ID: 53232


Level: 105

Posts: 2523/2846
EXP: 12029143
Next: 233117

Since: 02-19-07

Last post: 6061 days
Last view: 2798 days
We were going to make it theme-based, heh

____________________
I dealt with it.

Randy53215
Posted on 07-08-07 05:51 PM Link | Quote | ID: 53234


Shyguy
Banned by request
Level: 22

Posts: 52/81
EXP: 57757
Next: 593

Since: 02-19-07
From: Greenfield, Wisconsin (U.S.A)

Last post: 6092 days
Last view: 6070 days
w00t

Flan
Posted on 07-09-07 03:35 AM Link | Quote | ID: 53342

Newcomer
EPSILONS. EPSILONS EVERYWHERE
Level: 8

Posts: 4/8
EXP: 1772
Next: 415

Since: 07-09-07

Last post: 6132 days
Last view: 6133 days

$$x \in A$$
This is to be formally read as `x is a member of A', however, for brevity,
one might consider reading it as `x epsilon A'.

Some examples of numerical sets are as follows:
$$\{0,1,2,3\},\{2,3,5\},\left\{\frac{2}{3},\frac{4}{5}\right\}$$

Looks cool.

Sonicandfails
Posted on 07-09-07 08:05 AM Link | Quote | ID: 53395


Lantern Ghost
Level: 60

Posts: 695/766
EXP: 1679670
Next: 93108

Since: 02-19-07

Last post: 5965 days
Last view: 5771 days
I really like this, it's useful for the IRC thread, but can we get an option/flag for word wrap?

____________________
I miss post headers more.

Xkeeper
Posted on 07-09-07 07:02 PM Link | Quote | ID: 53462


Level: 105

Posts: 2538/2846
EXP: 12029143
Next: 233117

Since: 02-19-07

Last post: 6061 days
Last view: 2798 days
It's not possible to have word wrap but also have non-compressed spaces (i.e. three spaces turning into one)...

____________________
I dealt with it.

blackhole89
Posted on 07-09-07 07:05 PM Link | Quote | ID: 53464


The Guardian
Moloch whose eyes are a thousand blind windows!
Level: 124

Posts: 263/4196
EXP: 21534556
Next: 302045

Since: 02-19-07
From: Ithaca, NY, US

Last post: 472 days
Last view: 85 days



Actually, I could think of a way (use regexps to convert groups of successive spaces into a single normal space and a series of non-breaking ones following them), but it would obsolete the formatting using
 currently used.

____________________



stag019
Posted on 07-09-07 11:47 PM Link | Quote | ID: 53530


Snifit
Level: 40

Posts: 155/299
EXP: 409626
Next: 31683

Since: 02-19-07

Last post: 4281 days
Last view: 2167 days
Or, you know, use these.
testing some code, testing some code, testing some code, testing some code, testing some code, testing some code, testing some code, testing some code, testing some code, testing some code.


Also, I totally forgot to mention this, but I've been watching new features being implemented, and I've noticed:
The original way of using fonts involved using font-size: user_defined% for the body, and then all other font size changes have been made in terms of em.
Then I noticed, rather than using the sfont class, <small> started to be used places (signatures). Now here, this is defined in points. What's with the inconsistency?

Xkeeper
Posted on 07-11-07 09:27 AM Link | Quote | ID: 53848


Level: 105

Posts: 2566/2846
EXP: 12029143
Next: 233117

Since: 02-19-07

Last post: 6061 days
Last view: 2798 days
If you mean my sample code tag, it's just because defining something as 11px was a constant for me (not to big, not too small) and it was just a test because I didn't feel like fucking with %s and ems to get the right size.

Signatures are in <small> tags because.... well, what did you expect me to use? <span class="tiny">? <small> just fits better.

____________________
I dealt with it.

stag019
Posted on 07-11-07 09:44 AM Link | Quote | ID: 53850


Snifit
Level: 40

Posts: 156/299
EXP: 409626
Next: 31683

Since: 02-19-07

Last post: 4281 days
Last view: 2167 days
Posted by Xkeeper
If you mean my sample code tag, it's just because defining something as 11px was a constant for me (not to big, not too small) and it was just a test because I didn't feel like fucking with %s and ems to get the right size.
No, that's fine and I don't really care about that. Hell, my layout uses a font defined in pixel size. What I was referring to is blackhole89's [code] tag.

<table cellspacing=0 width=90%><tr><td class="b n3"><pre><font style=font-size:9pt;></table>
9 point. Also, I'm curious why the style was applied to a seperate <font> tag rather than just directly to the <pre> tag.
Posted by Xkeeper
Signatures are in <small> tags because.... well, what did you expect me to use? <span class="tiny">? <small> just fits better.
Well, I would use that (sfont though ), but no, I wouldn't expect you to use that.

The only reason I brought it up because they're technically different sizes. Very minuscule at smaller sizes, but making it larger reveals the difference better. Not only that, but which one is bigger or smaller depends on the browser (IE6 and FF2 were different as to which is larger). I'd just recommend changing the CSS to include the both the class and the small tag.
.sfont, small{
font-size: 0.8em;
}


For those of you who want to see the difference:
test
test

<span class="sfont">test</span>
<small>test</small>
Pages: 1 2


Main - General Chat - [code] tag, go! New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.029 seconds. (323KB of memory used)
MySQL - queries: 77, rows: 105/106, time: 0.018 seconds.