Music Block - Add Song Title
PermalinkIs there any way to configure the Music block to add the song title from the database? When I add an MP3 file it doesn't give me the option of adding the songs title. I think this would be a necessity for pages with more than 1 song.
Thanks
Normally, you'd add to the href:
onClick=”pageTracker._trackEvent(‘category’, ‘action’, ‘optional label’);”
Would one add this to the controller.php code that builds the div, or would it need to be embedded in the swf itself?
Thanks
Just to signal that I had to change some absolute paths in the controller.js and audio-player.config.js to make it work.
It would be appreciated for all the others users of C5, that you share some of the modifications you've made in the controller.js and audio-player.config.js.
Thanks.
Hmm... I really like the look of the player on the examples page. I've seen it on other blogs and things.
Adapt the audio-player.config.js first line to your configuration (for example, if concrete is the cms directory):
AudioPlayer.setup("/cms/blocks/audio_player/tools/player.swf"
Adapt controller.php two lines the same way : $this->addHeaderItem($html->javascript('/cms/blocks/audio_player/tools/audio-player.js'));
$this->addHeaderItem($html->javascript('/cms/blocks/audio_player/audio-player.config.js'));
I'll check this out and post my success when I have a chance.
Thanks for that.
And for any novice looking at this, to clarify, I edited as djes said, putting "/concrete5" in where "/cms" is in the example.
Thanks so much...
At first, I edited just like you said with "cms" added. That displayed the words "alternative content" where the player should be. Then, I changed that to "concrete5" instead and it worked, or so I thought.
However, once I log out and then try to look at the page it still says "alternative content". If I log into the dashboard and go to the page it shows the audio player, looking great. Once I log out it doesn't show anymore.
I did edit the colors and volume after I thought it was working and it displays the changes but still no player when I log out.
Hmmm...
What am I missing?
I really like the look & function of this block. What can I do?
Thank you for your help.
Are you sure you have altered the two urls in the controller and one in audio-player.config.js to match your installation?
I'm intending to produce a properly tested update for the block which will address this issue when I have a spare hour or two - will post here ASAP.
Yeah, I'm pretty sure I have all of that correct.
Here is what it says in the controller file now:
$this->addHeaderItem($html->javascript('/concrete5/blocks/audio_player/tools/audio-player.js')); $this->addHeaderItem($html->javascript('/concrete5/blocks/audio_player/audio-player.config.js'));
...and the audio-player.config.js is edited too with "concrete5" in place of "cms".
I attached text documents of my edited files below.
I thought it had started working the other day and I rebuilt the page and found some interesting "behavior". Once I added more than five players, all of a sudden the player would become "alternative content". Not just the new one but all the ones that looked good before. Then as I added even more (a had to try) the players would show up again.
I thought I had it working for a few minutes, testing it when logged out of C5, using different browsers etc. and eventually the "alternative content" message would show up instead of the players. Now I'm afraid that if I think it's working and leave it unattended it'll go wrong and my visitors will essentially get a broken page.
Is there some sort of player limit I can adjust? It may sound strange that the number of players would affect behavior, and maybe it doesn't, but those were the symptoms I was observing.
I am using the music block right now. I know the audio block can work, I really want it to, I just can't seem to figure out what's wrong. If I have to I'll wait for your update and see what I get.
Thank you again.
So I put two players up and they could be seen in edit mode. Once I put up the third, it returned to "alternative content".
Here's the link:
http://www.larsmortensen.com/concrete5/index.php/examples/auidio-bl...
Hmmm...
Thank you...
As I said above, if I have to wait for the update I will but this is a puzzling problem for sure.
As far as I can see when three instances of the player are put on the page the audio-player.js link in the header seem to be duplicated.
When five instances are included both js files are duplicated but the player still works because the last two files still load in the right order.
I will look into what is happening and try to come up with a fix.
I tried adding a few more to the page and it is still working.
I will wait a few hopurs and check again if it's still up.
Judging from the insight you posted above as to why the problem is there, I'm confused as to why it's working now without me changing any code.
Is it from the source url that my code get's the player from that has changed?
Anyway, I'll wait a touch more before changing my official sites page.
:)
I have the same problem here.
When I try to post Audio Player on this page I get "Alternative Content" instead of the player.
I check audio-player.config.js and controller.php and I guess everything is OK there.
Can you guys help me?
Thanks for all your time and effort.
We built a new block based on the standalone version of Martin Laine's Wordpress plugin.
Code is attached + you can see it working athttp://www.chrisflegg.com/lyrics/i_m_not_crazy_yet...