9 years ago
4
Topic

Hello, How is add upload audio files to material


I have upload form, 

user upload audio file in Material Editor

and add description for that 

and file is saved,

    --  How will show this upload file in this new material by audio player


 audio player I have

if you can please Help.


Get a VIP membership
9 years ago
0
Level 1

Hello when108,

welcome on SEBLOD forum.

You can use a a field "upload_file" to get audio file.

Then in the content view you have differents solution :

  1. Using a field Beforerender to add the player on your field
  2. Using a position override
  3. Using a variation

in all case, you have to write some custom code to add the player.


Best regards.

Lionel

9 years ago
0
Level 1

thank you, I'll learn

9 years ago
0
Level 1

Hello! I have solution for that

I have found it here  http://www.seblod.pro/forum/32-seblod-3-x-dlya-joomla-3-x/4012-resheno-galereya-dlya-otdelnykh-papok#5235

I want to show you it

1. Make field "upload_file" in storage write your value (in my way it's .audio_1.) (my defalt folder is audio)

2. In intro make freeText field 

- save- select "2"

- then in Typography select HTML 

- click on the plus 

- in the form put this

 <audio src="/audio/$cck->getValue('audio_1'); " controls></audio>


WHERE 'audio_1'  your value in the storage

and 'audio/'   this is my folder


Thise is HTML5 audio we can show audio player without plugin

http://www.w3schools.com/html/html5_audio.asp

I think it will be usefull for someone


But now I have a question

How I can use one field 'upload_file' and save files to different folders.  

for example: I have 3 audio files and I want to save them to 3 different folders. (but I don't want use id) I need name folders.


thanks for the answers

1283 Posts
Bucklash
9 years ago
0
Level 1

+1

Get a VIP membership