в profile.tpl
Code:
{* BEGIN friends ONLINE *}
{if $owner->user_info.user_id == $owner->user_info.user_id}
{if $online_friends[0]|@count > 0}
<table cellpadding='0' cellspacing='0' width='100%' style='margin-bottom: 10px;'>
<tr>
<td class='header'>
<table><tr width='100%'><td width='80%'>
Друзья OnLine <a href="profile_friends.php?user={$owner->user_info.user_username}">Все</a>
</td><td width='20%'>
</td></tr></table>
</td>
</tr>
<div class="fSeeAll"> {if $owner->user_info.user_id == $owner->user_info.user_id}
{if $online_friends[0]|@count >= 6}
<a href='user_friends_online.php'>{lang_print id=232}</a> {/if}{/if}
</div>
</h3>
</div>
</div>
</div></div>
<table cellpadding='0' cellspacing='0' width='100%' style='margin-bottom: 10px;'>
<tr>
<td class='profile'>
{* SHOW ONLINE FRIENDS IF MORE THAN ZERO *}
{math assign='total_online_friends' equation="x+y" x=$online_friends[0]|@count y=$online_friends[1]}
{if $total_online_friends > 0}
{if $online_friends[0]|@count == 0}
{lang_sprintf id=977 1=$online_friends[1]}
{else}
{capture assign='online_friends_registered'}{section name=online_loop loop=$online_friends[0] max=6}{if $smarty.section.online_loop.rownum != 1} {/if}
<div id='profile_friends' style='display: none;'></div>
<div align="center">
<div style='width: 60px; float: left;'>
<a href='{$url->url_create("profile", $online_friends[0][online_loop]->user_info.user_username)}'>
<img class="photo corner iradius8 ishade66 ishadow25" src='{$online_friends[0][online_loop]->user_photo('./images/nophoto.gif', TRUE)}' class='photo' width='50' border='0'></a>
<div align="center">
<a href='{$url->url_create("profile", $online_friends[0][online_loop]->user_info.user_username)}'>{$online_friends[0][online_loop]->user_displayname}</a></div>
{$online_users[0][online_loop]->user_username}
</div>
</div>
{cycle values=",,<div style='clear: both; height: 10px;'></div>"}
{/section}{/capture}
{$online_friends_registered}
{/if}
{else}
<table cellpadding='0' cellspacing='0' align='center'>
<tr><td class='result'><img src='./images/icons/bulb16.gif' border='0' class='icon'>{lang_print id=69654215}</td></tr>
</table>
{/if}
</td>
</tr>
</table>
{/if} {/if}
в funiction_general.php после // END censor() FUNCTION
Code:
// THIS FUNCTION RETURNS AN ARRAY CONTAINING THE USERNAMES OF ONLINE FRIENDS
// INPUT:
// OUTPUT: AN ARRAY OF USERNAMES FOR FRIENDS CURRENTLY ACTIVE IN THE SYSTEM
function online_friends() {
global $database, $owner;
// GET LOGGED IN FRIENDS ONLINE
$onlinefriends_array = Array();
$online_time = time()-30*30;
$online_friends = $database->database_query("SELECT u.user_username, u.user_fname, u.user_lname
FROM se_users u
INNER JOIN se_friends f ON f.friend_user_id2=u.user_id WHERE f.friend_user_id1='{$owner->user_info['user_id']}'
&& u.user_lastactive > '$online_time' AND u.user_invisible=0 ORDER BY u.user_lastactive DESC LIMIT 2000")
or die($database->database_error());
while($online_friend_info = $database->database_fetch_assoc($online_friends)) {
$online_friend = new se_user();
$online_friend->user_info[user_id] = $online_friend_info[user_id];
$online_friend->user_info[user_username] = $online_friend_info[user_username];
$online_friend->user_info[user_fname] = $online_friend_info[user_fname];
$online_friend->user_info[user_lname] = $online_friend_info[user_lname];
$online_friend->user_displayname();
// SET ONLINE FRIENDS ARRAY
$onlinefriends_array[] = $online_friend;
$onlinefriends_usernames[] = $online_friend->user_info[user_username];
}
// GET VISITORS ONLINE
$total_visitors = 0;
return Array($onlinefriends_array, $total_visitors, $onlinefriends_usernames);
} // END online_friends() FUNCTION
в profile.php перед
include "footer.php";
Code:
$smarty->assign('online_friends', online_friends());
фото не отображается...