"Member awards arriba de la firma"
Que se necesita:
- Tener instalado el mod "Members Awards"
- Un editor para los archivos php (Block de notas, notepad++,etc)
1.- Buscamos el archivo Display.template.php de nuestro tema (Themes>Tutheme) y lo abrimos.
2.- Buscamos el código que os dejare y lo eliminamos:
Code Select
// Show their signature awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0)
{
$awards = 0;
$award_output = '';
foreach ($message['member']['awards'] as $award)
{
if (($award['location'] == 3) && ($awards < $modSettings['awards_in_post']))
{
$award_output .= '
<a href="' . $scripturl . $award['more'] . '"><img src="' . dirname($scripturl) . $award['img'] . '" alt="' . $award['description'] . '" title="' . $award['description'] . '" /></a> ';
$awards++;
}
}
// If we found some to output here, then show them
if (!empty($awards))
{
$style = (empty($modSettings['awards_signature_format']) || $modSettings['awards_signature_format'] == 1) ? 'style="border:1px;border-style:solid; border-color:#CCC;padding:2px 2px 2px 5px;margin-right:15px;"'
: ($modSettings['awards_signature_format'] == 2 ? 'style="border-top:1px;border-bottom:0;border-right:0;border-left:0;border-style:solid;border-color:#CCC;padding:2px 2px 2px 5px;margin-right:15px;"'
: 'style="border:0px;border-style:solid; border-color:#CCC; padding: 0 0;"');
echo '
<div class="signature">
<fieldset ', $style, '>';
if (isset($modSettings['awards_signature_title']))
echo '
<legend><a href="' . $scripturl . '?action=profile;area=showAwards;u=' . $message['member']['id'] . '" title="' . $txt['awards'] . '">' . $modSettings['awards_signature_title'] . '</a></legend>';
echo $award_output;
echo '
</fieldset>
</div>';
}
}
3.- Ahora en ese mismo archivo buscamos:
Code Select
// Show the member's signature?
Agregar antes:
Code Select
// Show their signature awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0)
{
$awards = 0;
$award_output = '';
foreach ($message['member']['awards'] as $award)
{
if (($award['location'] == 3) && ($awards < $modSettings['awards_in_post']))
{
$award_output .= '
<a href="' . $scripturl . $award['more'] . '"><img src="' . dirname($scripturl) . $award['img'] . '" alt="' . $award['description'] . '" title="' . $award['description'] . '" /></a> ';
$awards++;
}
}
// If we found some to output here, then show them
if (!empty($awards))
{
$style = (empty($modSettings['awards_signature_format']) || $modSettings['awards_signature_format'] == 1) ? 'style="border:1px;border-style:solid; border-color:#CCC;padding:2px 2px 2px 5px;margin-right:15px;"'
: ($modSettings['awards_signature_format'] == 2 ? 'style="border-top:1px;border-bottom:0;border-right:0;border-left:0;border-style:solid;border-color:#CCC;padding:2px 2px 2px 5px;margin-right:15px;"'
: 'style="border:0px;border-style:solid; border-color:#CCC; padding: 0 0;"');
if (isset($modSettings['awards_signature_title']))
echo '
<div class="aw_head">' . $modSettings['awards_signature_title'] . '</div>';
echo '
<div class="aw_container">';
echo $award_output;
echo '
</div>
<a href="' . $scripturl . '?action=profile;area=showAwards;u=' . $message['member']['id'] . '" title="' . $txt['awards'] . '">Ver Mas</a>';
}
}
4. Buscamos el archivo Index.css de nuestro tema (Themes>Tutheme>css) y lo abrimos.
5. Agregar al final:
Code Select
.aw_head
{
margin: 5px;
background: rgb(116, 169, 192) none repeat scroll 0%;
color: #fff;
text-align: center;
font-size: 11px;
font-weight: bold;
border-radius: 10px;
}
.aw_container
{
margin-right: 5px;
margin-left: 5px;
text-align: center;
}
Si hacen todo bien, les debería quedar así:
Saludos, y espero que les guste este tutorial!