[TYPO3-UG Italy] Albo pretorio
Mauro
webmaster at csia.cs.it
Tue Jul 3 18:14:12 CEST 2007
Ciao Davide,
ho provato... ma niente, mi manderesti direttamente l'estensione modificata?
per installarla hai usato direttamente la vers. 3.4 o la 3.8?
Saluti e grazie ancora per la collaborazione,
Mauro
"Davide Principi" <d.principi at nospamme.provincia.ps.it> ha scritto nel
messaggio
news:mailman.1.1183456734.21633.typo3-ug-italy at lists.netfielders.de...
> Mauro ha scritto:
>> ho contattato l'autore Silvio Spagnoli, che mi ha confermato i problemi:
>> " L'unica cosa che posso dirti ad ora ? che sicuramente Davide Principi
>> cos?
>> come altri utenti hanno eseguito un passaggio da una situazione con la
>> versione 3.8.1 alla versione 4.1.1 e non sono partiti da una nuova
>> installazione 4.1.1."
>>
>> Io ho provato anche ad utilizzare l'estensione con typo3 3.8.1, ma
>> niente,
>> mi sapresti indicare la procedura utilizzata da te per farla funzionare?
>
> Ho visto che ci sono stati degli aggiornamenti di albo_pretorio;
> l'ultima è la 0.1.13.
>
> Non so se ci sono ancora dei problemi di compatibilità con T3 4.0. La
> 0.1.12 (che è in uso su una nostra installazione) ne aveva, e per
> risolverli ho dovuto modificare qualche chiamata.
>
> Allego un diff.
>
> Aspettiamo anche noi un rilascio "ufficiale" per typo3 v4
>
> Ciao,
>
> --
> Davide Principi
> CSPA Unipersonale S.r.l.
> Provincia di Pesaro e Urbino
>
> *DocWeb*
> sistema di gestione portali
> http://www.docweb.provincia.pu.it
>
--------------------------------------------------------------------------------
> --- pi1/class.tx_albopretorio_pi1.php.orig.12 2007-07-03
> 11:49:21.996039544 +0200
> +++ pi1/class.tx_albopretorio_pi1.php 2007-01-19 13:32:23.000000000 +0100
> @@ -404,10 +404,22 @@
> * @param integer $uid : it of the current news
> record
> * @return string html code for the related news
> list
> */
> + /**
> + * Find related news records and pages, add links to them and wrap them
> with stdWraps from TS.
> + *
> + * @param integer $uid of the current news record
> + * @return string html code for the related news list
> + */
> function getRelated($uid) {
> $lConf = $this->conf['getRelatedCObject.'];
> // find visible categories and their singlePids
> - $catres = $GLOBALS['TYPO3_DB']->exec_SELECTquery
> ('tt_news_cat.uid,tt_news_cat.single_pid',
> 'tt_news_cat','1=1'.$this->SPaddWhere.$this->enableCatFields);
> +
> + $catres = $GLOBALS['TYPO3_DB']->exec_SELECTquery (
> + 'tt_news_cat.uid,tt_news_cat.single_pid',
> + 'tt_news_cat',
> + '1=1'.$this->SPaddWhere.$this->enableCatFields);
> +
> +
> $catTemp = array();
> $sPidByCat = array();
> while ($catrow =
> $GLOBALS['TYPO3_DB']->sql_fetch_assoc($catres)) {
> @@ -420,11 +432,14 @@
>
> if ($this->conf['usePagesRelations']) {
> $relPages = array();
> +
> $pres = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
>
> 'uid,title,tstamp,description,subtitle,M.tablenames',
> 'pages,tt_news_related_mm AS M',
> - 'pages.uid=M.uid_foreign AND
> M.uid_local=' . $uid . ' AND
> M.tablenames="pages"'.$this->cObj->enableFields('pages'),
> + 'pages.uid=M.uid_foreign AND M.uid_local=' . $uid . ' AND
> M.tablenames='.$GLOBALS['TYPO3_DB']->fullQuoteStr('pages',
> 'tt_news_related_mm').$this->cObj->enableFields('pages'),
> '', 'title');
> +
> +
> while ($prow =
> $GLOBALS['TYPO3_DB']->sql_fetch_assoc($pres)) {
> if
> ($GLOBALS['TSFE']->sys_language_content) {
> $prow =
> $GLOBALS['TSFE']->sys_page->getPageOverlay($prow,
> $GLOBALS['TSFE']->sys_language_content);
> @@ -443,7 +458,7 @@
> }
> $select_fields = 'DISTINCT uid, pid, title, short,
> datetime, archivedate, type, page, ext_url, sys_language_uid, l18n_parent,
> M.tablenames';
>
> - $where = 'tt_news.uid=M.uid_foreign AND M.uid_local=' .
> $uid . ' AND M.tablenames!="pages"';
> + $where = 'tt_news.uid=M.uid_foreign AND M.uid_local=' . $uid . ' AND
> M.tablenames!='.$GLOBALS['TYPO3_DB']->fullQuoteStr('pages',
> 'tt_news_related_mm');
>
> if ($lConf['groupBy']) {
> $groupBy = trim($lConf['groupBy']);
> @@ -453,14 +468,21 @@
> }
>
> if ($this->conf['useBidirectionalRelations']) {
> - $where = '(('.$where.') OR
> (tt_news.uid=M.uid_local AND M.uid_foreign=' . $uid .' AND
> M.tablenames!="pages"))';
> + $where = '(('.$where.') OR (tt_news.uid=M.uid_local AND M.uid_foreign='
> . $uid .' AND M.tablenames!='.$GLOBALS['TYPO3_DB']->fullQuoteStr('pages',
> 'tt_news_related_mm').'))';
> }
>
> - $res =
> $GLOBALS['TYPO3_DB']->exec_SELECTquery($select_fields,
> 'tt_news,tt_news_related_mm AS M', $where . $this->enableFields. $groupBy,
> $orderBy);
> + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
> + $select_fields,
> + 'tt_news,tt_news_related_mm AS M',
> + $where . $this->enableFields,
> + $groupBy,
> + $orderBy);
> +
> +
> +
> if ($res) {
> $relrows = array();
> while ($relrow =
> $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
> -
> $currentCats = array();
> if
> ($this->conf['checkCategoriesOfRelatedNews'] ||
> $this->conf['useSPidFromCategory']) {
> $currentCats =
> $this->getCategories($relrow['uid'],true);
> @@ -491,7 +513,6 @@
> $relrows =
> array_merge_recursive($relPages,$relrows);
> }
>
> -
> $veryLocal_cObj =
> t3lib_div::makeInstance('tslib_cObj'); // Local cObj.
> $lines = array();
> foreach($relrows as $k => $row) {
> @@ -519,9 +540,9 @@
>
> if
> (!$this->conf['dontUseBackPid']) {
>
> $paramArray['tx_albopretorio_pi1[backPid]'] =
> 'tx_albopretorio_pi1[backPid]=' . $this->config['backPid'];
> -
> $paramArray['tx_albopretorio_pi1[backPid]'] =
> 'tx_albopretorio_pi1[backPid]=' . $this->config['backPid'];
> }
> $newsAddParams = '&' .
> implode($paramArray, '&');
> + // debug ($newsAddParams);
> }
> // load the parameter string into
> the register 'newsAddParams' to access it from TS
>
> $veryLocal_cObj->LOAD_REGISTER(array('newsAddParams' => $newsAddParams),
> '');
> @@ -531,8 +552,10 @@
> }
> $sPid =
> ($catSPid?$catSPid:$this->config['singlePid']);
>
> $veryLocal_cObj->LOAD_REGISTER(array('newsSinglePid' => $sPid), '');
> + if
> (!$this->conf['getRelatedCObject.']['10.']['default.']['10.']['typolink.']['parameter']
> || $catSPid) {
>
> $this->conf['getRelatedCObject.']['10.']['default.']['10.']['typolink.']['parameter']
> = $sPid;
> }
> + }
> $lines[] =
> $veryLocal_cObj->cObjGetSingle($this->conf['getRelatedCObject'],
> $this->conf['getRelatedCObject.'], 'getRelated');
> }
> return implode('', $lines);
>
More information about the TYPO3-UG-italy
mailing list