solved Adding Lyrics button to Audio Profile and Audio List if lyrics are Available.

alt=
@luis789
5 years ago
88 posts
Hello All.
I've been asked to Add some time of notice button in the audio profile next to the song description if a lyrics for that song is available.
The user will have the option to click in the button and then it will link to the song profile that contains the lyrics. See image below and maybe it will make more sense what I'm trying to accomplish. Most of the times the users only listen the songs from the songs/charts or audio profile, but no often goes to the song profile or are aware that the lyrics are available for the song that they are listening. Some help with coding for the profile and the Audio list will be great.
lyrics.png
lyrics.png  •  32KB


updated by @luis789: 08/16/19 02:43:47AM
michael
@michael
5 years ago
7,715 posts
First thing to do is to add a form field of type 'textarea' to the audio CREATE and UPDATE screens for the audio module so your artists have a place to add the lyrics into. To do that, you use the Form Designer

Docs: "Using the Form Designer"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/1275/using-the-form-designer

Call the new form field 'audio_lyrics'. Once its created your artists should be able to write the lyrics in there and save it along with the songs or use the UPDATE button to adjust the lyrics.

Thats all you need to do for the input side of things. That data will be stored along with all the other audio information.

Next you need to adjust the template locations where you want that info to be displayed, for that you need to adjust the templates:

Docs: "Using the Template Editor"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/3183/using-the-template-editor

In the location of your screenshot, figure out which template controls that area, then open it in the template editor. You will see the other audio_???? outputs like audio_title. Take note of the format its in, if it looks like this:
{$item.audio_title}
then you can use that same format to output the lyrics
{$item.audio_lyrics}

Get to that point first. From there the rest is just styling.

Tags