"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:
// 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:
// Show the member's signature?
Agregar antes:
// 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:
.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í:
(https://smftricks.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F9hztiXB.png&hash=e9dd49e6e624d898ed45fcfea9cf855e48e27358)
Saludos, y espero que les guste este tutorial!
Lamentablemente no encuentro la modificacion en SMF que ha pasado?
Quote from: nicolasx on December 05, 2013, 02:27:18 AM
Lamentablemente no encuentro la modificacion en SMF que ha pasado?
No encuentras la modificacion en SMF? No entiendo, podrias especificar mejor?
Esta modificacion me funcionó perfecto
Pues por lo que veo el MOD ya no existe o no aparece ya en SMF
https://github.com/Spuds/SMF-Member-Awards
Muchas gracias diego... sera que pueden actualizar el tutorial con la nueva versionP, por lo que veo tiene mas codigos en el display para hacer la modificacion anterior