Simple Article Elements

getBanner

This component allows you to integrate banners within the Article’s main view.

Note: As per default this component would be using the API keys, configured into the main App’s Mobile Settings panel. They could be overridden using the “content” parameter.

Available Parameters

content

Optional: Google's adsense code

ad_size

Optional: large | rectangle

Example

$this->getBanner(false, array( 'ad_size' => 'large', 'style' => 'deal-banner' ));

getFieldlist

This field would allow you to list HTML Select like lists.

Available Parameters

content

Required: the values, which would be listed in the box

variable

Optional: The name of the DB field, where the selected data would be saved

style

Optional: The configuration style name

Example

$content = 'example-1/Example text 1;example-2/Example text 2;example-3/Example text 3';
$this->getFieldlist($content, array( 'variable' => 'appointment_type', 'style' => 'field-list-style' ));

getFieldonoff

Displays an on/off checkbox ( Android ) or swipebox ( iOS ).

Available Parameters

content

Optional: The default value for the component

variable

Optional: The name of the DB field, where the selected data would be saved

style

Optional: The configuration style name

Example

$this->getFieldonoff( 1, array('style' => 'field-style', 'variable' => 'db-var-name') );

getFieldpassword

Get a password field.

Available Parameters

variable

Required: The name of the DB field, where the selected data would be saved

style

Optional: The configuration style name

id

Required: The name/id of the submit field. It would allow the field to pre-populate with the previously submitted value

hint

Optional: The default placeholder for the field

Example

$this->getFieldPassword('', array( 'style' => 'field-style', 'hint' => 'Please enter your password', 'id' => 1351, 'variable' => 'db-var-name' ))

getFieldtext

Renders a regular text field.

Available Parameters

variable

Required: The name of the DB field, where the selected data would be saved

style

Optional: The configuration style name

hint

Optional: The default placeholder for the field

Example

$content = 'Example pre-populated content';
$this->getFieldtext($content, array( 'style' => 'field-style', 'hint' => 'Please enter some text', 'variable' => 'db-var-name' ));

getFieldtextarea

Renders a regular textarea field.

Available Parameters

variable

Required: The name of the DB field, where the selected data would be saved

style

Optional: The configuration style name

hint

Optional: The default placeholder for the field

Example

$this->getFieldtextarea('', array( 'style' => 'field-style', 'hint' => 'Type your message here...', 'variable' => 'db-var-name' ));

getFieldupload

Renders an image or video upload field.

Available Parameters

content

Optional: The button's text

type

Required: The upload file type. Supports both image and video

variable

Required: The name of the DB field, where the selected data would be saved

style

Optional: The configuration style name

Example

$this->getFieldupload('Change image', array( 'type' => 'image', 'style' => 'field-style', 'variable' => 'db-var-name' ));

getHTML

Renders a standard WEB HTML content.

Available Parameters

content

Required: The HTML content, which would be displayed

style

Optional: The configuration style name

Example

$content = '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>';


$this->getHTML($content, array( 'style' => 'field-style' ));

getImage

Renders an simple image. Supported formats: jpg/png/gif

Note: if the mobile client couldn’t find an image, it would display an error message instead.

Available Parameters

content

Required: The image's file name.

style

Optional: The configuration style name

Example

$this->getImage('example-image.png', array( 'style' => 'image-style' ));