PHP Syntax Highlighting


#1

Ok… I missed it and don’t know what happened to it before, but I have just brought it back.

The php syntax highlighting is back.

You can use it as you would the CODE tags accept you change it to PHP

the [ CODE ] Tags would give you this

[code]<?php

class LogVisitor
{

  // set up the public vars
  public $ipAddress;
  public $userAgent;
  public $timesVisited;

  // Database Vars
  protected $dbserv = 'localhost';
  protected $dbuser = 'root';
  protected $dbpass = NULL;
  protected $dbbase = 'log';

  function LogVisitor()
  {

[/code]
Where the [ PHP ] Tags give you this
[php]<?php

class LogVisitor
{

  // set up the public vars
  public $ipAddress;
  public $userAgent;
  public $timesVisited;

  // Database Vars
  protected $dbserv = 'localhost';
  protected $dbuser = 'root';
  protected $dbpass = NULL;
  protected $dbbase = 'log';

  function LogVisitor()
  {

[/php]

Use and Enjoy…


#2

i havn’t yet found out when the php-syntax highliting is eating or adding the php tags:

<html><?php echo 'Hello World'; ?></html>

[php]<?php echo 'Hello World'; ?>[/php]

<?php echo 'start'; ?><html><?php echo 'Hello World'; ?></html><?php echo 'end'; ?>

[php]<?php echo 'start'; ?><?php echo 'Hello World'; ?><?php echo 'end'; ?>[/php]

<?php echo 'start'; ?><html><?php echo 'Hello World'; ?></html>

[php]<?php echo 'start'; ?><?php echo 'Hello World'; ?>[/php]

echo 'start'; ?><html><?php echo 'Hello World'; ?></html><?php echo 'end';

[php]echo ‘start’; ?><?php echo 'Hello World'; ?><?php echo ‘end’;[/php]

echo 'Hello World

[php]echo 'Hello World[/php]
(i know there is an synax-error in there)

Does anybody else know? Why and when?


#3

Currently with the recent Upgrade (??) to the PHPBB Software to version 3.x, The Mod for PHP Syntax Highlighting is disabled. Thus you should stick to using “CODE” instead of PHP (in the phpBB code formatting)

I will make another post when it’s re-enabled.