/** * Prepares the document */ protected function _prepareDocument($params) { //Get url query $artist = base64_decode(JRequest::getVar('artist')); $album = base64_decode(JRequest::getVar('album')); $genre = base64_decode(JRequest::getVar('cat')); $app = JFactory::getApplication(); //load javascript and css script $document = JFactory::getDocument(); // add style sheet if ($this->params->get('css_type', 'pj_css') == 'pj_css') { $document->addStyleSheet(JURI::root(true) . '/components/com_playjoom/assets/css/playlist_view.css'); $document->addStyleSheet(JURI::base(true) . '/components/com_playjoom/assets/css/album_view.css'); } //Pathway settings $pathway = $app->getPathway(); if ($genre) { $pathway->addItem($genre, PlayJoomHelperRoute::getPJlink('genres', '&cat=' . JRequest::getVar('cat') . '&catid=' . JRequest::getVar('catid'))); $pathway->addItem($artist, PlayJoomHelperRoute::getPJlink('artists', '&artist=' . JRequest::getVar('artist') . '&cat=' . JRequest::getVar('cat') . '&catid=' . JRequest::getVar('catid'))); } else { $pathway->addItem($artist, PlayJoomHelperRoute::getPJlink('artists')); } $pathway->addItem($album, PlayJoomHelperRoute::getPJlink('albums')); //Set Page title $this->document->setTitle($app->getCfg('sitename') . ' - ' . $album . ' von ' . $artist); }
static function getIndexHTML() { global $mainframe; $url_alphacontent = "index.php?option=com_playjoom&view=alphabetical&Itemid=" . JRequest::getVar('Itemid'); $url_alphacontent = PlayJoomHelperRoute::getPJlink('alphabetical', null); $alphabeticalindex = @explode(",", 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z'); $alphabeticalbar = modAlphabeticalBarHelper::getAlphabeticalBarModule($alphabeticalindex, $url_alphacontent); return array($alphabeticalbar); }
/** * Prepares the document */ protected function _prepareDocument() { //Get url query $album = base64_decode(JRequest::getVar('album')); $app = JFactory::getApplication(); $pathway = $app->getPathway(); //$pathway->addItem($cat, PlayJoomHelperRoute::getPJlink('artists')); if (isset($this->genre->id)) { $pathway->addItem($this->genre->title, PlayJoomHelperRoute::getPJlink('genres', '&catid=' . $this->genre->id)); } if (isset($this->genre->title)) { //Set Page title $this->document->setTitle($app->getCfg('sitename') . ' - Genre: ' . $this->genre->title); } }
/** * Prepares the document */ protected function _prepareDocument($params) { $app = JFactory::getApplication(); $document = JFactory::getDocument(); // add style sheet if ($this->params->get('css_type', 'pj_css') == 'pj_css') { $document->addStyleSheet(JURI::base(true) . '/components/com_playjoom/assets/css/filter.css'); $document->addStyleSheet(JURI::root(true) . '/components/com_playjoom/assets/css/playlist_view.css'); } //Pathway settings if (JRequest::getVar('LetterForAlphabetical')) { $pathway = $app->getPathway(); $pathway->addItem(JRequest::getVar('LetterForAlphabetical'), PlayJoomHelperRoute::getPJlink('alphabetical', '&LetterForAlphabetical=' . JRequest::getVar('LetterForAlphabetical'))); } //Set Page title $this->document->setTitle($app->getCfg('sitename') . ' - ' . JRequest::getVar('LetterForAlphabetical')); }
default: $cover_counter = null; foreach ($this->items as $i => $item) { //Get list of albums for this artist $album_list = PlayJoomModelAlphabetical::getAlbumList($item->artist); //Check for albumname as sampler $SamplerCheck = PlayJoomHelper::checkForSampler($item->album, $item->artist); if (!$SamplerCheck) { $artistname = JText::_('COM_PLAYJOOM_ALBUM_SAMPLER'); } else { $artistname = $item->artist; } $genresting = base64_encode($item->category_title); $artiststing = base64_encode($item->artist); $genrelink = PlayJoomHelperRoute::getPJlink('genres', '&catid=' . $item->catid); $artistlink = PlayJoomHelperRoute::getPJlink('artists', '&artist=' . $artiststing); //Configuration of the modal windows $modal_artist_config = "{handler: 'iframe', size: {x: " . $this->params->get('modal_infoabout_size_v', 600) . ", y: " . $this->params->get('modal_infoabout_size_h', 500) . "}}"; $modal_album_config = "{handler: 'iframe', size: {x: " . $this->params->get('modal_infoabout_size_v', 600) . ", y: " . $this->params->get('modal_infoabout_size_h', 500) . "}}"; $modal_genre_config = "{handler: 'iframe', size: {x: " . $this->params->get('modal_infoabout_size_v', 600) . ", y: " . $this->params->get('modal_infoabout_size_h', 500) . "}}"; $AboutInfo = array('artist' => base64_encode($item->artist), 'album' => null, 'genre' => $genresting); /* * - Check for additional artist infos * - and whether the button is active */ if ($this->params->get('show_additional_info_artist_alphabetical', 0) == 1) { $ArtistChecker = PlayJoomHelper::getInfoButton('artist', $AboutInfo, $modal_artist_config, $this->params); } else { $ArtistChecker = null; } /*
$counter = null; foreach ($this->items as $i => $item) { //Create strings $albumsting = base64_encode($item->album); $artiststing = base64_encode($item->artist); //Check for sampler $SamplerCheck = PlayJoomHelper::checkForSampler($item->album, $item->artist); if ($SamplerCheck) { $artistname = JText::_('COM_PLAYJOOM_ALBUM_SAMPLER'); } else { $artistlink = PlayJoomHelperRoute::getPJlink('artists', '&artist=' . $artiststing); $artistname = '<a href="' . $artistlink . '">' . $item->artist . '</a>'; } //Create links $albumlink = 'index.php?option=com_playjoom&view=album&album=' . $albumsting . '&artist=' . $artiststing . '&Itemid=' . JRequest::getVar('Itemid'); $genrelink = PlayJoomHelperRoute::getPJlink('genres', '&catid=' . $item->catid); //Get Album thumbnail if ($this->params->get(JRequest::getVar('view') . '_show_cover', 1) == 1) { $cover = new PlayJoomHelperCover(); $coverthumb = $cover->getCoverHTMLTag($albenitem, $SamplerCheck); } $genre = null; $counter++; echo '<tr>'; echo '<td>' . $counter . '</td>'; echo '<td>' . $artistname . '</td>'; echo '<td><a href="' . $albumlink . '" title="Continue to the album view" rel="Image ' . $counter . '" class="image">' . $coverthumb . $item->album . '</a></td>'; echo '<td><a href="' . $genrelink . '" title="Continue to the genre view">' . $item->category_title . '</a></td>'; echo '<td>' . $item->year . '</td>'; echo '</tr>'; }
protected static function _findItem($needles = null) { $app = JFactory::getApplication(); $menus = $app->getMenu('site'); // Prepare the reverse lookup array. if (self::$lookup === null) { self::$lookup = array(); $component = JComponentHelper::getComponent('com_playjoom'); $items = $menus->getItems('component_id', $component->id); foreach ($items as $item) { if (isset($item->query) && isset($item->query['view'])) { $view = $item->query['view']; if (!isset(self::$lookup[$view])) { self::$lookup[$view] = array(); } if (isset($item->query['id'])) { self::$lookup[$view][$item->query['id']] = $item->id; } } } } if ($needles) { foreach ($needles as $view => $ids) { if (isset(self::$lookup[$view])) { foreach ($ids as $id) { if (isset(self::$lookup[$view][(int) $id])) { return self::$lookup[$view][(int) $id]; } } } } } else { $active = $menus->getActive(); if ($active) { return $active->id; } } return null; }
} } $countdiff = $maxcount - $mincount; foreach ($list as $item) { if ($countdiff == 0) { $fontsize = $minsize; } else { $fontsize = $minsize + ($maxsize - $minsize) / $countdiff * ($item->count - $mincount); } ?> <span class="tag"> <a class="tag-name" style="font-size: <?php echo $fontsize . 'em'; ?> " href="<?php echo JRoute::_(PlayJoomHelperRoute::getTagRoute($item->tag_id . ':' . $item->alias)); ?> "> <?php echo htmlspecialchars($item->title); ?> </a> <?php if ($display_count) { ?> <span class="tag-count badge badge-info"><?php echo $item->count; ?> </span> <?php }