Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Add PHP syntax highlighting to Project Builder Apps
For those of you who want to use PHP with Project Builder, I've created a small installer (20K download) to do just that.

Features:
  • Syntax highlighting
  • File template
To do:
  • Syntax checker
  • Debugger
This has been tested with 2002 December Developer Tools package.

[Editor's note: I downloaded the installer and took a look through the files to be installed. There's nothing malicious here that I could see; just template files for Project Builder (but I always look before installing something that requires my admin password). After installation, I viewed some nicely colored PHP files in the Project Builder interface.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[12,732 views]  

Add PHP syntax highlighting to Project Builder | 18 comments | Create New Account
Click here to return to the 'Add PHP syntax highlighting to Project Builder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
No highlighting for me :(
Authored by: thaddeus on Jan 02, '03 06:46:58PM

I ran the installer, created a project for something I've been working on, dragged .php files, and there's no pretty highlighting. What did I do wrong?



[ Reply to This | # ]
No highlighting for me :(
Authored by: nutbits on Jan 02, '03 07:31:00PM

Try going to the syntax coloring preferences and choosing snazzier colors. The default colors are pretty dark and look like black on my monitor.



[ Reply to This | # ]
No highlighting for me :(
Authored by: thaddeus on Jan 03, '03 04:40:27PM

Grrr. Still no highlighting. Oh well back to vi.



[ Reply to This | # ]
No highlighting for me :(
Authored by: benoitc on Jan 11, '03 04:43:07AM

Did you installed last decemberer release of developer tools ?



[ Reply to This | # ]
Share the API :) ?
Authored by: dot_ike on Jan 06, '03 12:31:41AM

Hey there,

I'd love to create an open package to do syntax highting with Flash Actionscript- can the author of the app PLEASE post the source code?

Thanks for the great mod!



[ Reply to This | # ]
Share the API :) ?
Authored by: chew_wei on Jan 06, '03 09:18:13PM

A collection of useful links to add any language to Project Builder:

http://radio.weblogs.com/0100490/2002/12/20.html#a362

http://www.knaub.info/projekte/projekte.php

http://www.tesugen.com/2002/12/20.html#rubylangspec

Unpack the files and look at the pblang modules and you'll see how to create your own.



[ Reply to This | # ]
Share the API :) ?
Authored by: benoitc on Jan 11, '03 04:40:37AM

Go to phppbx.sourceforge.net and get the source now :)



[ Reply to This | # ]
line Numbers
Authored by: p4t on Jan 30, '03 11:25:05AM

This is excellent, all i need now is to figure out how to display line numbers (and the gutter for that matter) with PHP files. Anyone know how to do that? or is it a function of the debugger?

cheers

Pat....



[ Reply to This | # ]
line Numbers
Authored by: koncept on Jan 30, '03 07:19:13PM
BBEdit 7 tops everything.

=)

[ Reply to This | # ]
line Numbers
Authored by: p4t on Feb 03, '03 08:07:30AM

yea i like bbedit but.... what i really like is the file
browser aspect, ie i can add my working directory then
browse through the files instead of having to file>open
for each new file.

I love the way project builder implements this but
unfortunatly i'm lost without line numbers :( they appear
for my c files but not my php ones, i can't seem to
figure it out!

bbedit does not have this functionaly afaik, hopefully
someone can tell me otherwise.

i am currrently using jedit [www.jedit.org] which provides
all the features i need, is infinatly customizable and has
some nifty plugins although its a bit sluggish on my G3 :(
(unlike power builder which seems quite snappy)

cheers

Pat....



[ Reply to This | # ]
New Editor Desperately Needed
Authored by: shucks on Feb 03, '03 08:23:58AM

Currently I'm working on an editor that just about do all that you needed.
I personally am using Emacs right now but need something that has:
1. Native Cocoa
2. Line numbers
3. PB like file groups
4. Syntax highlighting for multiple languages
5. Code completion
I needed all those in one package and so far is either not there. I find JEdit abit on the slow side too. Tell me if you want to add to any of the above list. I can also put you on a beta program for the new editor which I will be calling YaPee (Yet Another Programmer's Editor Extended)



[ Reply to This | # ]
New Editor Desperately Needed
Authored by: p4t on Feb 05, '03 07:06:24AM

yea i like the sound of that, some of the things i would like /i use in jedit /which i find usefull or use a lot, listed in no particular order:

CVS support
Split Views
FTP (or better, SSH) client
XLT,XSLT parser
Tabbed file listing
i also use the IRC plugin in jedit but i guess thats not essential!!

i would be quite happy to help you with beta testing

cheers

Pat.....



[ Reply to This | # ]
line Numbers FIX
Authored by: Trevor Simmons on Mar 02, '03 08:02:47AM

What you need to do (providing you've installed the PHP syntax
colouring) is go to the /Developer/ProjectBuilder Extras/Specifications
directory and edit PHP.pbfilespec to say:

Identifier = "sourcecode.c.php";
BasedOn = "sourcecode.c";

And edit PHP.pblangspec to say:

BasedOn = "sourcecode.c";

Then restart Project Builder.

What this does in tell Project Builder that PHP is sourcecode and a
variation of C (which automatically gets the gutter and line numbers).
Previously it opened PHP files as empty files w/out the gutter.

I really wish Apple would document this stuff...

Trevor.



[ Reply to This | # ]
line Numbers FIX
Authored by: albertlash on Mar 19, '03 10:14:45AM

I've completed the instructions, but I'm wondering, are the line number supposed to be listed down the side of the file (is that the "gutter")?

This is the only thing I miss in PB. I can't imagine how people could live without it, or why apple would ever not have it implemented for ALL files.

Another question: how can I open .as files, .css files, and .htaccess files?



[ Reply to This | # ]
line Numbers FIX
Authored by: Brian Kendig on Apr 04, '03 11:16:43AM

I think all that's needed, if you want a gutter for line numbers, are those two lines changed in PHP.pbfilespec. When I change that one line in PHP.pblangspec, I lose a whole lot of hilighting.



[ Reply to This | # ]
New URL
Authored by: dustox on May 19, '03 01:23:06AM
Unfortunately, the link to the PHP syntax module is broken.

It took me a little while, but I found a working module at www.knaub.info. You can download it directly here (16k download). If you have any other links please post them in the comments.

[ Reply to This | # ]
Add PHP syntax highlighting to Project Builder
Authored by: samsm on Jun 03, '03 01:44:10PM

I was looking to find out an updated link after finding all the links posted here to be dead.

Just now, I found the project at sourceforge...not at phppbx.sourceforge.net but at:

http://sourceforge.net/projects/phppbx/

Hope that helps someone.



[ Reply to This | # ]
Add PHP syntax highlighting to Project Builder
Authored by: Brian Kendig on Dec 07, '03 09:12:42AM

That project hasn't had any updates for a long time, and I can't find any way to get it to work with Xcode. Anyone have any ideas on how to get Xcode to use it?



[ Reply to This | # ]