/** * Create a new feed. This is an extra step to take once you have a plugin * installed that supports the new Feed functions in the Plugin API. This * will let you select for which plugin (or Geeklog) you're creating the feed. * * @return string HTML for the complete page (selection or feed editor) * */ function newfeed() { global $_CONF, $LANG33; $retval = ''; $plugins = PLG_supportingFeeds(); if (count($plugins) == 0) { // none of the installed plugins are supporting feeds // - go directly to the feed editor $retval = COM_siteHeader('menu', $LANG33[11]) . editfeed(0, 'article') . COM_siteFooter(); } else { $selection = '<select name="type">' . LB; $selection .= '<option value="article">' . $LANG33[55] . '</option>' . LB; foreach ($plugins as $p) { $selection .= '<option value="' . $p . '">' . ucwords($p) . '</option>' . LB; } $selection .= '</select>' . LB; $feed_template = COM_newTemplate($_CONF['path_layout'] . 'admin/syndication'); $feed_template->set_file('type', 'selecttype.thtml'); $feed_template->set_var('type_selection', $selection); $feed_template->set_var('lang_explain', $LANG33[54]); $feed_template->set_var('lang_go', $LANG33[1]); $retval .= COM_siteHeader('menu', $LANG33[11]); $retval .= COM_startBlock($LANG33[36], '', COM_getBlockTemplate('_admin_block', 'header')); $retval .= $feed_template->finish($feed_template->parse('output', 'type')); $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); $retval .= COM_siteFooter(); } return $retval; }
/** * Create a new feed. This is an extra step to take once you have a plugin * installed that supports the new Feed functions in the Plugin API. This * will let you select for which plugin (or glFusion) you're creating the feed. * * @return string HTML for the complete page (selection or feed editor) * */ function FEED_newFeed() { global $_CONF, $LANG33, $LANG_ADMIN, $_IMAGE_TYPE; USES_lib_admin(); $retval = ''; $plugins = PLG_supportingFeeds(); if (sizeof($plugins) == 0) { // none of the installed plugins are supporting feeds // - go directly to the feed editor $retval = COM_siteHeader('menu', $LANG33[11]) . FEED_edit(0, 'article') . COM_siteFooter(); } else { $selection = '<select name="type">' . LB; $selection .= '<option value="article">' . $LANG33[55] . '</option>' . LB; foreach ($plugins as $p) { $selection .= '<option value="' . $p . '">' . ucwords($p) . '</option>' . LB; } $selection .= '</select>' . LB; $menu_arr = array(array('url' => $_CONF['site_admin_url'] . '/syndication.php', 'text' => $LANG33[57]), array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home'])); $feed_template = new Template($_CONF['path_layout'] . 'admin/syndication'); $feed_template->set_file('type', 'selecttype.thtml'); $feed_template->set_var('type_selection', $selection); $feed_template->set_var('lang_explain', $LANG33[54]); $feed_template->set_var('lang_go', $LANG33[1]); $retval .= COM_siteHeader('menu', $LANG33[11]); $retval .= COM_startBlock($LANG33[36], '', COM_getBlockTemplate('_admin_block', 'header')); $retval .= ADMIN_createMenu($menu_arr, $LANG33[54], $_CONF['layout_url'] . '/images/icons/syndication.' . $_IMAGE_TYPE); $retval .= $feed_template->finish($feed_template->parse('output', 'type')); $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); $retval .= COM_siteFooter(); } return $retval; }
/** * Create a new feed. This is an extra step to take once you have a plugin * installed that supports the new Feed functions in the Plugin API. This * will let you select for which plugin (or Geeklog) you're creating the feed. * * @return string HTML for the complete page (selection or feed editor) * */ function newfeed() { global $_CONF, $LANG33; $retval = ''; $plugins = PLG_supportingFeeds(); $selection = '<select name="type">' . LB; foreach ($plugins as $p) { $selection .= '<option value="' . $p . '">' . ucwords($p) . '</option>' . LB; } $selection .= '</select>' . LB; $feed_template = COM_newTemplate($_CONF['path_layout'] . 'admin/syndication'); $feed_template->set_file('type', 'selecttype.thtml'); $feed_template->set_var('type_selection', $selection); $feed_template->set_var('lang_explain', $LANG33[54]); $feed_template->set_var('lang_go', $LANG33[1]); $retval .= COM_startBlock($LANG33[36], '', COM_getBlockTemplate('_admin_block', 'header')); $retval .= $feed_template->finish($feed_template->parse('output', 'type')); $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); $retval = COM_createHTMLDocument($retval, array('pagetitle' => $LANG33[11])); return $retval; }