libdir .'/rsslib.php'); $id = optional_param('id', SITEID, PARAM_INT); //create a page object for url_get_full() $page = page_create_object($this->instance->pagetype, $this->instance->pageid); /// Print tabs at top $currentaction = optional_param('currentaction', '', PARAM_ALPHA); if (empty($currentaction) || $currentaction == 'configblock') { $currentaction = 'configblock'; } else { $currentaction = 'managefeeds'; } include('config_instance_tabs.php'); if ($currentaction == 'configblock') { print_box_start(); ?>
| block_rss_client_display_description) ) { $CFG->block_rss_client_display_description = '0'; } $selected = $CFG->block_rss_client_display_description; if (isset($this->config) && isset($this->config->display_description)) { $selected = $this->config->display_description; } $options[0] = get_string('no'); $options[1] = get_string('yes'); choose_from_menu ($options, 'display_description', $selected); ?> | |
| config) && isset($this->config->rssid)) {
                if (is_array($this->config->rssid)) {
                    // rssid is an array of rssids
                    $selectedarray = $this->config->rssid;
                } else {
                    // rssid is a single rssid
                    $selectedarray = array($this->config->rssid);
                }
            }
            global $USER;
            if ($rssfeeds = get_records_select('block_rss_client', 'userid = '.$USER->id.' OR shared = 1')) {
                foreach($rssfeeds as $rssfeed) {
                    if (!empty($rssfeed->preferredtitle)) {
                        $feedtitle = stripslashes_safe($rssfeed->preferredtitle);
                    } else {
                        $feedtitle = stripslashes_safe($rssfeed->title);
                    }
                    $checked = '';
                    if (in_array($rssfeed->id, $selectedarray)) {
                        $checked = 'checked="checked"';
                    }
                    $checkbox =  '';
                    print $checkbox . $feedtitle .' '."\n"; } } else { if (empty($this->instance->pinned)) { $context = get_context_instance(CONTEXT_BLOCK, $this->instance->id); } else { $context = get_context_instance(CONTEXT_SYSTEM); // pinned blocks do not have own context } print_string('nofeeds', 'block_rss_client'); if (has_capability('block/rss_client:createprivatefeeds', $context) || has_capability('block/rss_client:createsharedfeeds', $context)) { $addrsspage = $page->url_get_full(array('instanceid' => $this->instance->id, 'sesskey' => $USER->sesskey, 'blockaction' => 'config', 'currentaction' => 'managefeeds', 'id' => $id)); print ' '. get_string('editnewsfeeds', 'block_rss_client') .' '; } } ?> | |
| config) && !empty($this->config->title)) { $title = $this->config->title; } ?> | |
| config) && isset($this->config->block_rss_client_show_channel_link)) { $selected = $this->config->block_rss_client_show_channel_link; } else { $selected = '0'; } $options = array ( '0' => get_string('no'), '1' => get_string('yes') ); choose_from_menu ($options, 'block_rss_client_show_channel_link', $selected); ?> | |
| config) && isset($this->config->block_rss_client_show_channel_image)) { $selected = $this->config->block_rss_client_show_channel_image; } else { $selected = '0'; } $options = array ( '0' => get_string('no'), '1' => get_string('yes') ); choose_from_menu ($options, 'block_rss_client_show_channel_image', $selected); ?> | |