[TYPO3-dam] dam downloads...again!
Héctor Ordóñez Taboada
ordonhez_taboada_hector at hotmail.com
Thu Jan 11 09:19:15 CET 2007
> > - it selects also children categories when searching in the parent one,
Just in case you need this as well:
if ($this->cat) {
$cat2[] = $cat;
#$cat2[] = 3;
$cat3 = &$cat2;
foreach ($cat3 as $category) {
$resul = $GLOBALS['TYPO3_DB']-> exec_SELECTquery
('uid','tx_dam_cat','parent_id='.$category,'','','');
while ($temp = $GLOBALS['TYPO3_DB']-> sql_fetch_row($resul)){
$cat2[] = $temp[0];
}
}
$cat2 = implode(",",$cat2);
}
and then pass it to the array mmcat insted of $cat.
> > - it offers the possibility of selecting the fields in which to search
> > for in the frontend, among those relevant,
> > - it displays each element only once independently that it has more
> > than one category.
For the content i did the same and for the count:
if ($count) {
$queryParts = array(
#'SELECT' => 'count(*)',
'SELECT' => 'count(DISTINCT '.$table.'.uid)',
'FROM' => $TABLENAMES,
'WHERE' => $WHERE,
'GROUPBY' => '',
'ORDERBY' => '',
'LIMIT' => ''
);
}
To not modify it in the pi_base i copied the procedure into the
dam_downloads class and changed that line.
Hope it helps!
Regards,
Hector.
>
>Hi,
>
>I am also trying to do 3) and maybe 1)
>
>Can you please tell me how you solved 3)? I tried putting a "uid" into
>the $groupBy-param of the search query and it works for the content, but
>does not for the count. And that is because pi_list_query in
>class.tslib_pibase.php decides to throw away the $groupBy-param when
>$count == 1 (I wonder if this is a bug or intentional?)...
>
>best regards,
>Dieter Rothacker
>_______________________________________________
>TYPO3-project-dam mailing list
>TYPO3-project-dam at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-dam
_________________________________________________________________
Descarga gratis la Barra de Herramientas de MSN
http://www.msn.es/usuario/busqueda/barra?XAPID=2031&DI=1055&SU=http%3A//www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH
More information about the TYPO3-project-dam
mailing list