Object oriented Smart Templates Engine
Smart Template Engine
Installation / Tips Database Engine Interface Smart Parser Engine
Step by step installation
Database (DE) mode FAQ
Templates (TE) mode FAQ
Examples
Tips
Admin interface
Actions Editor
Jump Editor
Mailing Editor
Key Fields
Syntax
How to use TE
How to use DE

(*) DE - Database Engine
(*) TE - Template Engine
          Step by step installation

    Installation

Unzip "SmartParser" package into any directory you wish under your /public_html/ (www) catalog (must to be accessible by the web server). For example, unzip it into /sp/ directory. That's it.


     To work with Database Engine (DE)

Visit a directory where you unpacked Smart Parser files ie http://yourdomain.com/sp/
Choose the file to parse ( click on the "File to parse" button). File name will appears in "Parsed file" input field.
Hit "Start Parsing".

Ask yourself   top
Check if form fields have meaningful names and right "size" value
Decide what do you want to do with user entered form data, i.e.

  • Do you need to configure rules for your input fields? Which fields and what rules?
  • Do you need client side errors checking (Javascript)?
  • Do you need server side errors checking?
  • Do you need the confirmation page?
  • Do you need to mail form's data? Which addresses, subject, fields?
  • Will you redirect a user to another page when the form will have been submited?
    What are jump terms?
  • Do you need to put form's data into the MySQL table? What are your access settings (database host, mysql database name, login (user), password)? What table name will be? Is there key and additional fields?

Turn your answers into motion   top
If you answered "yes"

  • Set fields rules (required, alpha, numeric, min, max, email)
  • Set "Client side checking" checkbox
  • Set "Server side checking" checkbox
  • Set "Confirmation page" checkbox
  • Press "Add" button in "Mail to after submit" group for each address you want to send an email. configure Mailing Editor fields as described in User Guide - Mailing Editor
  • Press "Add" button in "Go to after submit" group for each page you want to send an user. Fill Jump Editor fields as described in User Guide - Jump Editor
  • If not exist - create a database if need to store submited values. Fill "Host", "DB Name","DB User", "Password", "Table" in "MySQL" group, set "Do MySQL" checkbox. Set right Type and Size for all form's fields (change it if you do not like values that our script sets).

    To setup key fields - press "Edit Key fields"button to run "Key Fields" editor. For more info please read Key Fields manual.

    Check "Log remote IP" and "Log post time" if you need to store clients IP and a time of database record's change/update.

    Press "Refresh fields" button to update a query to create a table. Press "Create table" button.

Choose Inside, SP or CGI  top
In common cases it is recommended to work through Include or SP mode. User will not see system scripts at a browser's address. There are some advantages to work in that mode. For instance, you can fill the form by values for future editing in SP mode only.
If you use only SP.DE - check "INCLUDE() model" checkbox.
If you use SP.TE language in your file - check "SP model" checkbox.

SP.DE can also works with forms in CGI mode - through an action directive
(form name='test' action='/sp/fcss.php'). In this case client will be redirected to fcss.php after submitting the form.
It is not good at all.

Check result  top
Press "Get result" button, check error messages and parsing modes in result output. For instance, if you set MySQL work, there needs to be message about - "There are MySQL jobs"
If everything is Ok - press "Receive html" and "Receive variables" buttons on a result page to get new form's file, converted into php script and variables file with all your settings that will be used by SP.DE to manage form input. Php file will have .hdl extension to prevent replacing your old file. You may check content to be sure that everything is ok. Just cut .hdl locally or after uploading to your FTP account. Upload new form's file and variabless file into your server into the same directory. New form file will have .php extension, so if your current extension is "htm" or "html" - update all site's links.

That's it   top
Load new form page in a browser and check how it works. If it doesn't - ask us via Support page, write at the forum, don't keep silence :)


Edit form's fields, set new rules, confirure database access.
To process the form and create new variable's file, press "Get result", save new form's and variable's files, upload files to the same catalog, open new form at your browser and submit values to test.

NOTE: if you plan to use Smart Parser.Template Engine on the same page, remove lines, inserted by
SP.Database Engine - <? ob_start() ?> above form and <?include("./sp/sp.php");?> after and replace with
[FORM__name ...] and [END__FORM__name]

Include sp_start.php script in the beginning of news.php
<?include(“./sp/sp_start.php”);?>

Include sp_end script in the end of the file
<?include(“./sp/sp_end.php”);?>

(use correct path to your {SP} directory)

 
    To work with Template Engine (TE)

Create new file, create required rules and SETs, configure templates, relacements, arrays and so on and test your file. For more information, check "Template Engine" manual

 

 1997-2004 © Copyright "H-2.com"    Developed by H-2.com