From de9865a4f25c47d205eb9fd0b7189891bd21de45 Mon Sep 17 00:00:00 2001 From: Git Date: Thu, 28 Jun 2012 08:00:13 +0000 Subject: [PATCH] Empty commit --- sections/ajax/index.php | 6 ++ sections/ajax/similar_artists.php | 28 ++++++++ sections/artist/artist.php | 86 ++++++++++++++++++++++-- sections/login/disabled.php | 2 +- static/functions/artist_cloud.js | 106 ++++++++++++++++++++++++++++++ static/functions/tagcanvas.js | 21 ++++++ 6 files changed, 243 insertions(+), 6 deletions(-) create mode 100644 sections/ajax/similar_artists.php create mode 100644 static/functions/artist_cloud.js create mode 100644 static/functions/tagcanvas.js diff --git a/sections/ajax/index.php b/sections/ajax/index.php index 18b33040..55d11225 100644 --- a/sections/ajax/index.php +++ b/sections/ajax/index.php @@ -92,6 +92,12 @@ case 'better': require(SERVER_ROOT.'/sections/ajax/better/index.php'); break; + case 'password_validate': + require(SERVER_ROOT.'/sections/ajax/password_validate.php'); + break; + case 'similar_artists': + require(SERVER_ROOT.'/sections/ajax/similar_artists.php'); + break; default: // If they're screwing around with the query string print json_encode(array('status' => 'failure')); diff --git a/sections/ajax/similar_artists.php b/sections/ajax/similar_artists.php new file mode 100644 index 00000000..dd8a3d05 --- /dev/null +++ b/sections/ajax/similar_artists.php @@ -0,0 +1,28 @@ +query(" + SELECT + s2.ArtistID, + ag.Name, + ass.Score + FROM artists_similar AS s1 + JOIN artists_similar AS s2 ON s1.SimilarID=s2.SimilarID AND s1.ArtistID!=s2.ArtistID + JOIN artists_similar_scores AS ass ON ass.SimilarID=s1.SimilarID + JOIN artists_group AS ag ON ag.ArtistID=s2.ArtistID + WHERE s1.ArtistID=".$artist_id." + ORDER BY ass.Score DESC + LIMIT 14"); + + + while(list($ArtistID, $Name, $Score) = $DB->next_record(MYSQLI_NUM, false)){ + if($Score<0){ + continue; + } + $results[] = array('id' => (int) $ArtistID, 'name' => $Name, 'score' => (int) $Score); + } + +print json_encode($results); +exit(); +?> diff --git a/sections/artist/artist.php b/sections/artist/artist.php index 92c3d76a..67658f8c 100644 --- a/sections/artist/artist.php +++ b/sections/artist/artist.php @@ -801,14 +801,90 @@ function compare($X, $Y){ ?>
-
Similar artist map
-
+
+ Similar Artist Map + +
+
write_artists(); ?> -
-
-0 ?> +
+ + + +0 + +if($NumSimilar>0) { ?> + + + + + + + +
Artist info
full_format($Body)?>
diff --git a/sections/login/disabled.php b/sections/login/disabled.php index 96aad8c2..1c9ac45c 100644 --- a/sections/login/disabled.php +++ b/sections/login/disabled.php @@ -10,7 +10,7 @@ Be honest - at this point, lying will get you nowhere.


-Before joining the disabled channel please read our
"Golden Rules" which can be found here.


+Before joining the disabled channel please read our
Golden Rules which can be found here.