Bug #16116 » tslib_content-submit2.diff
class.tslib_content-SUBMIT_IMAGE2.php 2006-06-08 18:47:29.000000000 +0200 | ||
---|---|---|
* @link http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=352&cHash=379c60f8bc
|
||
*/
|
||
function FILE($conf) {
|
||
$theValue = $this->fileResource($this->stdWrap($conf['file'],$conf['file.']), trim($this->getAltParam($conf)));
|
||
$theValue = $this->fileResource($this->stdWrap($conf['file'],$conf['file.']), trim($this->getAltParam($conf, false)));
|
||
if ($conf['linkWrap']) {
|
||
$theValue = $this->linkWrap($theValue,$conf['linkWrap']);
|
||
}
|
||
... | ... | |
case 'submit':
|
||
$value=trim($parts[2]);
|
||
if ($conf['image.']) {
|
||
$this->data[$this->currentValKey]=$value;
|
||
$image=$this->IMAGE($conf['image.']);
|
||
} else $image='';
|
||
if($image) {
|
||
$fieldCode = str_replace('<img','<input type="image"'.$addParams.' name="'.$confData['fieldname'].'"' ,$image);
|
||
$this->data[$this->currentValKey] = $value;
|
||
$image = $this->IMG_RESOURCE($conf['image.']);
|
||
$params = $conf['image.']['params'] ? ' '.$conf['image.']['params'] : '';
|
||
$params .= $this->getAltParam($conf['image.'], false);
|
||
$params .= $addParams;
|
||
} else {
|
||
$image = '';
|
||
}
|
||
if ($image) {
|
||
$fieldCode=sprintf('<input type="image" name="%s"%s src="%s"%s />',
|
||
$confData['fieldname'], $elementIdAttribute, $image, $params);
|
||
} else {
|
||
$fieldCode=sprintf('<input type="submit" name="%s"%s value="%s"%s />',
|
||
$confData['fieldname'], $elementIdAttribute, t3lib_div::deHSCentities(htmlspecialchars($value)), $addParams);
|
||
... | ... | |
}
|
||
/**
|
||
* An abstraction method which creates an alt or title parameter for an HTML img tag.
|
||
* An abstraction method which creates an alt or title parameter for an HTML img, applet, area or input element and the FILE content element.
|
||
* From the $conf array it implements the properties "altText", "titleText" and "longdescURL"
|
||
*
|
||
* @param array TypoScript configuration properties
|
||
* @param boolean If set, the longdesc attribute will be generated - must only be used for img elements!
|
||
* @return string Parameter string containing alt and title parameters (if any)
|
||
* @see IMGTEXT(), cImage()
|
||
* @see IMGTEXT(), FILE(), FORM(), cImage(), filelink()
|
||
*/
|
||
function getAltParam($conf) {
|
||
function getAltParam($conf, $longDesc=true) {
|
||
$altText = trim($this->stdWrap($conf['altText'], $conf['altText.']));
|
||
$titleText = trim($this->stdWrap($conf['titleText'],$conf['titleText.']));
|
||
$longDesc = trim($this->stdWrap($conf['longdescURL'],$conf['longdescURL.']));
|
||
... | ... | |
$GLOBALS['TSFE']->set_no_cache(); // Special content is about to be shown, so the cache must be disabled.
|
||
$style = $conf['styleAttribute'] ? ' style="'.htmlspecialchars($conf['styleAttribute']).'"' : '';
|
||
$iconTitle = $this->stdWrap($conf['iconTitle'],$conf['iconTitle.']);
|
||
$iconImg = $conf['iconImg'] ? $conf['iconImg'] : '<img src="'.TYPO3_mainDir.'gfx/edit_fe.gif" width="11" height="12" border="0" align="top" title="'.t3lib_div::deHSCentities(htmlspecialchars($iconTitle)).'"'.$style.' class="frontEndEditIcons" alt="" title="" />';
|
||
$iconImg = $conf['iconImg'] ? $conf['iconImg'] : '<img src="'.TYPO3_mainDir.'gfx/edit_fe.gif" width="11" height="12" border="0" align="top" title="'.t3lib_div::deHSCentities(htmlspecialchars($iconTitle)).'"'.$style.' class="frontEndEditIcons" alt="" />';
|
||
$nV=t3lib_div::_GP('ADMCMD_view')?1:0;
|
||
$adminURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL').TYPO3_mainDir;
|
||
$icon = $this->editPanelLinkWrap_doWrap($iconImg, $adminURL.'alt_doc.php?edit['.$rParts[0].']['.$editUid.']=edit&columnsOnly='.rawurlencode($fieldList).'&noView='.$nV.$addUrlParamStr,implode(':',$rParts));
|
- « Previous
- 1
- 2
- Next »