The board's server will undergo upgrade maintenance tonight, Nov 5, 2014, beginning approximately around 10 PM ET. Prepare for some possible down time during this process.
What if it was set up similar to the URL code so it's something like [bandcamp=ALBUMID]track number[\bandcamp]?
It would at least be a syntax that's somewhat familiar to codes we already use.
I don't know how that would work when you're embedding the full set (meaning there's no track number). We'd have to be able to write a code that does "if there's a track number use the code for the track player otherwise use the code for the album player", and while this is easily doable in general I'm not certain the custom BBcode feature of the board allows it.
Or did you mean having this code as a separate BBcode for embedding tracks?
The if/then statement regarding the track is ideal, but is it the end of the world having 2 codes?
No it's no big deal, just not very user-friendly and intuitive. But I don't think we'll have a better option anyway. It's up to the admins now.
@Sarge, that looks like an older version of bc's html code. It looks like this now:
Code:
<iframe style="border: 0; width: 100%; height: 120px;" src="http://bandcamp.com/EmbeddedPlayer/album=ALBUM_ID/size=medium/bgcol=ffffff/linkcol=0687f5/t=TRACK_NUMBER/transparent=true/" seamless><a href="http://immunerecordings.bandcamp.com/album/with-endless-fire">With Endless Fire by Ilyas Ahmed</a></iframe>
Similar to the album code but with that extra 't=track_number' in the URL. Actually, bandcamp is really fucking with us as there are two different codes for embedding a track ( ) depending on whether you're embedding a track that's part of an album (in this case it's what I posted above) or whether it's a single track that exists on its own, in which case it's:
Code:
<iframe style="border: 0; width: 100%; height: 120px;" src="http://bandcamp.com/EmbeddedPlayer/track=412663488/size=medium/bgcol=ffffff/linkcol=0687f5/transparent=true/" seamless><a href="http://footracks.bandcamp.com/track/2-5-1-backing-track-in-c-180-bpm">2-5-1 backing track in C - 180 BPM by Foo Tracks</a></iframe>
They're not making this easy. I think I'm going to ask them if there's a way to embed just from the URL like soundcloud does.
Alternatively, I think there might be a better way to do this that only uses one bbcode for every case while making it much easier/intuitive for the user. I don't have the time to go into details right now but basically instead of using the bandcamp iframe directly, we'd use an iframe that points to a script hosted on tsis.com.
That script would receive the text typed by the poster within the bbcode and sort it all out with PHP programming. If the parameter is just a number, you display the album player code, if it's a string with both album and track, use the corresponding code, etc.
This would be both the easiest and the most elegant. I'll try to clarify later if it doesn't make sense.
Alternatively, I think there might be a better way to do this that only uses one bbcode for every case while making it much easier/intuitive for the user. I don't have the time to go into details right now but basically instead of using the bandcamp iframe directly, we'd use an iframe that points to a script hosted on tsis.com.
Go to any bandcamp page, doesn't matter if it's an album, a specific track off an album or an standalone track, click on embed/share, pick any player, select either the wordpress or html code and paste it into the form field. It will display a medium-sized player regardless of which size you chose, thought it was easier that way. It also works if you just use the album ID.
So what the TSIS admins would have to do is upload that kind of script on the server (I've put the code source below, feel free to use it or to make your own version) and then have a new custom BBcode that would look like this:
elseif (preg_match('#track=([0-9]+)\D#', $_GET['bc_string'], $track)) { // if a track ID is included, use the standalone track player echo '<iframe style="border: 0; width: 100%; height: 120px;" src="http://bandcamp.com/EmbeddedPlayer/track='.$track[1].'/size=medium/bgcol=ffffff/linkcol=0687f5/transparent=true/" seamless></iframe>';
}
elseif (preg_match('#album=([0-9]+)\D#', $_GET['bc_string'], $album)) { // if album ID is included
if(preg_match('#[ /]t=([0-9]+)\D#', $_GET['bc_string'], $track)) { // if a track number is included, play that track echo '<iframe style="border: 0; width: 100%; height: 120px;" src="http://bandcamp.com/EmbeddedPlayer/album='.$album[1].'/size=medium/bgcol=ffffff/linkcol=0687f5/t='.$track[1].'/transparent=true/" seamless></iframe>'; }
else { // otherwise use the standard full album player echo '<iframe style="border: 0; width: 100%; height: 120px;" src="http://bandcamp.com/EmbeddedPlayer/album='.$album[1].'/size=medium/bgcol=ffffff/linkcol=0687f5/transparent=true/" seamless></iframe>'; } } ?>
That *should* work
The evenbetterest way though would be to just use the URL of the track/album you want to embed and have the script make a request via the Bandcamp API and get the corresponding album/track ID. But they're not handing out any more developer keys for now and you can't use the API without one.
Joined: Tue September 24, 2013 5:56 pm Posts: 47034 Location: In the oatmeal aisle wearing a Shellac shirt
LoathedVermin72 wrote:
Does anyone know of any still-operating, trustworthy sites that convert SoundCloud links to MP3s? All the ones I used to use seem to be defunct now.
I don't know of any sites, but if you're on a Mac, Black Hole is a free program that would let you route the audio from the site into Garageband or Audacity.
Joined: Sun May 25, 2014 9:32 pm Posts: 31614 Location: Garbage Dump
tragabigzanda wrote:
LoathedVermin72 wrote:
Does anyone know of any still-operating, trustworthy sites that convert SoundCloud links to MP3s? All the ones I used to use seem to be defunct now.
I don't know of any sites, but if you're on a Mac, Black Hole is a free program that would let you route the audio from the site into Garageband or Audacity.
Recording my computer's audio never even occurred to me. Duh! Thank you!
Users browsing this forum: No registered users and 15 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum