<commit_before><?php
/**
 * @version     $Id$
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Banners
 * @copyright   Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Module Banners View
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/cristiano.cucco>
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Banners
 */
 
class ModBannersHtml extends ModDefaultHtml
{
    var $_keywords; 
    
    public function display()
    { 
        $this->assign('header_text'    , trim($this->module->params->get('header_text')));
        $this->assign('footer_text'    , trim($this->module->params->get('footer_text')));
        $this->assign('moduleclass_sfx', $this->module->params->get('moduleclass_sfx'));
        
        // Module parameters
        $model = KFactory::get('com://site/banners.model.banners')
                    ->enabled(1)
                    ->category($this->module->params->get('catid'))
                    ->sort($this->module->params->get('ordering', 0))
                    ->limit($this->module->params->get('count', 1));
           
        // Manage tags search
        if ($this->module->params->get('tag_search')) {
            $model->tags($this->_getKeywords());
        }
               
	    // Assign vars and render view
		$this->assign('banners', $model->getList());    
         
        return parent::display();
    }
    
    protected function _getKeywords()
    {
        if (!isset($this->_keywords))
        {
            $params = KFactory::get('joomla:application')->getParams();
            $prefix = $params->get( 'tag_prefix' );<commit_msg>Removed 'joomla' KLoader and KFactory adapter. <commit_after><?php
/**
 * @version     $Id$
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Banners
 * @copyright   Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Module Banners View
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/cristiano.cucco>
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Banners
 */
 
class ModBannersHtml extends ModDefaultHtml
{
    var $_keywords; 
    
    public function display()
    { 
        $this->assign('header_text'    , trim($this->module->params->get('header_text')));
        $this->assign('footer_text'    , trim($this->module->params->get('footer_text')));
        $this->assign('moduleclass_sfx', $this->module->params->get('moduleclass_sfx'));
        
        // Module parameters
        $model = KFactory::get('com://site/banners.model.banners')
                    ->enabled(1)
                    ->category($this->module->params->get('catid'))
                    ->sort($this->module->params->get('ordering', 0))
                    ->limit($this->module->params->get('count', 1));
           
        // Manage tags search
        if ($this->module->params->get('tag_search')) {
            $model->tags($this->_getKeywords());
        }
               
	    // Assign vars and render view
		$this->assign('banners', $model->getList());    
         
        return parent::display();
    }
    
    protected function _getKeywords()
    {
        if (!isset($this->_keywords))
        {
            $params = JFactory::getApplication()->getParams();
            $prefix = $params->get( 'tag_prefix' );
{'fraction_non_alphanumeric': 0.16989066442388562, 'fraction_numerical': 0.00448556209700028, 'mean_word_length': 2.20863309352518, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3847015', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1064, 'n_words': 178}