Les archives de FluxBB.fr
Vous n'êtes pas identifié(e).
Bonjour,
Je vous soumets une petite colle que j'arrive pas a dissoudre moi même 
J'ai installé une modification de code dans viewforum.php qui permet d'afficher l'avatar du membre ayant répondu au dernier message :

J'aimerai pouvoir centrer les deux lignes de texte au milieu sur la droite de l'avatar de cette façon :

Je galère un peu avec mon code dans viewtopic.php que voici :
// If there are topics in this forum.
if ($db->num_rows($result))
{
while ($cur_topic = $db->fetch_assoc($result))
{
$icon_text = $lang_common['Normal icon'];
$item_status = '';
$icon_type = 'icon';
//-------------------------
//Modification personnel pour affichage avatar
//-------------------------
// Retrieve the id for the avatar (and their respective poster/online status)
if ($pun_config['o_avatars'] == '1' && $pun_user['show_avatars'] != '0')
{
if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.gif'))
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.gif" class = "maxavatar" alt="" />';
else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.jpg'))
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.jpg" class = "maxavatar" alt="" />';
else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.png'))
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.png" class = "maxavatar" alt="" />';
else
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/avatar_defaut.gif" class = "maxavatar" alt="" />';
}
else
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/avatar_defaut.gif" class = "maxavatar" alt="" />';
//-------------------
//La mod va jusqu' --> $user_avatar.
//-------------------
if ($cur_topic['moved_to'] == null)
$last_post = '<li><a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a><em><br> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).$user_avatar.'</span>';
else
$last_post = ' ';
if ($pun_config['o_censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
if ($cur_topic['moved_to'] != 0)
$subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a><br> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
else if ($cur_topic['closed'] == '0')
$subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a><br> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
else
{
$subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a><br> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
$icon_text = $lang_common['Closed icon'];
$item_status = 'iclosed';
}
if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null)
{
$icon_text .= ' '.$lang_common['New icon'];
$item_status .= ' inew';
$icon_type = 'icon inew';
$subject = '<strong>'.$subject.'</strong>';
$subject_new_posts = '<span class="newtext">[ <a href="viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]</span>';
}
else
$subject_new_posts = null;Est ce que quelqu'un aurait une petite idée pour m'aider a arriver a mes fins ?
Merci !
Dernière modification par kankan (09-03-2012 10:12:35)
Hors ligne
Je viens d'aller voir sur tes forums, l'affichage se fait bien comme tu le désires...
Hors ligne
Re Wan,
Chez moi la date s'affiche au dessus de l'Avatar : (FF10)
Dans viewforum.php hein 
Sur l'Index et Messages Recent, cela s'affiche correctement. Mais je n'arrive pas a intégrer le code

Dernière modification par kankan (08-03-2012 16:25:47)
Hors ligne
D'accord ! Tu veux dire que cela fonctionne dans l'index, le viewtopic mais pas dans le viewforum ?
Puisque tu as montré le bout de code du viewtopic, peux-tu montrer celui du viewforum ?
Hors ligne
en fait non, je souhaiterai que ce soit aligné dans le Viewfrum comme c'est le cas dans l'index et les recent posts...
voici le bout de code du viewforum :
// If there are topics in this forum.
if ($db->num_rows($result))
{
while ($cur_topic = $db->fetch_assoc($result))
{
$icon_text = $lang_common['Normal icon'];
$item_status = '';
$icon_type = 'icon';
//-------------------------
//Modification personnel pour affichage avatar
//-------------------------
// Retrieve the id for the avatar (and their respective poster/online status)
if ($pun_config['o_avatars'] == '1' && $pun_user['show_avatars'] != '0')
{
if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.gif'))
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.gif" class = "maxavatar" alt="" />';
else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.jpg'))
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.jpg" class = "maxavatar" alt="" />';
else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.png'))
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_topic['uid'].'.png" class = "maxavatar" alt="" />';
else
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/avatar_defaut.gif" class = "maxavatar" alt="" />';
}
else
$user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/avatar_defaut.gif" class = "maxavatar" alt="" />';
//-------------------
//La mod va jusqu' --> $user_avatar.
//-------------------
if ($cur_topic['moved_to'] == null)
$last_post = '<li><a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a><em><br> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).$user_avatar.'</span>';
else
$last_post = ' ';
if ($pun_config['o_censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
if ($cur_topic['moved_to'] != 0)
$subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a><br> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
else if ($cur_topic['closed'] == '0')
$subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a><br> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
else
{
$subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a><br> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
$icon_text = $lang_common['Closed icon'];
$item_status = 'iclosed';
}
if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null)
{
$icon_text .= ' '.$lang_common['New icon'];
$item_status .= ' inew';
$icon_type = 'icon inew';
$subject = '<strong>'.$subject.'</strong>';
$subject_new_posts = '<span class="newtext">[ <a href="viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]</span>';
}
else
$subject_new_posts = null;Merci
Hors ligne
Puisque le problème est "graphique", ce qui m'intéresse c'est au niveau de l'affichage. J'ai besoin, pour comparer, des parties finales de tes fichiers :
- pour viewforum.php, depuis :
// Should we show the "New posts" and/or the multipage links?jusqu'à la fin.
- pour index.php, depuis :
$moderators = "\t\t\t\t\t\t\t\t".'<p><em>('.$lang_common['Moderated by'].'</em> '.implode(', ', $moderators).')</p>'."\n";jusqu'à la fin.
Dernière modification par Wan (08-03-2012 20:39:20)
Hors ligne
Wan, je te remercie de te pencher sur ce problème.
Voic le code pour viewforum :
// Should we show the "New posts" and/or the multipage links?
if (!empty($subject_new_posts) || !empty($subject_multipage))
{
$subject .= ' '.(!empty($subject_new_posts) ? $subject_new_posts : '');
$subject .= !empty($subject_multipage) ? ' '.$subject_multipage : '';
}
//=========================
//=====RATE TOPIC CODE=====
//=========================
//Eric Subach (kha0s@comcast.net)
//=========================
if ($rate_topic)
{
//Select the rating and user_id for all ratings of the current topic.
$sql = $db->query ('SELECT rate, user_id FROM ' . $db->prefix . 'Ratings WHERE topic_id = ' . $cur_topic['id']) or error ($lang_rt['Error select user_id and rate'], __FILE__, __LINE__, $db->error ());
$num_rows = $db->num_rows ($sql);
if ($num_rows > 0)
{
$total_rating = 0;
//Parse data of ratings and user_ids for all ratings of current topic.
while ($sql_data = $db->fetch_assoc ($sql))
{
//Should we add the rating to total?
$flag = 1;
//Get username of user of specific rating.
$sql2 = $db->query ('SELECT username FROM ' . $db->prefix . 'users WHERE id = ' . $sql_data['user_id']) or error ($lang_rt['Error select username'], __FILE__, __LINE__, $db->error ());
$sql2_data = $db->fetch_assoc ($sql2);
//Check if user is banned.
foreach ($pun_bans as $ban)
{
if ($sql2_data['username'] == $ban['username'])
$flag = 0;
}
//If user isn't banned, add rating to total.
if ($flag)
$total_rating += $sql_data['rate'];
else
$num_rows--;
}
//If any ratings, calculate the overall rating.
if ($num_rows > 0)
{
$rating = $total_rating / $num_rows;
$rating = round ($rating, 2);
$subject .= ' ';
//If the user is not a guest, make the rating clickable to view who voted.
if (!$pun_user['is_guest'])
$subject .= '<a href="rate.php?v_id=' . $cur_topic['id'] . '">';
//Rating is rounded to the closest star or half-star.
//If stars are enabled, find what image file to load.
if ($rate_stars)
{
if ($rating >= 0.0 && $rating < 0.25)
$file_name = 'Star_0';
else if ($rating >= 0.25 && $rating < 0.75)
$file_name = 'Star_0_Half';
else if ($rating >= 0.75 && $rating < 1.25)
$file_name = 'Star_1';
else if ($rating >= 1.25 && $rating < 1.75)
$file_name = 'Star_1_Half';
else if ($rating >= 1.75 && $rating < 2.25)
$file_name = 'Star_2';
else if ($rating >= 2.25 && $rating < 2.75)
$file_name = 'Star_2_Half';
else if ($rating >= 2.75 && $rating < 3.25)
$file_name = 'Star_3';
else if ($rating >= 3.25 && $rating < 3.75)
$file_name = 'Star_3_Half';
else if ($rating >= 3.75 && $rating < 4.25)
$file_name = 'Star_4';
else if ($rating >= 4.25 && $rating < 4.75)
$file_name = 'Star_4_Half';
else
$file_name = 'Star_5';
$subject .= '<img src="' . PUN_ROOT . 'img/rate_stars/' . $pun_config['o_rt_cur_stars'] . '/' . $file_name . '.gif" />';
}
//Otherwise, use numbers.
else
{
$decimal = ($rating - floor ($rating)) * 100;
$rating = floor ($rating);
if ($decimal >= 25 && $decimal < 75)
$rating += 0.5;
if ($decimal >= 75)
$rating += 1;
$subject .= '<strong><small>' . $rating . ' / 5</small></strong>';
}
//If the link was made clickable, end the tag.
if (!$pun_user['is_guest'])
$subject .= '</a>';
}
}
}
//==================
//=====END CODE=====
//==================
?>
<tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>>
<td class="tcl">
<div class="intd">
<div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo trim($icon_text) ?></div></div>
<?php if(isset($iconetat)) echo $iconetat ?>
<div class="tclcon">
<?php echo $subject."\n" ?>
</div>
</div>
</td>
<td class="tc2"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_replies'] : ' ' ?></td>
<td class="tc3"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_views'] : ' ' ?></td>
<td class="tcr"><?php echo $last_post ?></td>
</tr>
<?php
}
}
else
{
?>
<tr>
<td class="tcl" colspan="4"><?php echo $lang_forum['Empty forum'] ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="linksb">
<div class="inbox">
<p class="pagelink conl"><?php echo $paging_links ?></p>
<?php echo $post_link ?>
<ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
<div class="clearer"></div>
</div>
</div>
<div class="blocktable">
<h2><b><font color="#FC9429">Publicité</font></b></h2>
<div class="box"><div class="inbox">
<table width="481" border="0">
<tr>
<td width="75"><div align="center"><img src="http://www.forum-des-portables-asus.fr/pub.jpg" ></div></td>
<td width="396">
<div align="left">
<script type="text/javascript"><!--
google_ad_client = "pub-8214675335005850";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="8638947372";
google_color_border = "ffffff";
google_color_bg = "E1771E";
google_color_link = "191919";
google_color_text = "FFFF66";
google_color_url = "E1771E";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></td></tr>
</table></div></div><br>
<?php
$forum_id = $id;
$footer_style = 'viewforum';
require PUN_ROOT.'footer.php';et le code pour index.php
$moderators = "\t\t\t\t\t\t\t\t".'<p><em>('.$lang_common['Moderated by'].'</em> '.implode(', ', $moderators).')</p>'."\n";
}
?>
<tr<?php if ($item_status != '') echo ' class="'.$item_status.'"'; ?>>
<td class="tcl">
<div class="intd">
<div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo $icon_text ?></div></div>
<div class="tclcon">
<?php echo $forum_field."\n".$moderators ?>
</div>
</div>
</td>
<td class="tc2"><?php echo $num_topics ?></td>
<td class="tc3"><?php echo $num_posts ?></td>
<td class="tcr"><?php echo $last_post ?></td>
</tr>
<?php
}
// Did we output any categories and forums?
if ($cur_category > 0)
echo "\t\t\t".'</tbody>'."\n\t\t\t".'</table>'."\n\t\t".'</div>'."\n\t".'</div>'."\n".'</div>'."\n\n";
else
echo '<div id="idx0" class="block"><div class="box"><div class="inbox"><p>'.$lang_index['Empty board'].'</p></div></div></div>';
// Collect some statistics from the database
$result = $db->query('SELECT COUNT(id)-1 FROM '.$db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error());
$stats['total_users'] = $db->result($result);
$result = $db->query('SELECT id, username, registered FROM '.$db->prefix.'users ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $db->error());
$stats['last_user'] = $db->fetch_assoc($result);
$result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM '.$db->prefix.'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error());
list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result);
?>
<div id="brdstats" class="block">
<h2><span><?php echo $lang_index['Board info'] ?></span></h2>
<div class="box">
<div class="inbox">
<dl class="conr">
<dt><strong><?php echo $lang_index['Board stats'] ?></strong></dt>
<dd><?php echo ' <strong>'. $stats['total_users'] ?></strong> gentils Asusiens </dd>
<dd><?php echo ' <strong>'.$stats['total_topics'] ?></strong> discussions lançées</dd>
<dd><?php echo ' <strong>'.$stats['total_posts'] ?></strong> messages rédigés</dd>
</dl>
<dl class="conl">
<dt><strong><?php echo $lang_index['User info'] ?></strong></dt>
<dd>Bienvenue à <b><a href="profile.php?id=<?php echo $stats['last_user']['id'] ?>"><?php echo pun_htmlspecialchars($stats['last_user']['username']) ?></a></b> qui nous à rejoint le <?php echo "".date('d-m-Y \à h:i:s a',$stats['last_user']['registered']); ?><p></dd>
<?php
if ($pun_config['o_users_online'] == '1')
{
// Fetch users online info and generate strings for output
$num_guests = 0;
$users = array();
$result = $db->query('SELECT user_id, ident, color FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());
while ($pun_user_online = $db->fetch_assoc($result))
{
if ($pun_user_online['user_id'] > 1)
{
$colorspan = (!empty($pun_user_online['color'])) ? '<span style="color:'.$pun_user_online['color'].'; font-weight:bold">' : '';
$colorspan2 = (!empty($pun_user_online['color'])) ? '</span>' : '';
$users[] = "\t\t\t\t".'<a href="profile.php?id='.$pun_user_online['user_id'].'">'.$colorspan.pun_htmlspecialchars($pun_user_online['ident']).$colorspan2.',</a>';
}
else
++$num_guests;
}
$num_users = count($users);
// utilisateurs en ligne aujourd'hui
$date = getdate(time());
$todaystamp = mktime(0,0,0, $date['mon'], $date['mday'], $date['year']);
$result = $db->query('SELECT username, id, group_id, last_visit, g_color FROM '.$db->prefix.'users AS u, '.$db->prefix.'groups AS g WHERE last_visit >= \''.$todaystamp.'\' and u.group_id = g.g_id ORDER by last_visit DESC') or error('Impossible de retrouver la liste des utilisateurs en ligne aujourd\'hui', __FILE__, __LINE__, $db->error());
$users_today = array();
while ($pun_user_online_today = $db->fetch_assoc($result)) {
$colorspan = (!empty($pun_user_online_today['g_color'])) ? '<span style="color:'.$pun_user_online_today['g_color'].'; font-weight:bold">' : '';
$colorspan2 = (!empty($pun_user_online_today['g_color'])) ? '</span>' : '';
$users_today[] .= "\t\t\t\t".'<a href="profile.php?id='.$pun_user_online_today['id'].'" title="Dernière visite de '.pun_htmlspecialchars($pun_user_online_today['username']).' : '.format_time($pun_user_online_today['last_visit']).'">'.$colorspan.$pun_user_online_today['username'].$colorspan2.'</a>';
}
$num_users_today = count($users_today);
echo "".implode( $users).' et <strong>'.$num_guests.'</strong> surfeurs sur la vague</dd>'."\t\t\t".'</dl>'."";
if ($num_users > 0)
echo "".'<div class="clearer"></div>'."\n";
// liste utilisateurs en ligne aujourd'hui
echo "".'<dl id="onlinetodaylist">'."\t\t\t\t".'<dt>'.$lang_index['Online today'].' :<p> </dt>';
if ($num_users_today > 0)
echo implode(',</dd> ', $users_today).'</dd>'."".'</dl>'."\n";
else
echo '<dd><em>Personne!</em></dd>'."".'</dl>'."\n";
}
else
echo "\t\t".'</dl>'."\n\t\t\t".'<div class="clearer"></div>'."\n";
?>
</div>
</div>
</div>
<center>
</center>
<div id="announce" class="block">
<!--<h2><span><b>Utilisateurs les plus bavards</b></span></h2>
<div class="box">
<div class="inbox">
<div>
<?php
$result = $db->query('SELECT id, username, num_posts FROM '.$db->prefix.'users ORDER BY num_posts DESC LIMIT 20') or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());
while ($data = $db->fetch_assoc($result))
{
echo "\t\t\t\t\t\t".'<a href="profile.php?id='.$data['id'].'"><span style="color:'.$data['g_color'].'">'.pun_htmlspecialchars($data['username']).'</span></a> ('.$data['num_posts'].') '."\n";
}
?>
</div>
</div>
</div>
</div>-->
<?php
require PUN_ROOT.'footer.php';
?>Merci
Hors ligne
Bon, ça m'éclaire un peu mais pas complètement... Je pense que le problème est sur la définition de la variable $last_post.
Finalement, si tu éditais carrément tout de tes fichiers index.php et viewforum.php j'espère pouvoir y arriver.
DSL pour cette répétition de demandes...
Hors ligne
Je te mets tout ca chez pastebin pour ne pas charger les forums :
Viewforum.php : http://pastebin.com/Gdsx1inv
Index.php : http://pastebin.com/TzAxtUx8
Merci
Hors ligne
Bonsoir,
Je n'ai pas regardé tes fichiers sur pastbin, j'ai juste regardé sur ton site avec firebug.
Tu n'as pas la même structure dans les deux fichiers (index et viewforum).
Donc applique la structure de l'index sur viewforum en cherchant dans le code <td class="tcr"> ou <img class="maxavatar".
Pour l'index, tu as :
<td class="tcr">
<img class="maxavatar" width="35" height="35" alt="" src="img/avatars/4281.jpg">
<a href="viewtopic.php?id=6953&p=2#p56513">Aujourd'hui 22:40:42</a>
<span class="byuser">
par
<span style="color:">milediou</span>
</span>
</td>Pour viewforum, tu as :
<td class="tcr">
<li>
<a href="viewtopic.php?id=2200&p=1#p15232">27-08-2008 10:53:35</a>
<em>
<br>
<span class="byuser">
par kankan
<img class="maxavatar" alt="" src="img/avatars/2.jpg">
</span>
</em>
</li>
</td>Dernière modification par Spiky (09-03-2012 00:13:56)
I don't play against a team in particular. I play to fight against the idea to lose... Life is beautiful.
Quelque #ID et beaucoup de .CLASS
Hors ligne
Oui c'est ce que j'ai fais en premier avec Firebug également,
mais une fois les fichiers .php ouvert la structure du code est bien différente et inclu pas mal de code que je ne sais pas déplacer...
je poursuis mes recherches.
Merci
Hors ligne
Bonjour,
Je pense que le problème vient bien de la définition de la variable $lastpost.
En effet, dans viewforum.php (ligne 298) on trouve :
$last_post = '<li><a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a><em><br> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).$user_avatar.'</span>';On peut donc remarquer que :
- la balise <li> ne sert à rien (d'ailleurs elle n'est pas fermée)
- en regardant la composition, cela va afficher d'abord la date (avec le lien hypertexte vers le message) puis à la ligne (<br>) le nom du posteur et son avatar.
En ce qui concerne index.php, on trouve (ligne 350) :
$last_post = $user_avatar.'<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.format_time($cur_forum['last_post']).'</a><span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';Ici cela va afficher d'abord l'avatar du posteur, puis la date avec le lien vers le message puis le nom du posteur dans son style particulier.
Voilà, on retrouve donc bien les différences à l'affichage.
Conclusion, kankan, remplace dans ton viewforum.php la ligne 298 par la ligne 350 de ton index.php (en changeant évidemment $cur_forum par $cur_topic) et dis-nous si cela fonctionne.
Dernière modification par Wan (09-03-2012 09:50:27)
Hors ligne
Hello Wan,
Ca le fait plutôt pas mal !
J'étais parti sur une solution plus compliquée avec des imbrications de <table> et de <td> ...
Merci pour ton coup de main une fois de plus.
Dernière modification par kankan (09-03-2012 10:11:28)
Hors ligne