Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   [SOLVED] add this code in a widget (http://forum.bytesforall.com/showthread.php?t=12254)

lambdaka Jan 15, 2011 06:58 AM

[SOLVED] add this code in a widget
 
hello everyone,
I have this code working very well in a page.
Code:

<link href="http://www.your_site.com/your_path/css/sc-player.css" rel="stylesheet" type="text/css" />

<a href="http://soundcloud.com/your_artist/sets/remixes-edits" class="sc-player">My new dub track</a>

<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
<script type="text/javascript" src="http://www.your_site.com/your_path/js/soundcloud.player.api.js"></script>
<script type="text/javascript" src="http:www.your_site.com/your_path/js/sc-player.js"></script>

I would like to put in a widget, unfortunately it doesn't work when I put in a widget.
I would like to avoid iframe, cause it will be to complicate for the administrator to add players.

Does someone have a clue of how I can get it to work..?
Maybe I need to developpe a widget..? but how to start...?

I spend hours on the player to be as I need..I would like to be able to use it ! !
:):)
Thanks !

lmilesw Jan 15, 2011 07:07 AM

You can either install a widget that allows javascript or you could install the spectacu.la page plugin which allows you to use a page as a widget.

lambdaka Jan 15, 2011 07:20 AM

Hi,
ok thanks..
wasn't sure what was the problem..
and I didn't know that there is some widget can allow javascrip..
will search for one..
and will let you now..
thanks

lambdaka Jan 15, 2011 07:30 AM

Sorry My mistake, but it doesn't work on a page neither.
Didn't get anything with the javascript widget..

It works very well on a html page..?

any ideas..?

lmilesw Jan 15, 2011 07:39 AM

Sorry... I'm not all that familiar with javascript. It appears it is a player of some sort. Is there perhaps a plugin you could use instead of the javascript?

lambdaka Jan 15, 2011 10:34 AM

the player works with soundcloud..So I can't use another player.

But actually I didn't see that the code works perfectly on firefox (mac), but doesnt works on safari and chrome.. !
it make me think that he could works on all the web browser ! ;)
but how:confused:

lmilesw Jan 15, 2011 12:24 PM

I would check on their site. It appears they have some info on using their app in WordPress.

lambdaka Jan 16, 2011 05:08 AM

Hi,
thanks for your answers but I got it.
Were two different links for the jquery.js, one on the readme file and other on the online quick start..

So everything is fine, I don't put my api key yet and it's workin ! !

I put that code on the insert html:
Code:

<link href="http://www.your_site.com/your_path/css/sc-player.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.your_site.com/your_path/js/soundcloud.player.api.js"></script>
<script type="text/javascript" src="http://www.your_site.com/your_path/js/sc-player.js"></script>

and that code in the widget:

Code:

<a href="http://soundcloud.com/your_artist/sets" class="sc-player">My new dub track</a>
everything is fine.
If you want customise a player for stream your soundcloud set, tracks or favorite you can use :
https://github.com/soundcloud/soundcloud-custom-player

:):)


All times are GMT -6. The time now is 09:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.