Tools helper

This helper provides simplified access to 3rd party tools to enhance your application

youtube(array $args)

Displays an embedded YouTube video. Valid $args keys are:

id - (Required) the YouTube video ID - this is in the URL of every YouTube page

width - optional, if omitted 425px will be used (the YouTube default)

height - optional, if omitted 344px will be used (the YouTube default)

adSense(array $args)

Displays an AdSense unit. You must have the GOOGLE_AD_CLIENT constant set in the .config for this helper to work. Required argument keys are height and width plus either slot or channel (you can get all of these values from the sample code that is generated by AdSense when you create your ad unit.

twitterLink($tweet, $text = null, array $args = array())

Generates a link so users can click to Tweet your $tweet message on Twitter.
This has the same signature as $html->link() except that the first argument is your Tweet text instead of link URL.

googleMap($location, array $args = array())

Generate a Google map.
Valid $args keys:

mapType - Options are: HYBRID (default), ROADMAP, SATELLITE, TERRAIN

height

width

zoom - valid zoom levels are 1-19

marker - marker used for your position on the map, takes an array of marker arguments (defined below)

googleMapUrl($address)

Generate a link to a location on Google maps.

googleTranslateById($id = null, $to = null, $from = '')

Translate the innerHTML of an HTML container or the value of a form text input by its ID
All arguments can be omitted, in which case this method will only initialize the translate engine, you will need to call the translation function from the page via JavaScript: vork.translateById('id', 'to', 'from')

$from Original language code of the page getting translated, omit for automatic selection

$headerLanguage Optional, language of the Google Header, if Google does not support the header language then it will use English in the header instead

qrCode($str, array $args = array())

Valid $args keys:

size (in px) - this is the size of your image, actual QR size may be smaller (with a white margin) depending on QR version which is automatically determined mathetmatically by a combination of size, ecLevel, string length and string complexity

margin (in px)

ecLevel - valid options are L, M, Q, H

tagCloud(array $tags, array $args = array())

$tags Array key is the tag, value is the tag weight
Valid $args keys:

noCss (Boolean) - if true, you will need to set styles for .cloud0, .cloud1 ... .cloud9

multiplier - Used to generate the CSS font sizes

baseUrl - this will be prepended to each tag to form the link URL

standardDeviation (Boolean) - a Standard Deviation is applied to clouds with at least 6 tags to better balance their sizes

tagCloudTags(array $tags, array $args = array())

Generates a PHP array of tags; this method provides more display control but requires you generate the cloud from the PHP array. Most users would probably be better off using tagCloud()

chart(array $args)

addThis(array $args = array())

Creates an AddThis widget. Requires setting the ADD_THIS constant to your AddThis publisher code in the .config file. $args are all optional and can be any parameters defined in the AddThis API.

shareThis(array $services = array(...))

Creates a ShareThis widget. Requires setting the SHARE_THIS constant to your ShareThis publisher code in the .config file. $services are all optional, the following default set of services will be used if ommitted: