Getting Started
Starting with a new framework is always both a thrill and daunting task. You might feel what you have in front of you is interesting, but how can you get started with the most basics and work with it in its simplest form?

To follow this tutorial, you'll need:
- a working installation of PHPDevShell (I'll assume it's accessible at http://localhost/phpdev/)
- an administrator account (a registration on this installation allowing you to manage plugins)
- a text editor or IDE to code in (we recommend free NetBeans or free Eclipse),
- you must also have access to create folders upload files to your installation.
Now lets pick a name for your plugin. In PHPDevShell, every script belongs to a plugin. This allows you to stay consistent within a structure and have a whole site inside a single plugin folder. Let's say you name your plugin "tutorial" (all lowercase). Create a folder with this name inside the "/phpdev/plugins/" folder, e.g. "/phpdev/plugins/tutorial"
Hello world
Of course our first script will be the classic (yet fancier) hello world application, using only code you are familiar with.
Once you have created the tutorial folder in "phpdev/plugins/", you will be placing your new script (lets call it first.php for now) "first.php" inside it. Open/create your first.php script with your favorite PHP editor and start writing code, lets do the promised hello world:
<?php // Hello world heading. echo "Hello, world!
"; // But don't feel limited. You have access to absolutely all standard PHP functions, even queries: $query = mysql_query('SELECT * FROM pds_core_users WHERE user_id = 1'); // Or use object queries if Models are not going to be used. $query = $db->newQuery('SELECT * FROM pds_core_users WHERE user_id = 1'); // You can build HTML right here. $html = "Some HTML
"; echo $html; ?>
Adding a menu to open your script in your Browser
The most common way of executing a script is to create a menu item. Creating a menu in PHPDevShell makes an item appears in the dashboard which when clicked will run your script. Go to System Management -> Menu Admin -> New Menu -> Fill the fields in as:
Plugin Item: Standard Plugin (leave rest of left column blank).
Name: The display name visible to the user ; let's try "Hello, World!" (note that this name can be different based on the user's language)
Alias: an alternate name, which can be used from the code to refer to the menu whatever the user's language ; let's try "hello-world"
Plugin Name/Folder: the name of the folder our script reside in; we chose "tutorial" earlier
URL or path: this will tell the engine where exactly to find our script file ; it's "first.php"
Leave the rest to their default values and click "Save". Then click on "Dashboard" in the upper menu: our new menu item "Hello, World!" should appear.

First run
OK we're ready! click on the menu icon "Hello, World!" and you should see your nice greeting. Basically any PHP script can be run that way; we call this "legacy mode" because it's way scripts where written before version 3.0.
But anyone can see my script :(
Ah, so you want to quickly protect your secretive Hello World with some magic using the Access Control? That is not a problem, simply add this line at the top of your script:
// Stop people from seeing my highly secretive menu.
(is_object($this->security)) ? $this->security->securityIni() : exit('Access Denied!');
Now remember to give your menu item the right permissions using by going to System Management->Policy Admin->Access Control
