getQuery(true); extract($vars); $titol_menu = JoomSEF::_getMenuTitle(@$option, @$task, @$Itemid); // Set title. $title = array(); switch($view){ case "artists": if (isset($letter)) { $letter = $letter ; } if (!empty($letter)) { $title[] = $letter; // Unset the original URL variable not to interfere anymore. unset($vars['letter']); } else{ $title[] = $titol_menu; } break; case "artist": if (isset($id) && $id != "") { $query = " SELECT letter,artist_name FROM #__muscol_artists WHERE id = ".$id ; $database->setQuery($query); $result = $database->loadObject(); } // Now message title read from DB is added as the next part of the SEF path. if (!empty($result)) { $title[] = $titol_menu; $title[] = $result->letter; $title[] = $result->artist_name; // Unset the original URL variable not to interfere anymore. unset($vars['id']); } break; case "songs": if (isset($id) && $id != "") { $query = " SELECT letter,artist_name FROM #__muscol_artists WHERE id = ".$id ; $database->setQuery($query); $result = $database->loadObject(); } // Now message title read from DB is added as the next part of the SEF path. if (!empty($result)) { $title[] = $titol_menu; $title[] = $result->letter; $title[] = $result->artist_name; $title[] = "songs"; // Unset the original URL variable not to interfere anymore. unset($vars['id']); } break; case "album": if (isset($id) && $id != "") { $query = " SELECT al.name, ar.letter, ar.artist_name FROM #__muscol_albums as al LEFT JOIN #__muscol_artists as ar ON ar.id = al.artist_id WHERE al.id = ".$id ; $database->setQuery($query); $result = $database->loadObject(); } // Now message title read from DB is added as the next part of the SEF path. if (!empty($result)) { $title[] = $titol_menu; $title[] = $result->letter; $title[] = $result->artist_name; $title[] = $result->name; // Unset the original URL variable not to interfere anymore. unset($vars['id']); } break; case "song": if (isset($id) && $id != "") { $query = " SELECT s.name, al.name as album_name, ar.letter, ar.artist_name FROM #__muscol_songs as s LEFT JOIN #__muscol_albums as al ON al.id = s.album_id LEFT JOIN #__muscol_artists as ar ON ar.id = al.artist_id WHERE s.id = ".$id ; $database->setQuery($query); $result = $database->loadObject(); } // Now message title read from DB is added as the next part of the SEF path. if (!empty($result)) { $title[] = $titol_menu; $title[] = $result->letter; $title[] = $result->artist_name; $title[] = $result->album_name; $title[] = $result->name; // Unset the original URL variable not to interfere anymore. unset($vars['id']); } break; case "file": if (isset($id) && $id != "") { $query = " SELECT s.name, s.filename, al.name as album_name, ar.letter, ar.artist_name FROM #__muscol_songs as s LEFT JOIN #__muscol_albums as al ON al.id = s.album_id LEFT JOIN #__muscol_artists as ar ON ar.id = al.artist_id WHERE s.id = ".$id ; $database->setQuery($query); $result = $database->loadObject(); } // Now message title read from DB is added as the next part of the SEF path. if (!empty($result)) { $title[] = $titol_menu; $title[] = $result->letter; $title[] = $result->artist_name; $title[] = $result->album_name; $title[] = $result->name; $title[] = $result->filename; // Unset the original URL variable not to interfere anymore. unset($vars['id']); } break; case "playlists": $title[] = $titol_menu; break; case "playlist": if (isset($id) && $id != "") { $query = " SELECT pl.* FROM #__muscol_playlists as pl WHERE pl.id = ".$id ; $database->setQuery($query); $result = $database->loadObject(); } // Now message title read from DB is added as the next part of the SEF path. if (!empty($result)) { $title[] = $titol_menu; $title[] = JText::_('Playlists'); $title[] = $result->title; // Unset the original URL variable not to interfere anymore. unset($vars['id']); } break; } $newUri = $uri; if (count($title) > 0) { $nonSefVars = array(); if( isset($format) ) $nonSefVars['format'] = $format; if( isset($type) ) $nonSefVars['type'] = $type; if( isset($task) && $task == "edit_playlist") $nonSefVars['task'] = $task; /* if( $sefConfig->appendNonSef && ($params->get('pagination', '0') != '0') ) { if( isset($limit) ) $nonSefVars['limit'] = $limit; if( isset($limitstart) ) $nonSefVars['limitstart'] = $limitstart; }*/ /*global $mainframe; print_r(@$vars['lang']); $mainframe->close();*/ $newUri = JoomSEF::_sefGetLocation($uri, $title, null, null, null, @$lang, $nonSefVars); } return $newUri; } } ?>