Upgrade Guide from PHPRunner 3.0 and older Home

Introduction
Welcome
System requirements
Licensing details
What is the registration
Using PHPRunner
Working with projects
Templates
What are templates
Cars
Classified ads
Events
Jobs
Knowledge base
News
Paypal
Real estate
Sporting
Vacation houses
Connecting to the database
Datasource tables
SQL query page
About SQL query designer
Query Designer
SQL
Results
Charts
Creating chart and setting parameters
Chart appearance
Using SQL to shape chart data
Reports
Creating report and setting parameters
Report totals and layout
Choose pages
Login page
User login settings
Advanced security settings
User group permissions
Fields order and totals
Miscellaneous settings
Choose theme
Visual Editor
About
Toolbars
Page Elements
"View as" settings
"Edit as" settings
Validation types
Lookup wizard
Events
Output directory settings
After you are done
FTP upload
FrontPage Publishing
Advanced topics
Events
More info about events
Global events
Table events
Page life cycle overview
Predefined actions
Send a simple email
Send an email with new data
Save new data in another table
Insert a record into another table
Check to see if a specific record exists
Display a message on the Web page
Redirect to another page
Custom code
Sample events
Show list of customer orders
Check if start date is ealier than end date
Before deleting a record check for related records
Speed up data entry using events
Publishing PHP application to the remote Web server
Using FTP client to publish PHP pages to the remote Web server
Using FrontPage to publish PHP pages to the remote Web server
Demo Account
What is the Demo Account?
Terms and Conditions
Connect using PHP
Master-details relationships
Using JOIN SQL queries
AJAX-based Functionality
PHPRunner session variables
Debugging tips
Template files processing rules (Files.txt)
Multilanguage support
Useful functions and links
Smarty templates
Stylesheets
Template language
How to control Inline Add/Edit functionality from script
Rich Text Editor plugins
Upgrade Guide from PHPRunner 3.0 and older
PDF view settings
Order PHPRunner online

 
  PHPRunner manual


Upgrade Guide from PHPRunner 3.0 and older

 


 1. Overview
 2. Project structure has changed
 3. No hidden fields
 4. There are no arguments in OnLoad events
 5. Events - $values[ ] array data don't contain quotes
 6. Template editor is gone
 7. Custom templates created in older versions
 8. Supertop, superbottom files names are changed
 9. Old URL of search results won't work
 10. Passing master key value to another page
 11. Permissions on templates_c directory

Overview

PHPRunner 3.1 comes with WYSIWYG editor. To enable drag-n-drop editing of generated pages HTML part was separated from the code. Each page now consists of .htm file (visual template) which defines appearance of the page and .php file that provides page functionality.

PHPRunner uses Smarty template engine for this purpose. To get more information about Smarty templates please visit:
http://smarty.php.net

Project structure has changed

Each project in PHPRunner goes to its own directory which contains the following subdirectories:

  1. visual - Contains modified visual templates.

  2. tmp - Temporary storage of visual templates.
  3. output - Directory with output files. Can be changed on Output directory step to point to any other directory.

Default directory for a new project is PHPRunner/projects/project_name. Project file will be saved under project directory as project_name.phpr.

When you open projects created with previous versions of PHPRunner you are prompted to choose project directory. After you select a directory your project file is copied there. Next time open your project from the folder you selected, not from the original location.

If you upload files to the Web server using third party FTP client you need to upload the whole content of the output directory.

When you make a backup of your project you may backup the whole project directory with subdirectories. As a minimum backup the project file itself along with visual directory.

Save Project As option appears. If you want to save current project as other one for development purposes or to create a backup, for example, you should choose Save Project As option. In this case new project directory with project file and all necessary files will be created.

No hidden fields

In new version we recommend to use readonly fields with default values or assign default values via events.

Here is the sample code for Before record added event:

function BeforeAdd(&$values)
{

  // Parameters: // $values - Array object. // Each field on the Add form represented as 'Field name'-'Field value' pair
  $values["Field1"]="default value for Field1";
  $values["UpdatedDate"]=now();
  $values["UpdatedBy"]=$_SESSION["UserID"];


   return true;

  // return true if you like to proceed with adding new record // return false in other case


}

 

There are no arguments in OnLoad events

OnLoad event handlers don't have parameters anymore. The events code is converted automatically when you open old project.

Events - $values[ ] array data don't contain quotes

You don't need to remove quotes when using $values data. However you need to add them when using $values data in your custom SQL commands, i.e. you don't need to remove or add quotes here:

echo $values["FirstName"];
$values["LastName"]="Johnson";

But must add them here:

$strSQL = "select * from users where username='".$values["Username"]."'";

Template editor is gone

In new version there is no template editor anymore. It was replaced by WYSIWYG visual editor.

Custom templates created in older versions

You cannot use custom templates created in older versions of PHPRunner

Supertop, superbottom files names are changed

In PHPRunner 3.1 supertop.php and superbottom.php files are correspondingly named header.php and footer.php

Files still need to reside in include directory.

Old URL of search results won't work

Now to obtain new search URLs you should run search once again and copy URL from browser's address box.

Passing master key value to another page

To obtaining the current master table key value in PHPRunner 3.1 use:

$_SESSION[strTableName & "_masterkey1"]

instead of:

$_SESSION[strTableName & "_masterkey"]

Permissions on templates_c directory

Smarty engine requires templates_c directory in the output directory to be writable by web server user.

 

The CHM file was converted to HTML by chm2web software.