| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/ |
|---|
| 4 | * CC-BY License - http://creativecommons.org/licenses/by/3.0/ |
|---|
| 5 | * |
|---|
| 6 | * @defgroup DolphinCore Dolphin Core |
|---|
| 7 | * @{ |
|---|
| 8 | */ |
|---|
| 9 | |
|---|
| 10 | require_once('./inc/header.inc.php'); |
|---|
| 11 | |
|---|
| 12 | $mixedBlockId = bx_process_input(bx_get('ID')); |
|---|
| 13 | |
|---|
| 14 | $aPredefinedRssFeeds = array ( |
|---|
| 15 | 'boonex_news' => 'http://www.boonex.com/unity/blog/featured_posts/?rss=1', |
|---|
| 16 | 'boonex_version' => 'http://rss.boonex.com/', |
|---|
| 17 | 'boonex_unity_market' => 'http://www.boonex.com/unity/extensions/latest/?rss=1', |
|---|
| 18 | 'boonex_unity_lang_files' => 'http://www.boonex.com/unity/extensions/tag/translations&rss=1', |
|---|
| 19 | 'boonex_unity_market_templates' => 'http://www.boonex.com/unity/extensions/tag/templates&rss=1', |
|---|
| 20 | 'boonex_unity_market_featured' => 'http://www.boonex.com/unity/extensions/featured_posts?rss=1', |
|---|
| 21 | ); |
|---|
| 22 | |
|---|
| 23 | if (isset($aPredefinedRssFeeds[$mixedBlockId])) { |
|---|
| 24 | |
|---|
| 25 | $sCont = $aPredefinedRssFeeds[$mixedBlockId]; |
|---|
| 26 | |
|---|
| 27 | } else { |
|---|
| 28 | |
|---|
| 29 | bx_import('BxDolPageQuery'); |
|---|
| 30 | $oPageQuery = new BxDolPageQuery(array()); |
|---|
| 31 | $sCont = $oPageQuery->getPageBlockContent($mixedBlockId); |
|---|
| 32 | |
|---|
| 33 | if (!$sCont) |
|---|
| 34 | exit; |
|---|
| 35 | } |
|---|
| 36 | |
|---|
| 37 | list($sUrl) = explode( '#', $sCont ); |
|---|
| 38 | $sUrl = str_replace('{SiteUrl}', BX_DOL_URL_ROOT, $sUrl); |
|---|
| 39 | |
|---|
| 40 | $iMemID = bx_process_input(bx_get('member'), BX_DATA_INT); |
|---|
| 41 | if ($iMemID) { |
|---|
| 42 | $aMember = getProfileInfo( $iMemID ); |
|---|
| 43 | $sUrl = str_replace( '{NickName}', $aMember['NickName'], $sUrl ); |
|---|
| 44 | } |
|---|
| 45 | |
|---|
| 46 | header('Content-Type: text/xml; charset=utf-8'); |
|---|
| 47 | echo bx_file_get_contents($sUrl . (BX_PROFILER && 0 == strncmp(BX_DOL_URL_ROOT, $sUrl, strlen(BX_DOL_URL_ROOT)) ? '&bx_profiler_disable=1' : '')); |
|---|
| 48 | |
|---|
| 49 | /** @} */ |
|---|