Advertisement:

Author Topic: Adding a link to the "Buddy List"  (Read 10814 times)

Offline Kevon

  • Newbie
  • *
  • Posts: 7
  • Gender: Male
    • Kevon.net
Adding a link to the "Buddy List"
« 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
Code: [Select]
if ($context['current_action'] == 'search2')
$current_action = 'search';

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

Then find this
Code: [Select]
// 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

Code: [Select]
//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*
 
« Last Edit: February 07, 2007, 08:57:34 AM by Kevon »
hxxp:www.kevon.net [nonactive]

Offline Kevon

  • Newbie
  • *
  • Posts: 7
  • Gender: Male
    • Kevon.net
Re: Adding a link to the "Buddy List"
« Reply #1 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?
hxxp:www.kevon.net [nonactive]

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,934
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Adding a link to the "Buddy List"
« Reply #2 on: May 21, 2007, 12:12:00 AM »
Kevon,

Do you still need assistance making this a package or did you figure it out?
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline mandukar

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
    • Romulan Star Empire
Re: Adding a link to the "Buddy List"
« Reply #3 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

Offline myaicons

  • Jr. Member
  • **
  • Posts: 228
  • Gender: Female
Re: Adding a link to the "Buddy List"
« Reply #4 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
« Last Edit: February 10, 2008, 05:43:15 PM by myaicons »
i scratch your back you scratch my back...
funny thing about my back is its located on my...

Offline Rumbaar

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,805
  • Gender: Male
  • Inherent Omniscience
    • Rumbaar.net
Re: Adding a link to the "Buddy List"
« Reply #5 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.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Offline myaicons

  • Jr. Member
  • **
  • Posts: 228
  • Gender: Female
Re: Adding a link to the "Buddy List"
« Reply #6 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
i scratch your back you scratch my back...
funny thing about my back is its located on my...

Offline Rumbaar

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,805
  • Gender: Male
  • Inherent Omniscience
    • Rumbaar.net
Re: Adding a link to the "Buddy List"
« Reply #7 on: February 19, 2008, 10:05:18 PM »
Well I would post in that particular thread then.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]