Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: Kevon on February 06, 2007, 07:10:20 PM

Title: Adding a link to the "Buddy List"
Post by: Kevon on February 06, 2007, 07:10:20 PM
I like the buddy list idea, but it's a little out of the way and most people never see it.
so you I added a link to it on the main bar.

in index.template.php look for this
if ($context['current_action'] == 'search2')
$current_action = 'search';


and add this after it
if ($context['current_action'] == 'buddies')
$current_action = 'buddies';


Then find this
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Afer that, add this

//Show the buddies link... [buddies]
if ($context['user']['is_logged'])
echo ($current_action == 'buddies' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'buddies' ? 'active_back' : 'back' , '">
<a href="' . $scripturl . '?action=profile;sa=editBuddies">Buddies</a>
</td>' , $current_action == 'buddies' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';





I'm not much of a php coder or whatever, if you can make it better, please do.
But at least it works,
It will take the user to their buddy list and only shows up if they are logged in.

*edited to correct an error*
Title: Re: Adding a link to the "Buddy List"
Post by: Kevon on February 08, 2007, 09:51:30 AM
I made a package for it, how do i get it to where people can download it?
Title: Re: Adding a link to the "Buddy List"
Post by: SleePy on May 21, 2007, 12:12:00 AM
Kevon,

Do you still need assistance making this a package or did you figure it out?
Title: Re: Adding a link to the "Buddy List"
Post by: mandukar on August 11, 2007, 04:54:01 AM
thank you very much for this feature, i've added it to my forums and works wonders :D
Title: Re: Adding a link to the "Buddy List"
Post by: myaicons on February 10, 2008, 05:41:44 PM
is this possible to show the buddies as a link in the Additional Information: section of a member's profile??

saying:

Show this Member's Buddies

(and of course his buddy list shows when following the link)



Forum Gods:  please  let me know if this is found elsewhere.... i havent found it in my serches and this thread is the closest thing i found to put it... move this post accordingly to your liking
Title: Re: Adding a link to the "Buddy List"
Post by: Rumbaar on February 17, 2008, 05:15:29 AM
That is a different thing and I don't think a persons buddies are publicly accessible to anyone other than the person who's set them.  So you can't have a display of a members buddies like that.

There would be privacy and permissions issues to overcome as well.
Title: Re: Adding a link to the "Buddy List"
Post by: myaicons on February 19, 2008, 09:37:11 PM
actually... here is a variation of what i was speaking of...


http://www.simplemachines.org/community/index.php?topic=216235.0


I just prefer it to be a list instead of buddies avatars
Title: Re: Adding a link to the "Buddy List"
Post by: Rumbaar on February 19, 2008, 10:05:18 PM
Well I would post in that particular thread then.