TinyPortal

Development => Support => Topic started by: londonhogfan on April 04, 2006, 08:25:45 PM

Title: Meet the team page.. Awesome
Post by: londonhogfan on April 04, 2006, 08:25:45 PM
any way someone could release the codes to do that meet the team page.  Im working on setting up tiny portal on my site and I think it would work awesome for my roster page (http://www.the-rota.com/?action=roster).
Title: Re: Meet the team page.. Awesome
Post by: Crip on April 04, 2006, 09:24:27 PM
not sure, it's part of TP?
Title: Re: Meet the team page.. Awesome
Post by: G6Cad on April 04, 2006, 09:30:39 PM
Yes itÂÃ,´s a part of the next release of TP
Title: Re: Meet the team page.. Awesome
Post by: londonhogfan on April 04, 2006, 09:34:19 PM
just give me some hints.  How do ya do it. :knuppel2:
Title: Re: Meet the team page.. Awesome
Post by: G6Cad on April 04, 2006, 09:36:43 PM
Well, You have to get a PC or MAC, then a tgboard would help to, and then you take your fingetips, and start puch the buttons and hope you know what you are doing ;)

"couldent recist"  :o
Title: Re: Meet the team page.. Awesome
Post by: TwinsX2Dad on April 04, 2006, 09:39:23 PM
Ooooh - nice bit of sarcasm!

Well, after I dissected 'recist'.   ;D
Title: Re: Meet the team page.. Awesome
Post by: londonhogfan on April 04, 2006, 09:46:03 PM
I knew that was coming when my fingers typed "hints"... I asked for it ;)
Title: Re: Meet the team page.. Awesome
Post by: Crip on April 04, 2006, 09:51:12 PM
Prolly a bit of everything, little HTML some .SSI.php .CSS, PHP for sure, and most likely some JavaScript..lots of code../ code is poetry.

But if it's in the next TP-release you will have it aswell.. ;)
Title: Re: Meet the team page.. Awesome
Post by: erikman on April 05, 2006, 12:17:28 PM
Next TP-release?

You mean v0.9?
Title: Re: Meet the team page.. Awesome
Post by: G6Cad on April 05, 2006, 12:36:04 PM
Not sure if the next release will be the 0.9, or even 1.0, we have to see what Bloc decide about it ;)
Title: Re: Meet the team page.. Awesome
Post by: TwinsX2Dad on April 05, 2006, 07:25:36 PM
What would stop it from being 0.861 or 0.87?

Or for fun, .8675309   ;D
Title: Re: Meet the team page.. Awesome
Post by: anunlike on April 05, 2006, 07:33:00 PM
Bloc's not quite that insane.

;)
Title: Re: Meet the team page.. Awesome
Post by: londonhogfan on April 05, 2006, 07:35:23 PM
come one... Dew it, Dew it. :coolsmiley:
Title: Re: Meet the team page.. Awesome
Post by: anunlike on April 05, 2006, 07:52:04 PM
He's crazy like a fox.

(that's a good thing)

;D
Title: Re: Meet the team page.. Awesome
Post by: elpvn on April 06, 2006, 02:05:05 PM
I like the Bloc's style than another, it has visual - effect very cool, I must be learn hard more to joint the Team of TPÃ,  ;D

However your codeÃ,  still need for developt, londonhogfanÃ,  ;)
Title: Re: Meet the team page.. Awesome
Post by: TwinsX2Dad on April 07, 2006, 01:00:59 AM
Quote from: anunlike on April 05, 2006, 07:33:00 PM
Bloc's not quite that insane.

Let the record show that it was NOT me who called Bloc insane.   ;D

I will give an extra $100 to the local Christian homeless shelter if it is anything other than a .8x or .9x number that arrives in April or May.

Jenny I've got your number
I need to make you mine
Jenny don't change your number
8 6 7-5 3 0 9 (8 6 7-5 3 0 9)
8 6 7-5 3 0 9 (8 6 7-5 3 0 9)
I got it (I got it), I got it


That TP version .8675309 sounds fun. And disturbed. And kind of insane.   :2funny:
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on April 07, 2006, 01:21:51 AM
So we have to wait for the next release to get this function?
Title: Re: Meet the team page.. Awesome
Post by: bloc on April 07, 2006, 01:51:23 AM
Yes, its not finished in its TP form - for now its only done in a php-article.
Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on April 17, 2006, 11:16:28 PM
Hey, I dont care HOW its done, but could you please post the code for the PHP article ROSTER?

I have been searching high and low for this code, so I can provide a roster on my TP as well.


THANKS! :D
Title: Re: Meet the team page.. Awesome
Post by: bloc on April 17, 2006, 11:24:32 PM
Sure. The extra description is taken from the theme, so that you need extra code for..but the page code look like this:

global $txt, $scripturl, $user_info;
global $context, $modSettings, $ID_MEMBER;
global $board_info, $settings, $db_prefix;

$groupnumber = 2;
$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['TPortal']['team']=array();

$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.ID_MEMBER, mem.memberName,
mem.realName,mem.lastLogin, mem.websiteTitle, mem.websiteUrl, mem.location,   
                        mem.posts,
                        them.value AS teamtext";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
                        LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)";

// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE mem.ID_GROUP = $groupnumber
                        OR mem.ID_GROUP = 1 ORDER BY mem.memberName ASC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{

$avatar_width = '';
$avatar_height = '';

$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'name' => $row['realName'],
'posts' => $row['posts'],
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img  src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'last_login' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']),
'last_login_timestamp' => empty($row['lastLogin']) ? 0 : forum_time(0, $row['lastLogin']),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);



}
mysql_free_result($request);



        echo '<table align="center" width="95%" cellpadding="0" cellspacing="0"><tr>
                 <td colspan="4" style="border-bottom: 2px solid #d0d0d0; padding-bottom: 4px; "><h2>Meet the team!</h2>
<span class="smalltext">The people you will run into while visiting tinyportal.co.uk.</span><br /><br />
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
            echo '
<td valign="top">'.$team['avatar']['image'].'</td>
<td valign="top" width="50%" class="middletext" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;">'.$team['link'].'</h2>
<b>Last seen</b>: '.$team['last_login'].'<br />
<b>Posts</b>: '.$team['posts'].'<br />
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' ,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br />' , '

' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '

' ,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '

    </div></td>';
            $newrow++;
            if($newrow>1){
               $newrow=0;
               echo '</tr><tr><td colspan="4"><br /><br /> </td></tr><tr>';
            }
        }
echo '</tr></table>';


"$groupnumber" is of course the ID of the group you want to show. Admins is automatically added as well.

The TP version will have some easy options for this, how much you want to show, extra groups and a divided into section-per-membergroup  etc.
Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on April 17, 2006, 11:34:38 PM
"$groupnumber" should be changed to what to show a particular group?

Example: I want to show the member group 'Officers', then I should insert: "$Officers" ?
Title: Re: Meet the team page.. Awesome
Post by: bloc on April 17, 2006, 11:36:08 PM
No, you need to go into admin and check that groups ID number..you normally see it in the query string when doing something to the membergroup. It has to be a number.
Title: Re: Meet the team page.. Awesome
Post by: ontap on April 17, 2006, 11:36:58 PM
thanks bloc, how would you add more than 1 group?  :P


Title: Re: Meet the team page.. Awesome
Post by: bloc on April 17, 2006, 11:38:43 PM
That I am working on...so no code yet, but basically its just adding to the check for $groupnumber1,2,3 etc. In an array of course.
Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on April 17, 2006, 11:47:04 PM
I c, I c, said the blind man...  I got it to work Bloc thanks! :)  I'll play with it later when I have time.

Im really looking forward to this feature.  Gaming Clans EVERYWHERE will love you ;)  Right now, mine is html driven.  I manage the roster by hand.  I do this because the profiles as of now dont give you a really good PLAYER PAGE for stats and a player pictures (not counting the avatar).

It would be nice to be able to list other things in player pages such as computer stats and clan accomplishments.
Title: Re: Meet the team page.. Awesome
Post by: Omniverse on April 18, 2006, 03:08:57 AM
All I gotta say is, you make this feature customizable... being able to set membergroups that can add themselves to the page, allowing the editting of different fields (to allow for different games, sites) by these users.... TP would become the be all end all of gaming sites  ;D

We have been working on a php script with an smf log in, that allows users to input character stats, and that would also generate a "roster" of sorts to display. I guess we won't need that anymore hmm? :)

We also wanted to create a kind of sign up script for scheduling guild runs, that tied into the roster, maybe we still need to do that :P

Bloc, ya just keeping pushing the bar huh?  8)  Great job, I was plenty happy with .86 ... seeing what you are doing with future versions, I am.... amazed.
Title: Re: Meet the team page.. Awesome
Post by: bloc on April 18, 2006, 09:37:21 AM
Yes, the page can use more options. Exactly how I am still thinking around, but as of now it draw things from the profile, making it very easy to keep up to date.
Title: Re: Meet the team page.. Awesome
Post by: Omniverse on April 19, 2006, 02:10:21 AM
Had a question about this :)

Will it be sortable? To where different members shown on the page could be sorted by membergroup, or maybe fields entered?
Title: Re: Meet the team page.. Awesome
Post by: JayBachatero on April 19, 2006, 02:57:36 AM
Looking good Bloc.  Using this for my website.
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on April 19, 2006, 03:06:43 AM
So how would i add this to my site and get it to at least show up



Quote from: Bloc on April 17, 2006, 11:24:32 PM
Sure. The extra description is taken from the theme, so that you need extra code for..but the page code look like this:

global $txt, $scripturl, $user_info;
global $context, $modSettings, $ID_MEMBER;
global $board_info, $settings, $db_prefix;

$groupnumber = 2;
$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['TPortal']['team']=array();

$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.ID_MEMBER, mem.memberName,
mem.realName,mem.lastLogin, mem.websiteTitle, mem.websiteUrl, mem.location,   
                        mem.posts,
                        them.value AS teamtext";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
                        LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)";

// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE mem.ID_GROUP = $groupnumber
                        OR mem.ID_GROUP = 1 ORDER BY mem.memberName ASC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{

$avatar_width = '';
$avatar_height = '';

$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'name' => $row['realName'],
'posts' => $row['posts'],
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img  src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'last_login' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']),
'last_login_timestamp' => empty($row['lastLogin']) ? 0 : forum_time(0, $row['lastLogin']),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);



}
mysql_free_result($request);



        echo '<table align="center" width="95%" cellpadding="0" cellspacing="0"><tr>
                 <td colspan="4" style="border-bottom: 2px solid #d0d0d0; padding-bottom: 4px; "><h2>Meet the team!</h2>
<span class="smalltext">The people you will run into while visiting tinyportal.co.uk.</span><br /><br />
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
            echo '
<td valign="top">'.$team['avatar']['image'].'</td>
<td valign="top" width="50%" class="middletext" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;">'.$team['link'].'</h2>
<b>Last seen</b>: '.$team['last_login'].'<br />
<b>Posts</b>: '.$team['posts'].'<br />
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' ,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br />' , '

' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '

' ,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '

    </div></td>';
            $newrow++;
            if($newrow>1){
               $newrow=0;
               echo '</tr><tr><td colspan="4"><br /><br /> </td></tr><tr>';
            }
        }
echo '</tr></table>';


"$groupnumber" is of course the ID of the group you want to show. Admins is automatically added as well.

The TP version will have some easy options for this, how much you want to show, extra groups and a divided into section-per-membergroup  etc.
Title: Re: Meet the team page.. Awesome
Post by: JayBachatero on April 19, 2006, 03:57:42 AM
Add that as a TP PHP Article.
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on April 19, 2006, 04:26:27 AM
What do you have to do to have it set up as Admins first, then below that the mods, and below that the next rank?
Title: Re: Meet the team page.. Awesome
Post by: londonhogfan on April 19, 2006, 05:49:05 AM
Quote from: HaxXxoR on April 19, 2006, 04:26:27 AM
What do you have to do to have it set up as Admins first, then below that the mods, and below that the next rank?

Thats the 64,000 dollar question.

it would be the end so all gaming sites problems.  Exactly why I started the topic.  Looks like its pretty close to doing that.

on my roster page (http://www.the-rota.com/?action=roster)

Could be good to do it like that (rank would be member group)  I use custom title for their real name so everything is in the database.  Just not smart enough to let it do the work for me :(
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on April 19, 2006, 06:10:10 PM
wow i just added that code that is in this thread and got 4 members with their avatars big as hell and i just dont like the way it looks. Does anyone know about a release date for all the new good features in .9
Title: Re: Meet the team page.. Awesome
Post by: G6Cad on April 19, 2006, 06:12:38 PM
No ETA just yet, not even the Alphatesters have it yet, Bloc will release it to them as soon as he think the big issues is fixed, and then the alpha team test it for some time and try to narrow down the small things thats left if any :)  After that it will be released to the betas
Title: Re: Meet the team page.. Awesome
Post by: londonhogfan on April 23, 2006, 07:54:33 PM
anyway to get this to work for secondary groups and remove administrator.

Wanting to use this with the SMF subscription mod Using a ~Donor~ membergroup that gives them that as their secondary group.  But I don't want administrators it auto show.  And the shopmod gives them the group as a secondary group.

Nothing shows up.
Title: Re: Meet the team page.. Awesome
Post by: bloc on April 24, 2006, 07:48:33 PM
As it stands its just 2 groups, admins and the settable one. In the TP version all the groups will be optionable.
Title: Re: Meet the team page.. Awesome
Post by: londonhogfan on April 27, 2006, 07:15:31 AM
well someone got what im wanting working...

http://www.lordsofcarnage.com/forum/index.php?action=member_mng

Anyone know how they would have done this?  Havn't heard back from their administrator yet.
Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on May 04, 2006, 11:24:51 PM
Im still waiting to learn this myself :)

Cant wait to implement this feature.  It will be great!
Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on May 09, 2006, 05:47:45 PM
Any clue when we can expect to use this new feature?

Time wise, should we be thinking weeks?  or Months?  :coolsmiley:
Title: Re: Meet the team page.. Awesome
Post by: bloc on May 09, 2006, 06:50:42 PM
Weeks, def. not months.
Title: Re: Meet the team page.. Awesome
Post by: G6Cad on May 09, 2006, 06:53:03 PM
It will take a long time.
The Tp thats released to Alphas is still very young in development for what Bloc want to put in, So it will still  be some time before it is released to the betatesters
Title: Re: Meet the team page.. Awesome
Post by: londonhogfan on May 12, 2006, 06:15:51 PM
Quote from: londonhogfan on April 27, 2006, 07:15:31 AM
well someone got what im wanting working...

http://www.lordsofcarnage.com/forum/index.php?action=member_mng

Anyone know how they would have done this?  Havn't heard back from their administrator yet.

Still havn't heard back from their administrator yet.  They have their database merged with their stats program to pull info from both systems to put on their roster.

a bridge with PsychoStats would be a great feature with Tiny Portal (new topic maybe) :D

Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on May 14, 2006, 06:26:12 AM
I <3 TP
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on May 16, 2006, 05:44:28 PM
This is my Team Page and as you can tell its a little messed up.

http://tasty-fragism.com/forum/index.php?page=3

I would like to get it to look like a normal page of my forums and also i was wondering if there was a short way to make a catagory said Admins, and the other say Global Moderator. Please let me know if anyone knows how to do this.

Thanks
Title: Re: Meet the team page.. Awesome
Post by: Xarcell on May 16, 2006, 06:09:23 PM
I didn't see anything wrong with it.
Title: Re: Meet the team page.. Awesome
Post by: Crip on May 16, 2006, 06:12:58 PM
Looks good to me.. :)
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on May 16, 2006, 06:14:05 PM
Well the main thing that i want changed is that there is no header on the top of the buttons, like where it shows your avatar and the news fader.
Title: Re: Meet the team page.. Awesome
Post by: IchBin on May 16, 2006, 06:39:53 PM
Did you check the article options for display? I don't recall the header being an option, but it's worth a check.
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on May 16, 2006, 06:51:16 PM
Ok then how do i put it in the modules section kinda like a link?
Title: Re: Meet the team page.. Awesome
Post by: IchBin on May 16, 2006, 06:54:42 PM
Well you can't put in in the modules. You can put it in a menu block. Bloc is adding it into the modules on an upcoming release.
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on May 16, 2006, 07:33:56 PM
could you explain how to do that please, i had someone else do that for me on my site.
Title: Re: Meet the team page.. Awesome
Post by: IchBin on May 16, 2006, 07:49:29 PM
In your admin panel>Manage Blocks>Menu Manager>Add Menu Item>Article Type of Link> Select your meet the team article.
Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on May 17, 2006, 05:30:58 PM
 :'( :'( :'(

Team Page Module!


Oh, where art thou???
Title: Re: Meet the team page.. Awesome
Post by: G6Cad on May 17, 2006, 05:31:41 PM
A few weeks away :)
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on May 17, 2006, 05:31:57 PM
does anyone know some kind of release date for the new TP?
Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on May 17, 2006, 05:34:08 PM
Quote from: G6 on May 17, 2006, 05:31:41 PM
A few weeks away :)

Bless ur heart G6.  I'll hold out as long as I can.  Supplies running out...  send help soon.
Title: Re: Meet the team page.. Awesome
Post by: Xarcell on May 17, 2006, 05:40:28 PM
I dont think the release for beta is gonna be anytime soon. There were alot of major changes, which means lots of bugs...
Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on May 17, 2006, 05:44:13 PM
Quote from: Xarcell on May 17, 2006, 05:40:28 PM
I dont think the release for beta is gonna be anytime soon. There were alot of major changes, which means lots of bugs...

Do you say Major changes because of more features added?

I intend to apply it as a detailed roster, with custom fields for stats (if possible) and site awards, etc... that sorta thing.

Do you think that this will be possible?
Title: Re: Meet the team page.. Awesome
Post by: G6Cad on May 17, 2006, 05:46:25 PM
Both futures and template changes to some css :)

Bloc have rebuilded the articles and the editors together with Feline, so there are some major changes there to.
But i read one other post here with a question of the time before release, Bloc said weeks, not month ;)
Title: Re: Meet the team page.. Awesome
Post by: ontap on May 27, 2006, 08:12:36 PM
This could be used as a Team Page Script, code was takin with the "Team Page (http://mods.simplemachines.org/index.php?mod=348)" Mod over at SMF,
it will show all Groups, will try and add the avaters and website urls to it.

global $db_prefix, $scripturl, $txt, $user_info,$settings, $modSettings;

                 $groups = '';
//Does all the real work here for showing groups.
$query = db_query("SELECT ID_GROUP, groupName, minPosts, onlineColor
FROM {$db_prefix}membergroups WHERE minPosts = -1
ORDER BY groupName", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query))
{

$groups[$row['ID_GROUP']]  = array(
'id' => $row['ID_GROUP'],
'name' => $row['groupName'],
'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'],
);
}
mysql_free_result($query);


foreach ($groups as $id => $data)
{

//Now get all the user's
$query2 = db_query("SELECT ID_GROUP, ID_MEMBER, realName, emailAddress, hideEmail, lastLogin, dateRegistered, ICQ, AIM, YIM, MSN, hideEmail, emailAddress
FROM {$db_prefix}members WHERE ID_GROUP = " . $data['id'] . " ", __FILE__, __LINE__);

if(db_affected_rows() != 0)
{
echo '<table border="0" cellspacing="0" cellpadding="2" width="100%">';
echo '<tr>';
echo '<td class="catbg2" width="30%">' . $data['name'] . '</td>';
echo '<td class="catbg2" width="30%">Last Active:</td>';
echo '<td class="catbg2" width="30%">Contact:</td>';
echo '</tr>';

while ($row2 = mysql_fetch_assoc($query2))
{
echo '<tr>';
echo '<td class="windowbg"><a href="' . $scripturl . '?action=profile;u=' . $row2['ID_MEMBER'] . '"><font color="' . $data['color'] . '">' . $row2['realName'] . '</font></a></td>';
echo '<td class="windowbg">' . timeformat($row2['lastLogin']) . '</td>';
//echo '<td class="windowbg">' .  timeformat($row2['dateRegistered']) . '</td>';
echo '<td class="windowbg">';

//Send email row
if($row2['hideEmail'] == 0)
echo '<a href="mailto:', $row2['emailAddress'], '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="email" /></a> ';


if($row2['ICQ'] != '')
echo '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $row2['ICQ'] . '" target="_blank"><img src="http://status.icq.com/online.gif?img=5&icq=' . $row2['ICQ'] . '" alt="' . $row2['ICQ'] . '" width="18" height="18" border="0" /></a> ';
if($row2['AIM'] != '')
echo '<a href="aim:goim?screenname=' . urlencode(strtr($row2['AIM'], array(' ' => '%20'))) . '&message=' . $txt['aim_default_message'] . '"><img src="' . $settings['images_url'] . '/aim.gif" alt="' . $row2['AIM'] . '" border="0" /></a> ';
if($row2['YIM'] != '')
echo '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row2['YIM']) . '"><img src="http://opi.yahoo.com/online?u=' . urlencode($row2['YIM']) . '&m=g&t=0" alt="' . $row2['YIM'] . '" border="0" /></a> ';
if($row2['MSN'] != '')
echo '<a href="http://members.msn.com/' . $row2['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $row2['MSN'] . '" border="0" /></a> ';

//Send PM row
echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $row2['ID_MEMBER'] . '"><img src="' . $settings['images_url'] . '/im_on.gif" alt="email" /></a></a>';

echo '</td>';

echo '</tr>';
}
echo '</table>';
}
}
Title: Re: Meet the team page.. Awesome
Post by: londonhogfan on May 30, 2006, 05:56:38 PM
This is awesome.

anyone know what would I need to change to hardcode only 1 membergroup? This shows all non post based groups.

global $db_prefix, $scripturl, $txt, $user_info,$settings, $modSettings;

                 $groups = '';
//Does all the real work here for showing groups.
$query = db_query("SELECT ID_GROUP, groupName, minPosts, onlineColor
FROM {$db_prefix}membergroups WHERE minPosts = -1
ORDER BY groupName", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query))
{

$groups[$row['ID_GROUP']]  = array(
'id' => $row['ID_GROUP'],
'name' => $row['groupName'],
'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'],
);
}
mysql_free_result($query);


foreach ($groups as $id => $data)
{

//Now get all the user's
$query2 = db_query("SELECT ID_GROUP, ID_MEMBER, realName, emailAddress, hideEmail, lastLogin, dateRegistered, ICQ, AIM, YIM, MSN, hideEmail, emailAddress
FROM {$db_prefix}members WHERE ID_GROUP = " . $data['id'] . " ", __FILE__, __LINE__);

if(db_affected_rows() != 0)
{
echo '<table border="0" cellspacing="0" cellpadding="2" width="100%">';
echo '<tr>';
echo '<td class="catbg2" width="30%">' . $data['name'] . '</td>';
echo '<td class="catbg2" width="30%">Last Active:</td>';
echo '<td class="catbg2" width="30%">Contact:</td>';
echo '</tr>';

while ($row2 = mysql_fetch_assoc($query2))
{
echo '<tr>';
echo '<td class="windowbg"><a href="' . $scripturl . '?action=profile;u=' . $row2['ID_MEMBER'] . '"><font color="' . $data['color'] . '">' . $row2['realName'] . '</font></a></td>';
echo '<td class="windowbg">' . timeformat($row2['lastLogin']) . '</td>';
//echo '<td class="windowbg">' .  timeformat($row2['dateRegistered']) . '</td>';
echo '<td class="windowbg">';

//Send email row
if($row2['hideEmail'] == 0)
echo '<a href="mailto:', $row2['emailAddress'], '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="email" /></a> ';


if($row2['ICQ'] != '')
echo '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $row2['ICQ'] . '" target="_blank"><img src="http://status.icq.com/online.gif?img=5&icq=' . $row2['ICQ'] . '" alt="' . $row2['ICQ'] . '" width="18" height="18" border="0" /></a> ';
if($row2['AIM'] != '')
echo '<a href="aim:goim?screenname=' . urlencode(strtr($row2['AIM'], array(' ' => '%20'))) . '&message=' . $txt['aim_default_message'] . '"><img src="' . $settings['images_url'] . '/aim.gif" alt="' . $row2['AIM'] . '" border="0" /></a> ';
if($row2['YIM'] != '')
echo '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row2['YIM']) . '"><img src="http://opi.yahoo.com/online?u=' . urlencode($row2['YIM']) . '&m=g&t=0" alt="' . $row2['YIM'] . '" border="0" /></a> ';
if($row2['MSN'] != '')
echo '<a href="http://members.msn.com/' . $row2['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $row2['MSN'] . '" border="0" /></a> ';

//Send PM row
echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $row2['ID_MEMBER'] . '"><img src="' . $settings['images_url'] . '/im_on.gif" alt="email" /></a></a>';

echo '</td>';

echo '</tr>';
}
echo '</table>';
}
}


I know the mod has the option to let you turn certain groups off, but I want it hardcoded to only allow a certain one so I can use it for other stuff.
Title: Re: Meet the team page.. Awesome
Post by: londonhogfan on May 30, 2006, 06:18:47 PM
the mod author replied telling me this...

edit this...
//Does all the real work here for showing groups.
$query = db_query("SELECT ID_GROUP, groupName, minPosts, onlineColor
FROM {$db_prefix}membergroups WHERE minPosts = -1
ORDER BY groupName", __FILE__, __LINE__);


to this...
//Does all the real work here for showing groups.
$query = db_query("SELECT ID_GROUP, groupName, minPosts, onlineColor
FROM {$db_prefix}membergroups WHERE groupName = 'The exact name of your group here'
ORDER BY groupName", __FILE__, __LINE__);


just in case anyone else wanted to know.
Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on June 02, 2006, 12:51:41 AM
FYI: I noticed that when I use the current MEET THE TEAM PAGE (code pasted by bloc) that it will only show the members of a GROUP ID if that is the member's PRIMARY member group.

On my TP site I have members with many secondary member groups, and when I modify the code in the Meet the Team page to call GROUP ID's it will not render those members in that group unless it is their PRIMARY ID. 

Is there a way to fix this so that it will recognize even secondary member groups?
Title: Re: Meet the team page.. Awesome
Post by: IchBin on June 02, 2006, 02:03:16 PM
Yes, Xarcell posted somewhere around here that he would like the same thing I think. Will have to wait until Bloc gets back, or if Feline just happens to come here. They are the only ones I know that hang around here that could give a definitive answer.
Title: Re: Meet the team page.. Awesome
Post by: stigmartyr on June 03, 2006, 02:38:13 PM
sweetness - until then, Ill tweak my .css !
Title: Re: Meet the team page.. Awesome
Post by: Xarcell on June 17, 2006, 01:02:39 AM
Secondary Membergroups:

http://www.tinyportal.net/smf/index.php?topic=5423.msg47506#msg47506

:laugh:
Title: Re: Meet the team page.. Awesome
Post by: bloc on June 17, 2006, 09:01:01 AM
The teampage module will fetch secondary groups....the sql call should really just fetch all the membergroups desired and single out which is which afterwards. You can simply re-use the code i used here, but each new copy will increase the query number and since it being a fairly complex call, the load on the server as well.
Title: Re: Meet the team page.. Awesome
Post by: G6Cad on June 25, 2006, 07:47:10 PM
Got mine working to now :)
Had a bit of struggle with getting the custom membergroup in, but I finaly got it to work  :D
Title: Re: Meet the team page.. Awesome
Post by: oliver on July 03, 2006, 12:58:57 AM
Quote from: G6 on June 25, 2006, 07:47:10 PM
Got mine working to now :)
Had a bit of struggle with getting the custom membergroup in, but I finaly got it to work  :D

I hpe you share the secret G6 because me I can only hoe right now.

The only thing that i did was to put number 2 to the $membergrup and it shows admin and global moderators but all my team has an aditiona grupname and if I can put that grup on this script than all the team will show up.

I just cant do it :( because I dont know but the my idea is very simple. All the team ( admins, moderators etc ) they have a aditional grup that is called Team :)

So is there any way I can add the team grup on this.

Thanks.

PS: Bloc this Team Page was a grate idea. Thanks for sharing :)
Title: Re: Meet the team page.. Awesome
Post by: Gargoyle on July 03, 2006, 02:18:38 AM
Well i got it to work great on the first page but then I tried to do another page for a different membergroup and it would not work...

If I make multiple pages using the same code is there a variable I should change to make it work ??
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 22, 2006, 01:17:09 PM
what exactly is 'teamtext' => $row['teamtext'], calling to?

I can see that the custom text shows up, but i also notice that on this site the team page has a paragraph...

this is what I have done with it so far: http://www.techdomain.com.au/index.php?page=23

that is done using secondary member groups
Title: Re: Meet the team page.. Awesome
Post by: bloc on July 22, 2006, 05:39:05 PM
In my version its actually a extra profile field within the bz7 theme. It looks specifically for that. The team can edit that field and it will be reflected at once on the team page.
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 22, 2006, 10:34:54 PM
ah - ok. thanks for that.

any chance on getting the code bits to do that?
Title: Re: Meet the team page.. Awesome
Post by: bloc on July 22, 2006, 10:53:07 PM
Sure. If you use the code in first post here more or less, the call is already fetching the texts - you only need to add the fields to the profile template.

If you open Profile.template in the theme you want to use as base, look for this code: // Personal text...
echo '
<tr>
<td width="40%"><b>', $txt[228], ': </b></td>

and add this BEFORE it:
// extra field for team
echo '
      <tr>
        <td><b>Personal Description: </b></td>
        <td>
         <textarea name="default_options[teamtext]" rows="6" cols="80" class="editor">', !empty($context['member']['options']['teamtext']) ? $context['member']['options']['teamtext'] : '' , '</textarea>
        </td>
     </tr>';


Then all members can update that..but only the group you set in the team page will actually be fetched for team page.
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 22, 2006, 10:57:52 PM
Thanks for that Bloc!

Worked like a charm  ;D
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 02:12:22 AM
here is the staff page as I have it here http://www.techdomain.com.au/index.php?page=23 , as an article: (get the articlecode.txt file)

what I did was I assigned secondary member groups to those that I wanted to display, and then put in the numbers corresponding to that group.

alternatively, you can install the smfhacks staff page mod, and then overwrite the staff.template.php with this one: (just edit it the same way that you need to edit the article code above)
that will let you have action=staff instead of it being an article: http://www.techdomain.com.au/index.php?action=staff

If anyone needs any help with that code, let me know. I have put the description for each group under the group displayed, but in the code, it appears at the top of the following group. this was because I was too lazy to move it. if you dont understand, play around with it, and it should be fairly self explanetory.

I also have the extra text field added above (into profile.template.php in /themes/default) and have set the personal text and the team text to display to the right of the staff page (which could cause a problem for low res users)
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 02:15:08 AM
Bloc, if you dont mind, I might throw together a package for TP to have the page displayed as above for 0.9.5. (unless you are already doing that!)
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on July 23, 2006, 02:19:26 AM
I kinda feel dumb in asking but how do i change it to display other member groups then the ones that you have on there?


The only ranks that i want to display is Global Moderators, Administrator, and Graphix
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 02:41:20 AM
it depends on what your group numbers are. administrator will nearly always be 1, and global mod 2. graphix you will have to see (just go to membergroups in your admin, click on the modify of the group "graphix" and look at the number that the group is (will be in your url bar)
other then that, you can delete the rest.
you will need to go through each of your members that you want displayed and assign the secondary member group (the same as the primary I would assume)
If you tell my what the number is of your "graphix" group, I will do the edit to the code for you.
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on July 23, 2006, 02:43:18 AM
Admin = 1
Global Moderator = 2
Graphix = 14

Thanks for doin this.
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 02:50:58 AM

     global $txt, $scripturl, $user_info;
global $context, $modSettings, $ID_MEMBER;
global $board_info, $settings, $db_prefix;

$groupnumber = 1;
$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['TPortal']['team']=array();

// get the name of the group
$request = db_query("
                        SELECT groupName FROM {$db_prefix}membergroups WHERE ID_GROUP=$groupnumber", __FILE__, __LINE__);
if(mysql_num_rows($request)>0){
$row = mysql_fetch_row($request);
$groupname=$row[0];
mysql_free_result($request);
    }

$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.additionalGroups, mem.ID_MEMBER, mem.memberName,
mem.usertitle, mem.karmaBad, mem.karmaGood,
mem.realName,mem.lastLogin, mem.websiteTitle, mem.websiteUrl, mem.location,
             mem.posts,
             them.value AS teamtext";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
             LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)";

// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE FIND_IN_SET($groupnumber, mem.additionalGroups)
             ORDER BY mem.memberName ASC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{

$avatar_width = '';
$avatar_height = '';

$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'usertitle' => $row['usertitle'],
'name' => $row['realName'],
'groupname' => $groupname,
'posts' => $row['posts'],
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img  src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'last_login' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']),
'last_login_timestamp' => empty($row['lastLogin']) ? 0 : forum_time(0, $row['lastLogin']),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);



}
mysql_free_result($request);



        echo '<table align="center" width="95%" cellpadding="5" cellspacing="5"><tr>
                 <td colspan="4" style="border-bottom: 2px solid #d0d0d0; padding-bottom: 4px; "><h2>Meet the Team!</h2>
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
            echo '
<tr><td valign="middle" width="110">'.$team['avatar']['image'].'</td>
<td valign="top" width="250" class="middletext" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;"><b>'.$team['link'].'</b></h2>
<b>Custom title</b>: '.$team['usertitle'].'<br />
<b>Rank</b>: '.$team['groupname'].'<br />
<b>Last seen</b>: '.$team['last_login'].'<br />
<b>Posts</b>: '.$team['posts'].'<br />
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' ,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br />' , '</td>
<td valign="top" class="middletext" style="padding: 5px;"><br />
' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '

' ,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '

    </div></td></tr>';
            $newrow++;
            if($newrow>1){
               $newrow=0;
               echo '</tr><tr><td colspan="4"></td></tr><tr>';
            }
        }
echo '</tr></table>';

$groupnumber = 2;
$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['TPortal']['team']=array();

// get the name of the group
$request = db_query("
                        SELECT groupName FROM {$db_prefix}membergroups WHERE ID_GROUP=$groupnumber", __FILE__, __LINE__);
if(mysql_num_rows($request)>0){
$row = mysql_fetch_row($request);
$groupname=$row[0];
mysql_free_result($request);
    }

$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.additionalGroups, mem.ID_MEMBER, mem.memberName,
mem.usertitle, mem.karmaBad, mem.karmaGood,
mem.realName,mem.lastLogin, mem.websiteTitle, mem.websiteUrl, mem.location,
             mem.posts,
             them.value AS teamtext";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
             LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)";

// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE FIND_IN_SET($groupnumber, mem.additionalGroups)
             ORDER BY mem.memberName ASC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{

$avatar_width = '';
$avatar_height = '';

$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'usertitle' => $row['usertitle'],
'name' => $row['realName'],
'groupname' => $groupname,
'posts' => $row['posts'],
'karmabad' => $row['karmaBad'],
'karmagood' => $row['karmaGood'],
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img  src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'last_login' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']),
'last_login_timestamp' => empty($row['lastLogin']) ? 0 : forum_time(0, $row['lastLogin']),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);



}
mysql_free_result($request);


//this is the text that is underneath your first group
        echo '<table align="center" width="95%" cellpadding="5" cellspacing="5"><tr>
                 <td colspan="4" style="border-bottom: 2px solid #d0d0d0; padding-bottom: 4px; ">
<span class="smalltext"><b>Administrator</b> you can put more text here if you want, or delete this</span><br />
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
//these are the stats for the second group
            echo '
<tr><td valign="middle" width="110">'.$team['avatar']['image'].'</td>
<td valign="top" class="middletext" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;"><b>'.$team['link'].'</b></h2>
<b>Custom title</b>: '.$team['usertitle'].'<br />
<b>Rank</b>: '.$team['groupname'].'<br />
<b>Last seen</b>: '.$team['last_login'].'<br />
<b>Posts</b>: '.$team['posts'].'<br />
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' ,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br />' , '</td>
<td valign="top" class="middletext" style="padding: 5px;"><br />

' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '

' ,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '

    </div></td></tr>';
            $newrow++;
            if($newrow>1){
               $newrow=0;
               echo '</tr><tr><td colspan="4"></td></tr><tr>';
            }
        }
echo '</tr></table>';

$groupnumber = 14;
$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['TPortal']['team']=array();

// get the name of the group
$request = db_query("
                        SELECT groupName FROM {$db_prefix}membergroups WHERE ID_GROUP=$groupnumber", __FILE__, __LINE__);
if(mysql_num_rows($request)>0){
$row = mysql_fetch_row($request);
$groupname=$row[0];
mysql_free_result($request);
    }

$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.additionalGroups, mem.ID_MEMBER, mem.memberName,
mem.usertitle, mem.karmaBad, mem.karmaGood,
mem.realName,mem.lastLogin, mem.websiteTitle, mem.websiteUrl, mem.location,
             mem.posts,
             them.value AS teamtext";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
             LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)";

// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE FIND_IN_SET($groupnumber, mem.additionalGroups)
             ORDER BY mem.memberName ASC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{

$avatar_width = '';
$avatar_height = '';

$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'usertitle' => $row['usertitle'],
'name' => $row['realName'],
'groupname' => $groupname,
'posts' => $row['posts'],
'karmabad' => $row['karmaBad'],
'karmagood' => $row['karmaGood'],
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img  src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'last_login' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']),
'last_login_timestamp' => empty($row['lastLogin']) ? 0 : forum_time(0, $row['lastLogin']),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);



}
mysql_free_result($request);


//Global moderator text - the text under the second group
        echo '<table align="center" width="95%" cellpadding="5" cellspacing="5"><tr>
                 <td colspan="4" style="border-bottom: 2px solid #d0d0d0; padding-bottom: 4px; ">
<span class="smalltext"><b>Global Moderator</b> as before, delete this if you dont want it.</span><br />
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
//start stats of third group
            echo '
<tr><td valign="middle" width="110">'.$team['avatar']['image'].'</td>
<td valign="top" class="middletext" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;"><b>'.$team['link'].'</b></h2>
<b>Custom title</b>: '.$team['usertitle'].'<br />
<b>Rank</b>: '.$team['groupname'].'<br />
<b>Last seen</b>: '.$team['last_login'].'<br />
<b>Posts</b>: '.$team['posts'].'<br />
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' ,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br />' , '</td>
<td valign="top" class="middletext" style="padding: 5px;"><br />

' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '

' ,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '

    </div></td></tr>';
            $newrow++;
            if($newrow>1){
               $newrow=0;
               echo '</tr><tr><td colspan="4"></td></tr><tr>';
            }
        }
echo '</tr></table>';

        echo '<table align="center" width="95%" cellpadding="5" cellspacing="5"><tr>
                 <td colspan="4" style="border-bottom: 2px solid #d0d0d0; padding-bottom: 4px; ">
<span class="smalltext"><b>Graphix</b> the text for the final group.</span><br />
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
echo '</tr></table>';

try that
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on July 23, 2006, 02:52:17 AM
Can you edit the Staff.Template.php file for me, im not good at articles yet.
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 02:52:49 AM
yep, have you got the staff mod installed already?
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on July 23, 2006, 02:53:19 AM
Yes i do, I uploaded the file that you attached and it just looks funny :P
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 02:54:50 AM
ok. this is the modded one with only 3 groups (the ones you wanted)
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on July 23, 2006, 02:57:28 AM
http://tasty-fragism.com/forum/index.php?action=staff

This is a lil wierd. I should have me as the admin and i have 4 global moderators and 5 graphix guys. Got any ideas?
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 02:59:52 AM
yep - take a look at the secondary member groups that are assigned. set yourself as admin, etc etc.

btw, if someone with the power wants to split this topic, that might not be a bad idea
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on July 23, 2006, 03:01:13 AM
So this is only based off of seconday member groups?
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 03:02:21 AM
yep, not off primary at all. that way people that have a dead/dumby backup admin account etc dont have to have that displayed.
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on July 23, 2006, 03:03:01 AM
ahhh ok Thank you very much for the help.
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on July 23, 2006, 03:06:23 AM
Ok well now i cant get any Graphix people to show up and yes it is their secondary member groups.
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 03:08:14 AM
sounds like the group number is wrong
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on July 23, 2006, 03:09:35 AM
That didnt do anything. Lets do it this way what is the easiest way to find out what group number that is?
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 03:14:34 AM
yep... my mistake - didnt put in the right number. this one fixes an alignment issue for your admin team text also:
Title: Re: Meet the team page.. Awesome
Post by: HaxXxoR on July 23, 2006, 03:19:59 AM
Thank you again for all your help.
Title: Re: Meet the team page.. Awesome
Post by: JayT on July 23, 2006, 07:53:39 PM
Techdomain, can you give the code change needed to put the group description at the top of the group?

I played around with it only kept getting the description in a new row.
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 23, 2006, 11:22:09 PM
above or below the lines?
Title: Re: Meet the team page.. Awesome
Post by: bloc on July 24, 2006, 12:04:53 AM
Quote from: Techdomain on July 23, 2006, 02:15:08 AM
Bloc, if you dont mind, I might throw together a package for TP to have the page displayed as above for 0.9.5. (unless you are already doing that!)
Well, I have in fact already started writing a Teampage module, that will be in v1.0..and it will do this and more. Though not for 0.9.5. That version has quite a few new features already. :)
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 24, 2006, 12:40:49 AM
what sort of timeframe are we looking at between 0.9.5 and v1? if it is over 6 months or a year, then it might be worthwhile, but otherwise it wont affect me (I mean I am happy with what I have, but other people might not be able to put it up easily)

What I might do is put together some instructions and files for 0.9.5 for those ppl that want to do it, and then the official one can take over for v1.
Title: Re: Meet the team page.. Awesome
Post by: JayT on July 24, 2006, 03:04:07 AM
Quote from: Techdomain on July 23, 2006, 11:22:09 PM
above or below the lines?

Below the lines, right above the first group member.
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 24, 2006, 03:24:58 AM
I have to go out for a couple of hours now, but when I get back I will change it and put it up for you.
Title: Re: Meet the team page.. Awesome
Post by: bloc on July 24, 2006, 03:20:50 PM
Quote from: Techdomain on July 24, 2006, 12:40:49 AM
what sort of timeframe are we looking at between 0.9.5 and v1? if it is over 6 months or a year, then it might be worthwhile, but otherwise it wont affect me (I mean I am happy with what I have, but other people might not be able to put it up easily)

What I might do is put together some instructions and files for 0.9.5 for those ppl that want to do it, and then the official one can take over for v1.

This isn't really finished as it is, there are a lot of options that should be added or customised further. Also, it doesn't take into account secondary groups together with primary. For me it isn't enough to put in as a feature now. It works fine as a php article code block though.

Timespan for v1.0? Well, it might go 6 months, but it also might be 6 weeks. I aim for a good and stable portal mod, not a time-rushed one that meet said dates. I am using TP actively myself too, on more sites than this one. Seing errors in those sites I couldn't stand lol ;D not when I could used more time on a release.
Title: Re: Meet the team page.. Awesome
Post by: G6Cad on July 24, 2006, 04:09:04 PM
Bloc, i thought I read in some other thread that you would not release any TP V.1 before SMF final or V3 is released to  ??? not that I know how far they have come with the next SMF version after 1.1rc2 though  :)
Title: Re: Meet the team page.. Awesome
Post by: bloc on July 24, 2006, 04:46:43 PM
Yes.. :) I can't say how far SMF 1.1 Final is away, but I will try to sync those two as much as possible.(TP v1.0) its also much work, so I want to finish up 0.9.5 first and get that out working fine.

But FYI I already have started on it. :)
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 24, 2006, 09:28:40 PM
LOL @ SMF Final... now those guys (sorry to you who are there also) dont like to give out any info!
Title: Re: Meet the team page.. Awesome
Post by: JayT on July 25, 2006, 02:15:12 AM
Quote from: Techdomain on July 24, 2006, 03:24:58 AM
I have to go out for a couple of hours now, but when I get back I will change it and put it up for you.

Long couple hours, eh? :P
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 25, 2006, 02:19:55 AM
whoops... sorry... will do it now
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 25, 2006, 02:41:31 AM

     global $txt, $scripturl, $user_info;
global $context, $modSettings, $ID_MEMBER;
global $board_info, $settings, $db_prefix;

$groupnumber = 1;
$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['TPortal']['team']=array();

// get the name of the group
$request = db_query("
                        SELECT groupName FROM {$db_prefix}membergroups WHERE ID_GROUP=$groupnumber", __FILE__, __LINE__);
if(mysql_num_rows($request)>0){
$row = mysql_fetch_row($request);
$groupname=$row[0];
mysql_free_result($request);
    }

$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.additionalGroups, mem.ID_MEMBER, mem.memberName,
mem.usertitle, mem.karmaBad, mem.karmaGood,
mem.realName,mem.lastLogin, mem.websiteTitle, mem.websiteUrl, mem.location,
             mem.posts,
             them.value AS teamtext";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
             LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)";

// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE FIND_IN_SET($groupnumber, mem.additionalGroups)
             ORDER BY mem.memberName ASC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{

$avatar_width = '';
$avatar_height = '';

$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'usertitle' => $row['usertitle'],
'name' => $row['realName'],
'groupname' => $groupname,
'posts' => $row['posts'],
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img  src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'last_login' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']),
'last_login_timestamp' => empty($row['lastLogin']) ? 0 : forum_time(0, $row['lastLogin']),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);



}
mysql_free_result($request);

        echo '<table align="center" width="95%" cellpadding="5" cellspacing="5"><tr>
                 <td colspan="4" style="border-bottom: 2px solid #d0d0d0; padding-bottom: 2px; "><h2>Meet the Team!</h2>
</td></tr><tr><td colspan="4" padding-bottom: 2px; "><span class="smalltext"><b>Administrator</b> first lot of text</span>
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
            echo '
<tr><td valign="middle" width="110">'.$team['avatar']['image'].'</td>
<td valign="top" width="250" class="middletext" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;"><b>'.$team['link'].'</b></h2>
<b>Custom title</b>: '.$team['usertitle'].'<br />
<b>Rank</b>: '.$team['groupname'].'<br />
<b>Last seen</b>: '.$team['last_login'].'<br />
<b>Posts</b>: '.$team['posts'].'<br />
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' ,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br />' , '</td>
<td valign="top" class="middletext" style="padding: 5px;"><br />
' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '

' ,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '

    </div></td></tr>';
            $newrow++;
            if($newrow>1){
               $newrow=0;
               echo '</tr><tr><td colspan="4"></td></tr><tr>';
            }
        }
echo '</tr></table>';

$groupnumber = 2;
$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['TPortal']['team']=array();

// get the name of the group
$request = db_query("
                        SELECT groupName FROM {$db_prefix}membergroups WHERE ID_GROUP=$groupnumber", __FILE__, __LINE__);
if(mysql_num_rows($request)>0){
$row = mysql_fetch_row($request);
$groupname=$row[0];
mysql_free_result($request);
    }

$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.additionalGroups, mem.ID_MEMBER, mem.memberName,
mem.usertitle, mem.karmaBad, mem.karmaGood,
mem.realName,mem.lastLogin, mem.websiteTitle, mem.websiteUrl, mem.location,
             mem.posts,
             them.value AS teamtext";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
             LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)";

// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE FIND_IN_SET($groupnumber, mem.additionalGroups)
             ORDER BY mem.memberName ASC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{

$avatar_width = '';
$avatar_height = '';

$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'usertitle' => $row['usertitle'],
'name' => $row['realName'],
'groupname' => $groupname,
'posts' => $row['posts'],
'karmabad' => $row['karmaBad'],
'karmagood' => $row['karmaGood'],
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img  src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'last_login' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']),
'last_login_timestamp' => empty($row['lastLogin']) ? 0 : forum_time(0, $row['lastLogin']),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);



}
mysql_free_result($request);



        echo '<table align="center" width="95%" cellpadding="5" cellspacing="5"><tr>
                 <td colspan="4" style="border-top: 2px solid #d0d0d0; padding-top: 4px; ">
<span class="smalltext"><b>Global Moderator</b> second bit of text</span><br />
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
            echo '
<tr><td valign="middle" width="110">'.$team['avatar']['image'].'</td>
<td valign="top" class="middletext" width="250" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;"><b>'.$team['link'].'</b></h2>
<b>Custom title</b>: '.$team['usertitle'].'<br />
<b>Rank</b>: '.$team['groupname'].'<br />
<b>Last seen</b>: '.$team['last_login'].'<br />
<b>Posts</b>: '.$team['posts'].'<br />
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' ,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br />' , '</td>
<td valign="top" class="middletext" style="padding: 5px;"><br />

' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '

' ,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '

    </div></td></tr>';
            $newrow++;
            if($newrow>1){
               $newrow=0;
               echo '</tr><tr><td colspan="4"></td></tr><tr>';
            }
        }
echo '</tr></table>';

$groupnumber = 3;
$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['TPortal']['team']=array();

// get the name of the group
$request = db_query("
                        SELECT groupName FROM {$db_prefix}membergroups WHERE ID_GROUP=$groupnumber", __FILE__, __LINE__);
if(mysql_num_rows($request)>0){
$row = mysql_fetch_row($request);
$groupname=$row[0];
mysql_free_result($request);
    }

$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.additionalGroups, mem.ID_MEMBER, mem.memberName,
mem.usertitle, mem.karmaBad, mem.karmaGood,
mem.realName,mem.lastLogin, mem.websiteTitle, mem.websiteUrl, mem.location,
             mem.posts,
             them.value AS teamtext";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
             LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)";

// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE FIND_IN_SET($groupnumber, mem.additionalGroups)
             ORDER BY mem.memberName ASC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{

$avatar_width = '';
$avatar_height = '';

$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'usertitle' => $row['usertitle'],
'name' => $row['realName'],
'groupname' => $groupname,
'posts' => $row['posts'],
'karmabad' => $row['karmaBad'],
'karmagood' => $row['karmaGood'],
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img  src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'last_login' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']),
'last_login_timestamp' => empty($row['lastLogin']) ? 0 : forum_time(0, $row['lastLogin']),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);



}
mysql_free_result($request);



        echo '<table align="center" width="95%" cellpadding="5" cellspacing="5"><tr>
                 <td colspan="4" style="border-top: 2px solid #d0d0d0; padding-top: 4px; ">
<span class="smalltext"><b>Group Three</b> third bit of text</span><br />
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
            echo '
<tr><td valign="middle" width="110">'.$team['avatar']['image'].'</td>
<td valign="top" class="middletext" width="250" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;"><b>'.$team['link'].'</b></h2>
<b>Custom title</b>: '.$team['usertitle'].'<br />
<b>Rank</b>: '.$team['groupname'].'<br />
<b>Last seen</b>: '.$team['last_login'].'<br />
<b>Posts</b>: '.$team['posts'].'<br />
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' ,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br />' , '</td>
<td valign="top" class="middletext" style="padding: 5px;"><br />

' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '

' ,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '

    </div></td></tr>';
            $newrow++;
            if($newrow>1){
               $newrow=0;
               echo '</tr><tr><td colspan="4"></td></tr><tr>';
            }
        }
echo '</tr></table>';

        echo '<table align="center" width="95%" cellpadding="5" cellspacing="5"><tr>
                 <td colspan="4" style="border-bottom: 2px solid #d0d0d0; padding-bottom: 4px; ">
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
echo '</tr></table>';

can see it here: http://www.techdomain.com.au/index.php?page=23
I have no group number 3, so it isnt displayed there...
you can change the padding to drop the text down (I can help you if you like, but get that up on your page first.
Title: Re: Meet the team page.. Awesome
Post by: JayT on July 25, 2006, 01:45:24 PM
Thank you!
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on July 25, 2006, 11:40:38 PM
no worries :)

Looks pretty good!
Title: Re: Meet the team page.. Awesome
Post by: knat on August 21, 2006, 07:51:38 PM
This is not working out for me  :-\ If i want it to show a membergroup it only shows me the members who has that membergroup as secondary group.

I need to show all members in a primary membergroup ??   ???
Title: Re: Meet the team page.. Awesome
Post by: G6Cad on August 21, 2006, 07:58:10 PM
Look in your database and check what number your membergroup you want to show have, then add that prefix the the code in the php code you copied from here
Title: Re: Meet the team page.. Awesome
Post by: JPDeni on August 21, 2006, 08:08:09 PM
Assuming you're using the most recent code in this topic, find the following in the code:
WHERE FIND_IN_SET($groupnumber, mem.additionalGroups)

Change it to
WHERE mem.ID_Group = '$groupnumber'

That should do it for you.
Title: Re: Meet the team page.. Awesome
Post by: knat on August 22, 2006, 05:06:58 AM
Quote from: JPDeni on August 21, 2006, 08:08:09 PM
Assuming you're using the most recent code in this topic, find the following in the code:
WHERE FIND_IN_SET($groupnumber, mem.additionalGroups)

Change it to
WHERE mem.ID_Group = '$groupnumber'

That should do it for you.

That worked fine, thanks alot
Title: Re: Meet the team page.. Awesome
Post by: JPDeni on August 22, 2006, 03:19:13 PM
Cool! 8) I'm glad I could help.
Title: Re: Meet the team page.. Awesome
Post by: Jpg on August 22, 2006, 03:33:04 PM
How do I install this? Do I just add it in an article?
Title: Re: Meet the team page.. Awesome
Post by: JPDeni on August 22, 2006, 03:46:26 PM
Yes. If found it best to create a page, but just put the title in and save it and then go back and paste the text in.

I hadn't looked at the code closely before. If you want the primary group to be displayed, you'll have to make the change above three places.
Title: Re: Meet the team page.. Awesome
Post by: Jpg on August 22, 2006, 03:53:21 PM
Ok cool and thanx. It shouldn't be hard for me. ;)
Title: Re: Meet the team page.. Awesome
Post by: Jpg on August 22, 2006, 04:03:45 PM
Ok it isn't working for me. :\
Lol. It isn't showing anything on it besides text.
http://inflamehq.com/forum/index.php?page=31
Title: Re: Meet the team page.. Awesome
Post by: JPDeni on August 22, 2006, 04:06:33 PM
There are two possibilities --

1 -- you didn't make the change in my post about changing the "WHERE" line and you don't have anyone assigned to those groups as secondary groups.

or

2 -- you did make the change and you don't have any admins or moderators. :)
Title: Re: Meet the team page.. Awesome
Post by: Jpg on August 22, 2006, 04:11:06 PM
LOL... I like the second one better. -_-'

My bad I thought that was for something else but I'll change it. ;)

Edit: Ok it works. Thanks you JPDeni. I like the Jp part of your nickname fore some reason....
Title: Re: Meet the team page.. Awesome
Post by: Techdomain on August 23, 2006, 06:58:29 AM
The only reason that it was set to show secondary groups was so that people could choose to leave out test accounts and backup admin accounts.
Title: Re: Meet the team page.. Awesome
Post by: JPDeni on August 23, 2006, 01:12:36 PM
QuoteI like the Jp part of your nickname fore some reason....
;D
It stands for "Just Plain." I've had this nickname since the '60s and was sort of a pun on the name of the insanely wealthy "J.P. Morgan," whose investment banking company still exists. You can call me "JP" or you can call me "Deni." Or you can call me "JPDeni." As you wish.  :)

QuoteThe only reason that it was set to show secondary groups was so that people could choose to leave out test accounts and backup admin accounts.
Makes perfect sense. These things evolve way beyond what was originally intended.
Title: Re: Meet the team page.. Awesome
Post by: Sakuragi on January 09, 2007, 10:59:07 PM
Hi
I need some help on this
I would like to show members from a group where this group is set as their additional group

Thanks in advance
Title: Re: Meet the team page.. Awesome
Post by: Porky on January 09, 2007, 11:22:10 PM
Look here http://www.tinyportal.net/index.php?topic=5423.msg99656#msg99656
Title: Re: Meet the team page.. Awesome
Post by: Sakuragi on January 09, 2007, 11:42:25 PM
thank you!