Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

[SOLVED] add this code in a widget


  #1  
Old Jan 15, 2011, 07:58 AM
lambdaka's Avatar
lambdaka
 
94 posts · Apr 2010
France
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 !

Last edited by lambdaka; Jan 16, 2011 at 06:12 AM.
  #2  
Old Jan 15, 2011, 08:07 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
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.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Jan 15, 2011, 08:20 AM
lambdaka's Avatar
lambdaka
 
94 posts · Apr 2010
France
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
  #4  
Old Jan 15, 2011, 08:30 AM
lambdaka's Avatar
lambdaka
 
94 posts · Apr 2010
France
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..?
  #5  
Old Jan 15, 2011, 08:39 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
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?
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #6  
Old Jan 15, 2011, 11:34 AM
lambdaka's Avatar
lambdaka
 
94 posts · Apr 2010
France
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
  #7  
Old Jan 15, 2011, 01:24 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I would check on their site. It appears they have some info on using their app in WordPress.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #8  
Old Jan 16, 2011, 06:08 AM
lambdaka's Avatar
lambdaka
 
94 posts · Apr 2010
France
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


Last edited by lambdaka; Jan 16, 2011 at 06:12 AM.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add Google Analytics code TheSurvivalMom Forum How-To 3 Apr 15, 2011 03:58 AM
How to add adbrite code in the center column. Please Help. jack512 Center area post/pages 1 Apr 3, 2010 11:08 PM
How to add php code to a 'single' page JakeThePeg Center area post/pages 8 Mar 21, 2010 02:21 AM
Google Analystic not shown even I add the code... yosh66 Plugins & Atahualpa 6 Jul 9, 2009 03:37 PM
I'm not sure what file I need add code for the sidebar jockoe Atahualpa 3 Wordpress theme 0 Mar 18, 2009 10:45 AM


All times are GMT -6. The time now is 01:38 AM.


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