mmm no one...
I dunno how to echo or display it.
I'll explain :
1 : I built a ZOO category and types I named Profiles
2 : I built a modification of the Zoomodule.php Helper and a mod of the zooitem module : now I have a ZOO module that displays the Avatar uploaded by the viewer in his profile...which I'm VERY happy with.
3: Now I've been trying to integrate those zoo avatars into Jcomment so I have them all over .
it works like this : A ZOO Profile displays elements; elements can be anything; the user image is an element.
It has a specific id .But this element is made of a file ("file") and its attributes.It looks like this in the DB :
"1460640d-b051-4eb7-a03a-9e227f444113": {
"file": "images\/stories\/zoo\/uploads\/bruce_willis_1.jpg.html.jpeg",
"title": "",
"link": "",
"target": "0",
"rel": "",
"width": 600,
"height": 800
}
where the long figure "1460640D...Etc" means "image element" to ZOO.
Now the part I'm trying to get from the db and display correctly in the Jcomments avatar plugin is the "file".
so I tried this :
if (count($users)) {
$db->setQuery( 'SELECT * FROM zoo_table_item LIMIT 0, 30 WHERE created_by in (' . implode(',', $users) . ') AND type = article-copy-2 ');
$where[] = 'elements ' == '1460640d-b051-4eb7-a03a-9e227f444113'.$created_by;
$db->LoadObject('file' );
$where[] = 'created_by='.$userid;
$avatars = $db->loadObjectList('created_by'); } else {
$avatars = array();
}
$avatarA = $mainframe->getCfg('absolute_path') . DS . 'images' . DS . 'stories' . DS . 'zoo' . DS . 'uploads' ;
$avatarL = $mainframe->getCfg('live_site') . '/images/stories/zoo/uploads/';
// link to profile
$comments[$i]->profileLink = $userid ? JoomlaTuneRoute::_('index.php?option=com_zoo&Itemid=39&layout=mysubmissions&submission_id=3&view=submission' . $userid) : '';
// avatar
if (isset($avatars[$userid]) && $avatars[$userid]->avatar != 'file'.$userid) {
if (is_file($avatarA . $avatars[$userid]->avatar)) {
$comments[$i]->avatar = 'file'.$userid->avatar;
} else {
$comments[$i]->avatar = 'file'.$userid->avatar;
}
} else {
$comments[$i]->avatar = '"file":'.$userid->avatar;
}
}
unset($avatars);
...and I can't get the file to display; all I get is the word "file" echoed instead of the avatar.
I know this is some lecture but if someone wants to cooperate on this I can provide you with my zoo avatar module and the whole thing makes an awesome joomla integration : user profiles built in zoo with no further need of another component.
I ask here because I must admit I do not understand the way you code for I'm not actually a coder ...I tried and it worked
in advance, thank you very much