una icon indicating copy to clipboard operation
una copied to clipboard

RSS feeds: add ability to parse replace markers in RSS URLs

Open AlexTr opened this issue 7 years ago • 0 comments

To do it we need to pass 'id' and 'content_it' GET variables, so we can initiate Page object and replace markers, for example:

class BxDolRssPageBlock extends BxTemplRss
{
    ...
    public function getUrl($mixedId) {
	    $oPageQuery = new BxDolPageQuery(array());

        $aBlock = $oPageQuery->getPageBlock($mixedId);
        if (!$aBlock)
            return false;

        $oPage = BxDolPage::getObjectInstance($aBlock['object']);
        if (!$oPage)
            return false;

        return $oPage->getBlockRssUrl($aBlock);
    }

where getBlockRssUrl method:

class BxBasePage extends BxDolPage
{
    ...
    public function getBlockRssUrl ($aBlock)
    {
        list( $sUrl, $iNum ) = explode('#', $aBlock['content']);
        echoDbg(get_class($this));        
        return $this->_replaceMarkers($sUrl);
    }

AlexTr avatar Dec 21 '18 05:12 AlexTr