Function Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
A
 addField
 addFields
 appendKeywords
 appendTV
 array2table
 arrayUnique
B
 basicFilter
 buildURL
C
 checkAdvSort
 cleanArray
 cleanIDs
 customSort
D
 determine
 determineIDs
E
 exampleFilter
 exampleFunction
 execute
F
 fetch
 fetchKeywords
 findTemplateVars
G
 get_file_contents
 getAuthor
 getChildIDs
 getDocuments
 getDocumentsLite
 getDocVarType
 getParam
 getParentList
 getTVList
M
 makelink
 makeMODxSafe
 makeParamTable
 makeTab
 multiSort
N
 noResults
P
 paginate
 parseCustomPlaceholders
 parseDBFields
 parseFields
 parseFilters
 parseOrderBy
 prepareBasicInfo
 prepareDocumentInfo
 prepareFilters
 preparePrefetch
 prepareTemplates
 process
R
 relToAbs
 removeField
 render
 render_link
 render_popup
 renderQELinks
 replace
function addField($name,  
$location,  
$type = false)
Add a field to the internal field detection system
function addFields($fields,  
$location = '*',
$delimiter = ',',
$callback = false)
Add a field to the internal field detection system from an array or delimited string
function appendKeywords($resource)
Append keywords’s to the resource array
function appendTV($tvname = "",
$docIDs  )
Apeend a TV to the documents array
function array2table($array,  
$recursive =  false,
$return =  false,
$null =  ' ')
Translate a result array into a HTML table
function arrayUnique($array)
Make fields array unique
function basicFilter ($value)
Do basic comparison filtering
function buildURL($args,  
$id = false,
$dittoIdentifier = false)
Build a URL with regard to Ditto ID
function checkAdvSort($sortBy,  
$sortDir = 'asc')
Check the advSortString
function cleanArray($array)
Remove empty items from the array
function cleanIDs($IDs)
Clean the IDs of any dangerous characters
function customSort($data,
$fields,
$order)
Sort resource array if advanced sorting is needed
function determine($templates,
$x,
$start,
$stop,
$id)
Determine the correct template to apply
function determineIDs($IDs,
$IDType,
$TVs,
$orderBy,
$depth,
$showPublishedOnly,
$seeThruUnpub,
$hideFolders,
$hidePrivate,
$showInMenuOnly,
$myWhere,
$keywords,
$dateSource,
$limit,
$summarize,
$filter,
$paginate,
$randomize)
Get Document IDs for future use
function exampleFilter($resource)
Takes the resource array for an individual document and asks for the return of a 0 or 1 with 1 removing the document and 0 leaving it in the result set.
function exampleFunction($resource)
Takes the resource array for an individual document and returns the value of the placeholder, in this case the uppercase version of the pagetitle
function execute($resource,
$filter)
Filter documents via either a custom filter or basic filter
function fetch($tpl)
Get a template, based on version by Doze
function fetchKeywords($resource)
Helper function to appendKeywords
function findTemplateVars($tpl)
Find al the template variables in the template
function get_file_contents($filename)
Returns the contents of file name passed
function getAuthor($createdby)
Get the author name, or if not available the username
function getChildIDs($IDs,
$depth)
Get the IDs ready to be processed Similar to the modx version by the same name but much faster
function getDocuments($ids =  array (),
$fields,  
$TVs,  
$orderBy,  
$published =  1,
$deleted =  0,
$public =  1,
$where =  '',
$limit =  "",
$keywords = 0,
$randomize = 0,
$dateSource = false)
Get documents and append TVs + Prefetch Data, and sort
Get an array of documents
function getDocVarType($field)
Determine if the provided field is a tv, a database field, or something else
function getParam($param,
$langString)
Get a parameter or use the default language value
function getParentList()
Get a list of all available parents
function getTVList()
Get a list of all available TVs
Render the links to the debug console
function makeMODxSafe($value)
Make all MODx tags safe for the output
function makeParamTable($parameters = array(),
$header = "",
$sort = true,
$prep = true,
$wordwrap = true)
Turn an array of parameters in the format [“param”] => “value” into a table
function makeTab($title,
$content)
Render a tab
function multiSort($resource,
$orderBy)
Sort the resource array by multiple fields Rows->Columns portion by Jon L.
function noResults($text,
$paginate)
Render the noResults output
function paginate($start,
$stop,
$total,
$summarize,
$tplPaginateNext,
$tplPaginatePrevious,
$tplPaginateNextOff,
$tplPaginatePreviousOff,
$tplPaginatePage,
$tplPaginateCurrentPage,
$paginateAlwaysShowLinks,
$paginateSplitterCharacter)
Paginate the documents
function parseCustomPlaceholders($placeholders)
Parse the required fields out of the custom placeholders
function parseDBFields($seeThruUnpub)
Parse out the fields required for each state
function parseFields($placeholders,
$seeThruUnpub,
$dateSource,
$randomize)
Find the fields that are contained in the custom placeholders or those that are needed in other functions
function parseFilters($filter = false,
$cFilters = false,
$pFilters =  false,
$globalDelimiter,  
$localDelimiter  )
Split up the filters into an array and add the required fields to the fields array
function parseOrderBy($orderBy,
$randomize)
Parse out orderBy parameter string
function prepareBasicInfo($ditto,
$ditto_version,
$IDs,
$summarize,
$orderBy,
$start,
$stop,
$total)
Create the outut for the Info ta
function prepareDocumentInfo($resource)
Create the output for the Document Info tab
function prepareFilters($filter)
Create the content of the Filters tab
function preparePrefetch($prefetch)
Create the content of the Prefetch tab
function prepareTemplates($templates)
Create the output for the Templates tab
function process($template)
Take the templates and parse them for tempalte variables, Check to make sure they have fields, and sort the fields
function relToAbs($text,
$base)
Convert relative urls to absolute URLs Based on script from http://wintermute.com.au/bits/2005-09/php-relative-absolute-links/
function removeField($name,
$location,
$type)
Remove a field to the internal field detection system
function render($resource,  
$template,  
$removeChunk,  
$dateSource,  
$dateFormat,  
$ph = array(),
$phx = 1,
$x = 0)
Render the document output
function render_link($dittoID,
$ditto_base)
Render the links to the debug console
function render_popup($ditto,
$ditto_base,
$ditto_version,
$ditto_params,
$IDs,
$fields,
$summarize,
$templates,
$orderBy,
$start,
$stop,
$total,
$filter,
$resource)
Render the contents of the debug console
function renderQELinks($fields,
$resource,
$QEPrefix,
$placeholders)
Render QE links when needed
function replace($placeholders,
$tpl)
Replcae placeholders with their values