PDA

Voir la version complète : Fond d'avatar pour l'équipe


Allan
15/08/2006, 12h55
Voici un petit mod qui vous permet d'ajouter un fond a votre avatar en fonction du groupe dans lequel vous êtes.

http://img48.imageshack.us/img48/4491/badgeadmin8fm.png

Dans ton template "postbit" ou "postbit_legacy", trouve:
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>

Remplace par:
<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']">
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar/badge6.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge7.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MODERATOR -->
<else />
<!-- SUPER MODERATOR -->
<if condition="$post[usergroupid]==5 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge5.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- SUPER MODERATOR -->
<else />
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->

Quelques explications:- <table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">, celle ligne défis les dimensions du fond de l'avatar

- <td background="$stylevar[imgdir_misc]/badge6.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>, cette ligne défis la taille de l'avatar une fois redimensionner

- badge6.png, est le badge qui correspond au groupe 6, en gros, vous pouvez créer une image avec comme nom exemple.gif, et pour qui apparaisse avec un groupe choisi, ajouter le nombre du groupe choisi, cela donnera: exemple6.gif (6 correspond au groupe Administrateur)

- Pour ajouter des groupes, avant

<!-- NO GROUP -->

Ajouter,

<!-- NOUVEAU GROUPE -->
<if condition="$post[usergroupid]==x ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgex.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- NOUVEAU GROUPE -->
<else />

Changer x par l'ID du groupe

Et après

<!-- NO GROUP -->

Ajouter un

</if>
Un </if> devra être ajouter pour chaque ajout de groupe !

Voila, enjoy :yahoo:

[I][U]Sources: http://www.vbulletin.org/forum/showthread.php?t=120582

psy4
15/08/2006, 13h26
thx sa peut etre bien ;)

Alexandre_
15/08/2006, 15h04
Merci Allan pour ta réponse super rapide :p C'est cool !

rl0075
20/08/2006, 11h03
j'ai essayé, ..... sans succès, sa semble pas évident, merci tout de meme

Allan
20/08/2006, 11h46
j'ai essayé, ..... sans succès, sa semble pas évident, merci tout de meme
Ca donne quoi ?
Quel est le problème ?

rl0075
26/08/2006, 22h34
Excuse moi du retard allan

Tout est ok, c'est de moi

merci de ton aide malgré tout

Rom56
26/08/2006, 22h36
Super ca rend vraiment super merci beaucoup allan très pratique ! :)

super partage :p

0a$!s
06/09/2006, 11h32
À déplacer dans Templates Modifications non ?

Allan
10/09/2006, 16h06
À déplacer dans Templates Modifications non ?
Oui, tu a raison, c'est fait, merci ;)

rl0075
14/12/2006, 18h52
Désolé pour le post mal placé, je savais pas qu'il fallait mettre a la suite

Bonjour a vous,

voilà j'ai installé en test ce hack sur un vb vierge la 3.6.4

pris http://www.vbulletin-ressources.com/...ead.php?t=1519 (http://www.vbulletin-ressources.com/forum/showthread.php?t=1519)

Voilà deux screens pour mieux expliquer :

L'image ci-dessous est en mode verticale, avec un bug

http://img334.imageshack.us/img334/6523/sanstitre1fw7.th.jpg

L'image ci-dessous est en mode classique, là c'est normal

http://img278.imageshack.us/img278/1184/sanstitre2rk2.th.jpg

Et comme j'utilise la façon verticale, je suis un peu perdu !

j'ai bien trouvé la partie


<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>



et remplacé par

<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']">
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge6.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge7.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MODERATOR -->
<else />
<!-- SUPER MODERATOR -->
<if condition="$post[usergroupid]==5 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge5.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- SUPER MODERATOR -->
<else />
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->


J'ai bien défini le lieu ou se trouve le fond, bien tout paramétré mais sans succès ! merci de vos suggestions :blush2:

Nba13
17/12/2006, 09h38
On voit rien sur tes images.

Allan
17/12/2006, 09h57
Oui, remet nous des images stp avec ton template "postbit" ^^

rl0075
17/12/2006, 19h05
Voici donc ....

http://img168.imageshack.us/img168/5673/sanstitre1yq9.th.jpg (http://img168.imageshack.us/my.php?image=sanstitre1yq9.jpg)

http://img168.imageshack.us/img168/7312/sanstitre2bh1.th.jpg (http://img168.imageshack.us/my.php?image=sanstitre2bh1.jpg)

Ci-dessous, le postbit

j'ai mis en rouge la partie ajouté du hack

<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" $post[scrolltothis]>
<div class="normal" style="float:$stylevar[right]">
&nbsp;
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> &nbsp;</if>
<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>&nbsp;
</if>
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a> &nbsp;</if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> &nbsp;</if>
$post[iplogged]
<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>
</div>

<div class="normal">
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
<if condition="!$show['announcement']">
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
<else />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding:0px">
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']">
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge6.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge7.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MODERATOR -->
<else />
<!-- SUPER MODERATOR -->
<if condition="$post[usergroupid]==5 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge5.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- SUPER MODERATOR -->
<else />
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

</td>
<td width="100%">&nbsp;</td>
<td valign="top" nowrap="nowrap">

<div class="smallfont">
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>

</td>
</tr>
</table>
<!-- / user info -->
</td>
</tr>
<tr>
<td class="alt1" id="td_post_$post[postid]">
<!-- message, attachments, sig -->

<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>

<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>

<div style="margin-top: 10px" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<if condition="$show['deletedpost']">
<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
</if>
<if condition="$show['redcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
<else />
<if condition="$show['yellowcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>
</if>
<!-- / controls -->
</div>

<!-- message, attachments, sig -->

</td>
</tr>
</table>
<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none;">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->

Allan
17/12/2006, 19h35
Essaie de remplacer avec ca pour voir:

<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" $post[scrolltothis]>
<div class="normal" style="float:$stylevar[right]">
&nbsp;
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> &nbsp;</if>
<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>&nbsp;
</if>
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a> &nbsp;</if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> &nbsp;</if>
$post[iplogged]
<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>
</div>

<div class="normal">
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
<if condition="!$show['announcement']">
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
<else />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding:0px">
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']">
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge6.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge7.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MODERATOR -->
<else />
<!-- SUPER MODERATOR -->
<if condition="$post[usergroupid]==5 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge5.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- SUPER MODERATOR -->
<else />
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->

<td nowrap="nowrap">

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

</td>
<td width="100%">&nbsp;</td>
<td valign="top" nowrap="nowrap">

<div class="smallfont">
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>

</td>
</tr>
</table>
<!-- / user info -->
</td>
</tr>
<tr>
<td class="alt1" id="td_post_$post[postid]">
<!-- message, attachments, sig -->

<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>

<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>

<div style="margin-top: 10px" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<if condition="$show['deletedpost']">
<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
</if>
<if condition="$show['redcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
<else />
<if condition="$show['yellowcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>
</if>
<!-- / controls -->
</div>

<!-- message, attachments, sig -->

</td>
</tr>
</table>
<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none;">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->


J'ai ajouté la partie avec cette couleur

rl0075
18/12/2006, 11h33
Non c'st pareil ! bizarre car démarrer depuis un vb vierge sans rien dessus et sa fait toujours la meme chose ! comprends pas trop sur ce coup

rl0075
21/12/2006, 10h49
J'ai l'impression que ce hack est compatible pour le postbit et non legacy, car essayé de faire xx modif sans succès, tout est décalé, alors que si je fais les modif pour le postbit classique il est nickel !

donc ... j'ai fais la modif pour le postbit legacy et tout est déformé, j'ai donc recopié ça

<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>

a la place de tout le code eton a l'impression de ce retrouvé avec le postib à l'horizontal, donc c'est pour ça ! j'aimerais savoir si y'a des personnes qui ont réussi à l'installé à la verticale, si oui merci de copié votre postibt_légacy pour le comparer

merci a vous

0a$!s
21/12/2006, 11h04
J'imagine que tu utilises Internet Explorer ?

UtOpiK
21/12/2006, 11h10
Clair ca fait chier ie, meme si on utilise beaucoup mozilla, le probleme c'est qu'il y a encore 60% des gens qui sont sous ie .. donc c'est dommage de faire un site qui tiens pas la route sous ie :(

Autrement personne connait un moyent de faire un script qui detecte le naviguateur et si c'est ie, une popu apparait pour dire que le site est optimisé mozilla et de lui proposé de le download ?:angel:

rl0075
21/12/2006, 11h32
Alors alors, j'ai testé sous IE, maxthon et Mozilla firefox sans succès !

mais je doute que ce soit une incompatibilité de navigateur, sincèrement on dirait que ce hack est adapté pour le mode classique de VB et non pour le mode vertical, après .... je sais pas trop, pourtant j'ai réalisé xx tests même sous un forum vierge ! et toujours pareil
sinon c'est clair que mozilla est bien mieux qu'IE, chez moi c'est plus rapide ( mozilla )

LtD
21/12/2006, 11h53
merci allan, moi je vais tester ca ce soir

LtD
21/12/2006, 17h18
bon j'ai testé et pour ceux qui ont le postbit à la verticale "comme moi" c'est pas trés bien placé lol

Enfaite j'ai un peu cherché et j'ai vus qu'il fallais enlever :


<td class="alt2">le reste du code</td> <table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">Ce qui apparais en rouge est à enlever

Le "align="center"" du deuxiéme code est facultatif, moi je l'es enlevé car tout est aligné à gauche sur l'apparance à la vertical du postbit



Voila meoui

rl0075
21/12/2006, 20h47
C'est quoi sa


<td class="alt2">le reste du code</td>

LtD
21/12/2006, 21h25
<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']">
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge6.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge7.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MODERATOR -->
<else />
<!-- SUPER MODERATOR -->
<if condition="$post[usergroupid]==5 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge5.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- SUPER MODERATOR -->
<else />
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->

:)

rl0075
21/12/2006, 23h01
Ah d'accord j'avais pas saisi !!!


je viens d'essayer et c'est nickel chrome, merci a toi pour ta réponse :D

BarcaMaroc
24/09/2007, 22h14
merci tres cher

Grand_manitou
23/01/2008, 14h06
Hello,

J'ai installé et tout est OK jusqu'au moment où j'ai créé des nouveaux groupes.

Je n'ai pas bien saisi où il fallait insérer le "<!-- NO GROUP -->" et le "</if>" pourriez vous m'aider car le résultat que j'ai c'est tout les fonds les uns à côté des autres pour chaque membre !

Merci

http://img147.imageshack.us/img147/3038/screen11fd5.png

Grand_manitou
24/01/2008, 13h10
Bon, j'ai réparé une partie de mon soucis mais reste que pour les deux groupes que j'ai rajouté, l'avatar apparait bien mais il est encore dans son état de base à la droite.

Voir image : http://img244.imageshack.us/img244/6493/screen12rx0.png

Ci dessous la partie concernée du postbit. En rouge, c'est ce que j'ai rajouté comme groupe.

Merci de votre aide et merci à Allan pour ce hack qui j'en suis sur va finir par fonctionner chez moi.

<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']"></if>
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeadmin.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgemodo.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MODERATOR -->
<else />
<!-- GRAND MANITOU -->
<if condition="$post[usergroupid]==9 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgegrand.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- GRAND MANITOU -->
<else />
<!-- NO GROUP -->
<!-- PETIT MANITOU -->
<if condition="$post[usergroupid]==10 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeheure.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- PETIT MANITOU -->
<else />
<!-- NO GROUP -->
</if>
<!-- NO GROUP -->
<!-- AMBASSADEUR -->
<if condition="$post[usergroupid]==12 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeambsa.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- AMBASSADEUR -->
<else />
<!-- NO GROUP -->
</if>
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->

Grand_manitou
24/01/2008, 20h25
Si je mets ça :

<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']"></if>
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeadmin.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgemodo.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MODERATOR -->
<else />
<!-- GRAND MANITOU -->
<if condition="$post[usergroupid]==9 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgegrand.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- GRAND MANITOU -->
<else />
<!-- NO GROUP -->
<!-- PETIT MANITOU -->
<if condition="$post[usergroupid]==10 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeheure.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- PETIT MANITOU -->
<else />
<!-- NO GROUP -->
</if>
<!-- NO GROUP -->
<!-- AMBASSADEUR -->
<if condition="$post[usergroupid]==12 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeambsa.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- AMBASSADEUR -->
<else />
<!-- NO GROUP -->
</if>
<!-- NO GROUP -->
<!-- MEMBRE -->
<if condition="$post[usergroupid]==2 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgemembre.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MEMBRE -->
<else />
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->Je n'ai que deux des trois nouveaux groupes qui ont l'avatar à double.

Je n'y comprends plus rien.

A noter que VB m'a demandé de rajouter un "</if> en fin de ligne 38 (voir ligne en vert) autrement j'ai une page blanche qui s'affiche !

J'ai besoin d'un sérieux coup de main, merci.

Allan
24/01/2008, 20h45
Pour chaque condition, cela demande un </if> à la fin :)

Avec tous ces post, j'ai du mal a te suivre, peux tu mettre en balise code ton template, ce que tu souhaite en étand clair.

PS: tu dis que l'avatar de change pas de taille, celle-ci est déterminé par cela "height="56" width="56"", donc dans ce cas, l'avatar aura une taille de 56px de haut par 56px de large, si l'image est plus grande, elle sera redimensionner a cette dimension.

Grand_manitou
24/01/2008, 21h33
OK, je vais essayer d'être un peu plus clair.

J'ai utilisé ton hack pour mettre une image de fond aux avatar de tout les membres de mon forum.

J'ai rajouté trois nouveaux groupe que j'ai inséré dans le template. La partie hack du rajoutée au postbit est :

<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']"></if>
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeadmin.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgemodo.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MODERATOR -->
<else />
<!-- GRAND MANITOU -->
<if condition="$post[usergroupid]==9 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgegrand.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- GRAND MANITOU -->
<else />
<!-- PETIT MANITOU -->
<if condition="$post[usergroupid]==10 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeheure.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- PETIT MANITOU -->
<else />
<!-- NO GROUP -->
</if>
<!-- NO GROUP -->
<!-- AMBASSADEUR -->
<if condition="$post[usergroupid]==12 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeambsa.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- AMBASSADEUR -->
<else />
<!-- NO GROUP -->
</if>
<!-- NO GROUP -->
<!-- MEMBRE -->
<if condition="$post[usergroupid]==2 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgemembre.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MEMBRE -->
<else />
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->
Les groupes que j'ai rajouté son :
Petit Manitou
Ambassadeur
MembreMaintenant, mon problème est que pour "Petit Manitou" et "Ambassadeur" le résultat est le suivant : http://img244.imageshack.us/img244/6493/screen12rx0.png




L'avatar est bien redimentionné sur le fond mais il est aussi comme avant le hack. (voir image)

Ce que je ne comprends pas, c'est que pour le dernier groupe que j'ai créé (Membre) le problème n'existe pas, alors que j'ai fais pareil. Je n'arrive pas à trouver où se trouve mon erreur.

Je n'ai pas parlé d'avatar trop grand, je me suis juste mal exprimé.

Merci pour le coup de main et désolé pour le dérangement.

lagrace
25/01/2008, 18h36
Salut

Quel est le bon code pour le posbit-legacy svp merci a vous



Ps:pour un essai en local sait quoi le code pour ton new badge Allan parce que j'ai un bleme vis a vis de l'avatar il se met pas au centre du carré blanc merci a toi pour moi comprendre le codage

Allan
25/01/2008, 18h55
Salut

Quel est le bon code pour le posbit-legacy svp merci a vous



Ps:pour un essai en local sait quoi le code pour ton new badge Allan parce que j'ai un bleme vis a vis de l'avatar il se met pas au centre du carré blanc merci a toi pour moi comprendre le codage
Pour le centrage, j'ai utiliser une class que j'ai ajouter dans le template.

OK, je vais essayer d'être un peu plus clair.

J'ai utilisé ton hack pour mettre une image de fond aux avatar de tout les membres de mon forum.

J'ai rajouté trois nouveaux groupe que j'ai inséré dans le template. La partie hack du rajoutée au postbit est :

<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']"></if>
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeadmin.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgemodo.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MODERATOR -->
<else />
<!-- GRAND MANITOU -->
<if condition="$post[usergroupid]==9 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgegrand.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- GRAND MANITOU -->
<else />
<!-- PETIT MANITOU -->
<if condition="$post[usergroupid]==10 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeheure.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- PETIT MANITOU -->
<else />
<!-- NO GROUP -->
</if>
<!-- NO GROUP -->
<!-- AMBASSADEUR -->
<if condition="$post[usergroupid]==12 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeambsa.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- AMBASSADEUR -->
<else />
<!-- NO GROUP -->
</if>
<!-- NO GROUP -->
<!-- MEMBRE -->
<if condition="$post[usergroupid]==2 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgemembre.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MEMBRE -->
<else />
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->Les groupes que j'ai rajouté son :
Petit Manitou
Ambassadeur
MembreMaintenant, mon problème est que pour "Petit Manitou" et "Ambassadeur" le résultat est le suivant : http://img244.imageshack.us/img244/6493/screen12rx0.png





L'avatar est bien redimentionné sur le fond mais il est aussi comme avant le hack. (voir image)

Ce que je ne comprends pas, c'est que pour le dernier groupe que j'ai créé (Membre) le problème n'existe pas, alors que j'ai fais pareil. Je n'arrive pas à trouver où se trouve mon erreur.

Je n'ai pas parlé d'avatar trop grand, je me suis juste mal exprimé.

Merci pour le coup de main et désolé pour le dérangement.
Esaie avec ce code pour voir:

<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']"></if>
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeadmin.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgemodo.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MODERATOR -->
<else />
<!-- GRAND MANITOU -->
<if condition="$post[usergroupid]==9 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgegrand.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- GRAND MANITOU -->
<else />
<!-- PETIT MANITOU -->
<if condition="$post[usergroupid]==10 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeheure.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- PETIT MANITOU -->
<else />
<!-- AMBASSADEUR -->
<if condition="$post[usergroupid]==12 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgeambsa.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- AMBASSADEUR -->
<else />
<!-- NO GROUP -->

<!-- NO GROUP -->
<!-- MEMBRE -->
<if condition="$post[usergroupid]==2 ">
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badgemembre.gif" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>
</td>
<!-- MEMBRE -->
<else />
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->

lagrace
25/01/2008, 19h32
pour le posbit a la verticale sait des <div> et non des <td> je pense ???

<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>

Grand_manitou
25/01/2008, 19h48
Merci Allan, c'est TOP.

Encore une fois, mon problème est résolu grâce à VB-R !!!

Ombre
27/01/2008, 09h10
Bonjour, Tu les a modifié mais non refait, on vois les ajouts sur la base de ce de vB-r et tu sais que seul vB-r a le droit de les utilisés! tu seras prié stp d'éviter d'emprunter ce qui ne t'appartient pas, selon nos règles que tu ne respectes pas je devrais te bannir du forum, mais étant nouveau je préfère juste te conseiller vivement de faire tes propres créations, déjà tu sera plus satisfait du résultat car ce que tu as modifié sont loin d'être jolie et fini, et tu éviteras se style de remarque qui ne fait pas du plus belle effet dés l'entrée sur un forum. Merci

-=NSR=-
27/01/2008, 09h18
desoler j ai aps lu le reglement (je devrie le lire ;)) enfin merci de conseil ca va plus ce repreduire

@+

nevalys
24/03/2008, 11h01
merci pour ce hack

Goodie
10/06/2008, 09h57
Bonjour !

Super ce hack, mais je rencontre un souci.

Il marche très bien, sauf lorsqu'un groupe n'est pas inclue, cela décale son post. Car je n'ai pas voulu mettre de fond d'avatar pour les membres, et du coup ca leur fait un bug d'affichage sur chacun des messages des membres ayant un avatar. Ce bug disparait si je ne leur laisse pas la possibilité d'avoir un avatar.
Que puis-je faire?

Allan
10/06/2008, 14h39
Il faut que tu ajoute un <else /> à la fin de la partie correspondant a ton groupe membre, enfin, sans voir, je dis ca à la volée, donne nous ton code si cela ne marche pas, qu'on y jette un oeil :)

Goodie
10/06/2008, 16h20
Voici mon code:

<!-- START - TEST FOR AVATAR HACK -->
<if condition="$show['avatar']">
<!-- ADMIN -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->

<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge6.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>

<!-- ADMIN -->
<else />
<!-- MODERATOR -->
<if condition="$post[usergroupid]==7 ">

<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge7.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>

<!-- MODERATOR -->
<else />
<!-- SUPER MODERATOR -->
<if condition="$post[usergroupid]==5 ">

<table cellpadding="5" cellspacing="0" border="0" width="150" height="70" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge5.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="56" width="56" align="right"></td>
</tr>
</table>

<!-- SUPER MODERATOR -->
<else />
<!-- NO GROUP -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
<!-- NO GROUP -->
</if>
</if>
</if>
</if>
<!-- END - TEST FOR AVATAR HACK -->

Comme tu peux le voir, aucune ligne n'apparait pour le groupe "membre"
Je dois en créer une, même si je ne veux pas que ce groupe est un fond d'avatar, mais qu'il utilise l'avatar tout simplement?

Allan
10/06/2008, 19h41
J'ai du mal à imaginer le souci, peux-tu me faire un screen stp, et me dire clairement quel est le problème

Goodie
13/06/2008, 23h44
J'ai du mal à imaginer le souci, peux-tu me faire un screen stp, et me dire clairement quel est le problème

Dès que j'ai un petit moment je te fais ca.

En clair, j'utilise ton astuce pour le fond d'avatar que pour les admin et modo.
Pour les membres, je veux que juste leur avatar s'affiche, sans le fond.

Et lorsque qu'un membre se choisit un avatar, cela perturbe l'affichage, qui se trouve décalé. Et uniquement pour ceux qui ont un avatar.

Goodie
02/07/2008, 23h11
Je fais remonter au cas où.
Merci.