fb style minimal tool tip for jcow avatar images by using tipsy tool tip script.when a mouse over a avatar image it display a fb style tooltip containing username of avatar an image
2.now go to Home > Admin Panel > Modules check fbtip and click on update modules.
3.open file common.inc.php in jcow/includes/libs in your text/code editor and than find this code
function avatar($row, $type = 'small') {
global $uhome, $ubase;
if ($row['uid']) {
$row['id'] = $row['uid'];
}
if (!$row['avatar']) {
$row['avatar'] = 'undefined.jpg';
}
if ($type == 'small') {
$row['avatar'] = 's_'.$row['avatar'];
}
if (is_numeric($type)) {
$row['avatar'] = 's_'.$row['avatar'];
$csize = ' width="'.$type.'" height="'.$type.'" ';
}
return '<a href="'.$ubase.'u/'.$row['username'].'">
<img '.$csize.' src="'.$uhome.'/uploads/avatars/'.$row['avatar'].'" class="avatar" /></a>';
}
4. replace the above code with this one
function avatar($row, $type = 'small') {
global $uhome, $ubase,$client;
if ($row['uid']) {
$row['id'] = $row['uid'];
}
if (!$row['avatar']) {
$row['avatar'] = 'undefined.jpg';
}
if ($type == 'small') {
$row['avatar'] = 's_'.$row['avatar'];
}
if ($client['id'] && $row['uid']==$client['id'] ) {
$title = 'you';
}
else{
$title = $row['username'];
}
if (is_numeric($type)) {
$row['avatar'] = 's_'.$row['avatar'];
$csize = ' width="'.$type.'" height="'.$type.'" ';
}
return '<a href="'.$ubase.'u/'.$row['username'].'">
<img '.$csize.' src="'.$uhome.'/uploads/avatars/'.$row['avatar'].'" class="avatar" title="'.$title.'"/></a>';
}
5. done
please follow the installation instruction carefully
1.uploade and extract fbtip.zip to your jcow/modules folder.2.now go to Home > Admin Panel > Modules check fbtip and click on update modules.
3.open file common.inc.php in jcow/includes/libs in your text/code editor and than find this code
function avatar($row, $type = 'small') {
global $uhome, $ubase;
if ($row['uid']) {
$row['id'] = $row['uid'];
}
if (!$row['avatar']) {
$row['avatar'] = 'undefined.jpg';
}
if ($type == 'small') {
$row['avatar'] = 's_'.$row['avatar'];
}
if (is_numeric($type)) {
$row['avatar'] = 's_'.$row['avatar'];
$csize = ' width="'.$type.'" height="'.$type.'" ';
}
return '<a href="'.$ubase.'u/'.$row['username'].'">
<img '.$csize.' src="'.$uhome.'/uploads/avatars/'.$row['avatar'].'" class="avatar" /></a>';
}
4. replace the above code with this one
function avatar($row, $type = 'small') {
global $uhome, $ubase,$client;
if ($row['uid']) {
$row['id'] = $row['uid'];
}
if (!$row['avatar']) {
$row['avatar'] = 'undefined.jpg';
}
if ($type == 'small') {
$row['avatar'] = 's_'.$row['avatar'];
}
if ($client['id'] && $row['uid']==$client['id'] ) {
$title = 'you';
}
else{
$title = $row['username'];
}
if (is_numeric($type)) {
$row['avatar'] = 's_'.$row['avatar'];
$csize = ' width="'.$type.'" height="'.$type.'" ';
}
return '<a href="'.$ubase.'u/'.$row['username'].'">
<img '.$csize.' src="'.$uhome.'/uploads/avatars/'.$row['avatar'].'" class="avatar" title="'.$title.'"/></a>';
}
5. done
Very Nice - This worked for me !
ReplyDeleteGreat - Thank You