106
Soporte General SMF / Re:Problema con el mod Flags ( Banderas Animadas )
« on: July 20, 2012 - 03:41 15:41 »
adjunta tu display.template por favor
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pues si esta repetido tienes que borrarlo.debes hacer lo que dice losox
// Shows the top Thank You Resive.
function ssi_thankYouPostTopResived($topMembers = 5, $output_method = 'echo')
{
global $txt, $scripturl, $modSettings, $smcFunc;
// Fix mistakes ;P
$topMembers = (int) $topMembers;
$topMembers = empty($topMembers) ? 5 : $topMembers;
// Find the latest poster.
$request = $smcFunc['db_query']('', '
SELECT id_member, real_name, thank_you_post_became, thank_you_post_made
FROM {db_prefix}members
ORDER BY thank_you_post_became DESC
LIMIT {int:limit}',
array(
'limit' => $topMembers
)
);
$return = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$return[] = array(
'id' => $row['id_member'],
'name' => $row['real_name'],
'href' => $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>',
'thank_you_post_became' => $row['thank_you_post_became'],
'thank_you_post_made' => $row['thank_you_post_made']
);
$colorids[$row['id_member']] = $row['id_member'];
}
$smcFunc['db_free_result']($request);
// Add colors only on installed SSI Member Color Link
if (function_exists('ssi_loadColors') && !empty($colorids))
{
global $color_profile;
ssi_loadColors($colorids);
foreach ($return as $k => $p)
{
$profile = $color_profile[$p['id']];
if (!empty($profile))
$return[$k]['link'] = $profile['link'];
}
}
if ($output_method != 'echo')
return $return;
if (empty($return))
return;
echo '
<table class="ssi_table">
<tr>
<th align="left"></th>
<th align="left">', $txt['thank_you_post_became_display'], '</th>
<th align="left">', $txt['thank_you_post_made_display'], '</th>
</tr>';
foreach ($return as $temp)
echo '
<tr>
<td align="left">
', $temp['link'], '
</td>
<td align="right">', $temp['thank_you_post_became'], '</td>
<td align="right">', $temp['thank_you_post_made'], '</td>
</tr>';
echo '
</table>';
}
// Shows the top Thank You Given.
function ssi_thankYouPostTopGiven($topMembers = 5, $output_method = 'echo')
{
global $txt, $scripturl, $modSettings, $smcFunc;
// Fix mistakes ;P
$topMembers = (int) $topMembers;
$topMembers = empty($topMembers) ? 5 : $topMembers;
// Find the latest poster.
$request = $smcFunc['db_query']('', '
SELECT id_member, real_name, thank_you_post_became, thank_you_post_made
FROM {db_prefix}members
ORDER BY thank_you_post_made DESC
LIMIT {int:limit}',
array(
'limit' => $topMembers
)
);
$return = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$return[] = array(
'id' => $row['id_member'],
'name' => $row['real_name'],
'href' => $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>',
'thank_you_post_became' => $row['thank_you_post_became'],
'thank_you_post_made' => $row['thank_you_post_made']
);
$colorids[$row['id_member']] = $row['id_member'];
}
$smcFunc['db_free_result']($request);
// Add colors only on installed SSI Member Color Link
if (function_exists('ssi_loadColors') && !empty($colorids))
{
global $color_profile;
ssi_loadColors($colorids);
foreach ($return as $k => $p)
{
$profile = $color_profile[$p['id']];
if (!empty($profile))
$return[$k]['link'] = $profile['link'];
}
}
if ($output_method != 'echo')
return $return;
if (empty($return))
return;
echo '
<table class="ssi_table">
<tr>
<th align="left"></th>
<th align="left">', $txt['thank_you_post_made_display'], '</th>
<th align="left">', $txt['thank_you_post_became_display'], '</th>
</tr>';
foreach ($return as $temp)
echo '
<tr>
<td align="left">
', $temp['link'], '
</td>
<td align="right">', $temp['thank_you_post_made'], '</td>
<td align="right">', $temp['thank_you_post_became'], '</td>
</tr>';
echo '
</table>';
}