Bug #14671 » pibase_cleanup.diff
class.tslib_pibase.php 2005-05-22 15:42:07.191875424 +0200 | ||
---|---|---|
*
|
||
*/
|
||
/**
|
||
* Base class for frontend plugins
|
||
* Most modern frontend plugins are extension classes of this one.
|
||
... | ... | |
* @subpackage tslib
|
||
*/
|
||
class tslib_pibase {
|
||
// Reserved variables:
|
||
var $cObj; // The backReference to the mother cObj object set at call time
|
||
var $prefixId; // Should be same as classname of the plugin, used for CSS classes, variables
|
||
... | ... | |
var $pi_EPtemp_cObj;
|
||
var $pi_tmpPageId=0;
|
||
/***************************
|
||
*
|
||
* Init functions
|
||
... | ... | |
}
|
||
}
|
||
/***************************
|
||
*
|
||
* Link functions
|
||
... | ... | |
return $str;
|
||
}
|
||
/***************************
|
||
*
|
||
* Functions for listing, browsing, searching etc.
|
||
... | ... | |
return '<tr'.$this->pi_classParam('listrow-header').'><td><p>[dummy header row]</p></td></tr>';
|
||
}
|
||
/***************************
|
||
*
|
||
* Stylesheet, CSS
|
||
*
|
||
**************************/
|
||
/**
|
||
* Returns a class-name prefixed with $this->prefixId and with all underscores substituted to dashes (-)
|
||
*
|
||
... | ... | |
function pi_wrapInBaseClass($str) {
|
||
return '
|
||
<!--
|
||
BEGIN: Content of extension "'.$this->extKey.'", plugin "'.$this->prefixId.'"
|
||
... | ... | |
';
|
||
}
|
||
/***************************
|
||
*
|
||
* Frontend editing: Edit panel, edit icons
|
||
... | ... | |
return $content;
|
||
}
|
||
/***************************
|
||
*
|
||
* Localization, locallang functions
|
||
*
|
||
**************************/
|
||
/**
|
||
* Returns the localized label of the LOCAL_LANG key, $key
|
||
* Notice that for debugging purposes prefixes for the output values can be set with the internal vars ->LLtestPrefixAlt and ->LLtestPrefix
|
||
... | ... | |
}
|
||
$output = $this->LLtestPrefix.$word;
|
||
if ($hsc) $output = htmlspecialchars($output);
|
||
if ($hsc) {
|
||
$output = htmlspecialchars($output);
|
||
}
|
||
return $output;
|
||
}
|
||
... | ... | |
$this->LOCAL_LANG_loaded = 1;
|
||
}
|
||
/***************************
|
||
*
|
||
* Database, queries
|
||
... | ... | |
$WHERE = trim($WHERE);
|
||
// Add '$addWhere'
|
||
if ($addWhere) {$WHERE.=' '.$addWhere.chr(10);}
|
||
if ($addWhere) {
|
||
$WHERE.=' '.$addWhere.chr(10);
|
||
}
|
||
// Search word:
|
||
if ($this->piVars['sword'] && $this->internal['searchFieldList']) {
|
||
... | ... | |
* @return string List of PID values (comma separated)
|
||
*/
|
||
function pi_getPidList($pid_list,$recursive=0) {
|
||
if (!strcmp($pid_list,'')) $pid_list = $GLOBALS['TSFE']->id;
|
||
if (!strcmp($pid_list,'')) {
|
||
$pid_list = $GLOBALS['TSFE']->id;
|
||
}
|
||
$recursive = t3lib_div::intInRange($recursive,0);
|
||
$pid_list_arr = array_unique(t3lib_div::trimExplode(',',$pid_list,1));
|
||
... | ... | |
$val = t3lib_div::intInRange($val,0);
|
||
if ($val) {
|
||
$_list = $this->cObj->getTreeList(-1*$val, $recursive);
|
||
if ($_list) $pid_list[] = $_list;
|
||
if ($_list) {
|
||
$pid_list[] = $_list;
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
return $outArr;
|
||
}
|
||
/***************************
|
||
*
|
||
* Various
|
||
... | ... | |
$fList = t3lib_div::trimExplode(',',$fList,1);
|
||
$tempPiVars = $this->piVars;
|
||
while(list(,$k)=each($fList)) {
|
||
if (!t3lib_div::testInt($tempPiVars[$k]) || $tempPiVars[$k]<$lowerThan) unset($tempPiVars[$k]);
|
||
if (!t3lib_div::testInt($tempPiVars[$k]) || $tempPiVars[$k]<$lowerThan) {
|
||
unset($tempPiVars[$k]);
|
||
}
|
||
}
|
||
if (!count($tempPiVars)) {
|
||
return 1;
|
||
}
|
||
if (!count($tempPiVars)) return 1;
|
||
}
|
||
/**
|
||
... | ... | |
}
|
||
}
|
||
}
|
||
if (!count($inArray)) return 1;
|
||
if (!count($inArray)) {
|
||
return 1;
|
||
}
|
||
}
|
||
/**
|
||
... | ... | |
*/
|
||
function pi_RTEcssText($str) {
|
||
$parseFunc = $GLOBALS['TSFE']->tmpl->setup['lib.']['parseFunc_RTE.'];
|
||
if (is_array($parseFunc)) $str = $this->cObj->parseFunc($str, $parseFunc);
|
||
if (is_array($parseFunc)) {
|
||
$str = $this->cObj->parseFunc($str, $parseFunc);
|
||
}
|
||
return $str;
|
||
}
|
||
/*******************************
|
||
*
|
||
* FlexForms related functions
|
||
... | ... | |
// Converting flexform data into array:
|
||
if (!is_array($this->cObj->data['pi_flexform']) && $this->cObj->data['pi_flexform']) {
|
||
$this->cObj->data['pi_flexform'] = t3lib_div::xml2array($this->cObj->data['pi_flexform']);
|
||
if (!is_array($this->cObj->data['pi_flexform'])) $this->cObj->data['pi_flexform']=array();
|
||
if (!is_array($this->cObj->data['pi_flexform'])) {
|
||
$this->cObj->data['pi_flexform']=array();
|
||
}
|
||
}
|
||
}
|
||
- « Previous
- 1
- 2
- Next »