News:

Wondering if this will always be free?  See why free is better.

Main Menu

Team Page

Started by Diego Andrés, October 02, 2009, 04:56:36 PM

Previous topic - Next topic

samurai-lupin

For some reason it won't display my team mebers contact data (MSN, AIM; YIM etc.) Is this a bug in the code or did I do anything wrong? I would appreciate any help / feedback. Thank you.

<?php
// TeamPage Modification v3.5
// Created by ccbtimewiz ([email protected])

function template_main()
{
global $context$settings$options$scripturl$modSettings$txt$db_prefix$ID_MEMBER$boardurl;
// Start the team page.
echo '
<table cellpadding=0 cellspacing=0><tr><td height=10></td></tr></table>

<table align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr>'
;

// Let's list the group members on each side of the page.
for ($i 0$i <= 2$i++)
{
// Let's check if the array isn't empty
if (!empty($context['display_groups'][$i]))
{
// Check which column we are working with.
$column = ($i == ? ($i 1) : ($i 1));

echo '
<td valign="top" width=50%>'
;

// Depending on $i, if $i==0, it will list the members of the group on the left side of the page. If $i==1, it will list the members on the right side.
foreach ($context['display_groups'][$i] as $id => $group)
{
echo '
<table cellspacing="0" cellpadding="5" width="100%" border=0>
<tr class="titlebg">
<td align="left" width="100" nowrap>'
, (!empty($modSettings['team_show_badges']) ? $group['image'] : ''), '</td>
<td valign="middle" align="left" width="99%"><span class="largetext">'
$group['name'], '</span></td>
</tr>'
;

// Check if there are any members in this group.
if (!empty($group['members']))
{
// List the leader, and regular members.
foreach ($group['members'] as $pos => $data)
{
foreach ($data as $member)
{
echo '
<tr class="windowbg3">
<td colspan=2 style="border-top: 1px solid grey;">

<table cellpadding=0 cellspacing=0 width=100% border=0>
<tr>
<td align="center" valign="top" width="100" nowrap>'
;

// Show avatars?
if (!empty($modSettings['team_show_avatars']))
echo '
<div class="avatar">
<a href="'
$scripturl'?action=profile;u='$member['id'], '"><img src="' $member['avatar']['href'] .'" width="75" border="0" /></a>
</div>'
;
else
echo '
<!-- // -->'
;

echo '
</td>
<td align="left" valign=top>
<div align="left" style="padding-left: 20px;">
<img src="'
$member['online']['image_href'], '" alt="'$member['online']['label'], '" />&nbsp;<span class="largetext">'$member['link'], '</span><br />';

// A bit of a browser-side fix...
echo '
<div style="padding: 2px; clear: both;"><!-- // --></div>'
;

// Check their title. Is it there?
if (!empty($member['title']))
echo '
<i>'
$member['title'], '</i><br />';

echo '

<table cellpaddign=0 cellspacing=0>
<tr>
<td><a href="'
$scripturl'?action=pm;sa=send;u='$member['id'], '"><img src="http://www.thunting.com/smf/Themes/default/images/email_sm.gif" border=0></a><br /></td>
<td nowrap width=5>

'
;
if (
$context['member']['website']['url'])
echo 
'
<td><center>'
$context['member']['website']['url'] != '' '<a href="' $member['website']['url'] . '" target="_blank"><img src="' $settings['images_url'] . '/www.gif" alt="' $member['website']['title'] . '" title="' $member['website']['title'] . '" /></a>' '''</td>
<td nowrap width=5>

'
;
if (
$context['member']['icq']['link_text'])
echo 
'
<td><center>'
$context['member']['icq']['link'], '</td>
<td nowrap width=5>

'
;
if (
$context['member']['aim']['link_text'])
echo 
'
<td><center>'
$context['member']['aim']['link'], '</td>
<td nowrap width=5>

'
;
if (
$context['member']['yim']['link_text'])
echo 
'
<td><center>'
$context['member']['yim']['link'], '</td>
<td nowrap width=5>

'
;
if (
$context['member']['msn']['link_text'])
echo 
'
<td><center>'
$context['member']['msn']['link'], '</td>
<td nowrap width=5>
'
;

if (
$context['member']['twitter']['options'])
echo 
'
<td><center>'
$context['member']['options']['twitter'], '</td>
'
;
echo 
'
</tr>
</table>

'
;

// Do they want to show the last login?
if (!empty($modSettings['team_show_lastlogin']))
echo '
$member['last_login'];


// Show a activitybar.
if(!empty($modSettings['activitybar_enable']))
echo '
<div class="activity_holder" style="width: '
, !empty($modSettings['activitybar_max_width']) ? $modSettings['activitybar_max_width'] : 139'px;"><div class="activity_bar" style="width: '$member['activitybar']['width'], 'px;"><div class="activity_percentage smalltext">'$member['activitybar']['percentage'], '%</div></div></div>';

if (!empty($context['moderators'][$member['id']]))
{
$boards = array();
foreach ($context['moderators'][$member['id']] as $id => $name)
$boards[] = '<a href="' $scripturl '?board=' $id '">' $name '</a>';
echo '<div class="smalltext">Moderated Boards: ' implode(', '$boards) . '</div>';
}
echo '
</div>
</td>
</tr>
</table>

</td>
</tr>'
;
}
}
}
// No members? Let's tell them.
else
{
echo '
<tr class="windowbg3">
<td colspan="2" align="center">
<strong>'
$txt['team_no_members'], '</strong>
</td>
</tr>'
;
}

echo '
</table>
<br/>'
;
}
unset($group);

echo '
</td>'
;
}
}

// Now grabbing the half groups, if there are any.
if (!empty($context['display_groups'][3]))
{
echo '
</tr>
<tr>
<td colspan="2" valign="top">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" class="bordercolor">
<tr>
<td align="left" valign="top" class="windowbg3">
<table border="0" cellspacing="1" cellpadding="4" width="100%" class="bordercolor">
<tr class="titlebg">'
;

// Return the group first.
foreach ($context['display_groups'][3] as $id => $group)
{
echo '
<td align="left" valign="top">'
;

// Are we showing badges?
if (!empty($modSettings['team_show_badges']))
echo '
$group['image'] . '';

echo '
</td>'
;
}
unset($group);

echo '
</tr>
<tr>'
;

// List the members.
foreach ($context['display_groups'][3] as $id => $group)
{
echo '
<td width="25%" class="windowbg3" align="left" valign="top">'
;

// Now the members.
foreach ($group['members'] as $pos => $data)
{
foreach ($data as $member)
echo '
<div style="padding-bottom: 3px;">&bull; '
$member['link'], '&nbsp;&nbsp;', (!empty($member['title']) ? '-&nbsp;&nbsp;' $member['title'] : ''), '</div>';
}

echo '
</td>'
;
}
unset($group);

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

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


}

function 
template_adminset()
{
global $context$modSettings$txt$settings$scripturl;

$sscr $scripturl '?action=teampage;sa=manage';
$alternate = array(falsefalsefalsefalse);

echo '
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center;">
$txt['team_manage'] . '
</div>'
;

if (isset($_GET['error']))
{
echo '
<div id="update_message" style="font-size: 0.85em; padding: 4px;">
$txt['no_groups_defined'] . '
</div>'
;
}

if (isset($_GET['passed']) || (isset($_GET['del'])))
{
echo '
<div id="update_message" style="font-size: 0.85em; padding: 4px;">
<span style="color: green;">' 
$txt['settings_saved'] . '</span>
</div>'
;
}

echo '
<table class="bordercolor" align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr class="catbg">
<td colspan="5">' 
$txt['groups_left']  . '</td>
</tr>
<tr class="titlebg">
<th width="7%">' 
$txt['groups_order'] . '</th>
<th width="45%">' 
$txt['groups_name'] . '</th>
<th width="20%">' 
$txt['groups_stars'] . '</th>
<th width="15%">' 
$txt['groups_move'] . '</th>
<th width="10%">' 
$txt['groups_action'] . '</th>
</tr>'
;

$count 0;

if (!empty($context['groups']['left']))
{
foreach ($context['groups']['left'] as $group)
{
// If we're at this point, here's our man!
$count++;

// Doing the alternating background game...
$alternate[0] = !$alternate[0];
$window_class $alternate[0] ? 'windowbg' 'windowbg2';

// Some declarations.
$order = array(
'is_last' => $count == count($context['groups']['left']),
'is_first' => $count == 1,
);

echo '
<tr class="' 
$window_class '">
<td align="center">' 
. (!$order['is_last'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=down"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" title="Push down" /></a>' '') . '' . (!$order['is_first'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=up"><img src="' $settings['default_images_url'] . '/sort_up.gif" alt="" title="Push up" /></a>' '') . '</td>
<td>' 
. ($group['id'] == $group['name'] : '<a href="' $scripturl '?action=admin;area=membergroups;sa=members;group=' $group['id'] . '" style="color: ' $group['color'] . '">' $group['name'] . '</a>') . '</td>
<td>' 
$group['image'] . '</td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=2"><img src="' $settings['default_images_url'] . '/selected.gif" alt="" title="' $txt['groups_move_right'] . '" /></a>&nbsp;<a href="' $sscr';act=swap;group=' $group['id'] . ';place=3"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" title="' $txt['groups_move_bottom'] . '" /></a></td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=0"><img src="' $settings['default_images_url'] . '/icons/package_old.gif" alt="" title="' $txt['groups_remove'] . '" /></a></td>
</tr>'
;

}
unset($group);
}

echo '
</table><br />
<table class="bordercolor" align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr class="catbg">
<td colspan="5">' 
$txt['groups_right']  . '</td>
</tr>
<tr class="titlebg">
<th width="7%">' 
$txt['groups_order'] . '</th>
<th width="45%">' 
$txt['groups_name'] . '</th>
<th width="20%">' 
$txt['groups_stars'] . '</th>
<th width="15%">' 
$txt['groups_move'] . '</th>
<th width="10%">' 
$txt['groups_action'] . '</th>
</tr>'
;

$count 0;

if (!empty($context['groups']['right']))
{
foreach ($context['groups']['right'] as $group)
{
// If we're at this point, here's our man!
$count++;

// Doing the alternating background game...
$alternate[1] = !$alternate[1];
$window_class $alternate[1] ? 'windowbg' 'windowbg2';

// Some declarations.
$order = array(
'is_last' => $count == count($context['groups']['right']),
'is_first' => $count == 1,
);

echo '
<tr class="' 
$window_class '">
<td align="center">' 
. (!$order['is_last'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=down"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" title="Push down" /></a>' '') . '' . (!$order['is_first'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=up"><img src="' $settings['default_images_url'] . '/sort_up.gif" alt="" title="Push up" /></a>' '') . '</td>
<td>' 
. ($group['id'] == $group['name'] : '<a href="' $scripturl '?action=admin;area=membergroups;sa=members;group=' $group['id'] . '" style="color: ' $group['color'] . '">' $group['name'] . '</a>') . '</td>
<td>' 
$group['image'] . '</td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=1"><img src="' $settings['default_images_url'] . '/sort_left.gif" alt="" title="' $txt['groups_move_left'] . '" /></a>&nbsp;<a href="' $sscr';act=swap;group=' $group['id'] . ';place=3"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" title="' $txt['groups_move_bottom'] . '" /></a></td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=0"><img src="' $settings['default_images_url'] . '/icons/package_old.gif" alt="" title="' $txt['groups_remove'] . '" /></a></td>
</tr>'
;
}
unset($group);
}

echo '
</table><br />
<table class="bordercolor" align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr class="catbg">
<td colspan="5">' 
$txt['groups_bottom']  . '</td>
</tr>
<tr class="titlebg">
<th width="7%">' 
$txt['groups_order'] . '</th>
<th width="45%">' 
$txt['groups_name'] . '</th>
<th width="20%">' 
$txt['groups_stars'] . '</th>
<th width="15%">' 
$txt['groups_move'] . '</th>
<th width="10%">' 
$txt['groups_action'] . '</th>
</tr>'
;

$count 0;

if (!empty($context['groups']['bottom']))
{
foreach ($context['groups']['bottom'] as $group)
{
// If we're at this point, here's our man!
$count++;

// Doing the alternating background game...
$alternate[2] = !$alternate[2];
$window_class $alternate[2] ? 'windowbg' 'windowbg2';

// Some declarations.
$order = array(
'is_last' => $count == count($context['groups']['bottom']),
'is_first' => $count == 1,
);

echo '
<tr class="' 
$window_class '">
<td align="center">' 
. (!$order['is_last'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=down"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" title="Push down" /></a>' '') . '' . (!$order['is_first'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=up"><img src="' $settings['default_images_url'] . '/sort_up.gif" alt="" title="Push up" /></a>' '') . '</td>
<td>' 
. ($group['id'] == $group['name'] : '<a href="' $scripturl '?action=admin;area=membergroups;sa=members;group=' $group['id'] . '" style="color: ' $group['color'] . '">' $group['name'] . '</a>') . '</td>
<td>' 
$group['image'] . '</td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=1"><img src="' $settings['default_images_url'] . '/sort_left.gif" alt="" title="' $txt['groups_move_left'] . '" /></a>&nbsp;<a href="' $sscr';act=swap;group=' $group['id'] . ';place=2"><img src="' $settings['default_images_url'] . '/selected.gif" alt="" title="' $txt['groups_move_right'] . '" /></a></td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=0"><img src="' $settings['default_images_url'] . '/icons/package_old.gif" alt="" title="' $txt['groups_remove'] . '" /></a></td>
</tr>'
;
}
unset($group);
}

echo '
</table><br />'
;

echo '
<table border="0" width="100%">
<tr>
<td width="40%" align="left" valign="top">
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center;">
Groups not placed
</div>'
;

if (!empty($context['groups']['notactive']))
{
echo '
<table class="bordercolor" align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr class="titlebg">
<th width="70%">' 
$txt['groups_name'] . '</th>
<th width="25%">' 
$txt['groups_place'] . '</th>
</tr>'
;

foreach ($context['groups']['notactive'] as $group)
{
// Doing the alternating background game...
$alternate[3] = !$alternate[3];
$window_class $alternate[3] ? 'windowbg' 'windowbg2';

echo '
<tr class="' 
$window_class '">
<td>' 
. ($group['id'] == $group['name'] : '<a href="' $scripturl '?action=admin;area=membergroups;sa=members;group=' $group['id'] . '" style="color: ' $group['color'] . '">' $group['name'] . '</a>') . '</td>
<td><a href="' 
$sscr';act=add;group=' $group['id'] . ';place=1"><img src="' $settings['default_images_url'] . '/sort_left.gif" alt="" /></a>&nbsp;<a href="' $sscr';act=add;group=' $group['id'] . ';place=3"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" /></a>&nbsp;<a href="' $sscr';act=add;group=' $group['id'] . ';place=2"><img src="' $settings['default_images_url'] . '/selected.gif" alt="" /></a></td>
</tr>'
;
}

echo '
</table>'
;
}
else
{
echo '
<em>' 
$txt['no_more_groups'] . '</em>';
}

echo '
</td>
<td width="60%">'
;

echo '
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center;">
Settings
</div>'
;

echo '
<form method="post" action="'
$scripturl'?action=teampage;sa=manage;save">
<table border="0" width="100%" cellspacing="0" align="center" cellpadding="4">
<tr class="windowbg">
<td><input type="checkbox" name="team_show_badges" '
, (!empty($modSettings['team_show_badges']) ? ' checked="checked" ' '') . ' />'$txt['team_show_badges'], '</td>
</tr>
<tr class="windowbg">
<td><input type="checkbox" name="team_show_avatars" '
, (!empty($modSettings['team_show_avatars']) ? ' checked="checked" ' ''), ' />' $txt['team_show_avatars'], '</td>
</tr>
<tr class="windowbg">
<td><input type="checkbox" name="team_show_lastlogin" '
, (!empty($modSettings['team_show_lastlogin']) ? ' checked="checked" ' ''), ' />' $txt['team_show_lastlogin'], '</td>
</tr>
<tr class="windowbg">
<td><input type="checkbox" name="team_show_pmlink" '
, (!empty($modSettings['team_show_pmlink']) ? ' checked="checked" ' ''), ' />' $txt['team_show_pmlink'], '</td>
</tr>
<tr class="windowbg">
<td><input type="checkbox" name="team_additional_groups" '
, (!empty($modSettings['team_additional_groups']) ? ' checked="checked" ' ''), ' />' $txt['team_additional_groups'], '</td>
</tr>


<tr class="windowbg">
<td><input type="submit" name="savesettings" value="Save" /></td>
</tr>'
;

echo '
</table>
</form>
</td>
</tr>
</table>'
;

}

function 
template_assignleaders()
{
global $context$txt$settings$scripturl;

echo '
<h3 class="titlebg"><span class="left"></span>
<b>' 
$txt['team_manage'] . '</b>
</h3>'
;

echo '
<span class="upperframe"><span></span></span>
<div class="roundframe smalltext">
<h3 class="catbg"><span class="left"></span>
Group selected: <strong>' 
$context['group_name'] . '</strong>
</h3>'
;

echo '
<table border="0" cellpadding="2" width="50%">
<tr class="titlebg">
<th width="10%">ID</th>
<th width="40%" align="left">Name</th>
<th width="15%" align="left">Status</th>
</tr>'
;

foreach ($context['members'] as $member)
{
echo '
<tr>
<td align="center">' 
$member['id'] . '</td>
<td align="left"><a href="' 
$scripturl '?action=profile;u=' $member['id'] . '">' $member['name'] . '</a></td>
<td align="left">' 
. (!$member['is_leader'] ? '<a href="' $scripturl '?action=admin;area=teampage;sa=admin;act=leads;group=' $_GET['group'] . ';user=' $member['id'] . ';add">[+]</a>' '<a href="' $scripturl '?action=admin;area=teampage;sa=admin;act=leads;group=' $_GET['group'] . ';user=' $member['id'] . ';del">[-]</a>') . '</td>
</tr>'
;
}

echo '
</table>'
;

echo 
'Page: ' $context['page_index'];

echo '
</div>
<span class="lowerframe"><span></span></span>'
;
}

?>


Saintcrow

hey,

is there a way to add the teammembers jobs on the page like: Admin one jobs: Support
etc..

thanks =)

samurai-lupin

Quote from: samurai-lupin on December 07, 2010, 05:30:21 PM
For some reason it won't display my team mebers contact data (MSN, AIM; YIM etc.) Is this a bug in the code or did I do anything wrong? I would appreciate any help / feedback. Thank you.

<?php
// TeamPage Modification v3.5
// Created by ccbtimewiz ([email protected])

function template_main()
{
global $context$settings$options$scripturl$modSettings$txt$db_prefix$ID_MEMBER$boardurl;
// Start the team page.
echo '
<table cellpadding=0 cellspacing=0><tr><td height=10></td></tr></table>

<table align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr>'
;

// Let's list the group members on each side of the page.
for ($i 0$i <= 2$i++)
{
// Let's check if the array isn't empty
if (!empty($context['display_groups'][$i]))
{
// Check which column we are working with.
$column = ($i == ? ($i 1) : ($i 1));

echo '
<td valign="top" width=50%>'
;

// Depending on $i, if $i==0, it will list the members of the group on the left side of the page. If $i==1, it will list the members on the right side.
foreach ($context['display_groups'][$i] as $id => $group)
{
echo '
<table cellspacing="0" cellpadding="5" width="100%" border=0>
<tr class="titlebg">
<td align="left" width="100" nowrap>'
, (!empty($modSettings['team_show_badges']) ? $group['image'] : ''), '</td>
<td valign="middle" align="left" width="99%"><span class="largetext">'
$group['name'], '</span></td>
</tr>'
;

// Check if there are any members in this group.
if (!empty($group['members']))
{
// List the leader, and regular members.
foreach ($group['members'] as $pos => $data)
{
foreach ($data as $member)
{
echo '
<tr class="windowbg3">
<td colspan=2 style="border-top: 1px solid grey;">

<table cellpadding=0 cellspacing=0 width=100% border=0>
<tr>
<td align="center" valign="top" width="100" nowrap>'
;

// Show avatars?
if (!empty($modSettings['team_show_avatars']))
echo '
<div class="avatar">
<a href="'
$scripturl'?action=profile;u='$member['id'], '"><img src="' $member['avatar']['href'] .'" width="75" border="0" /></a>
</div>'
;
else
echo '
<!-- // -->'
;

echo '
</td>
<td align="left" valign=top>
<div align="left" style="padding-left: 20px;">
<img src="'
$member['online']['image_href'], '" alt="'$member['online']['label'], '" />&nbsp;<span class="largetext">'$member['link'], '</span><br />';

// A bit of a browser-side fix...
echo '
<div style="padding: 2px; clear: both;"><!-- // --></div>'
;

// Check their title. Is it there?
if (!empty($member['title']))
echo '
<i>'
$member['title'], '</i><br />';

echo '

<table cellpaddign=0 cellspacing=0>
<tr>
<td><a href="'
$scripturl'?action=pm;sa=send;u='$member['id'], '"><img src="http://www.thunting.com/smf/Themes/default/images/email_sm.gif" border=0></a><br /></td>
<td nowrap width=5>

'
;
if (
$context['member']['website']['url'])
echo 
'
<td><center>'
$context['member']['website']['url'] != '' '<a href="' $member['website']['url'] . '" target="_blank"><img src="' $settings['images_url'] . '/www.gif" alt="' $member['website']['title'] . '" title="' $member['website']['title'] . '" /></a>' '''</td>
<td nowrap width=5>

'
;
if (
$context['member']['icq']['link_text'])
echo 
'
<td><center>'
$context['member']['icq']['link'], '</td>
<td nowrap width=5>

'
;
if (
$context['member']['aim']['link_text'])
echo 
'
<td><center>'
$context['member']['aim']['link'], '</td>
<td nowrap width=5>

'
;
if (
$context['member']['yim']['link_text'])
echo 
'
<td><center>'
$context['member']['yim']['link'], '</td>
<td nowrap width=5>

'
;
if (
$context['member']['msn']['link_text'])
echo 
'
<td><center>'
$context['member']['msn']['link'], '</td>
<td nowrap width=5>
'
;

if (
$context['member']['twitter']['options'])
echo 
'
<td><center>'
$context['member']['options']['twitter'], '</td>
'
;
echo 
'
</tr>
</table>

'
;

// Do they want to show the last login?
if (!empty($modSettings['team_show_lastlogin']))
echo '
$member['last_login'];


// Show a activitybar.
if(!empty($modSettings['activitybar_enable']))
echo '
<div class="activity_holder" style="width: '
, !empty($modSettings['activitybar_max_width']) ? $modSettings['activitybar_max_width'] : 139'px;"><div class="activity_bar" style="width: '$member['activitybar']['width'], 'px;"><div class="activity_percentage smalltext">'$member['activitybar']['percentage'], '%</div></div></div>';

if (!empty($context['moderators'][$member['id']]))
{
$boards = array();
foreach ($context['moderators'][$member['id']] as $id => $name)
$boards[] = '<a href="' $scripturl '?board=' $id '">' $name '</a>';
echo '<div class="smalltext">Moderated Boards: ' implode(', '$boards) . '</div>';
}
echo '
</div>
</td>
</tr>
</table>

</td>
</tr>'
;
}
}
}
// No members? Let's tell them.
else
{
echo '
<tr class="windowbg3">
<td colspan="2" align="center">
<strong>'
$txt['team_no_members'], '</strong>
</td>
</tr>'
;
}

echo '
</table>
<br/>'
;
}
unset($group);

echo '
</td>'
;
}
}

// Now grabbing the half groups, if there are any.
if (!empty($context['display_groups'][3]))
{
echo '
</tr>
<tr>
<td colspan="2" valign="top">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" class="bordercolor">
<tr>
<td align="left" valign="top" class="windowbg3">
<table border="0" cellspacing="1" cellpadding="4" width="100%" class="bordercolor">
<tr class="titlebg">'
;

// Return the group first.
foreach ($context['display_groups'][3] as $id => $group)
{
echo '
<td align="left" valign="top">'
;

// Are we showing badges?
if (!empty($modSettings['team_show_badges']))
echo '
$group['image'] . '';

echo '
</td>'
;
}
unset($group);

echo '
</tr>
<tr>'
;

// List the members.
foreach ($context['display_groups'][3] as $id => $group)
{
echo '
<td width="25%" class="windowbg3" align="left" valign="top">'
;

// Now the members.
foreach ($group['members'] as $pos => $data)
{
foreach ($data as $member)
echo '
<div style="padding-bottom: 3px;">&bull; '
$member['link'], '&nbsp;&nbsp;', (!empty($member['title']) ? '-&nbsp;&nbsp;' $member['title'] : ''), '</div>';
}

echo '
</td>'
;
}
unset($group);

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

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


}

function 
template_adminset()
{
global $context$modSettings$txt$settings$scripturl;

$sscr $scripturl '?action=teampage;sa=manage';
$alternate = array(falsefalsefalsefalse);

echo '
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center;">
$txt['team_manage'] . '
</div>'
;

if (isset($_GET['error']))
{
echo '
<div id="update_message" style="font-size: 0.85em; padding: 4px;">
$txt['no_groups_defined'] . '
</div>'
;
}

if (isset($_GET['passed']) || (isset($_GET['del'])))
{
echo '
<div id="update_message" style="font-size: 0.85em; padding: 4px;">
<span style="color: green;">' 
$txt['settings_saved'] . '</span>
</div>'
;
}

echo '
<table class="bordercolor" align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr class="catbg">
<td colspan="5">' 
$txt['groups_left']  . '</td>
</tr>
<tr class="titlebg">
<th width="7%">' 
$txt['groups_order'] . '</th>
<th width="45%">' 
$txt['groups_name'] . '</th>
<th width="20%">' 
$txt['groups_stars'] . '</th>
<th width="15%">' 
$txt['groups_move'] . '</th>
<th width="10%">' 
$txt['groups_action'] . '</th>
</tr>'
;

$count 0;

if (!empty($context['groups']['left']))
{
foreach ($context['groups']['left'] as $group)
{
// If we're at this point, here's our man!
$count++;

// Doing the alternating background game...
$alternate[0] = !$alternate[0];
$window_class $alternate[0] ? 'windowbg' 'windowbg2';

// Some declarations.
$order = array(
'is_last' => $count == count($context['groups']['left']),
'is_first' => $count == 1,
);

echo '
<tr class="' 
$window_class '">
<td align="center">' 
. (!$order['is_last'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=down"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" title="Push down" /></a>' '') . '' . (!$order['is_first'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=up"><img src="' $settings['default_images_url'] . '/sort_up.gif" alt="" title="Push up" /></a>' '') . '</td>
<td>' 
. ($group['id'] == $group['name'] : '<a href="' $scripturl '?action=admin;area=membergroups;sa=members;group=' $group['id'] . '" style="color: ' $group['color'] . '">' $group['name'] . '</a>') . '</td>
<td>' 
$group['image'] . '</td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=2"><img src="' $settings['default_images_url'] . '/selected.gif" alt="" title="' $txt['groups_move_right'] . '" /></a>&nbsp;<a href="' $sscr';act=swap;group=' $group['id'] . ';place=3"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" title="' $txt['groups_move_bottom'] . '" /></a></td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=0"><img src="' $settings['default_images_url'] . '/icons/package_old.gif" alt="" title="' $txt['groups_remove'] . '" /></a></td>
</tr>'
;

}
unset($group);
}

echo '
</table><br />
<table class="bordercolor" align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr class="catbg">
<td colspan="5">' 
$txt['groups_right']  . '</td>
</tr>
<tr class="titlebg">
<th width="7%">' 
$txt['groups_order'] . '</th>
<th width="45%">' 
$txt['groups_name'] . '</th>
<th width="20%">' 
$txt['groups_stars'] . '</th>
<th width="15%">' 
$txt['groups_move'] . '</th>
<th width="10%">' 
$txt['groups_action'] . '</th>
</tr>'
;

$count 0;

if (!empty($context['groups']['right']))
{
foreach ($context['groups']['right'] as $group)
{
// If we're at this point, here's our man!
$count++;

// Doing the alternating background game...
$alternate[1] = !$alternate[1];
$window_class $alternate[1] ? 'windowbg' 'windowbg2';

// Some declarations.
$order = array(
'is_last' => $count == count($context['groups']['right']),
'is_first' => $count == 1,
);

echo '
<tr class="' 
$window_class '">
<td align="center">' 
. (!$order['is_last'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=down"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" title="Push down" /></a>' '') . '' . (!$order['is_first'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=up"><img src="' $settings['default_images_url'] . '/sort_up.gif" alt="" title="Push up" /></a>' '') . '</td>
<td>' 
. ($group['id'] == $group['name'] : '<a href="' $scripturl '?action=admin;area=membergroups;sa=members;group=' $group['id'] . '" style="color: ' $group['color'] . '">' $group['name'] . '</a>') . '</td>
<td>' 
$group['image'] . '</td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=1"><img src="' $settings['default_images_url'] . '/sort_left.gif" alt="" title="' $txt['groups_move_left'] . '" /></a>&nbsp;<a href="' $sscr';act=swap;group=' $group['id'] . ';place=3"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" title="' $txt['groups_move_bottom'] . '" /></a></td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=0"><img src="' $settings['default_images_url'] . '/icons/package_old.gif" alt="" title="' $txt['groups_remove'] . '" /></a></td>
</tr>'
;
}
unset($group);
}

echo '
</table><br />
<table class="bordercolor" align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr class="catbg">
<td colspan="5">' 
$txt['groups_bottom']  . '</td>
</tr>
<tr class="titlebg">
<th width="7%">' 
$txt['groups_order'] . '</th>
<th width="45%">' 
$txt['groups_name'] . '</th>
<th width="20%">' 
$txt['groups_stars'] . '</th>
<th width="15%">' 
$txt['groups_move'] . '</th>
<th width="10%">' 
$txt['groups_action'] . '</th>
</tr>'
;

$count 0;

if (!empty($context['groups']['bottom']))
{
foreach ($context['groups']['bottom'] as $group)
{
// If we're at this point, here's our man!
$count++;

// Doing the alternating background game...
$alternate[2] = !$alternate[2];
$window_class $alternate[2] ? 'windowbg' 'windowbg2';

// Some declarations.
$order = array(
'is_last' => $count == count($context['groups']['bottom']),
'is_first' => $count == 1,
);

echo '
<tr class="' 
$window_class '">
<td align="center">' 
. (!$order['is_last'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=down"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" title="Push down" /></a>' '') . '' . (!$order['is_first'] ? '<a href="' $sscr';act=move;group=' $group['id'] . ';direction=up"><img src="' $settings['default_images_url'] . '/sort_up.gif" alt="" title="Push up" /></a>' '') . '</td>
<td>' 
. ($group['id'] == $group['name'] : '<a href="' $scripturl '?action=admin;area=membergroups;sa=members;group=' $group['id'] . '" style="color: ' $group['color'] . '">' $group['name'] . '</a>') . '</td>
<td>' 
$group['image'] . '</td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=1"><img src="' $settings['default_images_url'] . '/sort_left.gif" alt="" title="' $txt['groups_move_left'] . '" /></a>&nbsp;<a href="' $sscr';act=swap;group=' $group['id'] . ';place=2"><img src="' $settings['default_images_url'] . '/selected.gif" alt="" title="' $txt['groups_move_right'] . '" /></a></td>
<td align="center"><a href="' 
$sscr';act=swap;group=' $group['id'] . ';place=0"><img src="' $settings['default_images_url'] . '/icons/package_old.gif" alt="" title="' $txt['groups_remove'] . '" /></a></td>
</tr>'
;
}
unset($group);
}

echo '
</table><br />'
;

echo '
<table border="0" width="100%">
<tr>
<td width="40%" align="left" valign="top">
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center;">
Groups not placed
</div>'
;

if (!empty($context['groups']['notactive']))
{
echo '
<table class="bordercolor" align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr class="titlebg">
<th width="70%">' 
$txt['groups_name'] . '</th>
<th width="25%">' 
$txt['groups_place'] . '</th>
</tr>'
;

foreach ($context['groups']['notactive'] as $group)
{
// Doing the alternating background game...
$alternate[3] = !$alternate[3];
$window_class $alternate[3] ? 'windowbg' 'windowbg2';

echo '
<tr class="' 
$window_class '">
<td>' 
. ($group['id'] == $group['name'] : '<a href="' $scripturl '?action=admin;area=membergroups;sa=members;group=' $group['id'] . '" style="color: ' $group['color'] . '">' $group['name'] . '</a>') . '</td>
<td><a href="' 
$sscr';act=add;group=' $group['id'] . ';place=1"><img src="' $settings['default_images_url'] . '/sort_left.gif" alt="" /></a>&nbsp;<a href="' $sscr';act=add;group=' $group['id'] . ';place=3"><img src="' $settings['default_images_url'] . '/sort_down.gif" alt="" /></a>&nbsp;<a href="' $sscr';act=add;group=' $group['id'] . ';place=2"><img src="' $settings['default_images_url'] . '/selected.gif" alt="" /></a></td>
</tr>'
;
}

echo '
</table>'
;
}
else
{
echo '
<em>' 
$txt['no_more_groups'] . '</em>';
}

echo '
</td>
<td width="60%">'
;

echo '
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center;">
Settings
</div>'
;

echo '
<form method="post" action="'
$scripturl'?action=teampage;sa=manage;save">
<table border="0" width="100%" cellspacing="0" align="center" cellpadding="4">
<tr class="windowbg">
<td><input type="checkbox" name="team_show_badges" '
, (!empty($modSettings['team_show_badges']) ? ' checked="checked" ' '') . ' />'$txt['team_show_badges'], '</td>
</tr>
<tr class="windowbg">
<td><input type="checkbox" name="team_show_avatars" '
, (!empty($modSettings['team_show_avatars']) ? ' checked="checked" ' ''), ' />' $txt['team_show_avatars'], '</td>
</tr>
<tr class="windowbg">
<td><input type="checkbox" name="team_show_lastlogin" '
, (!empty($modSettings['team_show_lastlogin']) ? ' checked="checked" ' ''), ' />' $txt['team_show_lastlogin'], '</td>
</tr>
<tr class="windowbg">
<td><input type="checkbox" name="team_show_pmlink" '
, (!empty($modSettings['team_show_pmlink']) ? ' checked="checked" ' ''), ' />' $txt['team_show_pmlink'], '</td>
</tr>
<tr class="windowbg">
<td><input type="checkbox" name="team_additional_groups" '
, (!empty($modSettings['team_additional_groups']) ? ' checked="checked" ' ''), ' />' $txt['team_additional_groups'], '</td>
</tr>


<tr class="windowbg">
<td><input type="submit" name="savesettings" value="Save" /></td>
</tr>'
;

echo '
</table>
</form>
</td>
</tr>
</table>'
;

}

function 
template_assignleaders()
{
global $context$txt$settings$scripturl;

echo '
<h3 class="titlebg"><span class="left"></span>
<b>' 
$txt['team_manage'] . '</b>
</h3>'
;

echo '
<span class="upperframe"><span></span></span>
<div class="roundframe smalltext">
<h3 class="catbg"><span class="left"></span>
Group selected: <strong>' 
$context['group_name'] . '</strong>
</h3>'
;

echo '
<table border="0" cellpadding="2" width="50%">
<tr class="titlebg">
<th width="10%">ID</th>
<th width="40%" align="left">Name</th>
<th width="15%" align="left">Status</th>
</tr>'
;

foreach ($context['members'] as $member)
{
echo '
<tr>
<td align="center">' 
$member['id'] . '</td>
<td align="left"><a href="' 
$scripturl '?action=profile;u=' $member['id'] . '">' $member['name'] . '</a></td>
<td align="left">' 
. (!$member['is_leader'] ? '<a href="' $scripturl '?action=admin;area=teampage;sa=admin;act=leads;group=' $_GET['group'] . ';user=' $member['id'] . ';add">[+]</a>' '<a href="' $scripturl '?action=admin;area=teampage;sa=admin;act=leads;group=' $_GET['group'] . ';user=' $member['id'] . ';del">[-]</a>') . '</td>
</tr>'
;
}

echo '
</table>'
;

echo 
'Page: ' $context['page_index'];

echo '
</div>
<span class="lowerframe"><span></span></span>'
;
}

?>


Bump. Thank you.

Thredziii

hi

i have this message during install

Table 'smf.smf_team' doesn't exist
Fichier: C:\xampp\htdocs\ns_forum\Packages\temp\smf2\install.php
Ligne: 70

ty for your help

TheListener

Quote from: samurai-lupin on December 22, 2010, 03:08:16 PM
Quote from: samurai-lupin on December 07, 2010, 05:30:21 PM
For some reason it won't display my team mebers contact data (MSN, AIM; YIM etc.) Is this a bug in the code or did I do anything wrong? I would appreciate any help / feedback. Thank you.


That is not a function on this mod. All it does is show the groups ie admin etc and the members within the groups.

Quote from: Thredziii on December 26, 2010, 06:05:21 AM
hi

i have this message during install

Table 'smf.smf_team' doesn't exist
Fichier: C:\xampp\htdocs\ns_forum\Packages\temp\smf2\install.php
Ligne: 70

ty for your help

The answer can be found on the dream portal forum.

imrich

Will they be updating the files here for RC4 for the bug in the install.php script?

Kimmen

Link to my site: http://www.efclan.eu
SMF version: SMF2 RC4
TP version: TinyPortal 1.0 RC1
Default Forum Language: English
Theme name and version: Catamosphere by Shine-Art & Smf Personal
Browser Name and Version: Firefox
Mods installed: Aeva Media 1.4c - MCLegendII RC3 3.0 - Member Color Link 3.0.8 - Curve_centered_menu 1.2 - Menu_Icons 1.0 - Custom Buttons / tabs and menus
Related Error messages: Error message here

I got this error after doing the parser for SMF2 RC4:

Table 'efclan_eu.smf_team' doesn't exist
File: /customers/efclan.eu/efclan.eu/httpd.www/Sources/TeamPage.php
Line: 201


What now?

Arantor

QuoteTable 'efclan_eu.smf_team' doesn't exist
You need to run the script as provided in the package itself that creates said table.

Kimmen

Then i get this error:

Table 'efclan_eu.smf_team' doesn't exist
File: /customers/efclan.eu/efclan.eu/httpd.www/Packages/temp/smf2/install.php
Line: 70

Arantor

....the whole point of that script is that's it's supposed to *make* the table.

You could ask for support on DP's site since that's where they tend to support mods, or if you have access to phpMyAdmin you could create the table manually...

Kimmen

Well, i have access, but i dont know how to do it. I have never edit anything in there ever before.

Arantor

Hmm, it may be best asking the DP folks themselves on dream-portal.net

ben sisko


jkdove

Obviously, my tables won't make a bunch of sense, but I'm throwing this up here as it's the only error message I have to share atm.   To re-install the mod after upgrading to RC-5, I used the Package Manager cheater option to push it back to RC-4, then attempted to run installation on the mod.  It posted Zero errors in installation testing, but when attempting to actually install, I received this error:


Table 'unk152_tbchq8.settings' doesn't exist
File: /home/unk152/public_html/tbchq.org/forums/Packages/temp/smf2/install.php
Line: 95



Don't know how much that helps, but that's all I have.   This is hands down my Favorite mod, so I really hope this gets updated sooner than later.   We'll be happy to make a donation if you do.

Oscworth

Will this mod be updated to work on RC5 ?
Sim Racing,  nearly as good as the real thing but much safer & cheaper

FireDitto

Quote from: -=[Vyorel]=- on December 03, 2010, 06:03:30 PM
Team Page (Updated for SMF 2.0 RC4) on the attachments. ;)



Edited by (F.L.A.M.E.R) : Attachment removed. Please post the edits instead of the whole package if you wish to assist the author with the update.


=( would you share what you did, please??
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

MjÖlNiR

Any prospects if this will be available for RC5?

MATTEK

Table 'db274223268.settings' doesn't exist
File: /homepages/46/d274007555/htdocs/Packages/temp/smf2/install.php
Line: 95

RC5. I'm sure other people have this issue as well, but just in case I'm looking for assistance please.
SMF 2.0.1

Like Comics, Books, Movies or T.V. Shows? Read about them here!!

Fredx

To install on SMF 2.0 RC4 and RC5, you have to change manually the install.php file, in the smf2/ directory of the package.

Find this line (line 19):
if (stristr($forum_version, 'SMF 2.0 RC2') || stristr($modSettings['smfVersion'], 'RC2') || stristr($forum_version, 'SMF 2.0 RC3') || stristr($modSettings['smfVersion'], 'RC3'))

And replace with this:
if (stristr($forum_version, 'SMF 2.0 RC4') || stristr($modSettings['smfVersion'], 'RC4') || stristr($forum_version, 'SMF 2.0 RC5') || stristr($modSettings['smfVersion'], 'RC5'))

In this case the mod will not install on 2.0RC2 and RC3... but this shouldn't be a problem.

Advertisement: