PDA

Afficher la version complète : Affichage des discussions Avatars sur le threadbit



sunray
08/05/2010, 22h59
Ce hack permet d'afficher les avatars des auteurs des messages sur le threadbit. Il fonctionne avec les versions 4.0.X




Remerciements et support


Ce Hack a été traduit en français pour vBulletin-Ressources avec l'autorisation explicite de son auteur. / This Hack was translated into French for vBulletin-Ressources with the explicit authorization of its author.



vBulletin-Ressources et son équipe offrira du support vis à vis des hacks traduits, bien sûr, dans la mesure du possible de chacun, autant en terme de temps que de connaissances/ vBulletin-Ressources and its team will offer support for the translated hacks, of course, as far as possible for everyone, as much in term of time that knowledge.



vBulletin-Ressources remercie l'auteur du hack pour avoir fourni son autorisation. / vBulletin-Ressources thanks the author for the hack to have provided its authorization.


Conception


Auteur du Hack / Author Of Hack :BlackThorn (http://www.vbulletin.org/forum/member.php?u=344957)
Source / Link of Thread:BT - Avatar forumdisplay (http://www.vbulletin.org/forum/showthread.php?t=240021)
Version du hack / Hack version : 2.00
Version vBulletin Requise / Version vBulletin Required : vB 4.x
Testé / Tested: oui sur 4.0 beta 3

Traducteur / Translator: Sunray (http://www.vbulletin-ressources.com/forum/member.php?u=8678)



Copyright © 2006-2009 vBulletin-Ressources.com - Tous droits réservés Uniquement pour nos traductions / Copyright © 2006-2009 vBulletin-Ressources.com - All Rights Reserved Only for ours translations.


Installation


Connectez-vous sur votre panneau d’administration et dirigez vous sur l’onglet "Modules et Produits" => "Télécharger/Importer un Module" => Importer le fichier XML des modules => Indiquez le chemin du xml et cliquez sur "Importer"

Ouvrez votre template "threadbit" et cherchez :

<span class="label">{vb:rawphrase posted_by}</span>
Ajoutez ceci au-dessus :

<vb:if condition="$thread[avatarurl]">
<img height="25px" width="25px" class="inlineimg" src="{vb:raw thread.avatarurl}" border="0" alt="" /></vb:if>

Si vous avez un style personnalisé il se peut que vous ne trouviez pas cette phrase.

Dans ce cas cherchez :


vb:if condition="$show['gotonewpost']"><a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_newpost}, 'threadid', 'threadtitle'}" id="thread_gotonew_{vb:raw thread.realthreadid}"><img class="gotonewpost" src="{vb:stylevar imgdir_button}/firstnew.png" alt="{vb:rawphrase go_to_first_new_post}" /></a>
</vb:if> et aoutez après :


<vb:if condition="$thread[avatarurl]">
<img height="50px" width="50px" class="inlineimg" src="{vb:raw thread.avatarurl}" border="0" alt="" /></vb:if>
** Vous pouvez changer les valeurs 25px par d'autres de votre choix :


height="25px" width="25px"


Démonstration/Captures


Vous trouverez en pièces jointes des screenshot explicatifs

Ombre
09/05/2010, 00h02
Bonsoir, merci pour cette traduction Sunray :)

Un hack que je trouve inutile à mon gout et l'intégration est sommaire.

Simon
09/05/2010, 12h17
Merci pour la traduction :)

Billyboule
09/05/2010, 19h50
Merci pour cette trad. :)

Motus
06/08/2010, 13h39
Merci beaucoup mais j'ai un soucis voici mon threadbit mais je trouve pas ce que vous demander a chercher pourriez vous m'aider svp merci beaucoup d'avance



<li class="threadbit {vb:raw thread.statusstring}<vb:if condition="$show['paperclip']"> attachments</vb:if><vb:if condition="!$thread['postuserid'] AND !$thread['del_userid']"> guest</vb:if><vb:if condition="$thread['moderatedprefix']"> unapproved</vb:if>" id="thread_{vb:raw thread.realthreadid}">
<div class="rating{vb:raw thread.rating}<vb:if condition="$thread['sticky']"> sticky<vb:else /> nonsticky</vb:if>">
<div class="threadinfo" title="{vb:raw thread.preview}">
<!-- status icon block -->
<a class="threadstatus" rel="vB::AJAX" <vb:if condition="$show['threadcount']">title="{vb:rawphrase have_x_posts_in_thread_last_y, {vb:raw thread.dot_count}, {vb:raw thread.dot_lastpost}}"</vb:if>></a>

<!-- title / author block -->
<div class="inner">
<h3 class="threadtitle">
<vb:if condition="$show['gotonewpost']"><a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_newpost}, 'threadid', 'threadtitle'}" id="thread_gotonew_{vb:raw thread.realthreadid}"><img class="gotonewpost" src="{vb:stylevar imgdir_button}/firstnew.png" alt="{vb:rawphrase go_to_first_new_post}" /></a>
</vb:if>

<vb:if condition="$show['threadicon']">
<img src="{vb:raw thread.threadiconpath}" alt="{vb:raw thread.threadicontitle}" border="0" />
</vb:if>

<vb:if condition="$thread['sticky']">
<img src="{vb:stylevar imgdir_misc}/sticky.gif" alt="{vb:rawphrase sticky_thread}" />
</vb:if>

<vb:if condition="$thread['movedprefix'] OR $thread['typeprefix'] OR $thread['moderatedprefix'] OR $thread['prefix_rich']">
<span class="prefix understate">
{vb:raw thread.movedprefix}
{vb:raw thread.typeprefix}
{vb:raw thread.moderatedprefix}
{vb:raw thread.prefix_rich}
</span>
</vb:if>
<a class="title<vb:if condition="$show['gotonewpost']"> threadtitle_unread</vb:if>" href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo}, 'threadid', 'threadtitle'}" id="thread_title_{vb:raw thread.realthreadid}">{vb:raw thread.threadtitle}</a>
</h3>


<div class="threadmeta">
<p class="threaddesc">{vb:raw thread.preview}</p>
<div class="author">
<vb:if condition="$show['rmanage']">
<span class="rmanage"><a href="postings.php?{vb:raw session.sessionurl}do=editthread&amp;t={vb:raw thread.redirectthreadid}">{vb:rawphrase manage}</a></span>
</vb:if>
{vb:rawphrase started_by_x_y_z_a, {vb:link member, {vb:raw thread}, null, 'postuserid', 'postusername'}, {vb:raw thread.postusername}, {vb:raw thread.startdate}, {vb:raw thread.starttime}, {vb:stylevar dirmark}}
<vb:if condition="$show['unsubscribe']">
&nbsp; <a href="newreply.php?{vb:raw session.sessionurl}do=newreply&amp;t={vb:raw thread.threadid}" rel="nofollow">{vb:rawphrase reply}</a>
| <a href="subscription.php?{vb:raw session.sessionurl}do=removesubscription&amp;return=uc p&amp;t={vb:raw thread.threadid}" rel="nofollow">{vb:rawphrase unsubscribe}</a>
</vb:if>
<vb:if condition="$thread['pagenav']">
<dl class="pagination" id="pagination_threadbit_{vb:raw thread.realthreadid}">
<dt class="label">{vb:raw thread.totalpages} {vb:rawphrase pages} <span class="separator">&bull;</span></dt>
<dd>
{vb:raw thread.pagenav}
<vb:if condition="$show['pagenavmore']"> <span class="separator">...</span> <span><a href="{vb:raw thread.lastpagelink}">{vb:raw thread.totalpages}</a></span></vb:if>
</dd>
</dl>
</vb:if>
</div>

</div>

</div>
<!-- iconinfo -->
<div class="threaddetails td">
<div class="threaddetailicons">
<vb:if condition="$show['taglist']">
<img src="{vb:stylevar imgdir_misc}/tag.png" alt="{vb:raw thread.taglist}" />
</vb:if>
<vb:if condition="$show['rexpires']">
<img src="{vb:stylevar imgdir_misc}/expires.gif" alt="{vb:rawphrase expires_on_x_y, {vb:raw thread.expiredate}, {vb:raw thread.expiretime}}" />
</vb:if>
<vb:if condition="$show['moderated']">
<img src="{vb:stylevar imgdir_misc}/moderated_small.gif" alt="{vb:rawphrase x_moderated_posts, {vb:raw thread.hiddencount}}" />
</vb:if>
<vb:if condition="$show['deletedthread']">
<img src="{vb:stylevar imgdir_misc}/trashcan_small.gif" alt="{vb:rawphrase x_deleted_posts, {vb:raw thread.deletedcount}}" />
</vb:if>
<vb:if condition="$show['paperclip']">
<a href="javascript://" onclick="attachments({vb:raw thread.threadid}); return false"> <img src="{vb:stylevar imgdir_misc}/paperclip.png" border="0" alt="{vb:rawphrase x_attachments, {vb:raw thread.attach}}" /></a>
</vb:if>
<vb:if condition="$show['subscribed']">
<img src="{vb:stylevar imgdir_misc}/subscribed.png" alt="{vb:rawphrase you_are_subscribed_to_this_thread}" />
</vb:if>
</div>
</div>
</div>

<!-- threadstats -->
<vb:if condition="!$show['notificationtype']">
<ul class="threadstats td alt" title="<vb:if condition="$thread['dot_count'] > 0">{vb:rawphrase have_x_posts_in_thread_last_y, {vb:raw thread.dot_count}, {vb:raw thread.dot_lastpost}}</vb:if>">
<li>{vb:rawphrase replies}: <a href="misc.php?do=whoposted&amp;t={vb:raw thread.threadid}" onclick="who({vb:raw thread.threadid}); return false;" class="understate">{vb:raw thread.replycount}</a></li>
<li>{vb:rawphrase views}: {vb:raw thread.views}</li>
<li class="hidden">{vb:rawphrase rating}{vb:raw thread.rating} / 5</li>
</ul>
</vb:if>
<!-- lastpost -->
<dl class="threadlastpost td<vb:if condition="$show['notificationtype']"> alt</vb:if>">
<dt class="lastpostby hidden">{vb:rawphrase last_post_by}</dt>
<dd>{vb:raw memberaction_dropdown}</dd>
<dd>{vb:raw thread.lastpostdate} <em class="time">{vb:raw thread.lastposttime}</em>
<a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_lastpost}, 'threadid', 'threadtitle'}#post{vb:raw pageinfo_lastpost.p}" class="lastpostdate understate" title="{vb:rawphrase go_to_last_post}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
</dd>
</dl>

<vb:if condition="$show['notificationtype']">
<!-- notification -->
<div class="threadnotification td" >
<label for="thread_imod_checkbox_{vb:raw thread.realthreadid}">{vb:raw thread.notification}</label>
</div>
<label class="threadimod td">
<input type="checkbox" name="deletebox[{vb:raw subscribethread.$threadid}]" id="thread_imod_checkbox_{vb:raw thread.realthreadid}" value="yes" tabindex="1" />
</label>
</vb:if>

<vb:if condition="$show['inlinemod']">
<!-- fourth block -->
<label class="threadimod td alt">
<input type="checkbox" id="thread_imod_checkbox_{vb:raw thread.realthreadid}" name="imodcheck[{vb:raw thread.realthreadid}]" tabindex="1" />
</label>
</vb:if>

</div>
</li>

Ombre
06/08/2010, 16h17
Bonjour,

Ton profile est il à jour? il indique vb3 et la le hack est pour vb4.

Ton template est celui de vb4 pourtant, la variable à trouver à changer, car le hack à était réalisé sous une version beta de vb4, ce qui n'est pas le top, la variable à trouver c'est celle là "{vb:rawphrase last_post_by}" le bout de code celui là:


<dt class="lastpostby hidden">{vb:rawphrase last_post_by}</dt>


Mais vu la position du code, je doute fort que l'emplacement sur les dernières version de vb4 soit approprié, tu devras rechercher le bon emplacement je pense, qu'il serait mieux de regarder du coter de ce bout de code pour positionner ton avatar:


<div class="inner">

Motus
07/08/2010, 12h46
Merci beaucoup ombre sa a fonctionner pour changer mon vb3 en vb4 je ne sais plus où je doit aller je viens d'acquerir vb 4.05

Ombre
07/08/2010, 12h53
Bonjour, regarde dans ton compte dans ton profile, tu dois avoir un lien "A propos de moi" dans la liste, tu trouveras le champ pour changer ta version de vbulletin à cet endroit.

Motus
07/08/2010, 13h22
Ha merci beaucoup ombre je va voir sa très sympas:yahoo:

Ombre
07/08/2010, 13h25
Ahh tu as trouvé :D

lea
02/11/2010, 22h45
bon soir voila moi j'ai mie votre hack il marche nikel

mais en faite moi j'ai mie des iconne et il affiche en 2 fois

es que on pourrais aider svp

Ombre
02/11/2010, 23h00
Bonsoir, oui il y a une erreur dans les modification de templates, je prend comme exemple la deuxième possibilité proposé par Sunray, retire ce que tu as ajouté, et après ceci:


<vb:if condition="$show['gotonewpost']"><a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_newpost}, 'threadid', 'threadtitle'}" id="thread_gotonew_{vb:raw thread.realthreadid}"><img class="gotonewpost" src="{vb:stylevar imgdir_button}/firstnew.png" alt="{vb:rawphrase go_to_first_new_post}" /></a>
</vb:if>Tu ajoutes cela:


<vb:if condition="$thread[avatarurl]">
<img height="50px" width="50px" class="inlineimg" src="{vb:raw thread.avatarurl}" border="0" alt="" /></vb:if> Je corrige le sujet, qui comporté des erreurs XHTML.

lea
03/11/2010, 11h34
merci ombre sa marche nikel