- Posts: 6
COMMUNITY FORUM
Found a way to add .mp3 files!
- hleen
-
Topic Author
- Offline
- New Member
When the allVideos plugin is installed, you can add mp3 support to K2 (version 2.1) by changing a single file:
In
administrator\components\com_k2\models\items.php
change line 380
to
if ($videotype == 'flv' || $videotype == 'swf' || $videotype == 'wmv' || $videotype == 'mov' || $videotype == 'mp4' || $videotype == '3gp' || $videotype == 'divx' || $videotype == 'mp3') {
Be aware that you have to set the video path in AllVideos to the path of K2:
media/k2/videos
Success!
Please Log in or Create an account to join the conversation.
- Alyanna Allah
-
- Offline
- New Member
- Posts: 2
Please Log in or Create an account to join the conversation.
- Shea Dawson
-
- Offline
- New Member
- Posts: 12
Thanks!
Please Log in or Create an account to join the conversation.
- FeSys
-
- Offline
- Elite Member
- Posts: 262
I love you "hleen"
I am asking for this method long time ago Here.. Thank you so much.
Please Log in or Create an account to join the conversation.
- FeSys
-
- Offline
- Elite Member
- Posts: 262
Have you tied to make the same above hack work for downloads too
I did play the mp3 files remotely and via upload too using your method above.
Thanks again.
Please Log in or Create an account to join the conversation.
- hleen
-
Topic Author
- Offline
- New Member
- Posts: 6
I do not see a problem with upload/download. I can upload an mp3 as attachment, it is the shown in the item and I can download it. Of course, as attachment you do not get the mp3 player in the item. Could you explain what you mean?
hleen
Followeyes said:Just one more thing "hleen" Have you tied to make the same above hack work for downloads too
I did play the mp3 files remotely and via upload too using your method above.
Thanks again.
Please Log in or Create an account to join the conversation.
- Manny Santos
-
- Offline
- Senior Member
- Posts: 49
I guess some other file.php which deals with uploading probably has to changed to allow mp3 files as a valid upload.
Please Log in or Create an account to join the conversation.
- FeSys
-
- Offline
- Elite Member
- Posts: 262
I mean that, you make it easy with your nice hack above to put any mp3 file to work remotely too (not only as uploaded method).. hence, would be nice to add little hack(s) to allow those remotely attached mp3 files to be downloaded as play at the same time. This will create a super multimedia for video/Audio with downloading features too.
Thanks
Please Log in or Create an account to join the conversation.
- hleen
-
Topic Author
- Offline
- New Member
- Posts: 6
you might need to add the following settings to your global site config:
Legal Extensions (File Types) - add ,mp3,MP3
Legal Image Extensions (File Types) - add ,mp3 (just to be sure :-)
Check MIME Types; set to No (just to be sure)
Legal MIME Types: add ,audio/mp3
Have luck!
Manukat said:Edited the file but still got errors " Not a valid video file" when choosing the "Upload video" method on the video tab. I guess some other file.php which deals with uploading probably has to changed to allow mp3 files as a valid upload.
Please Log in or Create an account to join the conversation.
- Stéphane Herby
-
- Offline
- New Member
- Posts: 12
I have made all modification you have mentionned.
Except the fact that in K2 2.2, there's two lines to change (400 AND 604) - I have also change configuration as mentionned above, but I still have this "Invalid video file" when I try to upload a MP3 file. Any suggestion about that ?
Joomla 1.5.15
K2 2.2
AllVideo 3.1
Please Log in or Create an account to join the conversation.
- hleen
-
Topic Author
- Offline
- New Member
- Posts: 6
Lance said:I think I found a solution... In addition to the steps listed above, edit this file:
administrator\components\com_k2\models\item.php
Change line 433 from this:
$validExtensions = array('flv', 'swf', 'wmv', 'mov', 'mp4', '3gp', 'avi', 'divx');
to this:
$validExtensions = array('flv', 'swf', 'wmv', 'mov', 'mp4', '3gp', 'mp3', 'avi', 'divx');
and change line 478 from this:
if ($videotype == 'flv' || $videotype == 'swf' || $videotype == 'wmv' || $videotype == 'mov' || $videotype == 'mp4' || $videotype == '3gp' || $videotype == 'divx') {
to this:
if ($videotype == 'flv' || $videotype == 'swf' || $videotype == 'wmv' || $videotype == 'mov' || $videotype == 'mp4' || $videotype == '3gp' || $videotype == 'mp3' || $videotype == 'divx') {
I hope this helps everyone!
Lance
Stéphane Herby said:hi hleen, I have made all modification you have mentionned. Except the fact that in K2 2.2, there's two lines to change (400 AND 604) - I have also change configuration as mentionned above, but I still have this "Invalid video file" when I try to upload a MP3 file. Any suggestion about that ?
Joomla 1.5.15
K2 2.2
AllVideo 3.1
Please Log in or Create an account to join the conversation.
- FidelGonzales
-
- Offline
- Premium Member
- Posts: 95
I would think it might be wise to add another audio tab. Thanks.
Please Log in or Create an account to join the conversation.
- Jaime Steele
-
- Offline
- New Member
- Posts: 6
Many thanks
jaime
Please Log in or Create an account to join the conversation.
- odam fm
-
- Offline
- New Member
- Posts: 2
why not in the core mates?
Please Log in or Create an account to join the conversation.
- LeroanZ
-
- Offline
- New Member
- Posts: 18
Please Log in or Create an account to join the conversation.
- Brian Teeman
-
- Offline
- New Member
- Posts: 2
administrator\components\com_k2\models\item.php and that the line numbers have changed in later releases of k2
Please Log in or Create an account to join the conversation.
- Farid
-
- Offline
- Junior Member
- Posts: 28
can anybody help me?!
I've done all the hacks above but still I can't see mp3 files in editor
Please Log in or Create an account to join the conversation.
- odam fm
-
- Offline
- New Member
- Posts: 2
Please Log in or Create an account to join the conversation.