Index du forum »»  Bugs, Probs ... »» [Résolu] - suppression suite a mauvaise manip er reinstal

[Résolu] - suppression suite a mauvaise manip er reinstal#25052

6Contributeur(s)
adrienjpbB-MagJireckPhilGuencolonelwog
3 Modérateur(s)
developpeurjpbJireck
PhilGuen PhilGuenicon_post
sur mon site guenet.org, j'ai fait ceci avec les méta-mots à la fin de l'édito



<p>&nbsp;</p>
<table style="width: 100%;" align="center" bgcolor="#838A94">
<tbody>
<tr>
<td bgcolor="#b5c905">LES DERNIERES NEWS</td>
</tr>
<tr>
<td align="center">lastarticles()</td>
</tr>
<tr>
<td bgcolor="#b5c905">LES DERNIERS POSTS</td>
</tr>
<tr>
<td align="center">forumP</td>
</tr>
</tbody>
</table>



Ce remplace à peu près
B-Mag B-Magicon_post
salut

Pour le meta des derniers post sur les forum: pas de probème affichage OK
mais pour lastarticle: les x dernières news il est tout petit... en taille

si l'un de vous sais comment le rendre aussi lisible que le meta forum
je suis preneur

NB: le centralBoard original est celui developpé par un ancien membre Clubado, rien à voir les modules de Dodi, dommage que personne n'ai pu l'adapter aux version supérieures à sable
PhilGuen PhilGuenicon_post
B-mag

Je n'ai pas souvenir d'avoir modifié quoi que ce soit et j'obtiens un affichage correct.

As-tu essayé avec d'autres thèmes (pour voir ce qui diffère dans la CSS)?
Jireck Jireckicon_post
en meme temps on peux faire un central tres facilement
adrien adrienicon_post
Merci pour la solution.
Elle est en ligne sur mon site mais marche po pour moi
http://mdf.afpa.free.fr

Et y a t'il des méta mots pour les derniers commentaires ?

Merci
PhilGuen PhilGuenicon_post
Citation : adrien 

Merci pour la solution.
Elle est en ligne sur mon site mais marche po pour moi
http://mdf.afpa.free.fr

Et y a t'il des méta mots pour les derniers commentaires ?

Merci 


Tu as bien installé ces méta mots?
adrien adrienicon_post
J'ai fais un copier collé dans l'édito.
J'ai juste changé la couleur
PhilGuen PhilGuenicon_post
Citation : B-Mag 

salut

Pour le meta des derniers post sur les forum: pas de probème affichage OK
mais pour lastarticle: les x dernières news il est tout petit... en taille

si l'un de vous sais comment le rendre aussi lisible que le meta forum
je suis preneur

NB: le centralBoard original est celui developpé par un ancien membre Clubado, rien à voir les modules de Dodi, dommage que personne n'ai pu l'adapter aux version supérieures à sable 


Je viens de faire un copié collé du code ci-dessus sur un autre site sous révolution et le résultat est OK.
PhilGuen PhilGuenicon_post
Citation : adrien 

J'ai fais un copier collé dans l'édito.
J'ai juste changé la couleur
 


Vérifie ta liste des métas mots et éventuellement télécharges les sur modules.npds.org, puis installes les

Message édité par : PhilGuen / 05-04-2011 21:41

adrien adrienicon_post
Ok pour lastarticles mais pas pour lastforum que je n'arrive pas à installer.
c'est normal que le mete-mot commence par #autodoc et non par function MM_forumP() ?

Je sais je suis pas doué et je vous remercie vraiment pout votre aide :=!
B-Mag B-Magicon_post
le code pour Forump



function MM_forumP()
{

    global $NPDS_Prefix,$cookie,$user;

    $maxcount = "5";
    $mbid = sql_fetch_row(sql_query("SELECT uid FROM ".$NPDS_Prefix."users WHERE uname = '$cookie[1]'"));

    $MM_forumP .= '<table cellspacing="3" cellpadding="1" width="top" border="0">'
    .'<tr align="center" class="ligna">'
    .'<td width="5%">'.aff_langue('[french]Etat[/french][english]State[/english]').'</td>'
    .'<td width="20%">'.aff_langue('[french]Forum[/french][english]Forum[/english]').'</td>'
    .'<td width="30%">'.aff_langue('[french]Sujet[/french][english]Topic[/english]').'</td>'
    .'<td width="5%">'.aff_langue('[french]Réponse[/french][english]Replie[/english]').'</td>'
    .'<td width="20%">'.aff_langue('[french]Dernier Auteur[/french][english]Last author[/english]').'</td>'
    .'<td width="20%">'.aff_langue('[french]Date[/french][english]Date[/english]').'</td>'
    .'</tr>';

    $result = sql_query("SELECT distinct topic_id FROM ".$NPDS_Prefix."posts WHERE forum_id > 0 ORDER BY post_id DESC LIMIT $maxcount");
    $count = sql_num_rows($result);
    if ($count > 0)

    if ($count > $maxcount) $count = $maxcount;
    $ibid = 0;
    $forum_limit = 0;
    while ($forum_limit < $count)
    {

        list($topic_id) = sql_fetch_row($result);

        list($post_id, $forum_id, $poster_id, $time) = sql_fetch_row(sql_query("SELECT post_id, forum_id, poster_id, post_time FROM ".$NPDS_Prefix."posts WHERE forum_id > 0 AND topic_id = $topic_id ORDER BY post_id DESC LIMIT 1"));

        $forum_limit++;

        if ($topic_id!=0) list($topic_title) = sql_fetch_row(sql_query("SELECT topic_title, forum_id FROM ".$NPDS_Prefix."forumtopics WHERE topic_id=$topic_id"));

        if ($forum_id!=0) list($forum_name,$forum_type,$forum_pass) = sql_fetch_row(sql_query("SELECT forum_name, forum_type, forum_pass FROM ".$NPDS_Prefix."forums WHERE forum_id = $forum_id"));

        if (($forum_type == "5") or ($forum_type == "7"))
        {

            $ok_affich = false;
            $tab_groupe = valid_group($user);
            $ok_affich = groupe_forum($forum_pass, $tab_groupe);

        }
        else
        {

            $ok_affich = true;

        }

        if ($ok_affich)
        {

            if ($poster_id != 0) list($uname) = sql_fetch_row(sql_query("SELECT uname FROM ".$NPDS_Prefix."users WHERE uid = $poster_id"));

            $MM_forumP .= '<tr class="lignb">';

            $sqlR = "SELECT rid FROM ".$NPDS_Prefix."forum_read WHERE topicid = '$topic_id' AND uid = '$mbid[0]' AND status != '0'";

            if ($ibid = theme_image("forum/icons/hot_red_folder.gif"))
            {

                $imgtmpHR = $ibid;

            }
            else
            {

                $imgtmpHR = "images/forum/icons/hot_red_folder.gif";

            }

            if ($ibid = theme_image("forum/icons/hot_folder.gif"))
            {

                $imgtmpH = $ibid;

            }
            else
            {

                $imgtmpH = "images/forum/icons/hot_folder.gif";

            }

            if ($ibid = theme_image("forum/icons/red_folder.gif"))
            {

                $imgtmpR = $ibid;

            }
            else
            {

                $imgtmpR = "images/forum/icons/red_folder.gif";

            }

            if ($ibid = theme_image("forum/icons/folder.gif"))
            {

                $imgtmpF = $ibid;

            }
            else
            {

                $imgtmpF = "images/forum/icons/folder.gif";

            }

            if ($ibid = theme_image("forum/icons/lock.gif"))
            {

                $imgtmpL = $ibid;

            }
            else
            {

                $imgtmpL="images/forum/icons/lock.gif";

            }

            $TableRep = sql_query("SELECT * FROM ".$NPDS_Prefix."posts WHERE forum_id > 0 AND topic_id = '$topic_id'");
            $replys = sql_num_rows($TableRep)-1;

            $hot_threshold = 10;//Nbres sujets chauds

            if ($replys >= $hot_threshold)
            {

                if (sql_num_rows(sql_query($sqlR))==0)
                    $image = $imgtmpHR;
                else
                    $image = $imgtmpH;

            }
            else
            {

                if (sql_num_rows(sql_query($sqlR))==0)
                    $image = $imgtmpR;
                else
                    $image = $imgtmpF;

            }

            if ($myrow[topic_status]!=0)
            $image = $imgtmpL;

            $MM_forumP .= '<td align="center"><img src="'.$image.'"></td>'
            .'<td><a href="viewforum.php?forum='.$forum_id.'">'.$forum_name.
'</a></td>'
            .'<td align="left"><a href="viewtopic.php?topic='.$topic_id.'&forum='.$forum_id.'">'.$topic_title.'</a></td>'
            .'<td align="center">'.$replys.'</td>'
            .'<td align="center"><a href="user.php?op=userinfo&uname='.$uname.'">'.$uname.'</a></td>'
            .'<td>'.$time.'</td>';

        }

    }

    $MM_forumP .= '</tr>'
    .'</table>';

    return ($MM_forumP);

}

B-Mag B-Magicon_post
salut pour PhilGen

Non tu n'a pas un affichage correct

le Meta lastArticle est "plus petit" que Forum, j'ai la meme présentation sur mon site de test et le meme problème :-(

http://duchassain.phpnet.org/02revol_final/index.php?op=edito#
PhilGuen PhilGuenicon_post
Citation : B-Mag 

salut pour PhilGen

Non tu n'a pas un affichage correct

le Meta lastArticle est "plus petit" que Forum, j'ai la meme présentation sur mon site de test et le meme problème :-(

http://duchassain.phpnet.org/02revol_final/index.php?op=edito# 

Slt B-Mag

Ah bah ca alors!!!

Avec quel navigateur? J'utilise chrome et ne me suis rendu compte de rien.

Va sans doute falloir ajouter qq chose dans la css Je regarde le + vite possible

MERci de ton aide

Je viens de faire un test sous IE8 et Firefox, c'est également bon chez moi... à suivre

copie d'écran
http://guenetsrcom.free.fr/Downloads/sous IE8.jpg
http://guenetsrcom.free.fr/Downloads/sous Firefox.jpg
http://guenetsrcom.free.fr/Downloads/sous Chrome.jpg

Chez moi (essai en Chrome), sur ton site de test, tout est OK

Le code que j'ia por le forum



function MM_forumP()
{

    global $NPDS_Prefix,$cookie,$user;

    $maxcount = "5";
    $mbid = sql_fetch_row(sql_query("SELECT uid FROM ".$NPDS_Prefix."users WHERE uname = '$cookie[1]'"));

    $MM_forumP .= '<table cellspacing="3" cellpadding="1" width="top" border="0">'
    .'<tr align="center" class="ligna">'
    .'<td width="5%">'.aff_langue('[french]Etat[/french][english]State[/english]').'</td>'
    .'<td width="20%">'.aff_langue('[french]Forum[/french][english]Forum[/english]').'</td>'
    .'<td width="30%">'.aff_langue('[french]Sujet[/french][english]Topic[/english]').'</td>'
    .'<td width="5%">'.aff_langue('[french]Réponse[/french][english]Replie[/english]').'</td>'
    .'<td width="20%">'.aff_langue('[french]Dernier Auteur[/french][english]Last author[/english]').'</td>'
    .'<td width="20%">'.aff_langue('[french]Date[/french][english]Date[/english]').'</td>'
    .'</tr>';

    $result = sql_query("SELECT distinct topic_id FROM ".$NPDS_Prefix."posts WHERE forum_id > 0 ORDER BY post_id DESC LIMIT $maxcount");
    $count = sql_num_rows($result);
    if ($count > 0)

    if ($count > $maxcount) $count = $maxcount;
    $ibid = 0;
    $forum_limit = 0;
    while ($forum_limit < $count)
    {

        list($topic_id) = sql_fetch_row($result);

        list($post_id, $forum_id, $poster_id, $time) = sql_fetch_row(sql_query("SELECT post_id, forum_id, poster_id, post_time FROM ".$NPDS_Prefix."posts WHERE topic_id = $topic_id ORDER BY post_id DESC LIMIT 1"));

        $forum_limit++;

        if ($topic_id!=0) list($topic_title) = sql_fetch_row(sql_query("SELECT topic_title, forum_id FROM ".$NPDS_Prefix."forumtopics WHERE topic_id=$topic_id"));

        if ($forum_id!=0) list($forum_name,$forum_type,$forum_pass) = sql_fetch_row(sql_query("SELECT forum_name, forum_type, forum_pass FROM ".$NPDS_Prefix."forums WHERE forum_id = $forum_id"));

        if (($forum_type == "5") or ($forum_type == "7"))
        {

            $ok_affich = false;
            $tab_groupe = valid_group($user);
            $ok_affich = groupe_forum($forum_pass, $tab_groupe);

        }
        else
        {

            $ok_affich = true;

        }

        if ($ok_affich)
        {

            if ($poster_id != 0) list($uname) = sql_fetch_row(sql_query("SELECT uname FROM ".$NPDS_Prefix."users WHERE uid = $poster_id"));

            $MM_forumP .= '<tr class="lignb">';

            $sqlR = "SELECT rid FROM ".$NPDS_Prefix."forum_read WHERE topicid = '$topic_id' AND uid = '$mbid[0]' AND status != '0'";

            if ($ibid = theme_image("forum/icons/hot_red_folder.gif"))
            {

                $imgtmpHR = $ibid;

            }
            else
            {

                $imgtmpHR = "images/forum/icons/hot_red_folder.gif";

            }

            if ($ibid = theme_image("forum/icons/hot_folder.gif"))
            {

                $imgtmpH = $ibid;

            }
            else
            {

                $imgtmpH = "images/forum/icons/hot_folder.gif";

            }

            if ($ibid = theme_image("forum/icons/red_folder.gif"))
            {

                $imgtmpR = $ibid;

            }
            else
            {

                $imgtmpR = "images/forum/icons/red_folder.gif";

            }

            if ($ibid = theme_image("forum/icons/folder.gif"))
            {

                $imgtmpF = $ibid;

            }
            else
            {

                $imgtmpF = "images/forum/icons/folder.gif";

            }

            if ($ibid = theme_image("forum/icons/lock.gif"))
            {

                $imgtmpL = $ibid;

            }
            else
            {

                $imgtmpL="images/forum/icons/lock.gif";

            }

            $TableRep = sql_query("SELECT * FROM ".$NPDS_Prefix."posts WHERE topic_id = '$topic_id'");
            $replys = sql_num_rows($TableRep)-1;

            $hot_threshold = 10;//Nbres sujets chauds

            if ($replys >= $hot_threshold)
            {

                if (sql_num_rows(sql_query($sqlR))==0)
                    $image = $imgtmpHR;
                else
                    $image = $imgtmpH;

            }
            else
            {

                if (sql_num_rows(sql_query($sqlR))==0)
                    $image = $imgtmpR;
                else
                    $image = $imgtmpF;

            }

            if ($myrow[topic_status]!=0)
            $image = $imgtmpL;

            $MM_forumP .= '<td align="center"><img src="'.$image.'"></td>'
            .'<td><a href="viewforum.php?forum='.$forum_id.'">'.$forum_name.'</a></td>'
            .'<td align="left"><a href="viewtopic.php?topic='.$topic_id.'&forum='.$forum_id.'">'.$topic_title.'</a></td>'
            .'<td align="center">'.$replys.'</td>'
            .'<td align="center"><a href="user.php?op=userinfo&uname='.$uname.'">'.$uname.'</a></td>'
            .'<td>'.$time.'</td>';

        }

    }

    $MM_forumP .= '</tr>'
    .'</table>';

    return ($MM_forumP);

}



et pour les News


function MM_lastarticles($maxarticles_b1) {
global $NPDS_Prefix, $site_font, $bgcolor4, $bgcolor3, $bgcolor2, $bgcolor1, $textcolor1, $textcolor2, 
$user;
$maxarticles_b1 = arg_filter($maxarticles_b1);    
$maxcount = $maxarticles_b1; 
if ($maxarticles_b1 == '') {    
$maxcount=5; 
}    
$tab_groupe = valid_group($user);
$clausewhere= "WHERE ihome='0' OR ihome='1' "; 
for ($ii=0; $ii<=9; $ii++) {
if($tab_groupe[$ii]) 
$clausewhere .= "OR ihome='$tab_groupe[$ii]'"; 
}
if($user)   
$clausewhere .= "OR ihome='-127' ";   
$chaine_rep .= '<table id="LastArticles">';
$chaine_rep .= '<tr id="enTeteLastArticles">';
$chaine_rep .= '<td>Articles</td>';
$chaine_rep .= '<td>Actions</td>';
$chaine_rep .= '<td>Lu</td>';
$chaine_rep .= '<td>Posté le</td>';
$chaine_rep .= '</tr>'; 
$xtab = news_aff("libre", " $clausewhere ORDER BY sid DESC limit $maxcount", 0, $maxcount); 
$ibid=0; 
$story_limit=0; 
while (($story_limit < $maxcount) and ($story_limit < sizeof($xtab))) { 
list($s_sid, $catid, $aid, $title, $time, $hometext, $bodytext, $comments , $counter, 
$topic, $informant) = $xtab[$story_limit];  
$story_limit++; 
if ($catid!=0) {
list($cattitle) = sql_fetch_row(sql_query("SELECT title FROM ".$NPDS_Prefix."stories_cat 
WHERE catid='".$catid."'"));
}
$printP = '<a href="print.php?sid='.$s_sid.'"><img src="images/print.gif"  border="0" 
Alt="'.translate("Printer Friendly Page").' "width="15" height="11"></a>'; 
$sendF = '<a href="friend.php?op=FriendSend&sid='.$s_sid.'">
<img src="images/friend.gif" border="0" Alt="'.translate("Send this  Story to a Friend").'" 
width="15" height="11"></ a>'; 
setlocale (LC_TIME,$locale); 
ereg ("([0-9]{4})-([0-9] {1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, 
$datetime); 
$sid = $s_sid;
$letitre = ''.translate("Posté par ").''.$informant.', le '.$time.'; lu '. $counter.' fois';
if ($catid != 0) { 
$resultm = sql_query("SELECT title FROM ".$NPDS_Prefix."stories_cat WHERE catid='$catid'"); 
list($title1) = sql_fetch_row($resultm); 
$title = "<a href='article.php?sid=$sid'  title='".$letitre."'>".aff_langue($title)."</a>  
<a href='index.php?op=newindex&catid=$catid' title='".$letitre."'[$title1]</a>"; 
} else { 
$title = '<a href="article.php?sid='.$sid.'" title="'.$letitre.'">'.aff_langue($title).'</a>' ; 
}
if($comments) 
$title .= '('.$comments.' comment.)'; 
$class = tablos();
 
$title = str_replace('NPDS', 'npds',$title);
$chaine_rep .= '<tr '.$class.'>'; 
$chaine_rep .= '<td>'.stripslashes($title).' </td>
<td class="centreLastArticles">' .$printP.' '.$sendF.'</td>';
$chaine_rep .= '<td class="centreLastArticles">'.$counter.'</td>';
$chaine_rep .= '<td class="centreLastArticles">'.$time.'</td>';
$chaine_rep .= '</tr>'; 

$chaine_rep .= "</table>"; 
return ($chaine_rep);
}




Message édité par : PhilGuen / 06-04-2011 09:40

B-Mag B-Magicon_post
salut PhilGen

Je me suis mal expliqué

Comme le montre tes captures d'ecran

seul le titre du meta (le bandeau vert) prend toute la largeur de la Div

Le corp du meta, les x colonnes sont réduitent sur lastarticle à un tableau de largeur fixe, alors que sur Forum ce tableau prend toute la largeur de la page où on le positionne

C'est en ce sens que je dis le méta LastArticle est à modifier, mais je pige pas quoi modifier

Cdt
PhilGuen PhilGuenicon_post
Ah ok!!

Il te suffit de modifier légèrement le méta-mot en ajoutant width="100%" (ou une autre valeur) à la ligne qui définit la table


chaine_rep .= '<table id="LastArticles" width="100%">';



et éventuellement de mettre aussi des width dans les < TD > pour définir les largeurs des colonnes ou encore mieux retravailler la css

Message édité par : PhilGuen / 06-04-2011 21:18