/** * Determine cache filename * * @access private */ private function build_url() { if (self::ACTIVATED === false) { return false; } if (VSession::renderer() == 'mobile') { $this->_url .= 'mobile'; } elseif (VSession::html5()) { $this->_url .= 'html5'; } else { $this->_url .= 'html'; } $this->_url .= '-ctl-' . VGet::ctl(); if (VGet::ctl() == 'albums' && VGet::album() && !VGet::comments()) { $this->_url .= '-album-' . VGet::album(); } elseif (VGet::ctl() == 'search') { foreach (VGet::all() as $key => $value) { if ($key != 'ctl') { $this->_url .= '-' . $key . '-' . $value; } } } }
/** * Display comments about an album * * @access private */ private function display_comments() { Html::header_albums($this->_album->_name . ' > Comments'); Html::album_details($this->_album->_id, $this->_album->_author_name, $this->_album->_date, nl2br($this->_album->_description), $this->_album->_name, WS_URL . '?ctl=' . $this->_pid . '&album=' . $this->_album->_id); echo '<br/><span id="go_back_album"><a href="' . PATH . '?ctl=' . $this->_pid . '&album=' . VGet::album() . '">Go Back</a></span>'; if (VSession::renderer() != 'mobile') { //create comment section if ($this->_album->_allow_comment == 'open') { $c = new Comments($this->_album->_id); $c->display_content(); } else { Html::comment_closed(); } } }
/** * Build link for comments permalink * * @access private * @return string */ private function build_link() { switch ($this->_pid) { case 'posts': $link = 'ctl=posts&news=' . VGet::news(); break; case 'albums': $link = 'ctl=albums&&album=' . VGet::album(); break; } return $link; }