Comment to 'Popular Hashtags'
Comment to Popular Hashtags
  • Hello InPage !

    First of all, you need to add the column with the default timestamp value as our metatags tables don't have similar fields. See the ways how to do it here.

    This block uses the method getKeywordsCloud from the BxBaseMetatags class (the same file in template/script directory). Look on the following lines there:

    public function getKeywordsCloud($mixedSection, $iMaxCount, $bAsArray = false)

        {

            $aKeywords = $this->keywordsPopularList($iMaxCount);

    So you may redeclare this method and change the bold code for the child class in your template (it has the name BxTemplMetatags.php) like:

    $sQuery = $this->_oQuery->prepare("SELECT `keyword`, COUNT(*) as `count` FROM `{$this->_oQuery->_aObject['table_keywords']}` GROUP BY `keyword` WHERE {condition to to select the necessary time interval} ORDER BY `count` DESC LIMIT ?", $iLimit);

    $aKeywords = $this->_oQuery->getPairs($sQuery, 'keyword', 'count');