Fork me on GitHub






Recherche plugin xhnewbb pour Bopcomments
Régulier
Inscrit: 12/04/2004 11:48
Messages: 260
Bonjour,

Tour est dans le titre
J'ai cherché un peu partout sur Google... je n'ai rien trouvé...

J'ai essayé de dupliquer et bidouiller le plug newbb mais ça ne fonctionne pas.

Merci d'avance de vos lumières.

Fabien

Posté le : 28/07/2008 09:40
Partager Twitter Partagez cette article sur GG+
Re: Recherche plugin xhnewbb pour Bopcomments
Régulier
Inscrit: 12/04/2004 11:48
Messages: 260
Bon ben j'ai réussi à créer mon plugin xhnewbb...

<?php

function b_BopComments_xhnewbb($maxtopic$module_mid)    {

//----------------------------------------------

// if you want to show Private forum's Comments.

// please $private_bb = true;

// if you not want to show praivate forum's Comments.

// please $private_bb = false;



    
$private_xhnewbb TRUE;

//----------------------------------------------

// View mode (thread or flat) get from user details

    

    
$userSetting TRUE;

//----------------------------------------------

    

    
global $xoopsUser;

    

    
$comment = array();

    
$xoopsDB =& Database::getInstance();

    if ( 
$private_xhnewbb == TRUE && $xoopsUser )    {

        
$uid $xoopsUser->uid();

        
$pu_SQL "SELECT forum_id FROM ".

                
$xoopsDB->prefix("xhnewbb_forum_access").

                
" WHERE user_id=".$uid;

        if ( !
$pu_query $xoopsDB->query($pu_SQL) ) echo "Error! (xhnewbb)";

        while (
$pu_result$xoopsDB->fetchArray($pu_query))    {

            
$forum[] = $pu_result['forum_id'];

        }

    }

    if ( !
count($forum)==)    {

        
$SQL "SELECT t.topic_id, t.topic_title, t.topic_views, t.topic_replies, t.forum_id, f.forum_name, p.post_time, p.uid FROM (".

                
$xoopsDB->prefix("xhnewbb_topics")." t LEFT JOIN ".

                
$xoopsDB->prefix("xhnewbb_forums")." f ON t.forum_id=f.forum_id) LEFT JOIN ".

                
$xoopsDB->prefix("xhnewbb_posts")." p ON t.topic_last_post_id=p.post_id ".

                
"WHERE (f.forum_type <> 1) OR (f.forum_id IN (".implode(", "$forum).") AND t.forum_id IN (".implode(", "$forum).") AND f.forum_type=1) ".

                
"ORDER BY t.topic_time DESC";

    } else {

        
$SQL "SELECT t.topic_id, t.topic_title, t.topic_views, t.topic_replies, t.forum_id, f.forum_name, p.post_time, p.uid FROM (".

                
$xoopsDB->prefix("xhnewbb_topics")." t LEFT JOIN ".

                
$xoopsDB->prefix("xhnewbb_forums")." f ON t.forum_id=f.forum_id) LEFT JOIN ".

                
$xoopsDB->prefix("xhnewbb_posts")." p ON t.topic_last_post_id=p.post_id ".

                
"WHERE (f.forum_type <> 1) ".

                
"ORDER BY t.topic_time DESC";

    }

    if ( !
$query $xoopsDB->query($SQL$maxtopic0) ) echo "Error! (xhnewbb)";

    while ( 
$result $xoopsDB->fetchArray($query) )    {

        
$key BopComments_KeyCheck($comment$result['post_time']);

        

        
$comment[$key]['moduleimg'] = XOOPS_URL."/modules/BopComments/plugin/image/newbb.gif";

        
$comment[$key]['modulelink'] = XOOPS_URL."/modules/xhnewbb/index.php";

        
$comment[$key]['placelink'] = XOOPS_URL."/modules/xhnewbb/viewforum.php?forum=".$result['forum_id'];

        
$comment[$key]['place'] = $result['forum_name'];

        
$comment[$key]['topiclink'] = XOOPS_URL."/modules/xhnewbb/viewtopic.php?forum=".$result['forum_id']."&topic_id=".$result['topic_id'];

        
$comment[$key]['topic'] = $result['topic_title'];

        
$comment[$key]['user'] = $result['uid'];

        
$comment[$key]['read'] = $result['topic_views'];

        
$comment[$key]['reply'] = $result['topic_replies'];

        
$comment[$key]['date'] = $result['post_time'];

    }

    return 
$comment;

}

?>


Le hic, c'est que tout les titres des modules sont décalés vers le bas...
???

Posté le : 28/07/2008 21:53
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant



Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

137 Personne(s) en ligne (107 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 137 | Plus ...