News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Adding a link to the "Buddy List"

Started by Kevon, February 06, 2007, 07:10:20 PM

Previous topic - Next topic

Kevon

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*
hxxp:www.kevon.net [nonactive]

Kevon

I made a package for it, how do i get it to where people can download it?
hxxp:www.kevon.net [nonactive]

SleePy

Kevon,

Do you still need assistance making this a package or did you figure it out?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

mandukar

thank you very much for this feature, i've added it to my forums and works wonders :D

myaicons

#4
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
i scratch your back you scratch my back...
funny thing about my back is its located on my...

Rumbaar

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 ]

myaicons

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...

Rumbaar

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 ]

Advertisement: