Archives FluxBB.fr

Les archives de FluxBB.fr

Vous n'êtes pas identifié(e).

#26 16-12-2007 00:40:48

gargoyle
Membre

Re : Max Visu Avatars 0.1

ca y est je crois que ça marche maintenant peux tu essayer sharrinddlar

Hors ligne

#28 16-12-2007 00:47:05

gargoyle
Membre

Re : Max Visu Avatars 0.1

c'est normal j'avais oublié de remodifier la fin du fichier la tu peux maintenant

Hors ligne

#30 16-12-2007 00:50:53

gargoyle
Membre

Re : Max Visu Avatars 0.1

c'était de ma faute c'est parce j'ai rajouté dans ton fichier les éléments que j'ai en plus et j'ai du mal replacé une syntaxe

Dernière modification par gargoyle (16-12-2007 00:51:31)

Hors ligne

#31 16-12-2007 17:10:04

Olivier2B
Membre

Re : Max Visu Avatars 0.1

Bonsoir

et merci à sharrinddlar car je trouve le rendu très sympa sur un forum (un peu plus de couleur)

J'ose 2 petites demande si cela est possible :

J'ai sur mon forum installé la modification qui permet de voir les derniers message postés en bas de mon forum (voir mon forum). Moi j'affiche les 8 derniers messages.

1°/ Est il possible de faire apparaître aussi ces avatars sur ces 8 derniers messages ?

et

2°/ Est il possible d'avoir un "avatars" différents pour les visiteurs. Sur mon forum, j'ai un partie qui est réservé aux particuliers. Ils n'ont pas besoin de sinscrire pour poser leur questions au reste du forum qui sont eux des professionnels.

En tous cas, encore bravo

Bonne soirée

Olivier

Hors ligne

#32 16-12-2007 18:09:39

sharrinddlar
Membre

Re : Max Visu Avatars 0.1

Merci Olivier2B pour ces compliments.

Je vois que cette mod plait beaucoup et j'en suis ravi. Je vais donc jeter un œil pour voir ce que je peux faire concernant cette demande. Je vous tiens au courant wink

++

Hors ligne

#33 16-12-2007 19:43:45

PascL
Membre

Re : Max Visu Avatars 0.1

Bonsoir,

C'est pas mal comme rendu.

(J'ai pas encore downloadé, j'ai regardé la source de ton forum)
Peut-être des petites modifs à faire niveau source pour arriver à quelque chose comme ça :

<img src="img/avatars/6.jpg" style = "max-width:35px; max-height:35px; float:left; margin-right:5px;" alt="" />

c'est-à-dire enlever les width et height d'img et de style, et ajouter des max-width/height dans le style.
normalement les max ne doivent pas déformer l'image dans le cas où l'avatar n'est pas carré.

et pour faire propre, mettre le style dans le fichier css en créant une classe.


Enfin, puisqu'on affiche l'avatar, on doit avoir l'id de l'utilisateur, on pourrait mettre le nom de l'utilisateur en lien vers son profil

Voilà, c'étaient mes petites idées wink

Hors ligne

#35 17-12-2007 12:17:30

sharrinddlar
Membre

Re : Max Visu Avatars 0.1

Olivier2B a écrit :

Bonsoir

et merci à sharrinddlar car je trouve le rendu très sympa sur un forum (un peu plus de couleur)

J'ose 2 petites demande si cela est possible :

J'ai sur mon forum installé la modification qui permet de voir les derniers message postés en bas de mon forum (voir mon forum). Moi j'affiche les 8 derniers messages.

1°/ Est il possible de faire apparaître aussi ces avatars sur ces 8 derniers messages ?

et

2°/ Est il possible d'avoir un "avatars" différents pour les visiteurs. Sur mon forum, j'ai un partie qui est réservé aux particuliers. Ils n'ont pas besoin de sinscrire pour poser leur questions au reste du forum qui sont eux des professionnels.

En tous cas, encore bravo

Bonne soirée

Olivier

Olivier2B,

Je ne t'ai pas oublié, je vais regarder dans la journée pour voir ce que je peux apporter.

Par contre si tu pouvais me donner le lien vers la mod des derniers messages, ce serait cool, cela m'éviterais de chercher wink

Je te tiens au courant smile

++

Hors ligne

#36 17-12-2007 21:34:11

Olivier2B
Membre

Re : Max Visu Avatars 0.1

Bonsoir,

Je viens de trouver la mod sur mon disque dur :

 Titre mod :  mod_active_topics_1.2
##
##        Version mod :  1.2
##         Pour PunBB :  1.2.x
##    Date Traduction :  31/10/2006
##           Date 1.2 :  12/02/2005
##  
##             Auteur :  Copyright 2004-2005 Alex King, http://www.alexking.org/
##             http://www.alexking.org/blog/2005/02/12/active-topics-mod-for-punbb-12/
##       
##        Description :  Affiche les derniers topics actifs sur l'index en dessous des forums
##
##  Fichiers affectés :  index.php
##
##         DISCLAIMER :  Veuillez noter que ces mods ne sont pas
##                       officiellement supportés par PunBB. L'installation
##                       de ces modifications est à vos risques et périls.
##                       N'oubliez pas de sauvegarder la base de données et
##                       les fichiers affectés avant de procéder à
##                       l'installation de cette modification.
##


#-------------------------------------------------------------------------------
#
#---------[ OUVRIR ]------------------------------------------------------------

index.php


#
#---------[ TROUVER ]---------------------------------------------------------
#

list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result);

?>


#
#---------[ APRES AJOUTER ]------------------------------------------------------
#

<?php


$ak_limit = 5; // change this to the number of active topics you want to display.

$result = $db->query('
    SELECT t.*
    FROM '.$db->prefix.'topics AS t
    INNER JOIN '.$db->prefix.'forums AS f
    ON f.id=t.forum_id
    LEFT JOIN '.$db->prefix.'forum_perms AS fp
    ON (
        fp.forum_id=f.id
        AND fp.group_id='.$pun_user['g_id'].'
    )
    WHERE (
        fp.read_forum IS NULL
        OR fp.read_forum=1
    )
    ORDER BY t.last_post DESC
    LIMIT '.$ak_limit
) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

require PUN_ROOT.'lang/'.$pun_user['language'].'/forum.php';

?>
<div id="vf" class="blocktable">
    <h2><span>Les 5 derniers posts du forum</span></h2>
    <div class="box">
        <div class="inbox">
            <table cellspacing="0">
            <thead>
                <tr>
                    <th class="tcl" scope="col"><?php echo $lang_common['Topic'] ?></th>
                    <th class="tc2" scope="col"><?php echo $lang_common['Replies'] ?></th>
                    <th class="tc3" scope="col"><?php echo $lang_forum['Views'] ?></th>
                    <th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?></th>
                </tr>
            </thead>
            <tbody>
<?php
// 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';

        if ($cur_topic['moved_to'] == null)
            $last_post = '<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).'</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> <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> <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> <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;

        // Should we display the dot or not? :)
        if (1 == 0 && !$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1')
        {
            if ($cur_topic['has_posted'] == $pun_user['id'])
                $subject = '<strong>·</strong> '.$subject;
            else
                $subject = '  '.$subject;
        }

        if ($cur_topic['sticky'] == '1')
        {
            $subject = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$subject;
            $item_status .= ' isticky';
            $icon_text .= ' '.$lang_forum['Sticky'];
        }

        $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);

        if ($num_pages_topic > 1)
            $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]';
        else
            $subject_multipage = null;

        // 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 : '';
        }

?>
                <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>
                            <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>

#
#---------[ ENREGISTRER ET ENVOYER SUR LE SERVEUR ]-------------------------
#

index.php

Hors ligne

#38 18-12-2007 09:00:48

Olivier2B
Membre

Re : Max Visu Avatars 0.1

sharrinddlar a écrit :

Je prend note, je te fais ça rapidement wink

++

Ce n'est pas urgent, prend ton temps. Cela peut attendre. En tous cas, tu fait un super boulot.

Merci

Hors ligne

#39 18-12-2007 16:20:26

sharrinddlar
Membre

Re : Max Visu Avatars 0.1

Voilà la mod des 5 derniers posts modifiées pour avoir les avatars et le lien vers les profiles wink

#---------[ OUVRIR ]------------------------------------------------------------

index.php


#
#---------[ TROUVER ]---------------------------------------------------------
#

list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result);

?>


#
#---------[ APRES AJOUTER ]------------------------------------------------------
#

<?php


$ak_limit = 5; // change this to the number of active topics you want to display.

$result = $db->query('SELECT t.*, u.id AS uid FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'users AS u ON f.last_poster=u.username WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY t.last_post DESC LIMIT '.$ak_limit ) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

require PUN_ROOT.'lang/'.$pun_user['language'].'/forum.php';

?>
<div id="vf" class="blocktable">
    <h2><span>Les 5 derniers posts du forum</span></h2>
    <div class="box">
        <div class="inbox">
            <table cellspacing="0">
            <thead>
                <tr>
                    <th class="tcl" scope="col"><?php echo $lang_common['Topic'] ?></th>
                    <th class="tc2" scope="col"><?php echo $lang_common['Replies'] ?></th>
                    <th class="tc3" scope="col"><?php echo $lang_forum['Views'] ?></th>
                    <th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?></th>
                </tr>
            </thead>
            <tbody>
<?php
// 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 = $user_avatar.'<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' <a href="profile.php?id='.$cur_topic['uid'].'" class = "lastposter">'.pun_htmlspecialchars($cur_topic['last_poster']).'</a></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> <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> <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> <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;

        // Should we display the dot or not? :)
        if (1 == 0 && !$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1')
        {
            if ($cur_topic['has_posted'] == $pun_user['id'])
                $subject = '<strong>·</strong> '.$subject;
            else
                $subject = '  '.$subject;
        }

        if ($cur_topic['sticky'] == '1')
        {
            $subject = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$subject;
            $item_status .= ' isticky';
            $icon_text .= ' '.$lang_forum['Sticky'];
        }

        $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);

        if ($num_pages_topic > 1)
            $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]';
        else
            $subject_multipage = null;

        // 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 : '';
        }

?>
                <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>
                            <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>

#
#---------[ ENREGISTRER ET ENVOYER SUR LE SERVEUR ]-------------------------
#

index.php

Dit moi si ça te conviens et si c'est bon je rajouterais cette mod au pack de Max Visu Avatars wink

++

Hors ligne

#40 18-12-2007 16:46:51

Olivier2B
Membre

Re : Max Visu Avatars 0.1

Salut sharrinddlar,

ça fonctionne mais les avatars restent en taille réel ce qui déforme et agrandit le forum bien sur.

A ++

Olivier

Hors ligne

#42 18-12-2007 16:56:00

sharrinddlar
Membre

Hors ligne

Pied de page des forums