Fork me on GitHub

Rapport de message :*
 

Re: plugin xnews pour sitemap et waiting

Titre du sujet : Re: plugin xnews pour sitemap et waiting
par caradoc sur 28/11/2010 23:08:49

pour waiting, fichier xnews.php
<?php
function b_waiting_xnews(){
    
$xoopsDB =& Database::getInstance();
    
$block = array();

    
// news
    
$result $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("nw_stories")." WHERE published=0");
    if ( 
$result ) {
        
$block['adminlink'] = XOOPS_URL."/modules/xnews/admin/index.php?op=newarticle" ;
        list(
$block['pendingnum']) = $xoopsDB->fetchRow($result);
        
$block['lang_linkname'] = _PI_WAITING_SUBMITTED ;
    }

    return 
$block;
}
?>

pour sitemap, fichier xnews.php
<?php
function b_sitemap_xnews(){
    
$xoopsDB =& Database::getInstance();

    
// xnews
    
$block sitemap_get_categoires_map($xoopsDB->prefix("nw_topics"), "topic_id""topic_pid""topic_title""index.php?storytopic=""topic_title");

    return 
$block;
}
?>

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

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