Non ne sono sicuro perchè faccio fatica a capirci qualcosa, ma nel file search.php sotto
components/com_customproperties/models/
ho trovato queste stringhe di codice che potrebbero riferirsi a ciò che mi dicevi (spero):
.....
if(!empty($tags) && !is_array($tags)){ // TAG SEARCH
$search_pars['tagId'] = $tags ;
$fromstr[] = "INNER JOIN #__custom_properties AS cp
ON(c.".$ce->id." = cp.content_id)
INNER JOIN #__custom_properties_values AS v
ON (cp.value_id = v.id )";
$wherestr[] = "v.id = '$tags' ";
$wherestr[] = "cp.ref_table = '".$ce->table."' ";
elseif(!empty($tags) && is_array($tags)){
$search_pars['tagId'] = $tags ;
$i = 0;
foreach($tags as $tag){
$fromstr[] = "INNER JOIN #__custom_properties AS cp$i
ON(c.".$ce->id." = cp$i.content_id)
INNER JOIN #__custom_properties_values AS v$i
ON (cp$i.value_id = v$i.id ) ";
$wherestr[] = "v$i.id = '$tag' ";
$wherestr[] = "cp$i.ref_table = '".$ce->table."' ";
$i++;
}
...............
............
if(!empty($tags) && !is_array($tags) && $params->get('show_tags')){
$this->tagname = getTagNameById($tags, $params);
$search_pars['tagId'] = $tags;
}
.......
e alla fine..
/**
* Method to return the tag name given the tag id
*
* @param string tag id
* @param object component params
* @access private
* @returns string
*/
function getTagNameById($tagId, $params){
$database = JFactory::getDBO();
$query = "SELECT f.id as fid, f.label as name, v.id as vid, v.label
FROM #__custom_properties_fields AS f
INNER JOIN #__custom_properties_values AS v
ON (f.id = v.field_id )
WHERE v.id = '$tagId'
LIMIT 1";
$database->setQuery("$query");
$result = $database->loadObject();
if($result){
$tagname = $params->get('show_tag_name') ? $result->name.":".$result->label : $result->label ;
return $tagname;
}
}
Corretto?