phpBB3 SEO Demo Forum - News - Source Source » phpBB3 SEO Demo Forum - News

  • Links
    File date
 
  • Source PHP : demo/rss-links.php
     
Code: Select all
<?php
/**
* @ignore
*/
define('IN_PHPBB'true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH './../';
$phpEx substr(strrchr(__FILE__'.'), 1);
include(
$phpbb_root_path 'common.' $phpEx);
include(
$phpbb_root_path 'demo/functions_demo.' $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
// Force prosilver for now
$user->data['user_style'] = 1;
$user->setup('viewtopic');

$php_file $phpbb_root_path 'demo/rss-links.' $phpEx;
$tpl_file "{$phpbb_root_path}styles/" $user->theme['template_path'] . '/template/rss_links_body.html';

// Assign index specific vars
$template->assign_vars(array(
    
'PHP_FILE'    => str_replace($phpbb_root_path''$php_file),
    
'PHP_SOURCE_CODE'    => highlight_php_file($php_file),
    
'TEMPLATE_FILE'    => str_replace($phpbb_root_path''$tpl_file),
    
'TEMPLATE_SOURCE_CODE'    => highlight_php_file($tpl_file),
));

// GYM Sitemaps & RSS agregator
if (!empty($config['gym_installed'])) {
    if (!
function_exists('display_feed')) {
        require_once(
$phpbb_root_path 'gym_sitemaps/includes/gym_common.' $phpEx);
    }
    
$params = array(
        
// Full URL to the RSS feed
        
'url' => 'http://phpbb3.phpbb-seo.net/rss/news/forum.xml',
        
// true | false - Scroll the link list or not ? 
        // Default is false
        
'slide' => true,
        
// number of item to parse
        // Default is 5
        
'limit' => 10,
    );
    
/**
     * display_feed($params, $tpl_prefix = '')
     * $params : array of params or string feed URL for defaults
     * tpl_prefix is for using different link blocks on one page
     * Use display_feed('http://www.example.com/rss/rss.xml') to use default settings.
     * */
    
display_feed($params);
}
// GYM Sitemaps & RSS agregator
// Output page
page_header('RSS Links');

$template->set_filenames(array(
    
'body' => 'rss_links_body.html')
);

page_footer();
?>
  • Source html : styles/prosilver/template/rss_links_body.html
     
Code: Select all
<!-- INCLUDE overall_header.html -->

<!-- INCLUDE 
gym_sitemaps/gym_link_body.html -->

<!--
/**
* Bellow is only used to show the source code
**/
-->
    <
div class="forumbg">
        <
div class="inner">
            <
span class="corners-top"><span></span></span>
            <
ul class="topiclist">
                <
li class="header">
                    <
dl class="icon">
                        <
dt>Source PHP : {PHP_FILE}</dt>
                        <
dd>&nbsp;</dd>
                    </
dl>

                </
li>
            </
ul>
            <
div class="post bg1">
            <
div class="inner">
                <
span class="corners-top"><span></span></span>
                
                <
div class="postbody bg1" style="width:80%;">
                    <
div class="content bg1">
                        <
dl><dt>{L_CODE}: <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></dt><dd><code>{PHP_SOURCE_CODE}</code></dd></dl>
                    </
div>
                </
div>    
                <
span class="corners-bottom"><span></span></span>
            </
div>    
            </
div>
            <
span class="corners-bottom"><span></span></span>

        </
div>
    </
div>
    <
div class="forumbg">
        <
div class="inner">
            <
span class="corners-top"><span></span></span>
            <
ul class="topiclist">
                <
li class="header">
                    <
dl class="icon">
                        <
dt>Source html : {TEMPLATE_FILE}</dt>
                        <
dd>&nbsp;</dd>
                    </
dl>

                </
li>
            </
ul>
            <
div class="post bg1">
            <
div class="inner">
                <
span class="corners-top"><span></span></span>
                
                <
div class="postbody bg1" style="width:100%;">
                    <
div class="content bg1">
                        <
dl><dt>{L_CODE}: <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></dt><dd><code>{TEMPLATE_SOURCE_CODE}</code></dd></dl>
                    </
div>
                </
div>    
                <
span class="corners-bottom"><span></span></span>
            </
div>    
            </
div>
            <
span class="corners-bottom"><span></span></span>

        </
div>
    </
div>


<!-- INCLUDE 
overall_footer.html -->