Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to add BBcode for Soundcloud

edited September 2010 in Vanilla 2.0 - 2.8
Here is the Soundcloud BBcode for forums:
<object height="81" width="100%"><param name="movie" value="{param}&g=bb"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="81" src="{param}&g=bb" type="application/x-shockwave-flash" width="100%"></embed></object> <a href="{param}">{param}</a>

I went to library/core/class.format.php and made all {param} variables with \\1
$Mixed2 = preg_replace("#\[soundcloud\](.*?)\[/soundcloud\]#si",'<object height="81" width="100%"><param name="movie" value="\\1&g=bb"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="81" src="\\1&g=bb" type="application/x-shockwave-flash" width="100%"></embed></object> <a href="\\1">\\1</a>',$Mixed2);

When you type: [soundcloud][/soundcloud] in most forums it must show the SC player!

But the result here is shown as:

param name="movie" value=" height="81" src="

Where is the problem? I hope for a help :)



  • Options
    Bump... No answer! I think some vanilla coders can help me
  • Options
    Hey friends how to add the stupid SoundCloud BBcode
  • Options
    edited December 2010
    i'm also trying to make this work. i've been playing around with class.format.php, i've got the player to show in the posts, but it's not getting the url so it shows 'this track is not available'...

    my class.format.php has this code:

    $Mixed2 = preg_replace("#\[sc\](.*?)\[/sc\]#si",'<object height="81" width="100%"><param name="movie" value=""\\1&g=bb"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="81" src=""\\1&g=bb" type="application/x-shockwave-flash" width="100%"></embed></object>',$Mixed2);

    i think it has something to do with the quotation of the url ("")

    any clues?

Sign In or Register to comment.