Friends

Rate

  

Parmaja.com

Forums for programming, Open source and free software.

You are not logged in.

  • Index
  •  » Projects
  •  » PHP Multi Syntax Highlighter CODE tags for PunBB

#1 2004-07-14 16:05:57

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

PHP Multi Syntax Highlighter CODE tags for PunBB

php Multi Syntax Highlighter will "beautify" PHP, Pascal, Delphi and
Applescript source code. It is not implemented like other beautifiers, as it
does not use pcre function or ereg functions , and allows  syntax code continually
line by line to reduce memory usage.  For example, to change highlight
colors, open "colors.php" and edit $this->settings array. You can also change
the font in function "highlight_code".

You can write your favorite code syntax, however keep in mind not use long
string variables to prevent large memory usage or crashing.  If you wish,
send me list of Keywords and string rules with samples and email them to me.
I will make a new class to support your favorite language and send add them
to the package.

download from
http://www.parmaja.com/downloads/phpMultiSyn-1.0.0.zip

http://www.punres.org/viewtopic.php?id=32

there is a parser.php.punbb
change name to  parser.php and put it in forum/include

Offline

 

#2 2004-07-14 16:06:17

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

Code: pascal

program cgi_test;

uses
    WinCrt,SysUtils;//I use freepascal
{
#i am not expert with Apache :-(
#add to apache server config file httpd.conf  this line

AddHandler cgi-script cgi exe,
}

begin
  //send header to the browser
  WriteLn('Content-Type: text/html');

  WriteLn('');//end of header
  
  //send html
  WriteLn('<html>');
  WriteLn('<body>');
  WriteLn('<h5>Hello World From Pascal</h><br>');
  //WriteLn(IntToStr(ParamCount));
  WriteLn('</body>');
  WriteLn('</html>');
end.

Offline

 

#3 2004-07-14 16:06:43

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

this a test for
Firebird SQL 1.5

Code: firebird

create or alter procedure "procLogin"
(
  "UserName" varchar(60),
  "UserPassword" varchar(60),
  "UserSite" integer,
  "UserIsOccult" integer
)
returns
(
  "SessionID" integer,
  "User" integer
)
as
declare variable "UserAccount" integer;
-- variable of user
begin
/* select a user from
   users table */
    select "UsrID" from "Users"
    where "UsrName"=:"UserName" and
          "UsrPassword"=:"UserPassword"
    into :"User";
    if ("User" is not null) then
    begin
      "SessionID"=CURRENT_CONNECTION;
      insert into "Sessions" ("SessionID","SessionUser","SessionSite","SessionIsOccult")
          values(:"SessionID",:"User",:"UserSite",:"UserIsOccult");
    end
  suspend;
end


It is good for me

Offline

 

#4 2004-07-14 16:29:30

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

applescript
using

[ code = applescript]
[ / code]   *** remove the spaces***

Code: applescript

tell application "Finder"
  activate
  select file "AppleScript.url"
  set position of selection to {656,277 }
  set position of selection to {700,282 }
  select file "terms.pdf"
-- comment line 
  set position of selection to {723,192 }
(*
  this is a 
    comment
*)
end tell

Offline

 

#5 2004-07-14 17:13:36

raybo
New member
Registered: 2004-07-14
Posts: 6

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

Code: applescript

tell application "Finder"
  activate
  select file "AppleScript.url"
  set position of selection to {675, 244}
  set position of selection to {688, 275}
  select file "terms.pdf"
  set position of selection to {727, 223}
  select file "Script2CSS.sit"
  set position of selection to {778, 197}
end tell

property propertyName : "property value"

Offline

 

#6 2004-07-15 17:32:27

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

New release done, Check out.

Offline

 

#7 2004-07-15 17:34:22

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

Code: mssql

-- Back up the currently active transaction log.
BACKUP LOG MyNwind
TO MyNwind_log2
WITH NO_TRUNCATE
GO
-- Restore the database backup.
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH NORECOVERY
GO

Offline

 

#8 2004-07-15 18:43:24

raybo
New member
Registered: 2004-07-14
Posts: 6

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

very kewl  :>)

Code: applescript

tell application "Finder"
  activate
  select file "AppleScript.url"
  set position of selection to {675, 244}
  set position of selection to {688, 275}
  select file "terms.pdf"
  set position of selection to {727, 223}
  select file "Script2CSS.sit"
  set position of selection to {778, 197}
end tell

property propertyName : "property value"

Offline

 

#9 2004-07-17 17:08:24

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

Some bug fixed and new changes.

Offline

 

#10 2004-07-21 03:18:22

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

Finxing  Bug
Keyword started with 'A' not Highlighted.

Support vbnet

Offline

 

#11 2004-07-28 16:10:48

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

This a test for php code,
try to post a code of php because i am not professional with its syntax

Code: php

<?php

$db_type = 'mysql';
$db_host = 'localhost';
$db_name = 'parmaja_com';
$db_username = 'zaherdirkey';
$db_password = 'diputstonmai';
$db_prefix = 'punbb_';
$p_connect = true;

$cookie_name = 'punbb_cookie';
$cookie_domain = '';
$cookie_path = '/';
$cookie_secure =0 ;

if (!isset($language))
  $language = 'en';

//header('Content-Type: text/html; charset=windows-1256');
header('Content-Type: text/html; charset=windows-1256');

$pun_url='http://www.parmaja.com/forum';

/* define('PUN',1 );
if (getenv('SITE')=='LOCAL')
{
        define('PUN_DEBUG',1);
}
*/

$s='select * from forums
where forum not found';

?>

Offline

 

#12 2004-07-28 16:42:14

raybo
New member
Registered: 2004-07-14
Posts: 6

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

Code: php

<?php 
/* Fill out the script as described */
$to = "you@yourdomain.com";
$subject = "News Update";
$message = '
<html>
<head>
<title>The title of your e-mail text area goes here</title>
</head>
<body>
<p>The wording of your text area, telling you where it is from goes here</p>
<a href=http://macscripter.net/aggregator/gator.php>View Page email Was Sent From</a>
</body>
</html>
';

/* Only change the From: to show who the email is from */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: you@ourdomain.com.net\r\n";

mail($to, $subject, $message, $headers) or print "could not send mail";
?>

Last edited by raybo (2004-07-28 16:42:40)

Offline

 

#13 2004-07-28 17:01:49

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

Code: php

  print "\"test\"";

Offline

 

#14 2005-02-03 12:38:02

Zaher
Administrator
From: syria
Registered: 2004-03-19
Posts: 220

Re: PHP Multi Syntax Highlighter CODE tags for PunBB

New version compatible with XHTML ,fix some bugs, integrating with PunBB 1.2. in this topic
http://www.parmaja.com/forums/viewtopic … d=120#p120

Offline

 
  • Index
  •  » Projects
  •  » PHP Multi Syntax Highlighter CODE tags for PunBB

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

[ Generated in 0.039 seconds, 7 queries executed ]