-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrss.php
47 lines (39 loc) · 1.54 KB
/
rss.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* Generating an RSS feed
*
* @copyright The ImpressCMS Project
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* @since 1.0
* @author marcan <marcan@impresscms.org>
* @package imaudit
* @version $Id$
*/
/** Include the module's header for all pages */
include_once 'header.php';
include_once ICMS_ROOT_PATH.'/header.php';
/** To come soon in imBuilding...
$clean_post_uid = isset($_GET['uid']) ? intval($_GET['uid']) : false;
include_once IMAUDIT_ROOT_PATH.'/class/icmsfeed.php';
$imaudit_feed = new IcmsFeed();
$imaudit_feed->title = $xoopsConfig['sitename'] . ' - ' . $xoopsModule->name();
$imaudit_feed->url = XOOPS_URL;
$imaudit_feed->description = $xoopsConfig['slogan'];
$imaudit_feed->language = _LANGCODE;
$imaudit_feed->charset = _CHARSET;
$imaudit_feed->category = $xoopsModule->name();
$imaudit_post_handler = xoops_getModuleHandler('post');
//ImauditPostHandler::getPosts($start = 0, $limit = 0, $post_uid = false, $year = false, $month = false
$postsArray = $imaudit_post_handler->getPosts(0, 10, $clean_post_uid);
foreach($postsArray as $postArray) {
$imaudit_feed->feeds[] = array (
'title' => $postArray['post_title'],
'link' => str_replace('&', '&', $postArray['itemUrl']),
'description' => htmlspecialchars(str_replace('&', '&', $postArray['post_lead']), ENT_QUOTES),
'pubdate' => $postArray['post_published_date_int'],
'guid' => str_replace('&', '&', $postArray['itemUrl']),
);
}
$imaudit_feed->render();
*/
?>