← SMF

Message.index.php: Visualizações + Posts como aqui o +T

Lida 3783 vezes

Offline

amaru 
Membro
Mensagens 600 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Boas,
nos nomes dos tópicos aqui no +T tem por baixo do topico iniciado por (Nick), visualizações assim:
Citar
Visualizações : 2495
Eu já tenho instalado a Message index like Vbulletin, mas a vossa está diferente, já consegui meter antes do nick "Topico iniciado por" mas queria por também o visualizações por baixo e tirar de lado como vocês e já agora meter também por baixo o numero de posts que o tópico tem.
 Explicam como se faz?
Offline

amaru 
Membro
Mensagens 600 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

já agora, os códigos são estes.
./Themes/default/MessageIndex.template.php

Find:
Código: [Seleccione]
echo '
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
</td>
<td class="windowbg2" valign="middle" width="14%">
', $topic['first_post']['member']['link'], '
</td>

Replace:
Código: [Seleccione]
echo '
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small><br />
<small>', $topic['first_post']['member']['link'], '</small>
</td>


Find:
Código: [Seleccione]
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<td width="9%" colspan="2" class="catbg3"></td>

<td class="catbg3"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[70], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

<td class="catbg3" width="11%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[109], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

<td class="catbg3" width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[110], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

<td class="catbg3" width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[301], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

<td class="catbg3" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[111], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>';

Replace:
Código: [Seleccione]
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<td width="9%" colspan="2" class="catbg3"></td>

<td class="catbg3"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[70], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

<td class="catbg3" width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[110], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

<td class="catbg3" width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[301], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>

<td class="catbg3" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[111], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>';

Offline

amaru 
Membro
Mensagens 600 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Ani? alguém do +T, quem tratou de editar essa mod podia partilhar aqui com o pessoal :/
Offline

Nuno 
Administrador
Mensagens 7780 Gostos 216
Feedback +2

Troféus totais: 42
Trófeus: (Ver todos)
100 Poll Votes Level 7 Search Mobile User Level 6 Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes

Olá amaru, não foi editado nenhum mod. Foi tudo foi por mim em exclusivo para o +t. Se quiseres requisitar os meus serviços contacta-me por pm.
Offline

amaru 
Membro
Mensagens 600 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Olá amaru, não foi editado nenhum mod. Foi tudo foi por mim em exclusivo para o +t. Se quiseres requisitar os meus serviços contacta-me por pm.
Afinal o script é da DzinerStudio.
http://demo.dzinerstudio.com/
Escolham a Newbalance V.2 e vejam, igualzinho lol
Offline

Nuno 
Administrador
Mensagens 7780 Gostos 216
Feedback +2

Troféus totais: 42
Trófeus: (Ver todos)
100 Poll Votes Level 7 Search Mobile User Level 6 Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes

Afinal o script é da DzinerStudio.
http://demo.dzinerstudio.com/
Escolham a Newbalance V.2 e vejam, igualzinho lol

Existem centenas de themes com essa configuração. Basta meter o código onde queres quando estás a fazer a theme... Não é copia dessa theme.

Basta agarrar no codigo das visualizações e coloca-lo por baixo do título, já agora a antiga theme do +t, que é muito anterior a essa, já tinha assim o message.index

http://maistrafego.pt/smfdemo/index.php?board=1.0

A theme a gratuita está disponível para download se quiseres ver o codigo...
Offline

amaru 
Membro
Mensagens 600 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Acredito, não é preciso de ir ver, só achei coiso a configuração estar exactamente igual xD