Forum Topic: Code tags agogo

(1,539 views • 53 replies)

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
None

Bizarro

Reply To Post Reply & Quote

Posted at: 9/19/07 06:08 PM

Bizarro NEUTRAL LEVEL 22

Sign-Up: 12/06/02

Posts: 656

even though everyone else tested it....im gonna too

//comment

WOW!

BBS Signature

None

liljim

Reply To Post Reply & Quote

Posted at: 9/19/07 06:28 PM

liljim NEUTRAL LEVEL 27

Sign-Up: 12/16/99

Posts: 8,896

At 9/19/07 04:36 PM, DannyIsOnFire wrote: Also liljim, are you gonna add a button above the message post area where the rest of the HTML tags are?
I'm aware it's written on the left hand side, but it's odds on a fair few people won't see it. Just a though/query.

I'm not too concerned about that at the moment - the html helper stuff only really leaves enough room for a line of text, and I think it's unlikely that someone asking for code help, or providing example code of their own, wouldn't be savvy enough to figure out what they need to do to put it in the code blocks.

BBS Signature

None

atomic-noodle

Reply To Post Reply & Quote

Posted at: 9/19/07 07:56 PM

atomic-noodle NEUTRAL LEVEL 14

Sign-Up: 05/17/05

Posts: 1,610

Awesome :D

iamcoreyg.com // campnorth
Need a website? music? graphics? CONTACT ME.

BBS Signature

None

Itsover9000

Reply To Post Reply & Quote

Posted at: 9/19/07 08:15 PM

Itsover9000 FAB LEVEL 10

Sign-Up: 08/07/07

Posts: 973

<script type="text/javascript"> function Whatever() { window.location.href = "<?php echo "Awesomeness!!!!";?>"; } </script>

BBS Signature

None

Itsover9000

Reply To Post Reply & Quote

Posted at: 9/19/07 08:17 PM

Itsover9000 FAB LEVEL 10

Sign-Up: 08/07/07

Posts: 973

I feel dumb...

<?php echo "Hai!";?>
<?php //comment ?>
BBS Signature

None

Cinjection

Reply To Post Reply & Quote

Posted at: 9/19/07 08:33 PM

Cinjection LIGHT LEVEL 18

Sign-Up: 04/06/04

Posts: 2,486

/* No comment */

The best part about going on Newgrounds is that no one know that you're naked!
[My Coder Profile]

BBS Signature

None

gankro

Reply To Post Reply & Quote

Posted at: 9/19/07 11:02 PM

gankro EVIL LEVEL 11

Sign-Up: 09/16/06

Posts: 1,174

bug report: ironically the text type that is most likely to be copied AKA the code type gets crushed together into one GIANT LINE when copied, just try:

onEnterThreed = function(){
if(noob){
spam ++
}else{
_root.spellCheck(text)
_root.grammarCheck(text)
}
if(spam >= 100){
_root.deleteAccount(_name)
}
}

My Coding Portfolio (updated frequently)
If you stay in bed for long enough it will be socially acceptable to go to bed again

BBS Signature

None

citricsquid

Reply To Post Reply & Quote

Posted at: 9/20/07 03:00 AM

citricsquid DARK LEVEL 23

Sign-Up: 06/25/05

Posts: 16,031

Anyway, thanks for CitricSquid for reminding me that we had this on the back burner, though.
Anyway, thanks for CitricSquid for reminding me that we had this on the back burner, though.
Anyway, thanks for CitricSquid for reminding me that we had this on the back burner, though.
Anyway, thanks for CitricSquid for reminding me that we had this on the back burner, though.
Anyway, thanks for CitricSquid for reminding me that we had this on the back burner, though.

None

Zendra

Reply To Post Reply & Quote

Posted at: 9/20/07 09:40 AM

Zendra NEUTRAL LEVEL 41

Sign-Up: 09/07/03

Posts: 12,487

<?PHP
echo 'Awesome!';
?>

NG BBS & Review moderator // PM abuse // Check my audio!


None

smulse

Reply To Post Reply & Quote

Posted at: 9/20/07 10:46 AM

smulse EVIL LEVEL 30

Sign-Up: 03/24/05

Posts: 5,929

See, newgrounds really does listen to it's users

But now I can't laugh at n00bs who can't properly write links like <a href="#">lols</a> because they can use

this

instead.

BBS Signature

None

citricsquid

Reply To Post Reply & Quote

Posted at: 9/20/07 10:50 AM

citricsquid DARK LEVEL 23

Sign-Up: 06/25/05

Posts: 16,031

Range ("C6") .Select

THat's my code knowledge done.


None

different

Reply To Post Reply & Quote

Posted at: 9/20/07 04:30 PM

different DARK LEVEL 35

Sign-Up: 07/08/04

Posts: 3,764

/* lovely */

we play iPhone, daily game reviews, twitter.


None

AcDiK-DR4G0N

Reply To Post Reply & Quote

Posted at: 9/20/07 04:43 PM

AcDiK-DR4G0N DARK LEVEL 19

Sign-Up: 01/31/06

Posts: 1,697

if(thisWorks == true):
     print 'Thanks guys!'
     lilJim = 'God'
     Ross = 'God'

Kissing

cherries

Reply To Post Reply & Quote

Posted at: 9/20/07 07:46 PM

cherries LIGHT LEVEL 18

Sign-Up: 06/07/05

Posts: 4,576

At 9/20/07 04:43 PM, AcDiK-DR4G0N wrote: if(thisWorks == true):
print 'Thanks guys!'
lilJim = 'God'
Ross = 'God'
It's not like it's that hard to do what they did..


......................................__................................................
.............................,-~*'`¯lllllll`*~,..........................................
.......................,-~*`lllllllllllllllllllllllllll¯`*-,....................................
..................,-~*llllllllllllllllllllllllllllllllllllllllllll*-,..................................
...............,-*llllllllllllllllllllllllllllllllllllllllllllllllllllll.\.................................
.............;*`lllllllllllllllllllllllllll,-~*~-,llllllllllllllllllll\................................
..............\lllllllllllllllllllllllllll/.........\;;;;llllllllllll,-`~-,...........................
...............\lllllllllllllllllllll,-*...........`~-~-,...(.(¯`*,`,..........................
................\llllllllllll,-~*.....................)_-\..*`*;..).........................
.................\,-*`¯,*`)............,-~*`~................/..........................
..................|/.../.../~,......-~*,-~*`;................/.\..........................
................./.../.../.../..,-,..*~,.`*~*................*...\........................
................|.../.../.../.*`...\...........................)....)¯`~,..................
................|./.../..../.......)......,.)`*~-,............/....|..)...`~-,.............
..............././.../...,*`-,.....`-,...*`....,-......\..../...../..|.........¯"`*~-,,,,
...............(..........)`*~-,....`*`.,-~*.,-*......|.../..../.../............\........
................*-,.......`*-,...`~,..".,,,-*..........|.,*...,*...|..............\........
...................*,.........`-,...)-,..............,-*`...,-*....(`-,............\.......
......................f`-,.........`-,/...*-,___,,-~*....,-*......|...`-,..........\.......

None

DP36

Reply To Post Reply & Quote

Posted at: 3/6/08 10:00 PM

DP36 EVIL LEVEL 23

Sign-Up: 03/12/07

Posts: 2,804

ok codes...... this is cool. I never used em so i guess i'll try

hmmm


None

DP36

Reply To Post Reply & Quote

Posted at: 3/6/08 10:12 PM

DP36 EVIL LEVEL 23

Sign-Up: 03/12/07

Posts: 2,804

this.createEmptyMovieClip("center", 0);
center._x = Stage.width/2;
center._y = Stage.height/2;
focalLength = 400;
cube = {};
cube.vertexList = [];
cube.vertexList.push({x:-50, y:-50, z:50}); 
cube.vertexList.push({x:50, y:-50, z:50}); 
cube.vertexList.push({x:50, y:-50, z:-50}); 
cube.vertexList.push({x:-50, y:-50, z:-50}); 
cube.vertexList.push({x:-50, y:50, z:50}); 
cube.vertexList.push({x:50, y:50, z:50}); 
cube.vertexList.push({x:50, y:50, z:-50}); 
cube.vertexList.push({x:-50, y:50, z:-50});
cube.side = [];
cube.side.push([0,1,2,3]);
cube.side.push([2,1,5,6]);
cube.side.push([1,0,4,5]);
cube.side.push([5,4,7,6]);
cube.side.push([0,3,7,4]);
cube.side.push([3,2,6,7]);
render = function(model) {
if (transformMatrix) {
for (var i = 0; i < model.vertexList.length; i++) {
var vert = model.vertexList[i];
var x = transformMatrix.a*vert.x + transformMatrix.b*vert.y + transformMatrix.c*vert.z;
var y = transformMatrix.d*vert.x + transformMatrix.e*vert.y + transformMatrix.f*vert.z;
var z = transformMatrix.g*vert.x + transformMatrix.h*vert.y + transformMatrix.i*vert.z;;
vert.x = x;
vert.y = y;
vert.z = z;
}
delete transformMatrix;
}
center.clear();
center.lineStyle(2, 0, 100);
verts2D = [];
depthArray = [];
for (var i = 0; i < model.side.length; i++) {
var zDepth = 0;
for (var j = 0; j < model.side[i].length; j++) {
var whichVert = model.side[i][j];
if (verts2D[whichVert] == undefined) {
verts2D[whichVert] = {};
var scale = focalLength/(focalLength - model.vertexList[whichVert].z);
verts2D[whichVert].x = model.vertexList[whichVert].x * scale;
verts2D[whichVert].y = model.vertexList[whichVert].y * scale;
}
zDepth += model.vertexList[whichVert].z;
}
depthArray.push([model.side[i], zDepth]);
}
depthArray.sort(function(a,b) { return a[1] > b[1] });
for (var i = 0; i < depthArray.length; i++) {
var sideVerts = depthArray[i][0];
center.moveTo(verts2D[sideVerts[0]].x, verts2D[sideVerts[0]].y);
center.beginFill(0x666666, 100);
for (var j = 1; j < sideVerts.length; j++) {
center.lineTo(verts2D[sideVerts[j]].x, verts2D[sideVerts[j]].y);
}
center.lineTo(verts2D[sideVerts[0]].x, verts2D[sideVerts[0]].y);
center.endFill();
}
}
rotateX = function(model, degree) {
var rad = degree*Math.PI/180;
var sin = Math.sin(rad);
var cos = Math.cos(rad);
var matrix = {a:1, b:0, c:0, d:0, e:cos, f:sin, g:0, h:-sin, i:cos};
transform(matrix, model);
}
rotateY = function(model, degree) {
var rad = degree*Math.PI/180;
var sin = Math.sin(rad);
var cos = Math.cos(rad);
var matrix = {a:cos, b:0, c:-sin, d:0, e:1, f:0, g:sin, h:0, i:cos};
transform(matrix, model);
}
rotateZ = function(model, degree) {
var rad = degree*Math.PI/180;
var sin = Math.sin(rad);
var cos = Math.cos(rad);
var matrix = {a:cos, b:sin, c:0, d:-sin, e:cos, f:0, g:0, h:0, i:1};
transform(matrix, model);
}
scale = function(model, percent) {
var rad = degree*Math.PI/180;
var matrix = {a:percent, b:0, c:0, d:0, e:percent, f:0, g:0, h:0, i:percent};
transform(matrix, model);
}
transform = function(matrix, model) {
if (transformMatrix) {
var a = matrix.a*transformMatrix.a + matrix.b*transformMatrix.d + matrix.c*transformMatrix.g;
var b = matrix.a*transformMatrix.b + matrix.b*transformMatrix.e + matrix.c*transformMatrix.h;
var c = matrix.a*transformMatrix.c + matrix.b*transformMatrix.f + matrix.c*transformMatrix.i;
var d = matrix.d*transformMatrix.a + matrix.e*transformMatrix.d + matrix.f*transformMatrix.g;
var e = matrix.d*transformMatrix.b + matrix.e*transformMatrix.e + matrix.f*transformMatrix.h;
var f = matrix.d*transformMatrix.c + matrix.e*transformMatrix.f + matrix.f*transformMatrix.i;
var g = matrix.g*transformMatrix.a + matrix.h*transformMatrix.d + matrix.i*transformMatrix.g;
var h = matrix.g*transformMatrix.b + matrix.h*transformMatrix.e + matrix.i*transformMatrix.h;
var i = matrix.g*transformMatrix.c + matrix.h*transformMatrix.f + matrix.i*transformMatrix.i;
transformMatrix = {a:a, b:b, c:c, d:d, e:e, f:f, g:g, h:h, i:i};
} else {
transformMatrix = matrix
}
}
center.onEnterFrame = function() {
rotateX(cube, 3);
rotateY(cube, 6);
rotateZ(cube, 10);
render(cube);
};

peh.


None

BoneIdol

Reply To Post Reply & Quote

Posted at: 3/7/08 02:17 AM

BoneIdol NEUTRAL LEVEL 05

Sign-Up: 08/14/06

Posts: 819

Rage of order wins this thread for using brainfuck.

Sufficiently advanced incompetence is indistinguishable from malice.


None

Loccie

Reply To Post Reply & Quote

Posted at: 3/7/08 10:30 AM

Loccie NEUTRAL LEVEL 16

Sign-Up: 02/27/04

Posts: 1,059

Why bump a topic that's 9 months old?


None

Kooblo

Reply To Post Reply & Quote

Posted at: 11/25/08 10:05 AM

Kooblo NEUTRAL LEVEL 01

Sign-Up: 10/22/08

Posts: 36

I dunno.

Am I doing it right? xD

None

Jessii

Reply To Post Reply & Quote

Posted at: 11/25/08 11:43 AM

Jessii DARK LEVEL 36

Sign-Up: 02/10/05

Posts: 9,153

At 11/25/08 10:05 AM, Kooblo wrote: Am I doing it right? xD

Why did you bump this topic after almost 9 months of it not being posted in? And yes you did it right.


None

Relish

Reply To Post Reply & Quote

Posted at: 11/25/08 02:33 PM

Relish NEUTRAL LEVEL 06

Sign-Up: 01/22/08

Posts: 768

Just a quick suggestion, might as well because this got bumped, why not add syntax highlighting?


None

blah569

Reply To Post Reply & Quote

Posted at: 11/26/08 04:02 AM

blah569 DARK LEVEL 21

Sign-Up: 01/18/05

Posts: 2,700

Well, I guess it also depends on the language for syntax highlighting. The user might be able to specify a language, or it could be intelligent enough to determine the language? Possibly:

[code lang="php">

Or maybe even this to disable syntax highlighting: (Not specifying a language)

[code>

Just my opinion.

I kept receiving an error, so I replaced the first < with a [.

PHP: Main | AS3: Main | Get Firefox | Host large files (fast and free)!
"Thank you for learning me English."

BBS Signature

None

cherries

Reply To Post Reply & Quote

Posted at: 11/26/08 04:39 PM

cherries LIGHT LEVEL 18

Sign-Up: 06/07/05

Posts: 4,576

OMIGOD THEY ADDED STYLES TO THE CODE TAG!


None

citricsquid

Reply To Post Reply & Quote

Posted at: 11/26/08 04:45 PM

citricsquid DARK LEVEL 23

Sign-Up: 06/25/05

Posts: 16,031

At 11/26/08 04:39 PM, cherries wrote: OMIGOD THEY ADDED STYLES TO THE CODE TAG!
OH EM GEE

wat


All times are Eastern Standard Time (GMT -5) | Current Time: 10:58 PM

<< Back

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!