- md5
- 7db850cf1bcf67de22103de5807e94eb
- sha1
- 143b5e020fa8c4b54b16bc01840af7ad82015fd6
- sha256
- 2bdfb9315d5bf84583125a72be23e87160ac6cbbe6285abce5e833839403cc26
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
<?php
/**
* @version $Id: mod_rssfeed.php 4079 2006-06-20 17:41:01Z stingrey $
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
if (!defined( '_JOS_RSSFEED_MODULE' )) {
/** ensure that functions are declared only once */
define( '_JOS_RSSFEED_MODULE', 1 );
function output_rssfeed( $link, $img_default, $img_file, $img_alt, $img_name ) {
$img = mosAdminMenus::ImageCheck( $img_default, '/images/M_images/', $img_file, '/images/M_images/', $img_alt, $img_name );
?>
<div align="center">
<a href="<?php echo sefRelToAbs( $link ); ?>">
<?php echo $img ?></a>
</div>
<?php
}
}
global $mosConfig_live_site, $mosConfig_absolute_path, $cur_template;
$text = $params->get( 'text', '');
$moduleclass_sfx = $params->get( 'moduleclass_sfx', '' );
$rss091 = $params->get( 'rss091', 1 );
$rss10 = $params->get( 'rss10', 1 );
$rss20 = $params->get( 'rss20', 1 );
$atom03 = $params->get( 'atom', 1 );
$opml = $params->get( 'opml', 1 );
$rss091_image = $params->get( 'rss091_image', '' );
$rss10_image = $params->get( 'rss10_image', '' );
$rss20_image = $params->get( 'rss20_image', '' );
$atom_image = $params->get( 'atom_image', '' );
$opml_image = $params->get( 'opml_image', '' );
$cur_template = $mainframe->getTemplate();
$t_path = $mosConfig_live_site .'/templates/'. $cur_template .'/images/';
$d_path = $mosConfig_live_site .'/images/M_images/';
// needed to reduce query
if ( isset( $GLOBALS['syndicateParams'] ) ) {
// load value stored in GLOBALS
$syndicateParams = $GLOBALS['syndicateParams'];
} else {
// query to oull syndication component params
$query = "SELECT a.*"
. "\n FROM #__components AS a"
. "\n WHERE ( a.admin_menu_link = 'option=com_syndicate' OR a.admin_menu_link = 'option=com_syndicate&hidemainmenu=1' )"
. "\n AND a.option = 'com_syndicate'"
;
$database->setQuery( $query );
$database->loadObject( $row );
// get params definitions
$syndicateParams = new mosParameters( $row->params, $mainframe->getPath( 'com_xml', $row->option ), 'component' );
}
// check for disabling/enabling of selected feed types
if ( !$syndicateParams->get( 'rss091', 1 ) ) {
$rss091 = 0;
}
if ( !$syndicateParams->get( 'rss10', 1 ) ) {
$rss10 = 0;
}
if ( !$syndicateParams->get( 'rss20', 1 ) ) {
$rss20 = 0;
}
if ( !$syndicateParams->get( 'atom03', 1 ) ) {
$atom03 = 0;
}
if ( !$syndicateParams->get( 'opml', 1 ) ) {
$opml = 0;
}
?>
<div class="syndicate<?php echo $moduleclass_sfx;?>">
<?php
// text
if ( $text ) {
?>
<div align="center" class="syndicate_text<?php echo $moduleclass_sfx;?>">
<?php echo $text;?>
</div>
<?php
}
// rss091 link
if ( $rss091 ) {
$link = 'index.php?option=com_rss&feed=RSS0.91&no_html=1';
output_rssfeed( $link, 'rss091.gif', $rss091_image, 'RSS 0.91', 'RSS091' );
}
// rss10 link
if ( $rss10 ) {
$link = 'index.php?option=com_rss&feed=RSS1.0&no_html=1';
output_rssfeed( $link, 'rss10.gif', $rss10_image, 'RSS 1.0', 'RSS10' );
}
// rss20 link
if ( $rss20 ) {
$link = 'index.php?option=com_rss&feed=RSS2.0&no_html=1';
output_rssfeed( $link, 'rss20.gif', $rss20_image, 'RSS 2.0', 'RSS20' );
}
// atom link
if ( $atom03 ) {
$link = 'index.php?option=com_rss&feed=ATOM0.3&no_html=1';
output_rssfeed( $link, 'atom03.gif', $atom_image, 'ATOM 0.3', 'ATOM03' );
}
// opml link
if ( $opml ) {
$link = 'index.php?option=com_rss&feed=OPML&no_html=1';
output_rssfeed( $link, 'opml.png', $opml_image, 'OPML', 'OPML' );
}
?>
</div>
The same content is in 3 releases, Joomla 1.0.13 to 1.0.15. See them all, or every version of this file.