PHP coder to build interface in Code Igniter
$100-500 USD
Paid on delivery
We need to have a web user interface which allows user to modify a pre formatted document and send it.
More precisely :
* A document format is provided, defining texts (in paragraphs), their positions, fonts, size, colors in documents, margins, skewing, etc. (format still unsure, HTML template is likely)
* A intuitive web interface allow a user to modify content of texts (if enabled), their order (if enabled) and colors (if enabled), then preview his changes.
* User can "send" the document through a button, which convert the document in PDF and send a confirmation mail (predefined).
All coding is to be done with Code Igniter
## Deliverables
# AMP Bakeoff - Tech Specs
## Platform
1. Codeigniter framework (1.7) with plugins
* Matchbox plugin : [url removed, login to view]
* Template: [url removed, login to view]
* MySmarty (smarty library for CodeIgniter) : [url removed, login to view]
* Asset Helper: [url removed, login to view] (This was adapted to work with the current directory structure)
2. MySQL 5 database
2. Smarty Templates for Fax templates
2. PDF Generation with [DOMPDF][1] + additional fonts.
3. jQuery (1.3) + plugins :
* Color picker : [url removed, login to view]
* Font selector : Improve [this][2] plugin.
* Ajax submit: [url removed, login to view]
## Datamodel
![][3]
## Structure
The directories are structured in the following way :
/
/ assets
/ assets/css
/ assets/images
/ assets/js
/ modules
/ modules/fax
/ modules/fax/assets
/ modules/fax/assets/css
/ modules/fax/assets/images
/ modules/fax/assets/js
/ modules/fax/controllers
/ modules/fax/views
/ modules/fax/views/mail
/ modules/fax/views/smarty
/ modules/fax/views
/ modules/fax/plugins
/ modules/fax/models
/ modules/fax/
/ system
/ application
** Modules :** Fax module (modules/fax)
- **Controllers** : FaxSupporter (modules/fax/controllers/[url removed, login to view])
- **Methods** :
* index() - redirects to step1()
* step1() - loads first step view
* congressmen() - loads the list of congressmen. This method is called using ajax. It must return a HTML fragment corresponding to a list of congressmen.
* step2() - checks step1 data and loads second step view
* private _generate() - generates the HTML code based on a smarty template
* preview() - returns a PDF stream (calls _generate() to get the html and passes it to the PDF library)
* send() - this calls _generate() method , creates the PDF ,calls a dummy fax sending library and sends the confirmation mail (gets the body from fe_conf_mail template).
* sent() - shows the fax completion page
-
**Views** :
* fe_step1 (modules/fax/views/[url removed, login to view]) : Step1 and Step1a page (check the FE - Send [url removed, login to view])
* fe_step2 (modules/fax/views/[url removed, login to view]) : Step2 and Step2a page (check the FE - Send [url removed, login to view])
* fe_sent (modules/fax/views/[url removed, login to view]) : Fax completion page
* fe_congressmen (modules/fax/views/[url removed, login to view]) : Ajax request that displays a list of congressmen.
* fe_send (modules/fax/views/[url removed, login to view]) : Shows the result of the ajax submitted form.
* fe_fax_smarty (modules/fax/views/smarty/[url removed, login to view]) : This is a Smarty template used to generate the HTML for the fax.
* fe_conf_mail (modules/fax/views/mail/[url removed, login to view]) : This is the Fax confirmation mail that is sent to the supporter.
-
**Plugins** : PDF (modules/fax/plugins/[url removed, login to view])
- **Methods**:
* function pdf_create($html, $filename, $stream=TRUE) {} . If stream parameter is set to true, the PDF will be streamed. -
**Models** :
* BaseModel (system/application/models/[url removed, login to view]) : handles basic CRUD operations. All other models must extend this model.
-
**Methods** :
* BaseModel($tablename = NULL) : Constructor, sets the table name that will be used in the operations.
* insert($entry)
* update($entry)
* get($id)
* getAll($count = NULL)
* TalkingPoint (modules/fax/modules/[url removed, login to view]) : Handles operations for "fax_tp" and "fax_tp_text" tables.
-
**Methods** : (no method for this version)
* FaxTemplate (modules/fax/modules/[url removed, login to view]) : Handles operations for all fax tables.
-
**Methods** :
* get ($id) : returns an array , containing data from all 4 tables. It returns all the information related to a fax.
### Templating
Template uses its own configuration file template.php. This file is placed inside the config folder. (system/application/config/[url removed, login to view]) :
$template['active_template'] = 'default';
$template['default']['template'] = 'template';
$template['default']['regions'] = array(
'_title',
'_module',
'content'
);
$template['default']['parser'] = 'parser';
$template['default']['parser_method'] = 'parse';
$template['default']['parse_template'] = FALSE;
The template has 3 regions defined :
- _title : is the page title
- _module : the name of the module
_ content : it's the body content
The template view is stored in 'system/application/views/[url removed, login to view]' . In the template there should be different CSS for IE6, 7 :
<!-- STYLESHEET SECTION -->
<?php echo css_asset('[url removed, login to view]', $_module); ?>
<!--[if lt IE 7]>
<?php echo css_asset('[url removed, login to view]', $_module); ?>
<![endif]-->
<!--[if gt IE 6]>
<?php echo css_asset('[url removed, login to view]', $_module); ?>
<![endif]-->
<!-- END OF STYLESHEET SECTION -->
Table based design must be avoided.
Project ID: #3688314