recento display recent profile visitors on users profile page in sidebar.also display recent profile visitors and top profile visitors in a facebook style popup box.
download
please follow the installation instruction carefully
Instructions:
1. extract and uploade recento to your jcow/modules folder.
2.now go to Home > Admin Panel > Modules check recento and click on update modules.
3.open file u.module.php in jcow/includes/libs in your text/code editor and than find function show_sidebar
// following
$res = sql_query("select u.id,u.username,u.avatar from ".tb()."followers as f left join ".tb()."accounts as u on u.id=f.fid where f.uid='{$owner['id']}' order by u.lastlogin DESC limit 10");
$output = '';
while ($row = sql_fetch_array($res)) {
$f = 1;
$output .= avatar($row);
}
ass(array('title'=>t('Following'), 'content' => '<div class="toolbar">'.url('u/'.$owner['username'] .'/following',t('See all')).'</div>'.$output));
// friends
$res = sql_query("SELECT u.* FROM `".tb()."friends` as f left join `".tb()."accounts` as u on u.id=f.fid where f.uid={$owner['id']} ".dbhold('f')." ORDER BY f.created DESC LIMIT 9");
$output = '';
while ($row = sql_fetch_array($res)) {
$f = 1;
$output .= avatar($row);
}
ass(array('title'=>t('Friends'), 'content' => '<div class="toolbar">'.url('u/'.$owner['username'] .'/friends',t('See all')).'</div>'.$output));
4. insert this code below the above code
// recent visitor
if ($client['id']) {
if ($client['id'] == $owner['id']) {
$res = sql_query("select u.* from ".tb()."recent_visitor as r left join ".tb()."accounts as u on u.id=r.vid where r.uid='{$owner['id']}' order by r.recent_visited DESC limit 10");
$output = '';
while ($row = sql_fetch_array($res)) {
$r = 1;
$output .= avatar($row);
$i++;
}
$recentvisitedlink= '<a href="#" onclick="jQuery.facebox({ ajax: \''.url('recento/recentvisited/'.$owner['id'] ). '\' });return false;" >'.t('see all').'</a>';
ass(array('title'=>t('recent visitor'), 'content' => '<div class="toolbar">'.$recentvisitedlink.'</div>' .$output));
}
else
{
sql_query("INSERT INTO `".tb()."recent_visitor` (uid, vid, first_visited, recent_visited, visiting_count) VALUES
( {$owner['id']},{$client['id']},current_timestamp, current_timestamp, 1)
ON DUPLICATE KEY UPDATE `visiting_count` = `visiting_count`+1;");
}
}
// end of recent visitor
5.done
screen shots...
1.
2.
download
please follow the installation instruction carefully
Instructions:
1. extract and uploade recento to your jcow/modules folder.
2.now go to Home > Admin Panel > Modules check recento and click on update modules.
3.open file u.module.php in jcow/includes/libs in your text/code editor and than find function show_sidebar
// following
$res = sql_query("select u.id,u.username,u.avatar from ".tb()."followers as f left join ".tb()."accounts as u on u.id=f.fid where f.uid='{$owner['id']}' order by u.lastlogin DESC limit 10");
$output = '';
while ($row = sql_fetch_array($res)) {
$f = 1;
$output .= avatar($row);
}
ass(array('title'=>t('Following'), 'content' => '<div class="toolbar">'.url('u/'.$owner['username'] .'/following',t('See all')).'</div>'.$output));
// friends
$res = sql_query("SELECT u.* FROM `".tb()."friends` as f left join `".tb()."accounts` as u on u.id=f.fid where f.uid={$owner['id']} ".dbhold('f')." ORDER BY f.created DESC LIMIT 9");
$output = '';
while ($row = sql_fetch_array($res)) {
$f = 1;
$output .= avatar($row);
}
ass(array('title'=>t('Friends'), 'content' => '<div class="toolbar">'.url('u/'.$owner['username'] .'/friends',t('See all')).'</div>'.$output));
4. insert this code below the above code
// recent visitor
if ($client['id']) {
if ($client['id'] == $owner['id']) {
$res = sql_query("select u.* from ".tb()."recent_visitor as r left join ".tb()."accounts as u on u.id=r.vid where r.uid='{$owner['id']}' order by r.recent_visited DESC limit 10");
$output = '';
while ($row = sql_fetch_array($res)) {
$r = 1;
$output .= avatar($row);
$i++;
}
$recentvisitedlink= '<a href="#" onclick="jQuery.facebox({ ajax: \''.url('recento/recentvisited/'.$owner['id'] ). '\' });return false;" >'.t('see all').'</a>';
ass(array('title'=>t('recent visitor'), 'content' => '<div class="toolbar">'.$recentvisitedlink.'</div>' .$output));
}
else
{
sql_query("INSERT INTO `".tb()."recent_visitor` (uid, vid, first_visited, recent_visited, visiting_count) VALUES
( {$owner['id']},{$client['id']},current_timestamp, current_timestamp, 1)
ON DUPLICATE KEY UPDATE `visiting_count` = `visiting_count`+1;");
}
}
// end of recent visitor
5.done
screen shots...
1.
2.
No comments:
Post a Comment