TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,234
  • Total Topics: 21,353
  • Online today: 739
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 267
  • Total: 267

Buddies Block!

Started by Xarcell, October 26, 2005, 02:36:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Xarcell

This would be a sweet feature...

Just an idea,

-Xarcell

Moocat

agreed. it should be call-able using an ssi function but i know nothing about that! :)

Xarcell


bloc

What should the buddies block do..? Show just your buddies?

Nokonium

Does the User block display buddies online?

gerrymo

Quote from: Bloc on October 26, 2005, 12:18:28 PM
What should the buddies block do..? Show just your buddies?

Username linked to profile?
PM Icon next to username?

Only a couple of ideas. Its not a feature I use, but a few members of my site do use it.

Oldiesmann

Unfortunately it seems that SMF's buddy list just stores the member IDs and nothing else. However, maybe something like this?

<?php
include_once('/path/to/forum/SSI.php');

if(
count($context['member']['buddies']) != 0)
{
   
$query = db_query("SELECT ID_MEMBER, realName FROM {$db_prefix}members WHERE ID_MEMBER IN (" . implode(',', $context['member']['buddies']) . ")", __FILE__, __LINE__);
   while(
$results = mysql_fetch_assoc($query))
   {
       
$buddies[] = array('name' => $results['realName'], 'ID_MEMBER' => $results['ID_MEMBER']);
   }
   
natcasesort($buddies);
   echo
'<div align="center"><b>Buddy List</b></div>';
   foreach(
$buddies AS $buddy)
   {
       echo
'<br /><a href="' , $scripturl, '?action=profile;sa=summary;u=', $buddy['ID_MEMBER'], '"><b>', $buddy['name'], '</b></a>';
   }
}
?>


That will give you a list of links to all your buddies' profiles...

Xarcell

Well, during the summer months I can have up to 100 user's online at once. So I disabled the show user names, simiply because the list is too long. During school season, I may have 2-6 members on at once. See, so I keep toggling back and forth.

If I had a block to just display my buddies, it would alot easier for me to keep up with my user's/friends.

IchBin

You try that code above Xarcell?

Xarcell

not yet, I've yet to install tp. Been busy, but I will get to it sometime today.

This website is proudly hosted on Crocweb Cloud Website Hosting.