Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: homer09001 on October 20, 2009, 08:39:32 AM

Title: Better PHP
Post by: homer09001 on October 20, 2009, 08:39:32 AM
SMF Better PHP

Current Version V1.0


SMF Better PHP is a small mod designed for SMF Forums, that improved on the standard formatting of PHP code within PHP BBC tags, the standard formatting applied by SMF 2.0 leaves the php code looking like coloured text with no seperation from the main post.

SMF Better PHP improves this by enclosing the php code in a Quote Style box and making the text bold to stand out better.

Standard PHP Highlighting:

<?
//Comment for Hello World
echo "Hello World";
?>


With "Better PHP"
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimages.dth-scripts.com%2FScript_Images%2Fphpafter.jpg&hash=eee7b5131af617f1e6bae9682a14d518a112e056)

Planned Features for V1.1.
Title: Re: Better PHP
Post by: grafitus on October 20, 2009, 11:09:27 AM
Good mod. Congratulations.
Title: Re: Better PHP
Post by: ɔɔɔɔɔɔuɥoɾ on October 20, 2009, 11:40:20 AM
hmmm, Nice idea.

but when you use php code in a standard code box you will get the same result

<?phpecho ($some['code'], ' here);?>
Title: Re: Better PHP
Post by: homer09001 on October 20, 2009, 11:44:37 AM
Quote from: ♪ JohnCcCcCc ♫ on October 20, 2009, 11:40:20 AM
hmmm, Nice idea.

but when you use php code in a standard code box you will get the same result

<?phpecho ($some['code'], ' here);?>


yes but that means typing 2 seperate lots of tags, this allows the lot to be done throught 1 set of tags.
Title: Re: Better PHP
Post by: ɔɔɔɔɔɔuɥoɾ on October 20, 2009, 11:50:15 AM
I only added code tags ??? to that though

If your talking about <?php and ?>
I suppose this will save a lot of time getting partial PHP code :)
Title: Re: Better PHP
Post by: homer09001 on October 20, 2009, 11:52:03 AM
at the end of they day its down to personal preferance, not everyone knows that Code will highlight PHP plus for Code to highlight php it must containg the open and close tags.
Title: Re: Better PHP
Post by: ɔɔɔɔɔɔuɥoɾ on October 20, 2009, 11:54:14 AM
Well nice addition, nice mod

Congratulations on your 1st mod, keep up the modding :D
Title: Re: Better PHP
Post by: ოկtђ on October 20, 2009, 11:57:14 AM
Nice idea ;)
Title: Re: Better PHP
Post by: Hiver101 on November 04, 2009, 09:10:38 AM
From what css file can I find the phpcode class?
Title: Re: Better PHP
Post by: Darthx on November 13, 2009, 08:52:58 PM
Quote from: Hiver101 on November 04, 2009, 09:10:38 AM
From what css file can I find the phpcode class?

I didnt look at the code but i presume that he is using this php function:
http://www.php.net/manual/en/function.highlight-string.php

Rewards
Title: Re: Better PHP
Post by: SAFAD on May 31, 2010, 06:53:47 AM
not updated ?
may i take over this mod .?
Title: Re: Better PHP
Post by: homer09001 on May 31, 2010, 07:56:04 AM
Feel free, i would update it but i don't have the time.