Changeset 533694
- Timestamp:
- 04/19/2012 08:25:37 PM (14 years ago)
- Location:
- spotify-embed-creator/trunk
- Files:
-
- 5 edited
-
Admin-pages/Spotify-Search-Page.php (modified) (4 diffs)
-
Admin-pages/edit-post-box.php (modified) (3 diffs)
-
Api/Spotify-Request-handler.php (modified) (2 diffs)
-
Readme.txt (modified) (2 diffs)
-
Spotify-Embed-Creator.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
spotify-embed-creator/trunk/Admin-pages/Spotify-Search-Page.php
r532145 r533694 2 2 if (is_user_logged_in ()): 3 3 // get the plugin base url 4 $pluginRoot = plugins_url('', __DIR__);4 $pluginRoot = plugins_url('', dirname( __FILE__ )); 5 5 $sec = new SpotifyEmbedCreator(); 6 6 wp_enqueue_script('SpotifyEmbedCreator'); … … 68 68 var query = jQuery('#artist-search').val(); 69 69 console.log("Ska söka artist: " + query); 70 search_spotify("artist", query );70 search_spotify("artist", query, ""); 71 71 }); 72 72 jQuery('#album-do-search').bind('click', function(event) { 73 73 var query = jQuery('#album-search').val(); 74 74 console.log("Ska söka album: " + query); 75 search_spotify("album", query );75 search_spotify("album", query, ""); 76 76 }); 77 77 jQuery('#song-do-search').bind('click', function(event) { 78 78 var query = jQuery('#song-search').val(); 79 79 console.log("Ska söka låt: " + query); 80 search_spotify("track", query );80 search_spotify("track", query, ""); 81 81 }); 82 82 }); 83 function search_spotify(type, query )83 function search_spotify(type, query, path) 84 84 { 85 85 jQuery("#spotify-result-container").html("Searching..."); … … 88 88 jQuery.ajax({ 89 89 type: "POST", 90 url: "<?php echo $pluginRoot ?> /Api/Spotify-Request-handler.php",90 url: "<?php echo $pluginRoot ?>" + path + "/Api/Spotify-Request-handler.php", 91 91 async: true, 92 92 timeout: 50000, … … 122 122 }, 123 123 error: function(data) { 124 console.log("misslyckades"); 125 alert("Gick dåligt"); 124 if(data.status == 404) 125 { 126 alert("Something went wrong with the url (seems to happend on Binero)"); 127 } 128 else 129 { 130 console.log("misslyckades"); 131 alert("Something went wrong"); 132 } 126 133 } 127 134 }); -
spotify-embed-creator/trunk/Admin-pages/edit-post-box.php
r533079 r533694 1 1 <?php 2 2 // get the plugin base url 3 $pluginRoot = plugins_url('', __DIR__);3 $pluginRoot = plugins_url('', dirname( __FILE__ )); 4 4 $sec = new SpotifyEmbedCreator(); 5 5 wp_enqueue_script('SpotifyEmbedCreator'); … … 66 66 var query = jQuery('#artist-search').val(); 67 67 console.log("Ska söka artist: " + query); 68 search_spotify("artist", query );68 search_spotify("artist", query, ""); 69 69 }); 70 70 jQuery('#album-do-search').bind('click', function(event) { 71 71 var query = jQuery('#album-search').val(); 72 72 console.log("Ska söka album: " + query); 73 search_spotify("album", query );73 search_spotify("album", query, ""); 74 74 }); 75 75 jQuery('#song-do-search').bind('click', function(event) { 76 76 var query = jQuery('#song-search').val(); 77 77 console.log("Ska söka låt: " + query); 78 search_spotify("track", query );78 search_spotify("track", query, ""); 79 79 }); 80 80 }); … … 130 130 }, 131 131 error: function(data) { 132 console.log("misslyckades"); 133 alert("Gick dåligt"); 132 if(data.status == 404) 133 { 134 alert("Something went wrong with the url (seems to happend on Binero)"); 135 } 136 else 137 { 138 console.log("misslyckades"); 139 alert("Something went wrong"); 140 } 134 141 } 135 142 }); -
spotify-embed-creator/trunk/Api/Spotify-Request-handler.php
r533328 r533694 1 1 <?php 2 2 3 require_once( __DIR__. '/../../../../wp-config.php');3 require_once(dirname( __FILE__ ) . '/../../../../wp-config.php'); 4 4 5 5 if ( is_user_logged_in() ) … … 31 31 } 32 32 // write it as json 33 //header('HTTP/1.1 404 Page Not Found'); 33 34 header('Cache-Control: no-cache, must-revalidate'); 34 35 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); -
spotify-embed-creator/trunk/Readme.txt
r533328 r533694 4 4 Requires at least: 3.0 5 5 Tested up to: 3.3 6 Stable tag: 1.0. 36 Stable tag: 1.0.4 7 7 8 8 Search for Album or Track on Spotify and create a Spotify Play Button. … … 35 35 == Changelog == 36 36 37 = 1.0.4 = 38 * dirname(__FILE__) instead of __DIR__ since it didn't work everywhere 39 37 40 = 1.0.3 = 38 41 * Uses file_get_contents() if curl isn't installed -
spotify-embed-creator/trunk/Spotify-Embed-Creator.php
r533328 r533694 5 5 Plugin URI: http://slowmove.se/wordpress-plugin-spotify-embed-creator/ 6 6 Description: Search for Album or Song on Spotify and create a Spotify Play Button 7 Version: 1.0. 37 Version: 1.0.4 8 8 Author: Erik Johansson 9 9 Author URI: http://slowmove.se
Note: See TracChangeset
for help on using the changeset viewer.