class UKnowvaUI extends JHtml


Located at : UKNOWVA_ROOT/libraries/conv/uknowvaui.php

This class helps you create various UI elements like autocomplete, multiselect list, usergroups list, users token input, file attachments, etc in uKnowva

Properties

static array $formatOptions Option values related to the generation of HTML output. Recognized options are: fmtDepth, integer. The current indent depth. from JHtml

Methods

static mixed
_(string $key)

Class loader method

from JHtml
static boolean
register(string $key, string $function)

Registers a function to be called with a specific key

from JHtml
static boolean
unregister(string $key)

Removes a key for a method from registry.

from JHtml
static boolean
isRegistered(string $key)

Test if the key is registered.

from JHtml
static string
link(string $url, string $text, array $attribs = null)

Write a element

from JHtml
static string
iframe(string $url, string $name, array $attribs = null, string $noFrames = '')

Write an iframe element

from JHtml
static string
image($file, $alt, $attribs = null, $relative = false, $path_only = false)

Write a element

from JHtml
static mixed
stylesheet(string $file, array $attribs = array(), boolean $relative = false, boolean $path_only = false, boolean $detect_browser = true)

Write a element

from JHtml
static mixed
script(string $file, boolean $framework = false, boolean $relative = false, boolean $path_only = false, boolean $detect_browser = true)

Write a element

from JHtml
static void
core(boolean $debug = null)

No description

from JHtml
static void
setFormatOptions(array $options)

Set format related options.

from JHtml
static string
date($input = 'now', $format = null, $tz = true, $gregorian = false)

Returns formated date according to a given format and time zone.

from JHtml
static string
tooltip($tooltip, $title = '', $image = 'tooltip.png', $text = '', $href = '', $alt = 'Tooltip', $class = 'hasTip')

Creates a tooltip with an image as button

from JHtml
static 
calendar(string $value, string $name, string $id, string $format = '%Y-%m-%d', array $attribs = null)

Displays a calendar control field

from JHtml
static array
addIncludePath(string $path = '')

Add a directory where JHtml should search for helpers. You may either pass a string or an array of directories.

from JHtml
loadFormField(string $name, string $type, string $default = null, array $attributes = array())

loads form field like textbox, calendar, etc

string
tokenInput(string $name, int $id, string $loadscripts = true, string $ajaxurl = 'index.php?option=com_uvwdocs&task=listusers', array $options = array())

creates a jquery input token field

string
populateKnowledgeSuggestions(array|mixed $ids, string $showheading = true, string $render_as_list = true, string $headinghtml = null, string $template = '<a href="%item.link%" target="_blank">%item.title% - by %item.author%</a>')

Populate Knowledge Suggestions ids would be topics and their details

string
userTokenInput(string $name, string $id, string $loadscripts = true, string $includeme = false, string $prepopulate = null, string $preventDuplicates = true, array $otheroptions = array())

Displays a user token input field in your html form

string
knowledgeTokenInput(string $name, string $id, string $loadscripts = true, string $prepopulate = null, string $preventDuplicates = true, array $otheroptions = array())

Displays a token input whose source is forum topics

string
getUserGroupList(string $name = 'role', string $selected = null, string $title_as_value = false, string $select_text = '', string $attribs = 'class="inputbox"', string $exclude = '1,8', array $options = array(), string $id = false)

This function returns a select list of user groups

attachments(name $name, string $id, string|mixed $uniqueid, string $allowupload, string $showuploadedfiles = true, string $loadscripts = true, string $displaytemplate = '<div><a class="toolTip uf%file.type%" title="%file.description%" href="%file.download_link%" target="_blank">%file.title%</a> (%file.size%) %file.actions%</div>', string $uploadtemplate = null)

Displays a simply area where people can drag and drop files

string
singleAttachment(string $name, string $value = null, string $loadscripts = true, array $options = array(), array $attributes = array())

Shows an file input field with ajax upload facility

string
showSingleAttachment(string $file_id, array $options = array())

Shows the information like name, size, etc. of an already uploaded file

string
showMultipleAttachment(array $file_ids, array $options = array())

Shows the information like name, size, etc. of an already uploaded files

string
showMultipleAttachments(array $file_ids, array $options = array())

Synonym of showMultipleAttachment

string
multipleAttachment(string $name, string $values = null, string $loadscripts = true, array $options = array(), array $attributes = array())

Creates an option to attach multiple files in an html form

string
pdfButton(string $divselector, string $label = 'Save as PDF', string $display_as_anchor = false, string $class = 'button', string $description = 'Save document as PDF', array $exceptions = array(), array $options = array())

creats a button which on click shall save a div as pdf

string
actionLabel(string $value, array $actions = array(), string $marker = false)

Creates a label to display in tables with edit and delete links

string
tableInput(string $name, string $headers, array $data = null, array $attributes = array(), array $options = array())

Used to create table input fields

string
showTableInput(string $headers, array $data = null, array $attributes = array(), array $options = array())

Show Table Input

mixed|boolean
formToken()

function to generate token required in forms to avoif CSRF attacks

string|mixed|boolean
selectList(string $name, string $values, string $selected = null, array $attributes = array(), array $options = array(), string $id = false)

generates select list from the provided values

string|string|mixed|boolean
userList(string $name = 'user_id', string $selected = null, array $attributes = array(), array $options = array())

returns the select list of all active users

string
autoComplete(string $name, string $source, string $prepopulate = null, string $loadscripts = true, array $options = array(), array $attributes = array())

Creates an autocomplete text box with a remove data source Note: ur source if it is an array of objects then each object should have an attribute called label: Refer: http://jqueryui.com/autocomplete/#custom-data

string|boolean
addToolTip(string $selector, string $loadscripts = true, array $options = array())

creates a tool tip html element

string
accordion(int $id, string $data, string $loadscripts = true, array $options = array(), array $attributes = array())

creates accordians style html divs

string
slider(int $id, string $loadscripts = true, array $options = array(), array $attributes = array())

creates slider input example :- http://jqueryui.com/slider/#range

string
switchButton(string $name, string $selected, array $options = array(), array $attributes = array(), string $id = false)

Creates an iphone style switch for radio button inputs

string|string|mixed|boolean
multiSelect(string $name, array|mixed $data, string $selected = null, string $select_text = false, array $attributes = array(), array $options = array(), string $id = false)

Creates a jquery multi select drop down list Refer: http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ to check the various options available

string
slidePanel(string $id, string $content, string $adjacent_div = 'contentarea', string $orientation = 'left', array $options = array())

Creates a kool show hide panel like that available in the dosnloads section of uKnowva

string
csvButton(string $selector, string $label = 'Export to Excel', array $attributes = array(), array $options = array())

creates a button which on click shall convert a table into CSV

string
colorPicker(string $name, string $value = '#FFFFFF', array $attributes = array(), array $options = array())

creates a color picker text field you can do various customizations by passing options See this link for options: http://jscolor.com/try.php#tweaking

string
likeBox(string $element, string $unique_id, string $disable_dislike = false)

creates like box for any kind of content

string
commentBox($element, $unique_id, $title = null, $owners = array(), $link = null, $attributes = array())

This function creates a comment box for any kind of content, example for an article, for a document, etc

string
barCodeImage(string $code, array $options = array(), array $attributes = array())

function to generate a BAR code image

string
qrCodeImage(string $code, array $options = array(), array $attributes = array())

Similar to the barCodeImage function but generates the qrcode

string|mixed|boolean
treeSelectList(unknown $name, unknown $objlist, unknown $selected = null, string $select_text = false, array $attributes = array(), array $options = array(), string $id = false)

creates a select list with a tree structure.

boolean
makeTaggable(string $selector, string $tag = '@,#', array $options = array())

This simply makes any textbox/textarea (defined by the selector) taggable uKnowva 2.5.1 shall facilitate tagging through two characters: @: this is for users and user groups hash(#): actually for tags which can be used across various other content types like articles, documents, knowledge posts, polls, etc You need to simply call it in the script this way: uKnowvaUI::makeTaggable(".taggable","@,#");

string
dateTimePicker(string $name, string $value = null, string $format = 'Y-m-d H:i', array $options = array(), array $attributes = array())

Displays a date and time picker in HTML

tour(string $tourid, mixed $steps, boolean $strict = false, mixed $options = array())

This function creates a tour for any page in uKnowva, it will remember if the user has already taken the tour, then it will skip it automatically

string
tagsInput(string $name = 'tags[]', string $selected = null, array $taglist = null, array $options = array(), array $attributes = array())

this function returns an input field that can be displayed in a form where users can select # tags

string|mixed|boolean
tableReferenceList(string $name, string $table, string $key, string $value, string $selected = null, array $attributes = array(), array $options = array(), string $id = false)

generates a select list from a database table

Details

in JHtml at line 97
static mixed _(string $key)

Class loader method

Additional arguments may be supplied and are passed to the sub-class. Additional include paths are also able to be specified for third-party use

Parameters

string $key The name of helper method to load, (prefix).(class).function prefix and class are optional and can be used to load custom html helpers.

Return Value

mixed JHtml::call($function, $args) or False on error

in JHtml at line 156
static boolean register(string $key, string $function)

Registers a function to be called with a specific key

Parameters

string $key The name of the key
string $function Function or method

Return Value

boolean True if the function is callable

in JHtml at line 175
static boolean unregister(string $key)

Removes a key for a method from registry.

Parameters

string $key The name of the key

Return Value

boolean True if a set key is unset

in JHtml at line 194
static boolean isRegistered(string $key)

Test if the key is registered.

Parameters

string $key The name of the key

Return Value

boolean True if the key is registered.

Write a element

Parameters

string $url The relative URL to use for the href attribute
string $text The target attribute to use
array $attribs An associative array of attributes to add

Return Value

string string

in JHtml at line 257
static string iframe(string $url, string $name, array $attribs = null, string $noFrames = '')

Write an iframe element

Parameters

string $url The relative URL to use for the src attribute
string $name The target attribute to use
array $attribs An associative array of attributes to add
string $noFrames The message to display if the iframe tag is not supported

Return Value

string iframe element or message if not supported

in JHtml at line 405
static string image($file, $alt, $attribs = null, $relative = false, $path_only = false)

Write a element

Parameters

$file
$alt
$attribs
$relative
$path_only

Return Value

string

in JHtml at line 442
static mixed stylesheet(string $file, array $attribs = array(), boolean $relative = false, boolean $path_only = false, boolean $detect_browser = true)

Write a element

Parameters

string $file path to file
array $attribs attributes to be added to the stylesheet
boolean $relative path to file is relative to /media folder
boolean $path_only return the path to the file only
boolean $detect_browser detect browser to include specific browser css files will try to include file, filebrowser, filebrowsermajor, filebrowsermajorminor

Return Value

mixed nothing if $path_only is false, null, path or array of path if specific css browser files were detected

See also

JBrowser

in JHtml at line 493
static mixed script(string $file, boolean $framework = false, boolean $relative = false, boolean $path_only = false, boolean $detect_browser = true)

Write a element

Parameters

string $file path to file
boolean $framework load the JS framework
boolean $relative path to file is relative to /media folder
boolean $path_only return the path to the file only
boolean $detect_browser detect browser to include specific browser js files

Return Value

mixed nothing if $path_only is false, null, path or array of path if specific js browser files were detected

See also

JHtml::stylesheet

in JHtml at line 541
static void core(boolean $debug = null)

Parameters

boolean $debug True if debugging is enabled.

Return Value

void

in JHtml at line 565
static void setFormatOptions(array $options)

Set format related options.

Updates the formatOptions array with all valid values in the passed array. See {see JHtml::$formatOptions} for details.

Parameters

array $options Option key/value pairs.

Return Value

void

in JHtml at line 586
static string date($input = 'now', $format = null, $tz = true, $gregorian = false)

Returns formated date according to a given format and time zone.

Parameters

$input
$format
$tz
$gregorian

Return Value

string A date translated by the given format and time zone.

See also

strftime

in JHtml at line 652
static string tooltip($tooltip, $title = '', $image = 'tooltip.png', $text = '', $href = '', $alt = 'Tooltip', $class = 'hasTip')

Creates a tooltip with an image as button

Parameters

$tooltip
$title
$image
$text
$href
$alt
$class

Return Value

string

in JHtml at line 712
static calendar(string $value, string $name, string $id, string $format = '%Y-%m-%d', array $attribs = null)

Displays a calendar control field

Parameters

string $value The date value
string $name The name of the text field
string $id The id of the text field
string $format The date format
array $attribs Additional HTML attributes

in JHtml at line 771
static array addIncludePath(string $path = '')

Add a directory where JHtml should search for helpers. You may either pass a string or an array of directories.

Parameters

string $path A path to search.

Return Value

array An array with directory elements

at line 49
loadFormField(string $name, string $type, string $default = null, array $attributes = array())

loads form field like textbox, calendar, etc

Parameters

string $name name of the form eg:- checkbox,textbox etc
string $type type of the form
string $default default value to be on the form
array $attributes array of attributes

at line 86
string tokenInput(string $name, int $id, string $loadscripts = true, string $ajaxurl = 'index.php?option=com_uvwdocs&amp;task=listusers', array $options = array())

creates a jquery input token field

Parameters

string $name field name
int $id should be unique identifier on your html page
string $loadscripts should be false, if you are already loading js files in your view
string $ajaxurl predefined URL
array $options which you want to set for tokeninput

Return Value

string HTML form with values

at line 141
string populateKnowledgeSuggestions(array|mixed $ids, string $showheading = true, string $render_as_list = true, string $headinghtml = null, string $template = '<a href="%item.link%" target="_blank">%item.title% - by %item.author%</a>')

Populate Knowledge Suggestions ids would be topics and their details

Parameters

array|mixed $ids User ID's
string $showheading to Show Heading or not, default = true
string $render_as_list to render the output as list, default = true
string $headinghtml attribute to be based, default = null
string $template template of the output, default is set by uknowva automatically

Return Value

string gives HTMl output with given above parameters

at line 192
string userTokenInput(string $name, string $id, string $loadscripts = true, string $includeme = false, string $prepopulate = null, string $preventDuplicates = true, array $otheroptions = array())

Displays a user token input field in your html form

Parameters

string $name name of the field
string $id should be unique identifier on your html page
string $loadscripts should be false, if you are already loading js files in your view
string $includeme to include your self or not, default = false
string $prepopulate prepopulate result, default = null
string $preventDuplicates prevent duplicate tokens, default = true
array $otheroptions to exclude any groups

Return Value

string HTML form with values

at line 243
string knowledgeTokenInput(string $name, string $id, string $loadscripts = true, string $prepopulate = null, string $preventDuplicates = true, array $otheroptions = array())

Displays a token input whose source is forum topics

Parameters

string $name name of the field
string $id should be unique identifier on your html page
string $loadscripts should be false, if you are already loading js files in your view
string $prepopulate prepopulate values
string $preventDuplicates to prevent duplicates
array $otheroptions to exclude any groups

Return Value

string HTML form with given above parameters

at line 280
string getUserGroupList(string $name = 'role', string $selected = null, string $title_as_value = false, string $select_text = '', string $attribs = 'class="inputbox"', string $exclude = '1,8', array $options = array(), string $id = false)

This function returns a select list of user groups

Parameters

string $name The value of the HTML name attribute
string $selected option with selected default value, default = NULL
string $title_as_value to let title be as value, default = false
string $select_text select text
string $attribs attributes of the output
string $exclude exclude any group, default = "1,8"
array $options In options u can specify the paramters like multiselect list and other options for multiselect
string $id group id

Return Value

string Gives HTML output of the Users group List

at line 339
attachments(name $name, string $id, string|mixed $uniqueid, string $allowupload, string $showuploadedfiles = true, string $loadscripts = true, string $displaytemplate = '<div><a class="toolTip uf%file.type%" title="%file.description%" href="%file.download_link%" target="_blank">%file.title%</a> (%file.size%) %file.actions%</div>', string $uploadtemplate = null)

Displays a simply area where people can drag and drop files

Parameters

name $name name of the attachment
string $id User ID
string|mixed $uniqueid unique ID
string $allowupload allowed documents to upload
string $showuploadedfiles show uploaded files
string $loadscripts should be false, if you are already loading js files in your view
string $displaytemplate display template, default set by uknowva automatically
string $uploadtemplate to uploadtemplate or not, default = NULL

at line 509
string singleAttachment(string $name, string $value = null, string $loadscripts = true, array $options = array(), array $attributes = array())

Shows an file input field with ajax upload facility

Parameters

string $name name of the attachment
string $value default = NULL
string $loadscripts should be false, if you are already loading js files in your view
array $options In options you can specify options like onAfterDelete, OnAfterUpload, etc
array $attributes attributes of the file

Return Value

string HTML output

at line 800
string showSingleAttachment(string $file_id, array $options = array())

Shows the information like name, size, etc. of an already uploaded file

Parameters

string $file_id file ID
array $options options of the file to pass if any in array

Return Value

string shows the attachment

at line 824
string showMultipleAttachment(array $file_ids, array $options = array())

Shows the information like name, size, etc. of an already uploaded files

Parameters

array $file_ids all files ids that needs to be displayed
array $options options of the file to pass if any in array

Return Value

string shows the attachment

at line 846
string showMultipleAttachments(array $file_ids, array $options = array())

Synonym of showMultipleAttachment

Parameters

array $file_ids all files ids that needs to be displayed
array $options options of the file to pass if any in array

Return Value

string shows the attachment

at line 864
string multipleAttachment(string $name, string $values = null, string $loadscripts = true, array $options = array(), array $attributes = array())

Creates an option to attach multiple files in an html form

Parameters

string $name name of the table input
string $values should be a comma separated string
string $loadscripts should be false, if you are already loading js files in your view
array $options options of the file to pass if any in array
array $attributes attributes of the output

Return Value

string returns the table with the list for multiple attachments

at line 1199
string pdfButton(string $divselector, string $label = 'Save as PDF', string $display_as_anchor = false, string $class = 'button', string $description = 'Save document as PDF', array $exceptions = array(), array $options = array())

creats a button which on click shall save a div as pdf

Parameters

string $divselector divselector is a jquery selector
string $label label to be in the output button , default = 'Save as PDF'
string $display_as_anchor to display in anchor tag, default = false
string $class to provide a class name to the button, default = 'button'
string $description description of the document, default = 'Save document as PDF'
array $exceptions is an array of jquery selector which willbe removed from the html output of inner html of $divselector
array $options options of values in array which will be used in the form

Return Value

string returns the HTMl output

at line 1256
string actionLabel(string $value, array $actions = array(), string $marker = false)

Creates a label to display in tables with edit and delete links

Parameters

string $value title of the action label
array $actions The edit and delete links should be provided in array, $actions array can be an associative array or a simple array then you can give its value as an object with href, class and rel attributes for the anchor tag
string $marker is true, then a marker shall be shown in the action label

Return Value

string action label in HTMl

at line 1324
string tableInput(string $name, string $headers, array $data = null, array $attributes = array(), array $options = array())

Used to create table input fields

Parameters

string $name name of the table element
string $headers An array that defines the headers to be set in the table .i.e.inshort the columns of the table input
array $data This is the data matrix .i.e. the a multidimensional array of default data to be put into the table input
array $attributes An array of attributes for the table tag, u can pass class, style etc.here
array $options An array which governs the functionling of the table input: you can pass id, afteradd javascript functions and after remove javascript functions here

Return Value

string returns the HTMl output with defined parameters

at line 1445
string showTableInput(string $headers, array $data = null, array $attributes = array(), array $options = array())

Show Table Input

Parameters

string $headers An array that defines the headers to be set in the table .i.e.inshort the columns of the table input
array $data This is the data matrix .i.e. the a multidimensional array of default data to be put into the table input
array $attributes An array of attributes for the table tag, u can pass class, style etc.here
array $options An array which governs the functionling of the table input: you can pass id, afteradd javascript functions and after remove javascript functions here

Return Value

string returns the HTMl output with defined parameters

at line 1544
mixed|boolean formToken()

function to generate token required in forms to avoif CSRF attacks

Return Value

mixed|boolean return form token

at line 1565
string|mixed|boolean selectList(string $name, string $values, string $selected = null, array $attributes = array(), array $options = array(), string $id = false)

generates select list from the provided values

Parameters

string $name The value of the HTML name attribute
string $values are the values that needs to be put in the select list. You can also specify childs in value if you want to set optgroups
string $selected default selected option in the seleted list
array $attributes Additional HTML attributes for the
array $options array of the option value to be present in the select HTML tag
string $id default = false

Return Value

string|mixed|boolean gives the select list HTML output with give above parameters

at line 1615
string|string|mixed|boolean userList(string $name = 'user_id', string $selected = null, array $attributes = array(), array $options = array())

returns the select list of all active users

Parameters

string $name The value of the HTML name attribute, default = "user_id"
string $selected default selected option in the seleted list
array $attributes Additional HTML attributes for the
array $options array of the option value to be present in the select HTML tag

Return Value

string|string|mixed|boolean values are passed to selectList functions which returns the select list

at line 1660
string autoComplete(string $name, string $source, string $prepopulate = null, string $loadscripts = true, array $options = array(), array $attributes = array())

Creates an autocomplete text box with a remove data source Note: ur source if it is an array of objects then each object should have an attribute called label: Refer: http://jqueryui.com/autocomplete/#custom-data

Parameters

string $name The name of the element, by default ID is also set as the name itself, it can be overwritten if you pass $options['id']
string $source It can be an ajax url or simplete a PHP array
string $prepopulate It is the preselected value, default = NULL
string $loadscripts If false, no scripts shall be loaded again, they might be loaded already
array $options other options like attributes, etc
array $attributes additional HTML attributes for the tag

Return Value

string returns the HTML tag with the above parameters

at line 1718
string|boolean addToolTip(string $selector, string $loadscripts = true, array $options = array())

creates a tool tip html element

Parameters

string $selector selector is the jquery selector of the html element for which tipsy needs to be applied
string $loadscripts If false, no scripts shall be loaded again, they might be loaded already, default = true
array $options options is the options array for tool tip

Return Value

string|boolean adds the add tool html element

at line 1776
string accordion(int $id, string $data, string $loadscripts = true, array $options = array(), array $attributes = array())

creates accordians style html divs

Parameters

int $id is the overall ID of this accordian
string $data should be an assocriative array with key as Title and Value as HTML
string $loadscripts If false, no scripts shall be loaded again, they might be loaded already, default = true
array $options options is the options array for accordion
array $attributes additional HTML attributes for the tag

Return Value

string returns the HTMl output in
tag with above parameters

at line 1850
string slider(int $id, string $loadscripts = true, array $options = array(), array $attributes = array())

creates slider input example :- http://jqueryui.com/slider/#range

Parameters

int $id id to be in the slider tag
string $loadscripts If false, no scripts shall be loaded again, they might be loaded already, default = true
array $options options is the options array for slider
array $attributes additional HTML attributes for the slider

Return Value

string returns the slider in HTML output

at line 1909
string switchButton(string $name, string $selected, array $options = array(), array $attributes = array(), string $id = false)

Creates an iphone style switch for radio button inputs

Parameters

string $name is the name of the input element
string $selected default selected value to be selected at start
array $options you can specify customization options like yeslabel, nolabel, yesvalue,novalue
array $attributes additional HTML attributes for radio buttons input
string $id id to be in the radio button inputs

Return Value

string returns the HTMl output

at line 1978
string|string|mixed|boolean multiSelect(string $name, array|mixed $data, string $selected = null, string $select_text = false, array $attributes = array(), array $options = array(), string $id = false)

Creates a jquery multi select drop down list Refer: http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ to check the various options available

Parameters

string $name
array|mixed $data can be an array, an associative array or an objectlist
string $selected default selected value at start
string $select_text default = false
array $attributes attributes of the select list
array $options
string $id you can also specify a unique id by passing id

Return Value

string|string|mixed|boolean returns the multi select list

at line 2073
string slidePanel(string $id, string $content, string $adjacent_div = 'contentarea', string $orientation = 'left', array $options = array())

Creates a kool show hide panel like that available in the dosnloads section of uKnowva

Parameters

string $id name ID of the form
string $content is the HTML which will be inside the sliders
string $adjacent_div default = 'contentarea'
string $orientation default = 'left'
array $options array of options to be in the slide panel

Return Value

string returns the HTML output of the slidepanel

at line 2229
string csvButton(string $selector, string $label = 'Export to Excel', array $attributes = array(), array $options = array())

creates a button which on click shall convert a table into CSV

Parameters

string $selector is a jquery selector
string $label label of the csv button default = 'Export to Excel'
array $attributes attributes of the csv button
array $options option to be in passed in like csv name

Return Value

string return the HTML output of csv button

at line 2279
string colorPicker(string $name, string $value = '#FFFFFF', array $attributes = array(), array $options = array())

creates a color picker text field you can do various customizations by passing options See this link for options: http://jscolor.com/try.php#tweaking

Parameters

string $name name of the color picker HTML form tag example :-
string $value color value, default = '#FFFFFF'
array $attributes attributes of the color picker
array $options array of id and class to be in the form

Return Value

string gives Color Picker in HTML

at line 2306
string likeBox(string $element, string $unique_id, string $disable_dislike = false)

creates like box for any kind of content

Parameters

string $element is the type example: article, photo, etc
string $unique_id is the unique id of your element like article id, phot id, etc., It should be an integer only
string $disable_dislike to disable dislike button in like box, default = false

Return Value

string return the HTML
tag with the like box in it

at line 2337
string commentBox($element, $unique_id, $title = null, $owners = array(), $link = null, $attributes = array())

This function creates a comment box for any kind of content, example for an article, for a document, etc

Parameters

$element
$unique_id
$title
$owners
$link
$attributes

Return Value

string HTML output of the comment box

at line 2394
string barCodeImage(string $code, array $options = array(), array $attributes = array())

function to generate a BAR code image

Parameters

string $code is the barcode to be printed
array $options $options can have params like following PARAMETERS: -----------

    type = (default=0) It's 0 for Code 3 of 9 (the only one supported)

    width = (default=160) Width of image in pixels. The image MUST be wide
    enough to handle the length of the given value. The default
    value will probably be able to display about 6 digits. If you
    get an error message, make it wider!


    height = (default=80) Height of image in pixels

    format = (default=jpeg) Can be "jpeg", "png", or "gif"

    quality = (default=100) For JPEG only: ranges from 0-100


    text = (default=1) 0 to disable text below barcode, >=1 to enable
array $attributes is the IMG element attributes like class, title, etc

Return Value

string HTML output in tag with the output of the barcode

at line 2423
string qrCodeImage(string $code, array $options = array(), array $attributes = array())

Similar to the barCodeImage function but generates the qrcode

Parameters

string $code is the qrcode to be printed
array $options options to be in the passed in the qrcode
array $attributes is the IMG element attributes like class, title, etc

Return Value

string returns the HTML output of the given above parameters

at line 2455
string|mixed|boolean treeSelectList(unknown $name, unknown $objlist, unknown $selected = null, string $select_text = false, array $attributes = array(), array $options = array(), string $id = false)

creates a select list with a tree structure.

This usually helps a log when you have an object list from an RDBMS where one column is a parent In such cases, you have to recursively parse the complete list and create a select list with --(dashes) appended You just need to pass the objectlist, parentcolumn, text column and value column here and this will automatically create a select drop down in a tree strucutre

Parameters

unknown $name is the name of the select list
unknown $objlist if the object list which needs to be parsed
unknown $selected is the default value to be selected
string $select_text
array $attributes are the additional html attributes to be added to the select list
array $options is where you can define keys like parentcolumn, textcolumn and value_column and other options
string $id is the id you want to give to this HTML element

Return Value

string|mixed|boolean returns the tree select list witg given above parameters

at line 2517
boolean makeTaggable(string $selector, string $tag = '@,#', array $options = array())

This simply makes any textbox/textarea (defined by the selector) taggable uKnowva 2.5.1 shall facilitate tagging through two characters: @: this is for users and user groups hash(#): actually for tags which can be used across various other content types like articles, documents, knowledge posts, polls, etc You need to simply call it in the script this way: uKnowvaUI::makeTaggable(".taggable","@,#");

Parameters

string $selector this is the jQuery selector which shall be made taggable
string $tag it can be # or @ or #,@ .i.e. basically which type of tag
array $options can be an associative array of other options available with this plugin like onshow, onselect, etc. as defined on this link: http://lodev09.github.io/bootstrap-suggest/#api

Return Value

boolean true if succeed or else false

at line 2590
string dateTimePicker(string $name, string $value = null, string $format = 'Y-m-d H:i', array $options = array(), array $attributes = array())

Displays a date and time picker in HTML

Parameters

string $name name of the field
string $value default value of the date time
string $format the PHP date format
array $options An array of options that can be configured as per JS file, refer http://xdsoft.net/jqplugins/datetimepicker/ for detailed documentation
array $attributes HTML element's attributes

Return Value

string the html that displays the date time picker

at line 2645
tour(string $tourid, mixed $steps, boolean $strict = false, mixed $options = array())

This function creates a tour for any page in uKnowva, it will remember if the user has already taken the tour, then it will skip it automatically

Parameters

string $tourid this is a unique key you can pass, it could be your component name or template name
mixed $steps the array of steps, each step should be an object with following attributes: target : the target HTML element like: #logo, .table_blue, etc. It is also possible to define an array of several targets. If an array is provided, Hopscotch will use the first target that exists on the page and disregard the rest. placement: specifies where the bubble should appear in relation to the target. Valid values are "top", "bottom", "right", "left". title: title of the bubble/step content: content of the bubble/step You can have more attributes as mentioned here: http://linkedin.github.io/hopscotch/
boolean $strict if true, then irrespective of whether the user has already taken this tour or not, the tour will run again
mixed $options the other options for Setting tour as defined here: http://linkedin.github.io/hopscotch/

at line 2735
string tagsInput(string $name = 'tags[]', string $selected = null, array $taglist = null, array $options = array(), array $attributes = array())

this function returns an input field that can be displayed in a form where users can select # tags

Parameters

string $name name of the field
string $selected default values to be selected
array $taglist predefined list of tags to be shown
array $options An array of options that can be configured as per JS file, refer https://harvesthq.github.io/chosen/
array $attributes HTML element's attributes

Return Value

string the html that displays the taginput

at line 2837
string|mixed|boolean tableReferenceList(string $name, string $table, string $key, string $value, string $selected = null, array $attributes = array(), array $options = array(), string $id = false)

generates a select list from a database table

Parameters

string $name The value of the HTML name attribute
string $table The databsae table from which the list needs to be populated
string $key The key parameter, this will be in the options value
string $value The column that will be show in the dropdown
string $selected default selected option in the seleted list
array $attributes Additional HTML attributes for the
array $options array of the option value to be present in the select HTML tag
string $id default = false

Return Value

string|mixed|boolean gives the select list HTML output with give above parameters