PHP Code tags

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

Moderator: General Moderators

PHP Code tags

Postby JayBird » Fri Jan 11, 2008 4:29 am

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

Syntax: [ Download ] [ Hide ]
Your code here


Like so

Syntax: [ Download ] [ Hide ]
<?php

phpinfo();

?>


This is unitl we get Geshi installed
User avatar
JayBird
Admin
 
Posts: 4522
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK

Re: PHP Code tags

Postby Kieran Huggins » Fri Jan 11, 2008 2:11 pm

I tried that (guessing it would work) for javascript, but it didn't seem to. What languages are currently available?
User avatar
Kieran Huggins
DevNet Master
 
Posts: 3635
Joined: Wed Dec 06, 2006 5:14 pm
Location: Toronto, Canada

Re: PHP Code tags

Postby JayBird » Fri Jan 11, 2008 2:28 pm

just php
User avatar
JayBird
Admin
 
Posts: 4522
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK

Re: PHP Code tags

Postby RobertGonzalez » Fri Jan 11, 2008 2:33 pm

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
RobertGonzalez
Site Administrator
 
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: PHP Code tags

Postby Jonah Bron » Fri Jan 11, 2008 4:17 pm

Ah. Good.
User avatar
Jonah Bron
DevNet Master
 
Posts: 2765
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: PHP Code tags

Postby Chris Corbyn » Sun Jan 13, 2008 4:47 am

Ok guys, the [php ] 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.

NOTE: 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
Chris Corbyn
Breakbeat Nuttzer
 
Posts: 13098
Joined: Wed Mar 24, 2004 8:57 am
Location: Melbourne, Australia

Re: PHP Code tags

Postby Inkyskin » Sun Jan 13, 2008 9:20 am

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
Inkyskin
Forum Contributor
 
Posts: 282
Joined: Mon Nov 19, 2007 11:15 am
Location: UK

Re: PHP Code tags

Postby Kieran Huggins » Sun Jan 13, 2008 9:37 am

looks like the same size as the rest of the text to me - what browser are you using?
User avatar
Kieran Huggins
DevNet Master
 
Posts: 3635
Joined: Wed Dec 06, 2006 5:14 pm
Location: Toronto, Canada

Re: PHP Code tags

Postby VladSun » Sun Jan 13, 2008 9:48 am

FF 2.0.0.11
Attachments
smallf.JPG
smallf.JPG (178.2 KiB) Viewed 16611 times
User avatar
VladSun
DevNet Master
 
Posts: 4294
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: PHP Code tags

Postby Inkyskin » Sun Jan 13, 2008 9:51 am

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.37 KiB) Viewed 16609 times
User avatar
Inkyskin
Forum Contributor
 
Posts: 282
Joined: Mon Nov 19, 2007 11:15 am
Location: UK

Re: PHP Code tags

Postby Benjamin » Sun Jan 13, 2008 10:04 am

Hmm, it doesn't render correctly at all in Firefox on Linux..
User avatar
Benjamin
Site Administrator
 
Posts: 6866
Joined: Sun May 19, 2002 10:24 pm

Re: PHP Code tags

Postby JayBird » Sun Jan 13, 2008 10:49 am

@astions: force a refresh. That will solve it
User avatar
JayBird
Admin
 
Posts: 4522
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK

Re: PHP Code tags

Postby Benjamin » Sun Jan 13, 2008 11:10 am

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
Benjamin
Site Administrator
 
Posts: 6866
Joined: Sun May 19, 2002 10:24 pm

Re: PHP Code tags

Postby RobertGonzalez » Sun Jan 13, 2008 11:14 am

I think we are trying to not show line numbers to make copy/paste cleaner.
User avatar
RobertGonzalez
Site Administrator
 
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: PHP Code tags

Postby Benjamin » Sun Jan 13, 2008 11:15 am

cool, I remember that was annoying.
User avatar
Benjamin
Site Administrator
 
Posts: 6866
Joined: Sun May 19, 2002 10:24 pm

Next

Return to Site News

Who is online

Users browsing this forum: No registered users and 2 guests