Ejemplo n.º 1
0
        $tpl->assign('channel_editor', $xoopsConfig['adminmail']);
        $tpl->assign('channel_category', 'New Contents of Mylinks');
        $tpl->assign('channel_generator', XOOPS_VERSION);
        $tpl->assign('channel_language', _LANGCODE);
        $tpl->assign('image_url', XOOPS_URL . "/{$logo}");
        $tpl->assign('channel_pubdate', wani_utf8_encode(date("r")));
        $tpl->assign('channel_copyright', 'wanisys');
        $dimention = getimagesize(XOOPS_ROOT_PATH . "/{$logo}");
        $width = empty($dimention[0]) ? 88 : $dimention[0] > 144 ? 144 : $dimention[0];
        $height = empty($dimention[1]) ? 31 : $dimention[1] > 400 ? 400 : $dimention[1];
        $tpl->assign('image_width', $width);
        $tpl->assign('image_height', $height);
        foreach ($new_array as $new) {
            $title = wani_utf8_encode(wani_make_html_title($new['title']));
            $link = $new['link'];
            $pubdate = '';
            if (isset($new['time'])) {
                $pubdate = wani_utf8_encode(date("r", $new['time']));
            }
            $description = '';
            if (isset($new['description'])) {
                $description = $new['description'];
                $description = wani_make_html_summary($description, $RSS_DESC_MAX);
                $description = wani_utf8_encode($description);
            }
            $tpl->append('items', array('title' => $title, 'link' => $link, 'guid' => $link, 'pubdate' => $pubdate, 'description' => $description));
        }
    }
}
$tpl->display("file:{$template}");
exit;
Ejemplo n.º 2
0
                $updated = wani_iso8601_date($new['time']);
                $published = wani_iso8601_date($new['time']);
            }
            $title = wani_utf8_encode(wani_make_html_title($new['title']));
            $link = $new['link'];
            $description = '';
            if (isset($new['description'])) {
                $description = $new['description'];
                $description = wani_make_html_summary($description, $ATOM_DESC_MAX);
                $description = wani_utf8_encode($description);
            }
            $mid = '';
            $aid = '';
            if (isset($new['mod_id'])) {
                $mid = $new['mod_id'];
            }
            if (isset($new['id'])) {
                $aid = $new['id'];
            }
            $year = date('Y');
            if (empty($mid) && empty($aid)) {
                $atom_id = "tag:{$site_tag},{$year}://1" . time();
            } else {
                $atom_id = "tag:{$site_tag},{$year}://1.{$mid}.{$aid}";
            }
            $tpl->append('entrys', array('author_name' => $site_author, 'updated' => wani_utf8_encode($updated), 'published' => wani_utf8_encode($published), 'author_uri' => '', 'author_email' => '', 'title' => $title, 'summary' => $description, 'category' => '', 'content' => $description, 'link' => $link, 'id' => $atom_id));
        }
    }
}
$tpl->display("file:{$template}");
exit;