[Typo3] smile_categorization - Boolean criteria for "selecting" ?
Francesco di Francia
darksky77 at email.it
Tue May 24 11:02:34 CEST 2005
I answer my self, may be this could help other user in the future.
Ok, i contacted author of the extension.
He said that the next version of this extension will contain a backend
switch to select beetwen OR and AND criteria.
At the moment the only way to have this extension working with AND
criteria is by hardocoding some php file. Here's what the author of
extension said to change:
file class.ux_tslib_content.php :
line 101 (replace the first OR by AND) :
for($i=1;$i<sizeof($categories_array);$i++) {
$where .= 'AND
((tx_smilecategorization_categories='.$categories_array[$i].') OR
(tx_smilecategorization_categories LIKE \'%,'.$categories_array
[$i].',%\') OR (tx_smilecategorization_categories LIKE
\''.$categories_array[$i].',%\') OR (tx_smilecategorization_categories
LIKE \'%,'.$categories_array[$i].'\')) ';
}
line 163 (replace the first OR by AND) :
for($i=1;$i<sizeof($categories_array);$i++) {
$where .= 'AND
((tx_smilecategorization_categories='.$categories_array[$i].') OR
(tx_smilecategorization_categories LIKE \'%,'.$categories_array
[$i].',%\') OR (tx_smilecategorization_categories LIKE
\''.$categories_array[$i].',%\') OR (tx_smilecategorization_categories
LIKE \'%,'.$categories_array[$i].'\')) ';
}
file smile_categorization.php :
line 156 (replace OR by AND) :
while($i<sizeof($categories_array)) {
$where .=
'((tx_smilecategorization_categories='.$categories_array[$i].') OR
(tx_smilecategorization_categories LIKE \'%,'.$categories_array
[$i].',%\') OR (tx_smilecategorization_categories LIKE
\''.$categories_array[$i].',%\') OR (tx_smilecategorization_categories
LIKE \'%,'.$categories_array[$i].'\'))';
$i++;
if($i<sizeof($categories_array)) {
$where .= ' AND ';
}
}
More information about the TYPO3-english
mailing list