DPHPEdit User Documentation

2003/01/24 - v 1.03

Although reading usage instructions can be boring and unnecessary for advanced and experienced developers, it is still recommended because this file is quite short and understandable and it can point to some things you could have not discovered while just testing DPHPEdit. Please read this "manual" to the end, if possible. :)

Table of Contents:


About DPHPEdit - Davor's PHP Editor

DPHPEdit - What is that?


"DPHPEdit" or - very selfishly called - "Davor's PHP Editor" is an IDE (Integrated Development Environment) for PHP programming language. That means, it can be used to create, edit and manage applications and scripts programmed in PHP and has an integrated editor (with syntax highlighting for PHP, HTML, JavaScript and CSS), project manager, file browser and internal (Internet Explorer compatible) web page previewer.

Initially developed as quick'n'dirty editor for fast script editing and author's own needs, DPHPEdit has in no time become a powerful programmer's tool, thanks in the first place to large team of devoted users world-wide.

OK, what can DPHPEdit do?


Using DPHPEdit, like with many other IDEs, you can:
Some features that make DPHPEdit different from similar tools and IDEs are: DPHPEdit can not (yet): These features, like many others, are planned for future development.
DPHPEdit will remain in constant phase of development and improvement as long as users have enough imagination to request additional features.

What do I need to run DPHPEdit?


You need (for existing version): DPHPEdit will of course run without last three things, but then project and files can not be previewed from it's IDE. You can use any alternative web browser if you are not going to use integrated web page previewer.

How much does it cost?


So far - Nothing. It is free. You can go and download it from here.

DPHPEdit is basically FREE. However, its author (me) could spend more time improving it and adding more features if helped by small donation from users. So, to help DPHPEdit grow, please send me
You can send your donation to next address:

Davor Pleskina
Mavriæi 91c
HR-51213 JURDANI
CROATIA (Hrvatska)

Thank you! :)

A Must-Be Disclaimer


OK, I know that this usually makes many potential users angry, but in this "Unstable-OS"-driven world, it simply needs to be written.

Although each version of DPHPEdit is extensively tested by it's author and many users worldwide, the author can not take responsibility for any local damages or data losses which may accidentaly appear on user's computer/filesystem for unknown reasons during usage of DPHPEdit.

DPHPEdit was written using Borland's Delphi extended with some additional commercial and freeware (OpenSource) components and it relies on many (Windows) system functions and modules like Internet Explorer API. Therefore, any such system module that is (unfortunately) beyond single programmer's control could cause errors which can bring the system down and damage user data. Although it has never happened to me (and I have never received any user complaints about such cases), please don't blame me if exactly you become the lucky one.


Setting Up

Installation


There is no (yet) special installation routine for installing DPHPEdit, because it requires only two (one) files to function properly.

To install DPHPEdit, simply place EXE file (DPHPEdit.exe), and DAT files (php*.dat) in any suitable directory of your hard drive. To make this help file (dphpman.html) accessible from IDE, place it in the same folder. Then, create any desired shortcuts and icons to access it quickly and comfortably.

As soon as you start it for the first time, DPHPEdit will create two working files, DPHPEdit.INI and DPHPEdit.HIS. If related option is set, it will create backups of any files changed in editor and store them in the same folder as original file.

DPHPEdit will automatically use system registry key "HKEY_CURRENT_USER/Software/DPHPEdit" to store some common settings.

Setting System Options


System Options should be distinguished from Project Properties. Although in relation to the last one, System Options are common options which shape global DPHPEdit behaviour. Individual project options (like path and URL) must be set under Project Properties. To access System Options at any time, use main menu "Tools/Options".

System Options are divided in three sections: "General", "Editor", "PHP Special" and "PHP/HTML Syntax Coloring". Changes to System Options become valid as soon as you close the dialogue pressing "OK" button. Press Cancel button to avoid unwanted changes to system options.

Choosing IDE Language


DPHPEdit is available in four languages from version 1.03: English, Croatian, French and German.
To change IDE language, click "Tools/Language" and choose wanted language. Selected language remains active until changed again.


Handling Projects and Files

Creating a New Project


To create a new project in DHPHEdit, simply click "File", then "New Project" or similar button on program's toolbar. "Project Options" dialogue will be displayed immediately, and default project name will be assigned. After a project has been created, you should first set it's properties.

Active project's name is displayed in application's window title (together with information if project has been recently changed), and above project tree (upper left panel), where contained files are listed. A new project does not contain any files in project tree.

After creation, you should save your new project using Save command ("File/Save"). You can use any filename allowed by your OS file system, but file extension must be DPHP. Project can later be saved under some other file name using "Save Project As" function.

To save project after some change (adding/removing files, changing properties), click on project name in project tree, then use "Save" command or press "Save" button. Saving project does not automatically save all changed files. To save all files and project file at once, use "File/Save All" command.

Changing Project Properties


You can access "Project Properties" dialogue by selecting "File/Project Properties" in main menu, or clicking the button above project tree. You can then enter following information:

Opening Existing Project


To open existing project, use main menu's "File/Open Project", or similar toolbar button. You will be asked to save any changed files in eventualy changed active project. Choose project's physical file name (*.dphp) in "Open Project" dialogue and click "Open". Project will be loaded and project files filled into project tree. If you try to open non-dphp or invalid project file, error message will be displayed.

Following that DPHPEdit accepts file name as a parameter, you can also open project by double clicking it's file name if *.DPHP file type has been associated with DPHPEdit. Associating file types is dependable on operating sytem under which DPHPEdit is being used.

A project can also be opened via File Browser (downer left panel) - simply double click file name (for example "myproject.dphp") in File Browser.

It is allowed to drag project file from Windows Explorer or similar program and drop it to DPHPEdit window.

Recently used projects can be opened using "File/Reopen" menu command. Any once opened project will appear in that submenu for possible reopening.

Closing Project - Using "Save Files" Dialogue


There is no real need to close a project, as active project is closed when you close DPHPEdit or before opening another project. However, if you want to close active project while leaving DPHPEdit running, you can do that using "File/Close Project" command.

Closing project brings up "Save Changed Files" dialogue, which displays a list of all changed files, including project file. File name and path are displayed for each file in the project. A mark beside file name tells DPHPEdit whether to save changes or not for each file. Check out files you do not want to save, and contrary. You can check/uncheck all files using "All" and "None" buttons. Press "OK" to save checked files or "Cancel" to cancel your opening/exiting operation.

Project file will appear as changed each time you change something in "Project Properties", or you add/remove files in project tree.

Adding/Removing File(s) to/from Project


You can either add existing files or create new files inside your project.

To add existing file(s): To create a new file, use "File/New" menu. Then, to create PHP, HTML or JavaScript file, use appropriate submenu options. To create undefined file (file type will be determined when you save the file), use "Undefined" option. You can quickly create new files using toolbar buttons.

To remove file(s) from your project, simply click it in project tree and use "File/Remove File from Project" or similar button above project tree. You will be asked to save the file if it has been changed.

Arranging Files in Project


As you add a file to the project, it will be placed at the end of file list. However, to arrange files in the list you can move them up and down using appropriate buttons in Project Manager pane.

Saving Changes


To save changes done to particular file (or a project itself), click it's name in project tree and then "File/Save" or "Save" button on toolbar. If the file has not yet been saved (if it is new), "Save File" dialogue appears.

It is possible to choose file format before saving the file. DPHPEdit supports both Windows (CR/LF) and Unix/Linux (LF, LF/CR) line breaks from version 1.03. To set file format for file in the project, use "File/Format" from main menu.

Names of changed files are displayed bold in project tree.

To save all changed files (including project file), use "File/Save All" command.

DPHPEdit will create backups of saved files if so ordered in "Options"; files are copied and their extension added an '~' sign. In case of failure of any kind, these files can be used to recover version of file before last save.

Printing a File


To print active editor file, use "File/Print" or "Print" button on editor toolbar.

In print dialogue which appears you can:
- set up the printer
- choose to print a selection
- choose text wrapping options
- decide whether to print in colors or not
- set up margins

Running (Previewing) Project


To run (preview) a project, press "Run/Run" in main menu, or "lightning" button on the toolbar, or press F9 key. Program will start a browser specified in System Options and start project site based either on project URL or project path. Default document (index.*) will be loaded unless something else is specified in project URL and left "As-Is".

While previewing in integrated previewer, last accessed URL is displayed in address bar.

See Setting System Options for details on setting up project preview options.

Before starting project preview (Run), DPHPEdit will attempt to save all changed and unsaved files.

Previewing Project Files


To preview a single project file, first click the file in project tree, then choose "Run/Preview Current File" in main menu, or press similar button on the toolbar, or press Ctrl+F9. Pressing Ctrl+F9 while editing file previews that file automatically. The file will be saved before preview. Preview happens in browser which is specified in System Options. See Setting System Options for details on setting up single file preview options.

While previewing in integrated previewer, last accessed URL is displayed in address bar.

You can not preview PHP scripts if they are not accessed through Local Web Server URL!


Using Editor

Special Keyboard Shortcuts


OperationKey Combination
UndoAlt+BackSpace
RedoShift+Alt+BackSpace
CopyCtrl+C
CutCtrl+X
PasteCtrl+V
Delete Last WordCtrl+BackSpace
Select AllCtrl+A
Block IndentShift+Ctrl+I
Block UnindentShift+Ctrl+U
Delete WordCtrl+T
Delete LineCtrl+Y
Delete to End of LineShift+Ctrl+Y
Match BracketShift+Ctrl+B
Go to Line NumberCtrl+G
Normal SelectShift+Ctrl+N
Line SelectShift+Ctrl+L
Column SelectShift+Ctrl+C
Change Word to UpperCaseCtrl+Alt+U
Change Word to LowerCaseCtrl+Alt+L
Toggle CaseCtrl+Alt+T
Save FileCtrl+S
Insert PHP Variable
(if enabled in Options)
Ctrl+P
Invoke Code ExplorerCtrl+E
Invoke Completion ProposalCtrl+Space
Invoke AutocompleteShift+Space
Preview Active FileCtrl+F9
Run ProjectF9

Choosing Syntax Highlighting Method


Although appropriate syntax highlighting method is choosen for currently edited file according to it's type, you can change it manually from drop-down list in editor toolbar.

For more information on syntax highlihting options, see System Options.

Inserting Variables, Functions and Classes


To insert variable, function or class while editing PHP script, click the editor with right mouse button (or editor toolbar "Insert" button), select "Insert" and then "Variable", "Function", or "Class" to insert any of these into source code.

Handling PHP Variables


If a specific option is set in System Options, if you press '$' key while editing PHP file, a "PHP Variables" dialogue will appear displaying all variables found in edited file. In this dialogue you can type in variable name (without '$') or select it in a list and press "Insert" to insert it into edited file.

This option is useful to save time needed for writing long variable names. It also treats class properties and methods properly.

Locating Functions and Classes in Current File


To locate a function or class definition while editing PHP script, click the editor with right mouse button (or editor toolbar "Functions" or "Classes" buttons), select "Functions" or "Classes"; in a list, double-click function or class to locate in source code.

Using Code Explorer


Code Explorer is a powerful tool which reads all your project files and finds PHP variables (must start with '$' sign, can be class properties and methods), functions and classes in JavaScript and PHP sections.

Each file is shown with a list of items found; expanding function (or either) item displays source code lines where it appears. Double-click source line to go directly to source code line where it appears.

To start Code Explorer, click "View/Code Explorer" in main menu, or click a button above project tree, or press Ctrl+E. Also accessible via editor popup-menu (right mouse button).


/EOF/ (Copyright (c) 2002 by Davor Pleskina)