Модерирование отзывов

Тема в разделе 'Presta- памятка', создана пользователем savvato, 9 янв 2013.

  1. savvato Administrator

    PHP:
    /*Add to /modules/productcomments/productcomments.php*/
     
    function hookBackOfficeHome()
    {
        require_once (
    dirname(__FILE__).'/ProductComment.php');
     
        global 
    $cookie;
       
        
    $allNotApproved ProductComment::getByValidate();
        
    $nbComments sizeof ($allNotApproved);
        
    $txt '';
        
    $txt .= '<div class="clear space"><br /><br /></div><fieldset class="width3"><legend>'.
            
    $this->l('Pending Comment Validations').'</legend>';
        
    $txt .= $this->l('Number of comments waiting for validation : ');
        if (
    $nbComments == 0)   
            
    $txt .= '<b>'.$this->l('No comments to validate at this time').'</b>';
        else
            
    $txt .= '<b>'.$nbComments.'</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="?tab=AdminModules&configure=productcomments&token='.Tools::getAdminToken('AdminModules'.(int)(Tab::getIdFromClassName('AdminModules')).(int)($cookie->id_employee)).'&tab_module=front_office_features&module_name=productcomments"><span  class="button">'.$this->l('View').'</span></a>';
        
    $txt .= '</fieldset><br/>';
        return 
    $txt;
    }

Поделиться этой страницей