Example #1
0
    // channel nodes
    // todo: custom priority settings for starter nodes
    $options['page'] = $vbphrase['page'];
    // node-less pages
    print_form_header('sitemap');
    print_table_header($vbphrase['sitemap_priority_manager']);
    print_select_row($vbphrase['manage_priority_for_content_type'], 'do', $options);
    print_submit_row($vbphrase['manage'], null);
}
// Default priority settings, with clear
$default_settings = array('default' => $vbphrase['default'], '0.0' => vb_number_format('0.0', 1), '0.1' => vb_number_format('0.1', 1), '0.2' => vb_number_format('0.2', 1), '0.3' => vb_number_format('0.3', 1), '0.4' => vb_number_format('0.4', 1), '0.5' => vb_number_format('0.5', 1), '0.6' => vb_number_format('0.6', 1), '0.7' => vb_number_format('0.7', 1), '0.8' => vb_number_format('0.8', 1), '0.9' => vb_number_format('0.9', 1), '1.0' => vb_number_format('1.0', 1));
// ########################################## BEGIN VB5 #####
// #########################edit channel priority (VB5)#########################
if ($_REQUEST['do'] == 'channel') {
    // Get the custom priorities
    $sitemap = new vB_SiteMap_Node($vbulletin);
    print_form_header('sitemap', 'savechannel');
    print_table_header($vbphrase['channel_priority_manager']);
    print_description_row($vbphrase['sitemap_forum_priority_desc']);
    $channels = $sitemap->get_allowed_channels();
    if (is_array($channels)) {
        foreach ($channels as $key => $channel) {
            $priority = $sitemap->get_node_priority($channel['nodeid']);
            if ($priority === false) {
                $priority = 'default';
            }
            $cell = array();
            $cell[] = "<b>" . construct_depth_mark($channel['depth'], '- - ') . "<a href=\"forum.php?do=edit&amp;n={$channel['nodeid']}\">{$channel['title']}</a></b>";
            $cell[] = "\n\t<select name=\"priority[{$channel['nodeid']}]\" class=\"bginput\">\n" . construct_select_options($default_settings, $priority) . " />\n\t";
            if ($channel['parentid'] == 0) {
                print_cells_row(array($vbphrase['title'], construct_phrase($vbphrase['priority_default_x'], vb_number_format($vbulletin->options['sitemap_priority'], 1))), 1, 'tcat');
 /**
  * Constructor - checks that the registry object has been passed correctly.
  *
  * @param	vB_Registry		Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.
  * @param 	vB_XML_Parser 	Instance of the vBulletin XML parser.
  */
 function __construct(vB_Registry $registry, vB_XML_Parser $xml_handler = null)
 {
     parent::__construct($registry, $xml_handler);
 }