SMFPT - Suporte e Manutenção de Fórum em Português

SMF 1.1.x (Móbulos Manual) => SMF 1.1.x Módulos Manual => Tópico iniciado por: candidosa2 em 31 de Dezembro de 2007, 15:38

Título: Avatar Inde@x
Enviado por: candidosa2 em 31 de Dezembro de 2007, 15:38
Aqui vai o procedimento como colocar imagens no index do teu tema...

(http://i211.photobucket.com/albums/bb184/candidosa2/sshot-1-52.png)

sources/MessageIndex.php

Código: [Seleccione]
else
{
if (!isset($context['icon_sources'][$row['firstIcon']]))
$context['icon_sources'][$row['firstIcon']] = 'images_url';
if (!isset($context['icon_sources'][$row['lastIcon']]))
$context['icon_sources'][$row['lastIcon']] = 'images_url';
}

Colocar este ....por baixo

Código: [Seleccione]
$mini_row = $row['firstID_MEMBER'];

if (!empty($settings['show_user_images']) && empty($options['show_no_avatars'])) {
$res = db_query("
SELECT
mem.avatar, a.ID_ATTACH, a.attachmentType, a.filename
FROM {$db_prefix}members AS mem LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
WHERE mem.ID_MEMBER = $mini_row
LIMIT 1", __FILE__, __LINE__);
$mini_avatar =  mysql_fetch_assoc($res);
mysql_free_result($res);
}


Código: [Seleccione]
'first_post' => array(
'id' => $row['ID_FIRST_MSG'],
'member' => array(
'username' => $row['firstMemberName'],
'name' => $row['firstDisplayName'],
'id' => $row['firstID_MEMBER'],
'href' => !empty($row['firstID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] : '',

Código: [Seleccione]
'avatar' => $mini_avatar['avatar'] == '' ? ($mini_avatar['ID_ATTACH'] > 0 ? '<img src="' . (empty($mini_avatar['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $mini_avatar['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $mini_avatar['filename']) . '" alt="" height="25px" align="absmiddle" border="0" />' : '') : (stristr($mini_avatar['avatar'], 'http://') ? '<img src="' . $mini_avatar['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" height="25px" align="absmiddle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($mini_avatar['avatar']) . '" alt="" height="25px" align="absmiddle" border="0" />')
/teutema/MessageIndex.template.php

Pesquisar....substituir

Código: [Seleccione]
echo'<br><font style="font-size: 8pt">', $topic['first_post']['member']['name'], '</font>
Colocar....este

Código: [Seleccione]
echo'<br>', $topic['first_post']['member']['avatar'],' <font style="font-size: 8pt">', $topic['first_post']['member']['name'], '</font>

Alguma duvida e colocar aqui mesmo

Título: Re: Avatar Inde@x
Enviado por: jass em 31 de Dezembro de 2007, 16:05
Aqui vai o procedimento como colocar imagens no index do teu tema...

(http://i211.photobucket.com/albums/bb184/candidosa2/sshot-1-52.png)

sources/MessageIndex.php

Código: [Seleccione]
else
{
if (!isset($context['icon_sources'][$row['firstIcon']]))
$context['icon_sources'][$row['firstIcon']] = 'images_url';
if (!isset($context['icon_sources'][$row['lastIcon']]))
$context['icon_sources'][$row['lastIcon']] = 'images_url';
}

Colocar este ....por baixo

Código: [Seleccione]
$mini_row = $row['firstID_MEMBER'];

if (!empty($settings['show_user_images']) && empty($options['show_no_avatars'])) {
$res = db_query("
SELECT
mem.avatar, a.ID_ATTACH, a.attachmentType, a.filename
FROM {$db_prefix}members AS mem LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
WHERE mem.ID_MEMBER = $mini_row
LIMIT 1", __FILE__, __LINE__);
$mini_avatar =  mysql_fetch_assoc($res);
mysql_free_result($res);
}


Código: [Seleccione]
'first_post' => array(
'id' => $row['ID_FIRST_MSG'],
'member' => array(
'username' => $row['firstMemberName'],
'name' => $row['firstDisplayName'],
'id' => $row['firstID_MEMBER'],
'href' => !empty($row['firstID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] : '',

Código: [Seleccione]
'avatar' => $mini_avatar['avatar'] == '' ? ($mini_avatar['ID_ATTACH'] > 0 ? '<img src="' . (empty($mini_avatar['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $mini_avatar['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $mini_avatar['filename']) . '" alt="" height="25px" align="absmiddle" border="0" />' : '') : (stristr($mini_avatar['avatar'], 'http://') ? '<img src="' . $mini_avatar['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" height="25px" align="absmiddle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($mini_avatar['avatar']) . '" alt="" height="25px" align="absmiddle" border="0" />')
/teutema/MessageIndex.template.php

Código: [Seleccione]
echo'<br><font style="font-size: 8pt">', $topic['first_post']['member']['name'], '</font>
Código: [Seleccione]
echo'<br>', $topic['first_post']['member']['avatar'],' <font style="font-size: 8pt">', $topic['first_post']['member']['name'], '</font>

Alguma duvida e colocar aqui mesmo



boas o ultimo e o antes do ultimo 'e para retirar o primeiro e por esse ou por baixo ou por cima???

cumps
Título: Re: Avatar Inde@x
Enviado por: candidosa2 em 31 de Dezembro de 2007, 18:45
sim e para substituir...
Ja actualizei no primeiro topico...
 :palmas
 pesquisar2:
Título: Re: Avatar Inde@x
Enviado por: jass em 31 de Dezembro de 2007, 19:12
Pesquisar....substituir

Código:

echo'<br><font style="font-size: 8pt">', $topic['first_post']['member']['name'], '</font>


Colocar....este

Código:

echo'<br>', $topic['first_post']['member']['avatar'],' <font style="font-size: 8pt">', $topic['first_post']['member']['name'], '</font>



esse codigo nao encontro no meu? nem em default a fazer como esta ai ne parecida!!
Título: Re: Avatar Inde@x
Enviado por: candidosa2 em 31 de Dezembro de 2007, 20:00
podes colocar aqui o teu ficheiro .php pra eu verificar..
Título: Re: Avatar Inde@x
Enviado por: jass em 01 de Janeiro de 2008, 13:28
Bom ano amigo e a todos desta casa..

bom amigo aobde esta esse ficheiro que desejas amigo??


cumps
Título: Re: Avatar Inde@x
Enviado por: candidosa2 em 01 de Janeiro de 2008, 13:37
Pra colocar ....No anexo....

MessageIndex.template.php
Título: Re: Avatar Inde@x
Enviado por: jass em 01 de Janeiro de 2008, 13:43
queres o ficherio

MessageIndex.template.php exacto??

cumps
Título: Re: Avatar Inde@x
Enviado por: candidosa2 em 01 de Janeiro de 2008, 13:51
sim pq o outro nao preciso faz parte do souce
Quero fazer texte....
Título: Re: Avatar Inde@x
Enviado por: jass em 01 de Janeiro de 2008, 13:53
Aqui esta amigo..

cumps e obrigado
Título: Re: Avatar Inde@x
Enviado por: candidosa2 em 01 de Janeiro de 2008, 14:17
estava a ver....

Podes pesquisar por .....// Show the quick moderation options?

depois colocar antes deste codigo....Para ver se ele funciona....

Código: [Seleccione]
</td>
<td class="windowbg' , $topic['is_sticky'] ? '3' : '' , '" valign="middle" width="4%" align="center">

Ai esta a linha que tens que colocar antes......

Código: [Seleccione]
echo'<br>', $topic['first_post']['member']['avatar'],' <font style="font-size: 8pt">', $topic['first_post']['member']['name'], '</font>
Título: Re: Avatar Inde@x
Enviado por: jass em 01 de Janeiro de 2008, 19:28
Boas

amigo ja aparece mas so os nomes nao os avatares ve aqui no forum

Código: [Seleccione]
www.sharingtugateam.org
e ja agora este codigo é para substituir por

Código: [Seleccione]
'first_post' => array(
'id' => $row['ID_FIRST_MSG'],
'member' => array(
'username' => $row['firstMemberName'],
'name' => $row['firstDisplayName'],
'id' => $row['firstID_MEMBER'],
'href' => !empty($row['firstID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] : '',
este aqui ou como??

ou apagar essse ai e so por este aqui??

Código: [Seleccione]
'avatar' => $mini_avatar['avatar'] == '' ? ($mini_avatar['ID_ATTACH'] > 0 ? '<img src="' . (empty($mini_avatar['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $mini_avatar['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $mini_avatar['filename']) . '" alt="" height="25px" align="absmiddle" border="0" />' : '') : (stristr($mini_avatar['avatar'], 'http://') ? '<img src="' . $mini_avatar['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" height="25px" align="absmiddle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($mini_avatar['avatar']) . '" alt="" height="25px" align="absmiddle" border="0" />')
sagradeco uma ajuda por favor..
Título: Re: Avatar Inde@x
Enviado por: candidosa2 em 01 de Janeiro de 2008, 19:44
tens a certeza que todos que estao no forum tem avatar nao estao aparecer....
tem que aparecer...
Título: Re: Avatar Inde@x
Enviado por: jass em 01 de Janeiro de 2008, 19:48
Boas

sim nen todos tem mas eu tenho e nao aparece com outros que tem mas de qualquer modo nao me deixa abrir a pagina quando mete esete codigo mas a minha duvida é que decerteza que devo estara fazer alguma coisa mal mas o que ai nao sei
porque nem abra a pagina mas nao me da erro nehum..

Código: [Seleccione]
'avatar' => $mini_avatar['avatar'] == '' ? ($mini_avatar['ID_ATTACH'] > 0 ? '<img src="' . (empty($mini_avatar['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $mini_avatar['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $mini_avatar['filename']) . '" alt="" height="25px" align="absmiddle" border="0" />' : '') : (stristr($mini_avatar['avatar'], 'http://') ? '<img src="' . $mini_avatar['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" height="25px" align="absmiddle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($mini_avatar['avatar']) . '" alt="" height="25px" align="absmiddle" border="0" />')
este aqui tenho que meter antes do outro ou como??

cumps
Título: Re: Avatar Inde@x
Enviado por: candidosa2 em 01 de Janeiro de 2008, 19:54
tem que colocar por baixo do outro código...
Nao altere o outro...
Título: Re: Avatar Inde@x
Enviado por: slimbullet em 15 de Janeiro de 2008, 02:43
Nao consegui no tema dilber mc
Alguem me pode ajudar?
Deixo aqui os ficheiros em questao para ver se alguem me pode alterar.
Agradecia se alguem alterasse me disse-se o que foi feito para ser utilizado neste tema.
Obrigado
Título: Re: Avatar Inde@x
Enviado por: Webmaster em 15 de Janeiro de 2008, 15:38
Vai ser testado depois vai postar aqui a solucao
Título: Re: Avatar Inde@x
Enviado por: mario junior em 20 de Janeiro de 2008, 07:41
Poderia me explica melhor Como Fazer este Procedimento Para Isso vou anexa aqui meu MessageIndex para modificacoes.
Título: Re: Avatar Inde@x
Enviado por: candidosa2 em 20 de Janeiro de 2008, 12:33
vou tentar adptar pra teu tema...
pq nao funciona mais espera ver como resolver depois vou colocar aqui a resposta
Título: Re: Avatar Inde@x
Enviado por: candidosa2 em 20 de Janeiro de 2008, 13:30
Conforme o seu pedido pra seu tem fica aqui disponível....o mod pra instalar ja em Pt pode clicar nesse Link

http://joomlamz.com/index.php?option=com_smf&Itemid=101&topic=4060.msg6623;topicseen#msg6623

estare disponiel tambem pra instalar manualmente

Depois de instalar abri o teu messageIndex.template.php

Pesquisar por  // Is this topic new? (assuming they are logged in!)

Alterar todo código e colocar este abaixo

Código: [Seleccione]
// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

echo '
<span class="smalltext" id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</span>
</td>
<td valign="middle" style="padding: 0px;" align="center"  width="17%">';
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($modSettings['enable_mini_avatars']))
echo '<table width="100%" cellpadding="0" cellspacing="2px" border="0"><tr><td width="30%" align="center">
', $topic['first_post']['member']['avatar'],'</td><td width="70%">';
echo'
', $topic['first_post']['member']['link'], '</td>';

if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($modSettings['enable_mini_avatars']))
echo '</tr></table></td>';
echo'

<td class="windowbg" valign="middle" width="4%" align="center">
', $topic['replies'], '
</td>
<td class="windowbg" valign="middle" width="4%" align="center">
', $topic['views'], '
</td>
<td class="smalltext" valign="middle" width="22%">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>

', $topic['last_post']['time'], '<br />
', $txt[525], ' ', $topic['last_post']['member']['link'], '
</td>';

Como ve na imagem esta a funcionar 100% pra teu tema

(http://i275.photobucket.com/albums/jj306/plilisilva/sshot-2-4.png)