Files: 5
Total filesizes: 209 Kbytes
Functions and classes: 128

class.tx_tandem.php

pi1/class.tx_tandem_pi1.php

res/class.tx_tandem_formslib.php

pi2/class.tx_tandem_pi2.php

pi3/class.tx_tandem_pi3.php

class.tx_tandem.php

General class for the 'Tandem' extension, all plugins inherit from this class

class tx_tandem extends tslib_pibase

function init()

function listMessages($filter1 = '',$filter2, $receivedMessages=false)

function statusUpdate($user_id,$message_id,$status)

function saveSuccess($message_uid, $user_uid)

database functions

function getData($table,$selectFields = '*')

function insertFormData($table, $fieldArr)

function updateFormData($table, $uid, $fieldArr)

function getRow($fields, $table, $addWhere)

function getFieldValue($field, $table, $addWhere)

function getDataFromSession($table,$sessionData)

function getList($table, $list)

language and localization functions

function getLL($string, $langkey='')

function loadLanguage($LLkey)

function getLocalizedList($table, $list)

user specific functions

function checkLoginStatus()

function updateFeuser($tandem_user_uid)

function getUserMessages($filter1='all', $filter2='tandem', $receivedMessages=false)

data processing functions

function formatResultValues($input_array)

general helper functions

function extract_tstamp_from_date($s)

function getAge($tstamp)

function pi_list_browseresults($showResultCount=1,$tableParams='')

function displayFormErrors($currentEvalErrors)

function renderImage($fileName)

function backlink($overrulePIvars = array())

function addTableRow($tdVals, $rowClass='default')

function buildTable($params='class="result_list_table" ')

function getLink($label, $addParams = array(), $replaceParams=array(), $class='',$title = '',$addParamsOnly = false)

function error($string, $lang_flag = 0)

function note($string, $lang_flag = 0)

function sendMail($recipient, $subject, $message)

function pi_wrapInBaseClass($content)

pi1/class.tx_tandem_pi1.php

Plugin 'Tandem' for the 'tandem' extension.

class tx_tandem_pi1 extends tx_tandem

function main($content,$conf)

function init()

views

function renderLoginView()

function registerUserConfirmation()

function infoBar()

function dataMissing()

function renderNavigation()

function renderMessageView()

function renderTandemSearchView()

function renderTandemSearchEditView()

form rendering

function createMessageForm()

function tandemRequestForm($search_fields=array())

function activateUser($user_id)

function tandemSuccess($message_uid, $user_uid)

database functions

function getTandemDetails()

function getTandemSearchResult($fields)

function deleteRequest($uid)

function getUserRequests()

function updateFeuser($tandem_user_uid)

res/class.tx_tandem_formslib.php

Base class for the 'frontendformslib' extension


modified and extended for tandem extension by

class tx_tandem_formslib

function tx_tandem_formslib(&$pObj)

function __construct(&$pObj)

function init()

Main render functions

function renderWholeForm($formType = '')

function renderCurrentStep()

function renderStepDisplay()

function renderStepsOverview()

Sub-Rendering functions

function wrapWithForm($content)

function renderSubmitButtons()

function renderSearchButtons()

Field rendering functions

function getSingleLabel($fieldConf, $rawLabelOnly = FALSE)

function getSingleField($fieldConf)

function getSingleField_typeInput($fieldConf, $tcaFieldConf)

function getSingleField_typeText($fieldConf, $tcaFieldConf)

function getSingleField_typeCheck($fieldConf, $tcaFieldConf)

function getSingleField_typeSelect_checkbox($fieldConf, $tcaFieldConf)

function getSingleField_typeSelect($fieldConf, $tcaFieldConf)

function getSingleField_typeGroup($fieldConf, $tcaFieldConf)

Evaluation functions

function evaluate_allFields(&$fieldsValuesArr)

function evaluate_stepFields($step, &$fieldsValuesArr)

function evaluate_singleField($fieldConf, $value)

function getUploadError()

function parseErrors($item, $key)

function validateEmail($email)

function validateDate($s)

function validateFile($tcaConfig,$fileArray,$table,$field)

function saveUploadedFiles()

Helper functions for internal use

function processIncomingData()

function implode_assoc_r ($inner_glue = "=", $outer_glue = "\n", $array = null, $keepOuterKey = false)

Helper functions for external use

function createStepConf($fieldNames, $table='', $stepLabel='', $infoText='')

function modifyStepConf($table, $field, $stepIndex, $configArray, $label = "")

function addFieldsToStepConf($fields, $table, $stepConfIndex)

function getEnableColumns($table)

function getSessionData()

function destroySessionData()

pi2/class.tx_tandem_pi2.php

Plugin 'mentor' for the 'Tandem' extension.

class tx_tandem_pi2 extends tx_tandem

function main($content,$conf)

function init()

views

function registerUserConfirmation()

function renderNavigation()

function infoBar()

function renderWelcomeView()

function setStatus()

function renderMessageView()

function renderSearchView()

form rendering

function createMessageForm()

function searchForm($searchFields=array())

function activateUser($user_id)

database functions

function getDetails()

function getSearchResult($fields)

Various helper functions

function getLL($string)

pi3/class.tx_tandem_pi3.php

Plugin 'Registration foprm' for the 'Tandem' extension.

class tx_tandem_pi3 extends tx_tandem

function main($content,$conf)

views

function registerUserConfirmation()

function renderNavigation()

function renderWelcomeView()

function setStatus()

function renderEditProfileView()

function renderEditProfileForm($profileType)

form rendering

function registerForm()

function renderDisabledFields($fields,$values,$table)

cronjob tasks

function cronjobTasks()

function sendConfirmRequest($recipient, $sender, $crdate, $signature, $is_sender, $status, $mentor, $langkey = '')

function decryptTandemkey($tandem_key)

function activateUser($user_id)

function updateUsergroupField($user_id,$new_group_id,$old_group_id=false)

function statusUpdate($user_id,$message_id,$status)

function saveSuccess($message_uid, $user_uid)

database functions

function deleteAccount($uid = 0)

function getLocalizedList($table, $list)

function getList($table, $list)

data processing functions

function getDataFromSession($table,$sessionData)

function formatResultValues($input_array)

Various helper functions

function displayFormErrors($currentEvalErrors)

function encrypt($string)

Detailed descriptions:

class.tx_tandem.php

General class for the 'Tandem' extension, all plugins inherit from this class

Filesize: 43 K
Func/Classes: 32
Tags: @author Nico de Haen <mail@ndh-websolutions.de>

class tx_tandem extends tslib_pibase

Returns:
Total Usage: 0  

function init()

Setting class variables from Typoscript (if set) or default pids
generates an error message if required settings are missing

Returns: string HTML (empty if no error)
Total Usage: 15  
  5 pi1/class.tx_tandem_pi1.php
  3 res/class.tx_tandem_formslib.php
  4 pi2/class.tx_tandem_pi2.php
  3 pi3/class.tx_tandem_pi3.php

function listMessages($filter1 = '',$filter2, $receivedMessages=false)

Are there new messages?

$filter1 = '' [type] $filter1: ...
$filter2 [type] $filter2: ...
$receivedMessages=false [type] $receivedMessages: ...
Returns: string HTML
Total Usage: 4  
  2 pi1/class.tx_tandem_pi1.php
  2 pi2/class.tx_tandem_pi2.php

function statusUpdate($user_id,$message_id,$status)

performs the mailings and sets the status of the message (initated from links in mails or message list


possible status of messages

0 => No reports
1 => Tandem Success reported from sender
2 => Tandem Failure reported from sender
3 => Tandem Success reported from recipient
4 => Tandem Failure reported from recipient
5 => Tandem Failure confirmed
6 => Tandem Success reported

9 => Tandem inconsistence

$user_id int $user_id the uid of the user who initiated the status update
$message_id int $message_id the uid of the message which status updated
$status int $status the status that is reported (1 for success, 2 for failure)
Returns: string HTML
Total Usage: 2  
  1 class.tx_tandem.php
  1 pi3/class.tx_tandem_pi3.php

function saveSuccess($message_uid, $user_uid)

saving a successfull tandem

$message_uid int $user_uid ID of the user who triggeredf the function
$user_uid int $message_uid ID of the message
Returns: void
Total Usage: 2  
  1 class.tx_tandem.php
  1 pi3/class.tx_tandem_pi3.php

function getData($table,$selectFields = '*')

gets data from the database based on the user_id of the current user

$table string name of the table
$selectFields = '*' array fields as key=>value pairs
Returns: [type] ...
Total Usage: 12  
  3 class.tx_tandem.php
  2 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  6 pi3/class.tx_tandem_pi3.php

function insertFormData($table, $fieldArr)

inserts the data in the database

$table string name of the table
$fieldArr array fields as key=>value pairs
Returns: int SQL insert ID
Total Usage: 11  
  2 class.tx_tandem.php
  3 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  5 pi3/class.tx_tandem_pi3.php

function updateFormData($table, $uid, $fieldArr)

inserts the data in the database

$table string name of the table
$uid $fieldArr array fields as key=>value pairs
$fieldArr [type] $fieldArr: ...
Returns: pointer MySQL result pointer / DBAL object
Total Usage: 44  
  14 class.tx_tandem.php
  4 pi1/class.tx_tandem_pi1.php
  5 pi2/class.tx_tandem_pi2.php
  21 pi3/class.tx_tandem_pi3.php

function getRow($fields, $table, $addWhere)

wrapper for exec_SELECTgetRows

$fields string name of the table
$table array fields as comma separated list
$addWhere [type] $addWhere: ...
Returns: array assoziative array (can have 2 or 3 level, depending on the number of result rows)
Total Usage: 19  
  4 class.tx_tandem.php
  3 pi1/class.tx_tandem_pi1.php
  2 pi2/class.tx_tandem_pi2.php
  10 pi3/class.tx_tandem_pi3.php

function getFieldValue($field, $table, $addWhere)

returns the value of a single field in a result row

$field string $field name of the field
$table string $table name of the table
$addWhere string $addWhere WHERE conditions
Returns: value of the field or false
Total Usage: 6  
  2 pi1/class.tx_tandem_pi1.php
  2 pi2/class.tx_tandem_pi2.php
  2 pi3/class.tx_tandem_pi3.php

function getDataFromSession($table,$sessionData)

returns a list of names

$table string name of the table
$sessionData array session data
Returns: array with the data from a subarray (key is the table name)
Total Usage: 9  
  3 pi1/class.tx_tandem_pi1.php
  3 pi2/class.tx_tandem_pi2.php
  3 pi3/class.tx_tandem_pi3.php

function getList($table, $list)

returns a list of names

$table string name of the table
$list string comma separaterd list with IDs
Returns: string comma separaterd list with names
Total Usage: 2  
  1 class.tx_tandem.php
  1 pi3/class.tx_tandem_pi3.php

function getLL($string, $langkey='')

wrapper for pi_getLL adds the prefix tx_tandem to the key string

tries to get the string in langkey language (for mails, independant of the website language)

enables the display of the fieldnames of the local lang Array to help translators find the appropriate field



return string value from LOCAL_LANG

$string string $string the key for the LOCAL_LANG array
$langkey='' string $langkey the key for the language different from $this->LLkey
Returns: [type] ...
Total Usage: 259  
  62 class.tx_tandem.php
  64 pi1/class.tx_tandem_pi1.php
  1 res/class.tx_tandem_formslib.php
  50 pi2/class.tx_tandem_pi2.php
  82 pi3/class.tx_tandem_pi3.php

function loadLanguage($LLkey)

Returns:
Total Usage: 4  
  1 class.tx_tandem.php
  3 pi3/class.tx_tandem_pi3.php

function getLocalizedList($table, $list)

returns a list of names, localized(translated in Backend) if available, otherwise default language

$table string name of the table
$list string comma separaterd list with IDs
Returns: string comma separaterd list with names
Total Usage: 4  
  2 class.tx_tandem.php
  2 pi3/class.tx_tandem_pi3.php

function checkLoginStatus()

checks the login status and returns an integer

possible tandem user status values:

0 : new registered user who didn't activate his account
1 : user who changed his email and didn't activate his account
2 : new registered user who activated his account
4 : registered and activated tandem user
9 : the user has been inactive and got a request to reactivate his account


possible return values:

0 : no login
1 : user who is not yet tandem member (tandem specific data missing)
2 : user who didn't activate his account
3 : new registered user who just activated his account
4 : registered and activated tandem user

Returns: integer depending on the login status
Total Usage: 3  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function updateFeuser($tandem_user_uid)

adds several tandem specific fields to the fe_user


return void

$tandem_user_uid int $tandem_user_uid the uid of the tandem user
Returns: [type] ...
Total Usage: 2  
  1 class.tx_tandem.php
  1 pi1/class.tx_tandem_pi1.php

function getUserMessages($filter1='all', $filter2='tandem', $receivedMessages=false)

returns an array with the users messages

'today' : only messages from today,

$filter1='all' string $filter which messages to filter
$filter2='tandem' boolean $receivedMessages only select received messages
$receivedMessages=false array fields as key=>value pairs
Returns: [type] ...
Total Usage: 5  
  3 class.tx_tandem.php
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php

function formatResultValues($input_array)

formatting the values of an result array according to the field types

$input_array array $input_array: assoziative array fieldname=>fieldvalue
Returns: array assoziative array fieldname=>new fieldvalue
Total Usage: 6  
  3 pi1/class.tx_tandem_pi1.php
  2 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function extract_tstamp_from_date($s)

converts a date string into the according Unix timestamp,
depending on the dateFormat string

$s string $s date string ('24-12-2003' or '24.12.04' etc.)
Returns: int tstamp
Total Usage: 3  
  1 class.tx_tandem.php
  1 pi1/class.tx_tandem_pi1.php
  1 pi3/class.tx_tandem_pi3.php

function getAge($tstamp)

calculates the current age of a person from a Unix timestamp,

$tstamp int Unix timesatmp
Returns: int age in years
Total Usage: 5  
  1 class.tx_tandem.php
  2 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function pi_list_browseresults($showResultCount=1,$tableParams='')

customized pi function

$showResultCount=1 [type] $showResultCount: ...
$tableParams='' [type] $tableParams: ...
Returns: [type] ...
Total Usage: 2  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php

function displayFormErrors($currentEvalErrors)

sends an email to recipient

$currentEvalErrors string $recipient
string $subject
string $message
Returns: [type] ...
Total Usage: 4  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  2 pi3/class.tx_tandem_pi3.php

function renderImage($fileName)

function to display a link to the previous page

$fileName array $overrulePIvars with new values to reset the url params
Returns: string HTML
Total Usage: 2  
  1 class.tx_tandem.php
  1 pi3/class.tx_tandem_pi3.php

function backlink($overrulePIvars = array())

function to display a link to the previous page

$overrulePIvars = array() array $overrulePIvars with new values to reset the url params
Returns: string HTML
Total Usage: 4  
  2 pi1/class.tx_tandem_pi1.php
  2 pi2/class.tx_tandem_pi2.php

function addTableRow($tdVals, $rowClass='default')

function to build HTML tables

$tdVals array $tdVals values to display in table cells td
$rowClass='default' string css class
Returns: void
Total Usage: 11  
  2 class.tx_tandem.php
  6 pi1/class.tx_tandem_pi1.php
  3 pi2/class.tx_tandem_pi2.php

function buildTable($params='class="result_list_table" ')

function to build HTML tables

$params='class="result_list_table" ' string css class
Returns: string HTML table
Total Usage: 7  
  1 class.tx_tandem.php
  4 pi1/class.tx_tandem_pi1.php
  2 pi2/class.tx_tandem_pi2.php

function getLink($label, $addParams = array(), $replaceParams=array(), $class='',$title = '',$addParamsOnly = false)

returns a link in HTML format

$label string $label of the link
$addParams = array() array $addParams $key => $value of GET-parameter which should be added
$replaceParams=array() array $replaceParams $key => $value of GET-parameter which should be replaced from standard parameter array
$class='' string (optional) with a css class attribute
$title = '' [type] $title: ...
$addParamsOnly = false [type] $addParamsOnly: ...
Returns: string link HTML
Total Usage: 23  
  4 class.tx_tandem.php
  6 pi1/class.tx_tandem_pi1.php
  6 pi2/class.tx_tandem_pi2.php
  7 pi3/class.tx_tandem_pi3.php

function error($string, $lang_flag = 0)

formatting of errors

$string string $string error message
$lang_flag = 0 [type] $lang_flag: ...
Returns: HTML formatted error message
  @boolean $lang_flag if the error message should be translated (could be values from config or data base)
Total Usage: 13  
  3 class.tx_tandem.php
  4 pi1/class.tx_tandem_pi1.php
  2 pi2/class.tx_tandem_pi2.php
  4 pi3/class.tx_tandem_pi3.php

function note($string, $lang_flag = 0)

formatting of notes

$string string $string notes
$lang_flag = 0 [type] $lang_flag: ...
Returns: HTML formatted notes
  @boolean $lang_flag if the notes should be translated
Total Usage: 4  
  2 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function sendMail($recipient, $subject, $message)

wrapper for php function mail() sends an email to recipient

$recipient string $recipient
$subject string $subject
$message string $message
Returns: [type] ...
Total Usage: 16  
  5 class.tx_tandem.php
  1 pi1/class.tx_tandem_pi1.php
  10 pi3/class.tx_tandem_pi3.php

function pi_wrapInBaseClass($content)

Returns:
Total Usage: 15  
  5 pi1/class.tx_tandem_pi1.php
  4 pi2/class.tx_tandem_pi2.php
  6 pi3/class.tx_tandem_pi3.php

pi1/class.tx_tandem_pi1.php

Plugin 'Tandem' for the 'tandem' extension.

Filesize: 35 K
Func/Classes: 20
Tags: @author Nico de Haen <mail@ndh-websolutions.de>

class tx_tandem_pi1 extends tx_tandem

Returns:
Total Usage: 0  

function main($content,$conf)

main function

$content [type] $content: ...
$conf [type] $conf: ...
Returns: [type] ...
Total Usage: 0  

function init()

Returns:
Total Usage: 15  
  5 pi1/class.tx_tandem_pi1.php
  3 res/class.tx_tandem_formslib.php
  4 pi2/class.tx_tandem_pi2.php
  3 pi3/class.tx_tandem_pi3.php

function renderLoginView()

Shows the login screen

Returns: string HTML Form
Total Usage: 1  
  1 pi1/class.tx_tandem_pi1.php

function registerUserConfirmation()

Shows a welcome message and updates the status in tx_tandem_users

Returns: string HTML Form
Total Usage: 3  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function infoBar()

Renders the infoBar

Returns: string HTML
Total Usage: 2  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php

function dataMissing()

Shows amessage if the user has not yet activated his account or the tandem specific register form, if
tandem specific data is missing

Returns: string HTML Form
Total Usage: 0  

function renderNavigation()

Renders the menu

Returns: string HTML Form
Total Usage: 3  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function renderMessageView()

Renders the message list or the message form

Returns: string HTML Form
Total Usage: 2  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php

function renderTandemSearchView()

Renders the tandem search view

Returns: string HTML Form
Total Usage: 2  
  2 pi1/class.tx_tandem_pi1.php

function renderTandemSearchEditView()

Renders the tandem search edit page

Returns: string HTML Form
Total Usage: 2  
  2 pi1/class.tx_tandem_pi1.php

function createMessageForm()

form for sending messages

Returns: string HTML form
Total Usage: 2  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php

function tandemRequestForm($search_fields=array())

request form

$search_fields=array() array (optional) search_fields for loading a saved search
Returns: void
Total Usage: 2  
  2 pi1/class.tx_tandem_pi1.php

function activateUser($user_id)

performs the activation process

$user_id int $user_id uid of fe_users
Returns: string HTML
Total Usage: 1  
  1 pi3/class.tx_tandem_pi3.php

function tandemSuccess($message_uid, $user_uid)

saving a successfull tandem

$message_uid int $user_uid ID of the user who triggeredf the function
$user_uid int $message_uid ID of the message
Returns: void
Total Usage: 0  

function getTandemDetails()

details of a tandem partner and a tandem request

Returns: [type] ...
  @returns string HTML table
Total Usage: 1  
  1 pi1/class.tx_tandem_pi1.php

function getTandemSearchResult($fields)

search for a tandem partner, using values from $fields and from $this->fe_user

$fields array fields as key=>value pairs
Returns: [type] ...
Total Usage: 3  
  3 pi1/class.tx_tandem_pi1.php

function deleteRequest($uid)

deletes a requests

$uid int $uid uid of the request
Returns: string confirm message
Total Usage: 1  
  1 pi1/class.tx_tandem_pi1.php

function getUserRequests()

returns an array with the users requests

string name of the table
array fields as key=>value pairs
Returns: [type] ...
Total Usage: 4  
  4 pi1/class.tx_tandem_pi1.php

function updateFeuser($tandem_user_uid)

adds several tandem specific fields to the fe_user

the general parent function has no requests function so we wrap it here


return void

$tandem_user_uid int $tandem_user_uid the uid of the tandem user
Returns: [type] ...
Total Usage: 2  
  1 class.tx_tandem.php
  1 pi1/class.tx_tandem_pi1.php

res/class.tx_tandem_formslib.php

Base class for the 'frontendformslib' extension


modified and extended for tandem extension by

Filesize: 53 K
Func/Classes: 36
Tags: @author Robert Lemke <robert@typo3.org>
@coauthor Nico de Haen

class tx_tandem_formslib

Returns:
Total Usage: 0  

function tx_tandem_formslib(&$pObj)

Constructor for PHP4 compability

&$pObj object $pObj: Reference to the parent object (a tslib_pibase)
Returns: mixed result from the real constructor (if any)
Total Usage: 0  

function __construct(&$pObj)

Constructor, initializes basics

&$pObj object $pObj: Reference to the parent object (a tslib_pibase)
Returns: void
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function init()

Init function. Always call this function after you have configured the formObj
and before you use any data or render the form!

Returns: void
Total Usage: 15  
  5 pi1/class.tx_tandem_pi1.php
  3 res/class.tx_tandem_formslib.php
  4 pi2/class.tx_tandem_pi2.php
  3 pi3/class.tx_tandem_pi3.php

function renderWholeForm($formType = '')

Renders the whole frontend form containing the labels and fields of the current step and
various submit buttons depending on the current situation.

$formType = '' [type] $formType: ...
Returns: string HTML form containing a table of labels and fields
Total Usage: 11  
  4 pi1/class.tx_tandem_pi1.php
  3 pi2/class.tx_tandem_pi2.php
  4 pi3/class.tx_tandem_pi3.php

function renderCurrentStep()

Renders the current step containing the labels and fields of the current step

Returns: string HTML output: labels and fields
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function renderStepDisplay()

Renders an HTML div container with number and label of the current step and how
many steps are following

Returns: string HTML output.
Total Usage: 0  

function renderStepsOverview()

Renders an HTML table containing all information from the different steps.

Returns: string HTML output.
Total Usage: 0  

function wrapWithForm($content)

Wraps the given content with an HTML form tag

$content string $content: Content to be wrapped
Returns: string The given string wrapped by a configured form tag
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function renderSubmitButtons()

Renders one or more buttons (previous, next, cancel) depending on the
current settings and situation.

Returns: string HTML button(s)
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function renderSearchButtons()

Renders the buttons for the tandem search

Returns: string HTML button(s)
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function getSingleLabel($fieldConf, $rawLabelOnly = FALSE)

Returns the label of a single field wrapped into label tags. In 'tca' mode the label will be taken from
the TCA configuration of that field. It may override this label by specifiying a property 'label' in
the field configuration.

$fieldConf array $fieldconf: The configuration for that field
$rawLabelOnly = FALSE boolean $rawLabelOnly: If set to TRUE, the label won't be wrapped with <label> tags
Returns: string Label for the specified field ready for insertion into an HTML form
Total Usage: 3  
  3 res/class.tx_tandem_formslib.php

function getSingleField($fieldConf)

Returns a single field

$fieldConf array $fieldconf: The configuration for that field
Returns: string HTML representation of the given field
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function getSingleField_typeInput($fieldConf, $tcaFieldConf)

Renders a single field of the type "input"

$fieldConf array $fieldConf: The formslib specific field configuration array
$tcaFieldConf array $tcaFieldConf: The TCA configuration
Returns: string HTML representation of the field
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function getSingleField_typeText($fieldConf, $tcaFieldConf)

Renders a single field of the type "text"

$fieldConf array $fieldConf: The formslib specific field configuration array
$tcaFieldConf array $tcaFieldConf: The TCA configuration
Returns: string HTML representation of the field
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function getSingleField_typeCheck($fieldConf, $tcaFieldConf)

Renders a single field of the type "checkbox"

$fieldConf array $fieldConf: The formslib specific field configuration array
$tcaFieldConf array $tcaFieldConf: The TCA configuration
Returns: string HTML representation of the field
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function getSingleField_typeSelect_checkbox($fieldConf, $tcaFieldConf)

Renders a single field of the type "checkbox"

$fieldConf array $fieldConf: The formslib specific field configuration array
$tcaFieldConf array $tcaFieldConf: The TCA configuration
Returns: string HTML representation of the field
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function getSingleField_typeSelect($fieldConf, $tcaFieldConf)

Renders a single field of the type "select"

$fieldConf array $fieldConf: The formslib specific field configuration array
$tcaFieldConf array $tcaFieldConf: The TCA configuration
Returns: string HTML representation of the field
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function getSingleField_typeGroup($fieldConf, $tcaFieldConf)

Renders a single field of the type "group"

$fieldConf array $fieldConf: The formslib specific field configuration array
$tcaFieldConf array $tcaFieldConf: The TCA configuration
Returns: string HTML representation of the field
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function evaluate_allFields(&$fieldsValuesArr)

Evaluates all fields

&$fieldsValuesArr array &$fieldsValuesArr: An array of tables with an array of field names and values array ('table' => array('field' => 'value', 'table2' => ...). Will contain the evaluated, possibly modified values.
Returns: mixed TRUE if all fields contain allowed values, array of tables/field identifiers which caused errors (identifier: tablename|fieldname)
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function evaluate_stepFields($step, &$fieldsValuesArr)

Evaluates all fields of a certain step

$step integer $step: Step number
&$fieldsValuesArr array &$fieldsValuesArr: An array of tables with an array of field names and values array ('table' => array('field' => 'value', 'table2' => ...). Will contain the evaluated, possibly modified values.
Returns: mixed TRUE if all fields contain allowed values, array of tables/field identifiers which caused errors (identifier: tablename|fieldname)
Total Usage: 2  
  2 res/class.tx_tandem_formslib.php

function evaluate_singleField($fieldConf, $value)

Evaluates a single field

$fieldConf array $fieldConf: The configuration of the field to be checked
$value mixed $value: The value to check
Returns: array If $value was valid it will be returned (possibly modified) as the value of key 'value'. If $value was not valid, the value of key 'value' will be NULL.
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function getUploadError()

parses recursive through $_FILES to get uncomplete or failed uploads

$this->uploadError will be true after execution, if an error was found

Returns: void
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function parseErrors($item, $key)

helper function for getUploadError

sets $this->uploadError true if an error was found

$item [type] $item: ...
$key [type] $key: ...
Returns: void
Total Usage: 0  

function validateEmail($email)

validates a email adress

$email string $email
Returns: boolean true if the email is valid
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function validateDate($s)

validates a string

$s string $date
Returns: boolean true if the date is valid
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function validateFile($tcaConfig,$fileArray,$table,$field)

validates a file according to eval fields set in $tcaFieldConf

$tcaConfig array $tcaConfig: Array with the config settings
$fileArray array $fileArray filled from $_FILES
$table string $table name of the table, where the values should be uodated
$field string $field name of the field which should be uodated
Returns: array with 'value'=>'filename' which will be passed to $this->sessionData
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function saveUploadedFiles()

saves the uploaded files, (has to be called from outside!)

Returns: array
Total Usage: 1  
  1 pi3/class.tx_tandem_pi3.php

function processIncomingData()

Processes incoming POST data and stores it into the current FE session

Returns: void
Total Usage: 1  
  1 res/class.tx_tandem_formslib.php

function implode_assoc_r ($inner_glue = "=", $outer_glue = "\n", $array = null, $keepOuterKey = false)

Implodes an associative array. Similar script found on php.net

$inner_glue = "=" string $inner_glue: Glue between key and value
$outer_glue = "\n" string $outer_glue: Glue between key-value sets
$array = null array $array: The array to implode
$keepOuterKey = false boolean $keepOuterKey: If set to TRUE, keys which have a value of type array will also be added.
Returns: string Imploded array
Total Usage: 6  
  6 res/class.tx_tandem_formslib.php

function createStepConf($fieldNames, $table='', $stepLabel='', $infoText='')

Creates a configuration array for one step.

$fieldNames string $fieldNames: A comma separated list of field names
$table='' string $table: The table name for all fields. Leaving the table empty means the default table (if configured) will be used later on
$stepLabel='' string $stepLabel: A label (header) for the step. Optional. You may use language splits (LLL:EXT:yourext/locallang.php etc.)
$infoText='' string $infoText: Some text to be shown just before the form. Won't be htmlspecialchared, make sure that it doesn't contain bad HTML code!
Returns: array step configuration array
Total Usage: 9  
  2 pi1/class.tx_tandem_pi1.php
  1 res/class.tx_tandem_formslib.php
  2 pi2/class.tx_tandem_pi2.php
  4 pi3/class.tx_tandem_pi3.php

function modifyStepConf($table, $field, $stepIndex, $configArray, $label = "")

Enables the manual manipulation of single values in $tcaFieldConf

$table string $table: The table of the field to be configured
$field string $field: The field to be configured
$stepIndex integer $stepIndex: The index of the step Array which should be manipulated
$configArray array $configArray: Array with the values that should be set (overriding the TCA values)
$label = "" [type] $label: ...
Returns: void
Total Usage: 12  
  2 pi1/class.tx_tandem_pi1.php
  5 pi2/class.tx_tandem_pi2.php
  5 pi3/class.tx_tandem_pi3.php

function addFieldsToStepConf($fields, $table, $stepConfIndex)

Adding fields to the stepConf

$fields string $table: The table of the field to be configured
$table string $field: The field to be configured
$stepConfIndex integer $stepIndex: The index of the step Array
Returns: void
Total Usage: 0  

function getEnableColumns($table)

Returns:
Total Usage: 0  

function getSessionData()

Returns the current session data containing all information entered into the form fields so far.
You might want to use this data in your own functions for generating an overview of all entered data
before finally submitting the order or registration.

Returns: array session data array
Total Usage: 0  

function destroySessionData()

Destroys the session data for the current form. Call this method if you'd like to discard the
form data after a successful submission of the form or if submission should be cancelled.

Returns: void;
Total Usage: 10  
  5 pi1/class.tx_tandem_pi1.php
  3 pi2/class.tx_tandem_pi2.php
  2 pi3/class.tx_tandem_pi3.php

pi2/class.tx_tandem_pi2.php

Plugin 'mentor' for the 'Tandem' extension.

Filesize: 27 K
Func/Classes: 16
Tags: @author Nico de Haen <mail@ndh-websolutions.de>

class tx_tandem_pi2 extends tx_tandem

Returns:
Total Usage: 0  

function main($content,$conf)

main function

$content [type] $content: ...
$conf [type] $conf: ...
Returns: [type] ...
Total Usage: 0  

function init()

Returns:
Total Usage: 15  
  5 pi1/class.tx_tandem_pi1.php
  3 res/class.tx_tandem_formslib.php
  4 pi2/class.tx_tandem_pi2.php
  3 pi3/class.tx_tandem_pi3.php

function registerUserConfirmation()

Shows a welcome message and updates the status in tx_tandem_users

Returns: string HTML Form
Total Usage: 3  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function renderNavigation()

Renders the menu

Returns: string HTML Form
Total Usage: 3  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function infoBar()

Renders the infoBar

Returns: string HTML Form
Total Usage: 2  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php

function renderWelcomeView()

Renders the welcome message and the links on the startpage

Returns: string HTML Form
Total Usage: 2  
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function setStatus()

Updates the user status: searching/mentoring active or not
set_status = 1 means activate

Returns: string HTML Form
Total Usage: 2  
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function renderMessageView()

Renders the message list or the message form

Returns: string HTML Form
Total Usage: 2  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php

function renderSearchView()

Renders the mentoring search view

Returns: string HTML Form
Total Usage: 1  
  1 pi2/class.tx_tandem_pi2.php

function createMessageForm()

form for sending messages

Returns: string HTML form
Total Usage: 2  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php

function searchForm($searchFields=array())

search form

$searchFields=array() array (optional) searchFields for loading a saved search
Returns: void
Total Usage: 1  
  1 pi2/class.tx_tandem_pi2.php

function activateUser($user_id)

performs the activation process

$user_id int $user_id uid of fe_users
Returns: string HTML
Total Usage: 1  
  1 pi3/class.tx_tandem_pi3.php

function getDetails()

details of a potential mentoring partner

Returns: [type] ...
  @returns string HTML table
Total Usage: 1  
  1 pi2/class.tx_tandem_pi2.php

function getSearchResult($fields)

search for a tandem partner, using values from $fields and from $this->fe_user

$fields array fields as key=>value pairs
Returns: [type] ...
Total Usage: 2  
  2 pi2/class.tx_tandem_pi2.php

function getLL($string)

wrapper for pi_getLL adds the prefix mentor_ to the key string if the plugin should display the view for mentors
so we don't need to differentiate each time we are calling $this->getLL


return string value from LOCAL_LANG

$string string $string the key for the LOCAL_LANG array
Returns: [type] ...
Total Usage: 259  
  62 class.tx_tandem.php
  64 pi1/class.tx_tandem_pi1.php
  1 res/class.tx_tandem_formslib.php
  50 pi2/class.tx_tandem_pi2.php
  82 pi3/class.tx_tandem_pi3.php

pi3/class.tx_tandem_pi3.php

Plugin 'Registration foprm' for the 'Tandem' extension.

Filesize: 50 K
Func/Classes: 24
Tags: @author Nico de Haen <mail@ndh-websolutions.de>

class tx_tandem_pi3 extends tx_tandem

Returns:
Total Usage: 0  

function main($content,$conf)

main function

$content [type] $content: ...
$conf [type] $conf: ...
Returns: [type] ...
Total Usage: 0  

function registerUserConfirmation()

Shows a welcome message and updates the status in tx_tandem_users

Returns: string HTML Form
Total Usage: 3  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function renderNavigation()

Renders the menu

Returns: string HTML Form
Total Usage: 3  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function renderWelcomeView()

Renders the welcome message and the links on the startpage

Returns: string HTML Form
Total Usage: 2  
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function setStatus()

Updates the user status: searching/mentoring active or not
set_status = 1 means activate

Returns: string HTML Form
Total Usage: 2  
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function renderEditProfileView()

Renders the edit profiles view

Returns: string HTML Form
Total Usage: 1  
  1 pi3/class.tx_tandem_pi3.php

function renderEditProfileForm($profileType)

renders the edit profile form

$profileType string $profileType which kind of form to render
Returns: void
Total Usage: 1  
  1 pi3/class.tx_tandem_pi3.php

function registerForm()

renders the registration form

Returns: string HTML
Total Usage: 3  
  1 pi1/class.tx_tandem_pi1.php
  2 pi3/class.tx_tandem_pi3.php

function renderDisabledFields($fields,$values,$table)

Rendering the disabled fields, these will be showed but not editable

$fields array $fields Array with the fieldnames
$values array $values associative array where the values are stored
$table [type] $table: ...
Returns: string HTML Form
Total Usage: 2  
  2 pi3/class.tx_tandem_pi3.php

function cronjobTasks()

performs the mailings and the disabling of inactive users

possible cron_status of the messages:

0 => New
1 => 1st mail sent
2 => 2nd mail sent

4 => both tandem partner have reported or one has reported a failure

Returns: string HTML
Total Usage: 2  
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function sendConfirmRequest($recipient, $sender, $crdate, $signature, $is_sender, $status, $mentor, $langkey = '')

sends mails to users

$recipient string $recipient
$sender array $values associative array where the values are stored
$crdate [type] $crdate: ...
$signature [type] $signature: ...
$is_sender [type] $is_sender: ...
$status [type] $status: ...
$mentor [type] $mentor: ...
$langkey = '' [type] $langkey: ...
Returns: void
Total Usage: 4  
  4 pi3/class.tx_tandem_pi3.php

function decryptTandemkey($tandem_key)

splits the tandem key and passes the parts of the key to the status
update function or activates the user

the parts should be separated by an 'l' and consist of
reported status 'l' request ID 'l' user ID 'l' encrypted username/password)
if it's a status update and x 'l' user ID 'l' encrypted username/password)
if it's an activation

$tandem_key $tandem_key tandem key
Returns: string HTML
Total Usage: 3  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function activateUser($user_id)

performs the activation process

$user_id int $user_id uid of fe_users
Returns: string HTML
Total Usage: 1  
  1 pi3/class.tx_tandem_pi3.php

function updateUsergroupField($user_id,$new_group_id,$old_group_id=false)

updates the usergroup field of fe_users
replaces an old group with a new one, or just adds a field

$user_id [type] $user_id: ...
$new_group_id [type] $new_group_id: ...
$old_group_id=false [type] $old_group_id: ...
Returns: void
Total Usage: 3  
  3 pi3/class.tx_tandem_pi3.php

function statusUpdate($user_id,$message_id,$status)

performs the mailings and sets the status of the message (initated from links in mails or message list


possible status of messages

1 => Tandem Success reported from sender
2 => Tandem Failure reported from sender
3 => Tandem Success reported from recipient
4 => Tandem Failure reported from recipient
5 => Tandem Failure confirmed
6 => Tandem Success reported

9 => Tandem inconsistence

$user_id int $user_id the uid of the user who initiated the status update
$message_id int $message_id the uid of the message which status updated
$status int $status the status that is reported (1 for success, 2 for failure)
Returns: string HTML
Total Usage: 2  
  1 class.tx_tandem.php
  1 pi3/class.tx_tandem_pi3.php

function saveSuccess($message_uid, $user_uid)

saving a successfull tandem

$message_uid int $user_uid ID of the user who triggeredf the function
$user_uid int $message_uid ID of the message
Returns: void
Total Usage: 2  
  1 class.tx_tandem.php
  1 pi3/class.tx_tandem_pi3.php

function deleteAccount($uid = 0)

sets the delete flag to true in fe_users, tx_tandem_users,
tx_tandem_requests, tx_tandem_messages and tx_tandem_list

called from cronjob or if a user deletes his account

(0 if it's the user who called this function)

$uid = 0 int $uid the uid of the fe_users who's account should be deleted
Returns: [type] ...
Total Usage: 1  
  1 pi3/class.tx_tandem_pi3.php

function getLocalizedList($table, $list)

returns a list of names, localized if available, otherwise default language

$table string name of the table
$list string comma separaterd list with IDs
Returns: string comma separaterd list with names
Total Usage: 4  
  2 class.tx_tandem.php
  2 pi3/class.tx_tandem_pi3.php

function getList($table, $list)

returns a list of names

$table string name of the table
$list string comma separaterd list with IDs
Returns: string comma separaterd list with names
Total Usage: 2  
  1 class.tx_tandem.php
  1 pi3/class.tx_tandem_pi3.php

function getDataFromSession($table,$sessionData)

returns a list of names

$table string name of the table
$sessionData array session data
Returns: array with the data from a subarray (key is the table name)
Total Usage: 9  
  3 pi1/class.tx_tandem_pi1.php
  3 pi2/class.tx_tandem_pi2.php
  3 pi3/class.tx_tandem_pi3.php

function formatResultValues($input_array)

formatting the values of an result array according to the field types

$input_array array $input_array: assoziative array fieldname=>fieldvalue
Returns: array assoziative array fieldname=>new fieldvalue
Total Usage: 6  
  3 pi1/class.tx_tandem_pi1.php
  2 pi2/class.tx_tandem_pi2.php
  1 pi3/class.tx_tandem_pi3.php

function displayFormErrors($currentEvalErrors)

displays the form errors

$currentEvalErrors array fieldnames and eval errors
Returns: string HTML
Total Usage: 4  
  1 pi1/class.tx_tandem_pi1.php
  1 pi2/class.tx_tandem_pi2.php
  2 pi3/class.tx_tandem_pi3.php

function encrypt($string)

encrypts a string using Typo3 encryption key, user to compare the md5 hash of username and mailadress

$string string
Returns: string the encrypted string
Total Usage: 5  
  5 pi3/class.tx_tandem_pi3.php