Tutoriais

Atualizado em 01 jun 2009 19h17

[Unreal Portal] Top Thanks - Agradecimentos (2.2.X)

  • URL Curta:

Venda: Ssd Sata Wd Green 240gb - Para Notebook, Mini Pc - 2.5

Venda: Memoria Corsair 8gb (2 X 4gb) Ddr3 Notebook, Mini Pc

Venda: Injetor Poe Eap225 24v Passivo - Tl-poe2412g - Tp-link

Venda: Injetor Poe Ubiquiti 802.3at 48v 30w Gigabit U-poe-at

[Unreal Portal] Top Thanks - Agradecimentos (2.2.X)
Aprenda a colocar no Unreal Portal 2.2.x o Top Thanks/Agradecimentos.
Favor Prestar bastante atenção nos passos, pois não tem como errar.

Esta versão substitui o top forums pelo top thanks, assim você poderá maner o top_posters junto com o top thanks.

1- Abra sources>action_public>uportal.php:
Procure:
//Top Forums

if ($GLOBALS['block']['top_forums'] != 0)
{
$count = 0;
if ($GLOBALS['setting']['num_top_forums'])
$number_of_forums = $GLOBALS['setting']['num_top_forums'];
else
$number_of_forums = 5;

$query = $this->ipsclass->DB->query("select id, name, topics, posts as replies from
{$this->ipsclass->vars['sql_tbl_prefix']}forums where sub_can_post = 1 order by topics desc, posts desc");
while($fetch = $this->ipsclass->DB->fetch_row($query))
{
if($check = $this->ipsclass->check_perms(
$this->ipsclass->cache['forum_cache'][$fetch['id']]['read_perms']))
{
$top_forums[] = $fetch;
$count++;
}

if($count == $number_of_forums)
break;
}
}

//End Top Forums


Substitua por:
//Top Thanks By ThiagoInfo

if ($GLOBALS['block']['top_forums'] != 0)
{
if ($GLOBALS['setting']['num_top_forums'])
$number_of_forums = $GLOBALS['setting']['num_top_forums'];
else
$number_of_forums = 5;

$query = $this->ipsclass->DB->query("select id, members_display_name, thanks_point from
{$this->ipsclass->vars['sql_tbl_prefix']}members order by thanks_point desc limit $number_of_forums");
while($fetch = $this->ipsclass->DB->fetch_row($query))
{
$top_forums[] = $fetch;
}
}

//End Top Thanks


Salve o Arquivo e Envie novamente via ftp.

2- Admin cp>LOOK & FEEL>Sua skin(se tiver mais de uma repita na outra skin)>Edit Template Html>skin_uportal (Non-Default Group)>top_forums_end:
Procure:
<tr>
<td class="catend" colspan="3"><!-- no content --></td>
</tr>
</table>

Substitua por:
<tr>
<td class="catend" colspan="2"><!-- no content --></td>
</tr>
</table>


3- Admin cp>LOOK & FEEL>Sua skin(se tiver mais de uma repita na outra skin)>Edit Template Html>skin_uportal (Non-Default Group)>top_forums_row:

Procure:
<tr>
<td class='row2'><a href='{$this->ipsclass->base_url}showforum={$fetch['id']}'>{$fetch['name']}</a></td>
<td class='row2'>{$fetch['topics']}</td>
<td class='row2'>{$fetch['replies']}</td>
</tr>


Substitua por:
<tr>
<td class='row2'>
<a href='{$this->ipsclass->base_url}showuser={$fetch['id']}'>{$fetch['members_display_name']}</a>
</td>
<td class='row2'><div align=center>{$fetch['thanks_point']}</div></td>
</tr>


4- Admin cp>LOOK & FEEL>Sua skin(se tiver mais de uma repita na outra skin)>Edit Template Html>skin_uportal (Non-Default Group)>top_forums_start:
Procure:
<table class='ipbtable' cellspacing="1">
<tr>
<th width='50%'>{$this->ipsclass->lang['forum']}</th>
<th width='25%'>{$this->ipsclass->lang['topics']}</th>
<th width='25%'>{$this->ipsclass->lang['replies']}</th>
</tr>

Substitua por:
<table class='ipbtable' cellspacing="1">
<tr>
<th width='75%'>{$this->ipsclass->lang['username']}</th>
<th width='25%'>{$this->ipsclass->lang['thanks']}</th>
</tr>


5- Abra cache>lang_cache>en>lang_uportal.php:
Procure:
'top_forums'        =>    "Top Forums",

Substitua por:
'top_forums'        =>    "Top Agradecimentos (ou ponha aqui o que achar melhor)",

Procure:
'posts'            =>    "Posts",

Substitua por:
'thanks'        =>    "Agradecimentos (ou ponha aqui o que achar melhor)",


Salve o Arquivo e Envie novamente via ftp.

5- Abra sources>action_admin>uportal.php:
Procure:
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Show Top Forums?</b>" ,
$this->ipsclass->adskin->form_yes_no( "top_forums", $GLOBALS['block']['top_forums'] )
) );

$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>How many Forums to display?</b>" ,
$this->ipsclass->adskin->form_input( "num_top_forums", $GLOBALS['setting']['num_top_forums'] )
) );

Substitua por:
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Exibir Top Agradecimentos?</b>" ,
$this->ipsclass->adskin->form_yes_no( "top_forums", $GLOBALS['block']['top_forums'] )
) );

$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Quantos Agradecimentos a Ser Exibido?</b>" ,
$this->ipsclass->adskin->form_input( "num_top_forums", $GLOBALS['setting']['num_top_forums'] )
) );

© MNDTI - Tecnologia e Informação. Todos Direitos Reservados. Política de privacidade.