Version Description
- Emergency fix linked to soundcloud server been attacked (DDoS): Added user-agent header to request.
Download this release
Release Info
Developer | realTM |
Plugin | SoundCloud Is Gold |
Version | 1.0.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.3.1 to 1.0.3.2
- readme.txt +41 -19
- soundcloud-is-gold-functions.php +1 -0
- soundcloud-is-gold.php +31 -6
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.mightymess.com/soundcloud-is-gold-wordpress-plugin
|
|
4 |
Tags: soundcloud, integrated, media, shortcode, browse, design, easy, simple, music, sound, js, live preview
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 3.2.1
|
7 |
-
Stable tag: 1.0.3.
|
8 |
|
9 |
Browse through your soundcloud tracks from a tab in the post's 'upload media'. Select, add a track to your post. Live preview, easy.
|
10 |
|
@@ -43,29 +43,20 @@ Check out my [TM soundcloud profile](http://www.soundcloud.com/t-m), more [might
|
|
43 |
That's just my opinion of course...
|
44 |
|
45 |
|
46 |
-
= How to use the shortcode manually =
|
47 |
-
|
48 |
-
If for some reason you wish to use the shortcode manually, like for embeding someone else tracks, you can use:
|
49 |
-
|
50 |
-
**[soundcloud id='10450254']**
|
51 |
-
|
52 |
-
This will use your default setting of with, classes, colors, autoplay, comments. (Replace *10450254* with the track id you want to show)
|
53 |
-
|
54 |
-
If you wish to have more control here is an example:
|
55 |
-
|
56 |
-
**[soundcloud id='10450254' comments='true' autoplay='false' playertype='Standard' width='100%' color='#005bff']**
|
57 |
-
|
58 |
-
|
59 |
= To Do List =
|
60 |
|
61 |
* V1.1: Advance Settings (change background color and comments color, playcounts, buy link, font, wmode, etc�)
|
|
|
|
|
|
|
62 |
* Possibility to add multiple users for thoses with multiple soundcloud account.
|
63 |
* Possibility to set a different user in the 'Soundcloud is Gold tab' to add tracks from different people.
|
64 |
* Add Soundcloud default Width to the options
|
65 |
* Style sortcode in TinyMCE (editor) because it would be cool and neat;
|
66 |
* Trigger live preview when changing Soundcloud user name
|
67 |
* Live search while typing a name in the user name field. So if you're looking for someone it's kind of easier.
|
68 |
-
*
|
|
|
69 |
|
70 |
|
71 |
== Installation ==
|
@@ -78,8 +69,37 @@ Just follow the usual procedure. Log on to your wordpress, go to plugin -> add n
|
|
78 |
|
79 |
= I can't see my tracks? =
|
80 |
|
81 |
-
*Have you entered your real username? Your username is what you see in your soundcloud url when you click your name in soundcloud or view public profile (e.g http://soundcloud.com/anna-chocola).
|
82 |
-
*Bare in mind is that all tracks that are set as private on soundcloud won't appear.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
= Can I request features? =
|
85 |
|
@@ -89,8 +109,6 @@ Yes, you can. If asked nicely and the requests are sensibles, I almost always in
|
|
89 |
|
90 |
Sometimes, I generaly keep a eye on my plugin's forums and website's comments. Bear in mind that I've got a full time job and a life, so I can't always help straight away.
|
91 |
|
92 |
-
|
93 |
-
|
94 |
== Upgrade Notice ==
|
95 |
|
96 |
When upgrading from 1.0.1 and earlier: All shortcode attributes are now lowercase (autoPlay is now autoplay, playerType is now playertype). Sorry about that but it's needed, so if you have some custom ones in your posts you will have to change those manually.
|
@@ -108,6 +126,10 @@ When upgrading from 1.0.1 and earlier: All shortcode attributes are now lowercas
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
111 |
= 1.0.3 and 1.0.3.1 =
|
112 |
* Fixed warning message related to xml not loading when allow_url_fopen is disable: Now using cURL as a first choice for getting xml, and then simplexml_load_file as a last desperate option. Thanks a million to Karl Rixon (http://www.karlrixon.co.uk/).
|
113 |
|
4 |
Tags: soundcloud, integrated, media, shortcode, browse, design, easy, simple, music, sound, js, live preview
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 3.2.1
|
7 |
+
Stable tag: 1.0.3.2
|
8 |
|
9 |
Browse through your soundcloud tracks from a tab in the post's 'upload media'. Select, add a track to your post. Live preview, easy.
|
10 |
|
43 |
That's just my opinion of course...
|
44 |
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
= To Do List =
|
47 |
|
48 |
* V1.1: Advance Settings (change background color and comments color, playcounts, buy link, font, wmode, etc�)
|
49 |
+
* Add Widget
|
50 |
+
* if no id is specified in the shortcode (e.g [soundcloud]), display the latest track.
|
51 |
+
* Posibility to access and add 'favorites' to post (thanks Bernd for the idea).
|
52 |
* Possibility to add multiple users for thoses with multiple soundcloud account.
|
53 |
* Possibility to set a different user in the 'Soundcloud is Gold tab' to add tracks from different people.
|
54 |
* Add Soundcloud default Width to the options
|
55 |
* Style sortcode in TinyMCE (editor) because it would be cool and neat;
|
56 |
* Trigger live preview when changing Soundcloud user name
|
57 |
* Live search while typing a name in the user name field. So if you're looking for someone it's kind of easier.
|
58 |
+
* Add 'activities' to a widget
|
59 |
+
* Iphone fall back with default browser html5 player.
|
60 |
|
61 |
|
62 |
== Installation ==
|
69 |
|
70 |
= I can't see my tracks? =
|
71 |
|
72 |
+
* Have you entered your real username? Your username is what you see in your soundcloud url when you click your name in soundcloud or view public profile (e.g http://soundcloud.com/anna-chocola).
|
73 |
+
* Bare in mind is that all tracks that are set as private on soundcloud won't appear.
|
74 |
+
* Have you got other soundcloud plugin installed? That generally happen as you've been 'shopping around', disable them or even delete them and this if it works.
|
75 |
+
|
76 |
+
= It's behaving strangely or working partially or I've check everything but it still doesn't work =
|
77 |
+
|
78 |
+
Here's a simple method to track down incompatibilities with plugins and themes:
|
79 |
+
|
80 |
+
* Disable all plugins
|
81 |
+
* Enable 'soundcloud is gold' and check if it works (add a track to a post to be sure)
|
82 |
+
* If it worked: enable the other plugins one by one and check if it breaks
|
83 |
+
* If it didn't worked: enable the default Worpress theme and check if it works (add a track to a post to be sure).
|
84 |
+
|
85 |
+
Remenber that even if a plugin is popular, most of the plugins are badly coded or the developer didn't follow Wordpress guidelines on plugin development. Therefor conflict happens. The method is useful not just for this plugin.
|
86 |
+
|
87 |
+
= Can't play my tracks on my iphone, ipad or ipod? =
|
88 |
+
|
89 |
+
Soundcloud doesn't currently give the possibility to developers to fall back to soundcloud html5 player if flash isn't installed or supported by the device. There are solutions but they are lengthy to implement and still not very user friendly. But as soon as it's possible it will be implemented.
|
90 |
+
|
91 |
+
= How can I use the shortcode manually? =
|
92 |
+
|
93 |
+
If for some reason you wish to use the shortcode manually, like for embeding someone else tracks, you can use:
|
94 |
+
|
95 |
+
**[soundcloud id='10450254']**
|
96 |
+
|
97 |
+
This will use your default setting of with, classes, colors, autoplay, comments. (Replace *10450254* with the track id you want to show)
|
98 |
+
|
99 |
+
If you wish to have more control here is an example:
|
100 |
+
|
101 |
+
**[soundcloud id='10450254' comments='true' autoplay='false' playertype='Standard' width='100%' color='#005bff']**
|
102 |
+
|
103 |
|
104 |
= Can I request features? =
|
105 |
|
109 |
|
110 |
Sometimes, I generaly keep a eye on my plugin's forums and website's comments. Bear in mind that I've got a full time job and a life, so I can't always help straight away.
|
111 |
|
|
|
|
|
112 |
== Upgrade Notice ==
|
113 |
|
114 |
When upgrading from 1.0.1 and earlier: All shortcode attributes are now lowercase (autoPlay is now autoplay, playerType is now playertype). Sorry about that but it's needed, so if you have some custom ones in your posts you will have to change those manually.
|
126 |
|
127 |
== Changelog ==
|
128 |
|
129 |
+
= 1.0.3.2 =
|
130 |
+
|
131 |
+
* Emergency fix linked to soundcloud server been attacked (DDoS): Added user-agent header to request.
|
132 |
+
|
133 |
= 1.0.3 and 1.0.3.1 =
|
134 |
* Fixed warning message related to xml not loading when allow_url_fopen is disable: Now using cURL as a first choice for getting xml, and then simplexml_load_file as a last desperate option. Thanks a million to Karl Rixon (http://www.karlrixon.co.uk/).
|
135 |
|
soundcloud-is-gold-functions.php
CHANGED
@@ -84,6 +84,7 @@ function get_soundcloud_is_gold_user_tracks($soundcloudIsGoldApiCall, $post_id){
|
|
84 |
//Set cURL Options
|
85 |
curl_setopt($soundcloudIsGoldCURL, CURLOPT_URL, $soundcloudIsGoldApiCall);
|
86 |
curl_setopt($soundcloudIsGoldCURL, CURLOPT_RETURNTRANSFER, true);//return a string
|
|
|
87 |
// Get XML as a string
|
88 |
$soundcloudIsGoldXmlString = curl_exec($soundcloudIsGoldCURL);
|
89 |
//Check for cURL errors
|
84 |
//Set cURL Options
|
85 |
curl_setopt($soundcloudIsGoldCURL, CURLOPT_URL, $soundcloudIsGoldApiCall);
|
86 |
curl_setopt($soundcloudIsGoldCURL, CURLOPT_RETURNTRANSFER, true);//return a string
|
87 |
+
curl_setopt($soundcloudIsGoldCURL, CURLOPT_USERAGENT, "user_agent : FOOBAR");
|
88 |
// Get XML as a string
|
89 |
$soundcloudIsGoldXmlString = curl_exec($soundcloudIsGoldCURL);
|
90 |
//Check for cURL errors
|
soundcloud-is-gold.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Soundcloud is Gold
|
4 |
Plugin URI: http://www.mightymess.com/soundcloud-is-gold-wordpress-plugin
|
5 |
Description: <strong><a href="http://www.mightymess.com/soundcloud-is-gold-wordpress-plugin">Soundcloud is gold</a></strong> integrates perfectly into wordpress. Browse through your soundcloud tracks from the 'soundcloud is gold' tab with the post's 'upload media' popup window. Select, set and add track to your post using the soundcloud player. Live Preview, easy, smart and straightforward. You can set default settings in the option page, choose your defaut soundcloud player (Mini, Standard, Artwork), its width, extra classes for you CSS lovers and your favorite colors. You'll still be able to set players to different settings before adding to your post if you fancy a one off change.
|
6 |
-
Version: 1.0.3.
|
7 |
Author: Thomas Michalak at Mighty Mess
|
8 |
Author URI: http://www.mightymess.com/thomas-michalak
|
9 |
License: GPL2 or Later
|
@@ -127,11 +127,36 @@ function soundcloud_is_gold_options(){
|
|
127 |
$soundcloudIsGoldWidthSettings = get_option('soundcloud_is_gold_width_settings');
|
128 |
$soundcloudIsGoldClasses = get_option('soundcloud_is_gold_classes');
|
129 |
$soundcloudIsGoldColor = get_option('soundcloud_is_gold_color');
|
130 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
//$soundcouldMMapiCall = PLUGIN_DIR.'tracks.xml';
|
132 |
-
|
133 |
-
if($
|
134 |
-
foreach($
|
135 |
$soundcouldMMId = (string)$soundcloudMMLatestTrack->id;
|
136 |
$soundcouldMMShortcode = '[soundcloud id='.$soundcouldMMId.']';
|
137 |
}
|
@@ -208,7 +233,7 @@ function soundcloud_is_gold_options(){
|
|
208 |
</ul>
|
209 |
</li>
|
210 |
<li class="soundcloudMMBox"><label>Live Preview <small>(your latest track)</small></label>
|
211 |
-
<?php if($
|
212 |
<p class="soundcloudMMEmbed soundcloudMMEmbedOptions" style="text-align:center;">
|
213 |
<!-- Soundcloud Preview here -->
|
214 |
</p>
|
3 |
Plugin Name: Soundcloud is Gold
|
4 |
Plugin URI: http://www.mightymess.com/soundcloud-is-gold-wordpress-plugin
|
5 |
Description: <strong><a href="http://www.mightymess.com/soundcloud-is-gold-wordpress-plugin">Soundcloud is gold</a></strong> integrates perfectly into wordpress. Browse through your soundcloud tracks from the 'soundcloud is gold' tab with the post's 'upload media' popup window. Select, set and add track to your post using the soundcloud player. Live Preview, easy, smart and straightforward. You can set default settings in the option page, choose your defaut soundcloud player (Mini, Standard, Artwork), its width, extra classes for you CSS lovers and your favorite colors. You'll still be able to set players to different settings before adding to your post if you fancy a one off change.
|
6 |
+
Version: 1.0.3.2
|
7 |
Author: Thomas Michalak at Mighty Mess
|
8 |
Author URI: http://www.mightymess.com/thomas-michalak
|
9 |
License: GPL2 or Later
|
127 |
$soundcloudIsGoldWidthSettings = get_option('soundcloud_is_gold_width_settings');
|
128 |
$soundcloudIsGoldClasses = get_option('soundcloud_is_gold_classes');
|
129 |
$soundcloudIsGoldColor = get_option('soundcloud_is_gold_color');
|
130 |
+
$soundcloudIsGoldApiCall = 'http://api.soundcloud.com/users/'.$soundcloudIsGoldUser.'/tracks.xml?limit=1&client_id=9rD2GrGrajkmkw5eYFDp2g';
|
131 |
+
|
132 |
+
//Set Error default message && default XML state
|
133 |
+
|
134 |
+
$soundcloudIsGoldRespError = false;
|
135 |
+
$soundcloudIsGoldResp = false;
|
136 |
+
//Check is cURL extension is loaded
|
137 |
+
if(extension_loaded("curl")){
|
138 |
+
// create a new cURL resource
|
139 |
+
$soundcloudIsGoldCURL = curl_init();
|
140 |
+
//Set cURL Options
|
141 |
+
curl_setopt($soundcloudIsGoldCURL, CURLOPT_URL, $soundcloudIsGoldApiCall);
|
142 |
+
curl_setopt($soundcloudIsGoldCURL, CURLOPT_RETURNTRANSFER, true);//return a string
|
143 |
+
curl_setopt($soundcloudIsGoldCURL, CURLOPT_USERAGENT, "user_agent : FOOBAR");
|
144 |
+
// Get XML as a string
|
145 |
+
$soundcloudIsGoldXmlString = curl_exec($soundcloudIsGoldCURL);
|
146 |
+
//Check for cURL errors
|
147 |
+
if($soundcloudIsGoldXmlString === false) $soundcloudIsGoldRespError = 'Curl error: ' . curl_error($soundcloudIsGoldCURL);
|
148 |
+
//No cURL Errors: Load the call and captured xml returned by the API
|
149 |
+
else $soundcloudIsGoldResp = simplexml_load_string($soundcloudIsGoldXmlString);
|
150 |
+
// close cURL resource, and free up system resources
|
151 |
+
curl_close($soundcloudIsGoldCURL);
|
152 |
+
}
|
153 |
+
//No cURL: Try loading the XML directly with simple_xml_load_file
|
154 |
+
else $soundcloudIsGoldResp = simplexml_load_file($soundcloudIsGoldApiCall);
|
155 |
+
|
156 |
//$soundcouldMMapiCall = PLUGIN_DIR.'tracks.xml';
|
157 |
+
//$soundcloudIsGoldResp = simplexml_load_file($soundcloudIsGoldApiCall);
|
158 |
+
if($soundcloudIsGoldResp){
|
159 |
+
foreach($soundcloudIsGoldResp as $soundcloudMMLatestTrack){
|
160 |
$soundcouldMMId = (string)$soundcloudMMLatestTrack->id;
|
161 |
$soundcouldMMShortcode = '[soundcloud id='.$soundcouldMMId.']';
|
162 |
}
|
233 |
</ul>
|
234 |
</li>
|
235 |
<li class="soundcloudMMBox"><label>Live Preview <small>(your latest track)</small></label>
|
236 |
+
<?php if($soundcloudIsGoldResp) :?>
|
237 |
<p class="soundcloudMMEmbed soundcloudMMEmbedOptions" style="text-align:center;">
|
238 |
<!-- Soundcloud Preview here -->
|
239 |
</p>
|