Tuesday 20 December 2011

fuser v1.0


fuser display friend and following in a facebook style popup box on users profile page.fuser module used facebox script which is already installed  jcow  for displaying liked users. so it will not give any extra burden to your network.











.


download


please follow the installation instruction carefully

1.uploade and extract fuser.zip to your jcow/modules folder.

2.now go to Home > Admin Panel > Modules check fuser and click on update modules.

3.open file u.module.php in jcow/includes/libs in your text/code editor and than find this code


// 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. replace the above code with this one


// 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);
}
$fllwrlink= '<a href="#" onclick="jQuery.facebox({ ajax: \''.url('fuser/fllwrfuser/'.$owner['id']  ).  '\' });return false;" >'.t('see all').'</a>';
ass(array('title'=>t('Following'), 'content' => '<div class="toolbar">'.$fllwrlink.'</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);
}
$frndslink= '<a href="#" onclick="jQuery.facebox({ ajax: \''.url('fuser/frndsfuser/'.$owner['id']  ).  '\' });return false;" >'.t('see all').'</a>';
ass(array('title'=>t('Friends'), 'content' => '<div class="toolbar">'.$frndslink.'</div>' .$vivek.$output));


5.done

2 comments:

  1. :D :D :D :D Takyo Very much

    ReplyDelete
    Replies
    1. Hi, This is not working for me - I Checked all - i am a developer. Please send me your full page of - public_html/includes/libs/u.module.php

      My Email - focusadvertisements@gmail.com

      Thank You

      Delete