Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[Small plugin] Friends Online [addon]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="presto5" data-source="post: 82954" data-attributes="member: 4844"><p>I looked at the code and realized whats missing. Here is the fixed code but I don't know how to add the dotted line separator.</p><p> </p><p> </p><p>Find this</p><p>[php]<li class="small" id="feed-lastlogin">Last signed in: {lastSignedIn}</li>[/php]</p><p> </p><p> </p><p>Add this below it.</p><p>[php]</p><p><?PHP</p><p> $query = mysql_query("SELECT * FROM messenger_friendships WHERE user_one_id = '".$_SESSION['user']['id']."'");</p><p> $i = 0;</p><p> while($friends = mysql_fetch_array($query))</p><p> {</p><p> $getfriend = mysql_query("SELECT * FROM users WHERE id ='".$friends['user_two_id']."' AND online = '1' LIMIT 1");</p><p> if(mysql_num_rows($getfriend) > 0)</p><p> {</p><p> $i++;</p><p> if($i == 1)</p><p> {</p><p> </p><p> echo '<li id="feed-friends">Your friend(s) online are:<b><span> ';</p><p> }</p><p> $friend = mysql_fetch_array($getfriend);</p><p>echo htmlspecialchars($friend['username']).', ';</p><p> }</p><p> }</p><p> if($i > 0)</p><p>echo '</b>'?>[/php]</p><p> </p><p> </p><p> </p><p>Hope this helps.</p></blockquote><p></p>
[QUOTE="presto5, post: 82954, member: 4844"] I looked at the code and realized whats missing. Here is the fixed code but I don't know how to add the dotted line separator. Find this [php]<li class="small" id="feed-lastlogin">Last signed in: {lastSignedIn}</li>[/php] Add this below it. [php] <?PHP $query = mysql_query("SELECT * FROM messenger_friendships WHERE user_one_id = '".$_SESSION['user']['id']."'"); $i = 0; while($friends = mysql_fetch_array($query)) { $getfriend = mysql_query("SELECT * FROM users WHERE id ='".$friends['user_two_id']."' AND online = '1' LIMIT 1"); if(mysql_num_rows($getfriend) > 0) { $i++; if($i == 1) { echo '<li id="feed-friends">Your friend(s) online are:<b><span> '; } $friend = mysql_fetch_array($getfriend); echo htmlspecialchars($friend['username']).', '; } } if($i > 0) echo '</b>'?>[/php] Hope this helps. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[Small plugin] Friends Online [addon]
Top