Popular Hashtags

Can anyone let me know how to automatically reset "Posts-Popular Hashtags" to only display hashtags for a 48 hour period? 


0 0 0 0 0 0
  • 144
Replies (2)
  • 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');

    0 0 0 0 0 0
    • Thank you LeonidS 

      0 0 0 0 0 0
      Not logged in users can't 'Comments Post'.

      UNA - Social Media Software Framework