News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Mp3Tube BBCode Mod

Started by karlbenson, September 04, 2007, 10:40:45 PM

Previous topic - Next topic

karlbenson

Link to Mod



MP3TUBE BBCODE v1.0
By Karl Benson


Link to Mod | Comment On This Mod

Introduction
Adds [mp3tube][/mp3tube] bbcode to show mp3tube content.

Mp3Tube does not use the content id in the url, so when POSTING a valid mp3tube url, it will lookup the 32 character md5 hash from Mp3Tube and replace the url with the id. When the post is viewed it will not have to lookup to find the content id.  If a valid content id is found, it will shown in the Mp3Tube player.

Installation
Simply install the package to install this modification on the Default theme.

Manual edits will be required for non-default themes to insert the BBcode button onto the Post.template.php.
And a copy of the mp3tube.gif placed in the bbcode images folder for each theme (Themes/{themename}/images/bbc/)

Features
o BBCode Button to insert [mp3tube][/mp3tube] tags
- Finds the content id from full urls [mp3tube]http://www.mp3tube.net/musics/A-Sample-Title/12345/[/mp3tube]
- Supports  [mp3tube]68ebf76c0ba7ed1300b6164aac932033[/mp3tube]

Languages
English
English-utf8
Brazilian (Thanks to Softcore)
Brazilian-utf8 (Thanks to Softcore)

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
1.0 - 19th August 2007
o Initial release by request (softcore)

Sakae

Awesome mod... Thanks again, Karl.

This will save some of my server's bandwidth :)
http://www.tigrelog.com.br
l: simple p: machines

styckx


fireandsalt

It says "#Invalid Mp3tube link!#" yet I copied the URL directly and pasted it. What might be the problem? In case it helps in the troubleshooting, my YouTube BBCode mod works fine.

Thank you,

Ryan

karlbenson

This is much different than the youtube mod.

This is because Mp3tube doesnt use the exact video id in their url, so this mod has to retrieve the url.
It require file_get_contents function to be enabled.

Who is your host?, you may need to check whether them whether its enabled.

P.S  doesnt it work with other links, or for every link you try?

fireandsalt

#5
Quote from: karlbenson on September 14, 2007, 12:15:17 PM
This is much different than the youtube mod.

This is because Mp3tube doesnt use the exact video id in their url, so this mod has to retrieve the url.
It require file_get_contents function to be enabled.

Who is your host?, you may need to check whether them whether its enabled.

P.S  doesnt it work with other links, or for every link you try?
My host is trexhost.com. I'll try e-mailing them to enable that function. It does not work with any url. My Amazon mod does not work either, so maybe this is the problem for both of these mods.

fireandsalt

My host says it is already enabled. Any other suggestions?

karlbenson

See this post http://www.simplemachines.org/community/index.php?topic=188455.msg1208363#msg1208363

There is an attachment called test.php
Upload a copy of that then view it in your browser.

If file_get_contents is enabled, you will see the Harry Potter book listing on Amazon, if not, it will say there is an issue.

fireandsalt

OK, it must not be enabled. I recieved this error:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/bibletal/public_html/mp3/test.php on line 3

Warning: file_get_contents(http://www.amazon.com/dp/0545010225) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/bibletal/public_html/mp3/test.php on line 3
Problem

karlbenson

You are correct.
It is disabled.

Without the function the amazon mod, mp3tube mod, ebaumsworld mod, all won't work.

fireandsalt

Quote from: karlbenson on September 14, 2007, 02:54:20 PM
You are correct.
It is disabled.

Without the function the amazon mod, mp3tube mod, ebaumsworld mod, all won't work.

OK Thanks! I'll get on my provider to fix it!

karlbenson

alot of shared hosts are starting to limit such functions to try to manage performance on machines.

Usually overselling hosts can be the worse who try to pack as many clients onto shared servers and limit their resource usage.

sipko

#12
One little detail. Is it possible to adjust the code so you can see the song title in the MP3Tube box, like you do at the MPeTube site; example at this link:

http://www.mp3tube.net/musics/The-Turtles-Happy-Together/29163/

Note the song title 'The Turtles - Happy Together' on the top of the box. Is it possible to replicate this in the mod?

The way it is now you get Mp3Tube.net instead of the song title.   

Thanks for any input.

karlbenson

The Mp3tube.net code doesnt provide the song title.
Their player seems to be very different from the one they allow people to link to.

For the moment that functionality wouldn't be easy to add.

karlbenson

I have reuploaded this mod and screenshots for it.

I am in the process of doing it for ALL my other mods aswell.  Please bear with me.

myaicons

this would be an interesting mod to integrate with the user profile!  ;D

you know... a field that carries the code then displays as the player...

hint hint  :D
i scratch your back you scratch my back...
funny thing about my back is its located on my...

Peter2008

I did install this mod, but it didnt work. Now I did try to uninstall the mod and I get the following error:

Type Action Description
1. Execute Modification ./Sources/Subs.php Test failed
2. Execute Modification ./Sources/Subs-Post.php Test failed
3. Execute Modification ./Themes/default/languages/Modifications.english.php Test failed
4. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
5. Execute Modification ./Themes/default/languages/Modifications.brazilian-utf8.php Skipping file
6. Execute Modification ./Themes/default/languages/Modifications.brazilian.php Skipping file
7. Execute Modification ./Themes/default/Post.template.php Test failed
8. Delete File ./Themes/default/images/bbc/mp3tube.gif

Is there any way to make this mod works? Thanks in advance:)

karlbenson

Works for me. Although you need to be able to use file_get_contents which can be disallowed on some shared/cheap hosts.

If you want to uninstall, its probably being affected by another mod you installed afterwards, so you need to uninstall it manually. Use a package parser to tell you how to uninstall the mo
http://www.adrevenueshare.com/parser

Peter2008

Quote from: karlbenson on April 10, 2008, 02:32:49 PM
Works for me. Although you need to be able to use file_get_contents which can be disallowed on some shared/cheap hosts.

If you want to uninstall, its probably being affected by another mod you installed afterwards, so you need to uninstall it manually. Use a package parser to tell you how to uninstall the mo
http://www.adrevenueshare.com/parser [nofollow]
how should i use that? could u explain me please? thanks for ur reply.

Peter2008

Quote from: karlbenson on April 10, 2008, 02:32:49 PM
Works for me. Although you need to be able to use file_get_contents which can be disallowed on some shared/cheap hosts.

If you want to uninstall, its probably being affected by another mod you installed afterwards, so you need to uninstall it manually. Use a package parser to tell you how to uninstall the mo
http://www.adrevenueshare.com/parser [nofollow]

I did try to do that, but in the subs.php such codes doesnt exist. and the same goes to post.template.php
it is still like it wasnt installed at all. What to do now?

Advertisement: