PHP Code tags

Where we keep all the boring tidbits about the PHPDN site, the news, and what not.

Moderator: General Moderators

User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

PHP Code tags

Post by JayBird »

Just so you know, if you need to post any PHP code you can use:

Code: Select all

Your code here
Like so

Code: Select all

<?php

phpinfo();

?>
This is unitl we get Geshi installed
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: PHP Code tags

Post by Kieran Huggins »

I tried that (guessing it would work) for javascript, but it didn't seem to. What languages are currently available?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Re: PHP Code tags

Post by JayBird »

just php
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: PHP Code tags

Post by RobertGonzalez »

The PHP code tag was added with phpBB3 in the core bbCode parser. That was the only change to the code tag I believe.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: PHP Code tags

Post by Jonah Bron »

Ah. Good.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: PHP Code tags

Post by Chris Corbyn »

Ok guys, the

Code: Select all

 tags and [syntax ] etc are now back.  Old posts will still look broken until they are editted and re-submitted due to the way the MOD works but they'll soon disappear into the graveyard of posts and we can edit any that are currently active.

On a side note if you try and do just [javascript ] [/ javascript], [cpp ] [/cpp ] etc it will pretty much work.

[b]NOTE:[/b]  Your browser may have cached CSS.  Do a SHIFT + Refresh if things look messed up.

PS: We know that the links above the code don't work right now...
User avatar
Inkyskin
Forum Contributor
Posts: 282
Joined: Mon Nov 19, 2007 10:15 am
Location: UK

Re: PHP Code tags

Post by Inkyskin »

The font used in the code boxes is quite small, would it be possible to enlarge it slightly? (Or am I just losing my eyesight? lol)
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: PHP Code tags

Post by Kieran Huggins »

looks like the same size as the rest of the text to me - what browser are you using?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: PHP Code tags

Post by VladSun »

FF 2.0.0.11
Attachments
smallf.JPG
smallf.JPG (178.19 KiB) Viewed 59596 times
User avatar
Inkyskin
Forum Contributor
Posts: 282
Joined: Mon Nov 19, 2007 10:15 am
Location: UK

Re: PHP Code tags

Post by Inkyskin »

FF 2.0.0.11

Check in this thread to what I mean:

viewtopic.php?f=1&t=77459
Attachments
ss.jpg
ss.jpg (215.36 KiB) Viewed 59596 times
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PHP Code tags

Post by Benjamin »

Hmm, it doesn't render correctly at all in Firefox on Linux..
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Re: PHP Code tags

Post by JayBird »

@astions: force a refresh. That will solve it
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PHP Code tags

Post by Benjamin »

That did the trick. Line numbers aren't showing up for me. Not sure if they are supposed to or not. No biggie.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: PHP Code tags

Post by RobertGonzalez »

I think we are trying to not show line numbers to make copy/paste cleaner.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PHP Code tags

Post by Benjamin »

cool, I remember that was annoying.
Post Reply