Pimcore Soundcloud Consumer

Skip to end of metadata
Go to start of metadata

This depends on the OAuth plugin. Download and install this first.

During plugin installation two settings are automatically added to the website settings (Settings->Website): soundcloud_player_width and soundcloud_player_height . These settings modify the player width and height on your website. Adjust them to your needs if needed.

Before the plugin can be used, you will need to get a consumerKey and a consumerSecrect from Soundcloud.

  • register a new app -> http://soundcloud.com/you/apps
  • enter the key and the secret in the oauth plugins options settings within pimcore
  • allow the plugin access to your Soundcloud account by fetching an access token (just click connect button in the plugin options)
  • when you are redirected from soundcloud you should see a 'disconnect' button - all done, you are connected to Soundcloud

Here is how to use the plugin on your website:

soundcloud.php
<?php
	print $this->select(
			'soundcloudblock',
			array(
				'store' => array(
					array('tracks', 'Show tracks on soundcloud'),
					array('dropbox', 'Show Dropbox')
				),
				"onchange" => "editWindow.reload.bind(editWindow)"
			)
		);
?>

<?php if($this->editmode):?>
<?php print $this->input('username', array('width' => 200)); ?>
<?php endif; ?>

<?php
	$action = $this->select("soundcloudblock")->getData();
	$params = array(
		'username'	=> $this->input('username')->getData(),
		'title'		=> $this->input('title')->getData()
	);
	if($action) {
		print $this->action($action, 'frontend', 'Soundcloud', $params);
	}
?>

Put this view script into your blocks folder and make it choosable in your editables default (or wherever you want to have it). Now when you open a document in Pimcore and choose to include a Soundcloud block,  you have the possibility to show tracks or just a dropbox on the page. Don't forget to enter the username in the block. 

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.