/** * @param $singlePid * @param $row * @param $piVarsArray * @param bool $urlOnly * @return array|string */ function getSingleViewLink(&$singlePid, &$row, $piVarsArray, $urlOnly = false) { $tmpY = false; $tmpM = false; $tmpD = false; if ($this->conf['useHRDates']) { $piVarsArray['pS'] = null; $piVarsArray['pL'] = null; $piVarsArray['arc'] = null; if ($this->conf['useHRDatesSingle']) { $tmpY = $this->piVars['year']; $tmpM = $this->piVars['month']; $tmpD = $this->piVars['day']; $this->getHrDateSingle($row['datetime']); $piVarsArray['year'] = $this->piVars['year']; $piVarsArray['month'] = $this->piVars['month']; $piVarsArray['day'] = $this->piVars['day'] ? $this->piVars['day'] : null; } } else { $piVarsArray['year'] = null; $piVarsArray['month'] = null; } $piVarsArray['tt_news'] = $row['uid']; $linkWrap = explode($this->token, $this->pi_linkTP_keepPIvars($this->token, $piVarsArray, $this->allowCaching, $this->conf['dontUseBackPid'], $singlePid)); $url = $this->cObj->lastTypoLinkUrl; // hook for processing of links if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['getSingleViewLinkHook'])) { foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['getSingleViewLinkHook'] as $_classRef) { $_procObj =& t3lib_div::getUserObj($_classRef); $params = array('singlePid' => &$singlePid, 'row' => &$row, 'piVarsArray' => $piVarsArray); $_procObj->processSingleViewLink($linkWrap, $url, $params, $this); } } $this->local_cObj->LOAD_REGISTER(array('newsMoreLink' => $linkWrap[0] . $this->pi_getLL('more') . $linkWrap[1], 'newsMoreLink_url' => $url), ''); if ($this->conf['useHRDates'] && $this->conf['useHRDatesSingle']) { $this->piVars['year'] = $tmpY; $this->piVars['month'] = $tmpM; $this->piVars['day'] = $tmpD; } if ($urlOnly) { return $url; } else { return $linkWrap; } }