We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 4f940c13 authored by Mike Sheldon's avatar Mike Sheldon

Remove 'Recommended' tab from user profiles and put recommended and mix...

Remove 'Recommended' tab from user profiles and put recommended and mix stations in the radio stations tab
parent 55333b81
......@@ -6,7 +6,7 @@ RewriteRule ^user/([^/]+)/journal/?$ user-journal.php
RewriteRule ^user/([^/]+)/groups/?$ user-groups.php?user=$1 [B,NC]
RewriteRule ^user/([^/]+)/recent-tracks/?$ user-recent-tracks.php?user=$1 [B,NC,QSA]
RewriteRule ^user/([^/]+)/stats/?$ user-stats.php?user=$1 [B,NC]
RewriteRule ^user/([^/]+)/station/?$ user-station.php?user=$1 [B,NC]
RewriteRule ^user/([^/]+)/station/?$ user-station.php?user=$1 [B,NC,QSA]
RewriteRule ^user/([^/]+)/recommended/?$ user-recommended.php?user=$1 [B,NC]
RewriteRule ^artist/([^/]+)/track/([^/]+)/?$ track.php?artist=$1&track=$2 [B,NC]
RewriteRule ^artist/([^/]+)/album/([^/]+)/track/([^/]+)/?$ track.php?artist=$1&album=$2&track=$3 [B,NC]
......
......@@ -27,8 +27,7 @@ function user_menu($user, $active_page) {
array('name' => 'Recent Tracks', 'url' => $user->getURL('recent-tracks'))
);
if($user->hasLoved()) {
$submenu[] = array('name' => 'Radio Station', 'url' => $user->getURL('station'));
$submenu[] = array('name' => 'Recommended', 'url' => $user->getURL('recommended'));
$submenu[] = array('name' => 'Radio Stations', 'url' => $user->getURL('station'));
}
if($user->name == $this_user->name) {
$submenu[] = array('name' => 'Edit', 'url' => $user->getURL('edit'));
......
......@@ -40,10 +40,15 @@ try {
}
if(isset($user->name)) {
if(isset($_GET['type'])) {
$type = $_GET['type'];
} else {
$type = 'loved';
}
$smarty->assign('me', $user);
$smarty->assign('pagetitle', $user->name . '\'s Radio Station');
$smarty->assign('pagetitle', $user->name . '\'s Radio ' . ucfirst($type) . ' Station');
$station = 'librefm://user/' . $user->name . '/loved';
$station = 'librefm://user/' . $user->name . '/' . $type;
if(isset($this_user)) {
$radio_session = $this_user->getRadioSession($station);
} else {
......@@ -53,6 +58,7 @@ if(isset($user->name)) {
$submenu = user_menu($user, 'Radio Station');
$smarty->assign('submenu', $submenu);
$smarty->assign('type', $type);
$smarty->assign('headerfile', 'maxiprofile.tpl');
$smarty->display('user-station.tpl');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment