function init($args = array()) { if (!empty($this->params['num_per_page'])) { $this->num_per_page = (int) $this->params['num_per_page']; } parent::init(); }
function init($args = array()) { if (!empty($this->params['num_per_page'])) { $this->num_per_page = (int) $this->params['num_per_page']; } $head_items = $this->get_head_items(); $head_items->add_stylesheet(REASON_HTTP_BASE_PATH . 'modules/av/av_simple.css'); parent::init(); }
function get_login_logout_link() { if ($this->show_login_link) { $sess_auth = reason_check_authentication('session'); $auth = reason_check_authentication('server'); if(!empty($sess_auth) || !empty($auth)) $class = 'login'; else $class = 'logout'; $ret = '<div class="loginlogout '.$class.'">'; if(!empty($sess_auth)) { $ret .= 'Logged in: '.$sess_auth.' <a href="'.REASON_LOGIN_URL.'?logout=true"><span class="action">Log Out</span></a>'; } elseif(!empty($auth)) { $ret .= 'Logged in as '.$auth; } else { $ret .= '<a href="'.REASON_LOGIN_URL.'"><span class="action">Log In</span></a>'; } $ret .= '</div>'; return $ret; } else parent::get_login_logout_link(); }
function list_items() { parent::list_items(); $media_file_type = new entity(id_of('av_file')); $feed_link = $this->parent->site_info->get_value('base_url').MINISITE_FEED_DIRECTORY_NAME.'/'.$media_file_type->get_value('feed_url_string'); $params = array(); if($this->params['limit_to_current_page']) { $params[] = 'page_id='.$this->parent->cur_page->id(); } if($this->params['relationship_sort']) { $params[] = 'rel_sort=1'; } if(!empty($params)) $feed_link .= '?'.implode('&',$params); echo '<p class="podcast">'; echo '<a href="'.$feed_link.'" class="feedLink">Podcast Feed</a>'; echo ' <a href="itpc://'.HTTP_HOST_NAME.$feed_link.'" class="subscribe">Subscribe in iTunes</a>'; echo '</p>'."\n"; if(defined('REASON_URL_FOR_PODCAST_HELP')) { echo '<p class="smallText podcastHelp"><a href="'.REASON_URL_FOR_PODCAST_HELP.'">What\'s a podcast, and how does this work?</a></p>'; } }
function run() { if (empty($this->request['classified_mode'])) { $this->view->show_submit_classified_text(); $this->view->show_header_text(); parent::run(); $this->view->show_footer_text(); } elseif ($this->request['classified_mode'] == 'add_item') { $this->view->show_return_to_listing_text(); $this->view->show_form_header_text(); $this->view->show_disco_form(); $this->view->show_form_footer_text(); } elseif ($this->request['classified_mode'] == 'submit_success') { $this->view->show_return_to_listing_text(); $this->view->show_successful_submit_text(); } elseif ($this->request['classified_mode'] == 'delete_item') { $this->view->show_return_to_listing_text(); if ($this->model->get_user_can_delete($this->model->get_classified_id())) { $this->model->delete_classified($this->model->get_classified_id()); $this->view->show_successful_delete_text(); } else { $this->view->show_submit_classified_text(); $this->view->show_header_text(); parent::run(); $this->view->show_footer_text(); } } }
function do_list() { if (!$this->params['limit_to_current_site']) { $site_indexed_items =& $this->get_items_by_site(); echo '<h3 id="site_index">Site Index<h3>'; echo '<ul>'; foreach( $site_indexed_items as $site => $items ) { $anchor[$site] = strtolower(htmlspecialchars(str_replace(" ", "_", $site))); echo '<li><a href="#'.$anchor[$site].'">'.$site.'</a></li>'; } echo '</ul>'; foreach( $site_indexed_items as $site => $items ) { echo '<h4 id="'.$anchor[$site].'">'.$site.' (<a href="#site_index">back to index</a>)</h4> '; echo '<ul>'."\n"; foreach( $items AS $item ) { $this->show_list_item( $item ); } echo '</ul>'."\n"; } } else parent::do_list(); }
/** * Add cleanup rules specific to the gallery module * @return array */ function get_cleanup_rules() { $this->cleanup_rules['original_access'] = array('function' => 'turn_into_int'); return parent::get_cleanup_rules(); }
function construct_link($item, $other_args = array()) { $link = parent::construct_link($item, $other_args); if (!empty($this->request['order_projects'])) { $link .= '&order_projects=' . $this->request['order_projects']; } return $link; }