Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: OhFasho.com on November 21, 2009, 07:10:14 PM

Title: Echo Buddies on Index using Tiny Portal
Post by: OhFasho.com on November 21, 2009, 07:10:14 PM
I'm aware that using Tiny Portal you are able to post PHP Snippets, how would I go about showing the first 6buddies or so on the Index?
Title: Re: Echo Buddies on Index using Tiny Portal
Post by: Arantor on November 21, 2009, 07:46:13 PM
Depends how you define "the first 6 buddies".

You might be better asking over on TinyPortal.net itself to be honest though.
Title: Re: Echo Buddies on Index using Tiny Portal
Post by: OhFasho.com on November 21, 2009, 07:47:58 PM
k thanks.
Title: Re: Echo Buddies on Index using Tiny Portal
Post by: OhFasho.com on November 21, 2009, 07:49:29 PM
or at would you know how to code the table at all maybe? All I'm looking for is the snippet.
Title: Re: Echo Buddies on Index using Tiny Portal
Post by: Arantor on November 21, 2009, 08:02:27 PM
I know nothing of TinyPortal to be honest. I know how to query for the buddies list, but I'm not clear on what the "first six" would be - first 6 ordered by what?
Title: Re: Echo Buddies on Index using Tiny Portal
Post by: sangwe11 on November 21, 2009, 08:03:34 PM
Quote from: Arantor on November 21, 2009, 08:02:27 PM
I know nothing of TinyPortal to be honest. I know how to query for the buddies list, but I'm not clear on what the "first six" would be - first 6 ordered by what?

Well unless there is a custom order, its probably going to be by when they were added as a buddy (so either order by a date, or by id)
Title: Re: Echo Buddies on Index using Tiny Portal
Post by: Arantor on November 21, 2009, 08:04:58 PM
That's what I'm trying to get at, what order it should be in.
Title: Re: Echo Buddies on Index using Tiny Portal
Post by: OhFasho.com on November 22, 2009, 12:49:42 AM
What ever order their set too I would  suppose seeing as the user is allowed to edit which ones are first in ultimate profile mod. But if not then Date I guess.
Title: Re: Echo Buddies on Index using Tiny Portal
Post by: Arantor on November 22, 2009, 12:55:53 AM
Ah, you didn't say you were using Ultimate Profile, unfortunately I don't know anything about that other than it does something else to what SMF's own buddies system does.
Title: Re: Echo Buddies on Index using Tiny Portal
Post by: OhFasho.com on November 22, 2009, 11:03:42 AM
Aw, ok well thanks.
  But one question. Isn't their away I could just build a table in php & echo the buddies by IP from the SQL?
Title: Re: Echo Buddies on Index using Tiny Portal
Post by: Arantor on November 22, 2009, 01:23:23 PM
There is, no doubt, but I don't know the SQL to give you, which is the problem.