Announcement

Collapse
No announcement yet.

SoundCloud BBCode

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Free Mod SoundCloud BBCode

    Integrate SoundCloud audio embed into your forums using custom BB Codes.

    Go to AdminCP > Custom BB Codes > Add New BB Code and enter the following information:

    Title: SoundCloud
    BB Code Tag Name: soundcloud
    Replacement:

    Code:
    <iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/{param}&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>
    Example: [soundcloud]TrackIdHere[/soundcloud]
    Other Options: Select Yes to all starting from "Remove Tag If Empty" option (for Button Image option, you could specify image path. If specified, a new button for this BB Code will appear in the editor)

    To find out the track ID in SoundCloud.com, click the Share button, then click Embed tab. The track ID is in the Code and Preview textbox. Check WordPress code checkbox to see the track ID more easily.

    Code:
    api.soundcloud.com/tracks/xxxxxxxxx
    where xxxxxxxxx is the track id (e.g. 123456789)

    So a sample BB Code posting would be:

    Code:
    [soundcloud]252827242[/soundcloud]
    and it would render like this:

    Click image for larger version  Name:	soundcloud.png Views:	1 Size:	30.3 KB ID:	5141
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    #2
    I added this. Works fine at https://forums.hosting/forum/other-f...xed-by-hinsley

    Many thanks for this mod glennrocksvb
    HostXNow - UK Web Hosting

    Comment


      #3
      I have got only:
      "You have not provided a valid SoundCloud URL. Learn more about using SoundCloud players"


      Need to write code:
      Code:
      <iframe allowtransparency="true" scrolling="no" frameborder="no" src="https://w.soundcloud.com/icon/?url=http%3A%2F%2Fsoundcloud.com%2Fundefined&color=orange_white&size=32" style="width: 32px; height: 32px;"></iframe>

      Comment


        #4
        Did you follow the steps mentioned in the first post?
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment


          #5
          This is amazing! Thank you!!

          I installed it on my brand new forum and it shows up in the signature of my sample post. I changed the height to 166 instead of 300, but either way, the picture gets cut off, as such:

          Click image for larger version

Name:	Screenshot 2019-10-17 19.28.26.png
Views:	292
Size:	438.0 KB
ID:	20543

          Is it possible to make the smaller view show up - the one I selected in the middle here? This way the avatar of the soundcloud song wouldn't get cut off if it isn't full size.
          Click image for larger version

Name:	Screenshot 2019-10-17 19.25.32.png
Views:	345
Size:	335.6 KB
ID:	20542

          Comment


            #6
            Selecting that one in the middle should automatically adjust/update the embed code. You don't have to change anything in the code. What you did was you selected the first one and then changed the height in the code.
            Helpful? Donate. Thanks!
            Buy me a coffeePayPal QR Code
            Fast VPS Host for vBulletin:
            A2 Hosting & IONOS

            Comment


              #7
              I see! It worked! Thank you . Donation heading your way. I am broke but I really appreciate all you've done here.

              Comment


              • glennrocksvb
                glennrocksvb commented
                Editing a comment
                Thanks, I appreciate it!
                Badges added to your postbit.

              #8
              This works great but I am wondering if there is a way to implement this using the track URL instead of the ID

              Comment


                #9
                AltBraKz, you could but anyone can put any URL even non-SoundCloud URLs.

                Try it with this replacement code (untested).

                HTML Code:
                <iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url={param}&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>
                Helpful? Donate. Thanks!
                Buy me a coffeePayPal QR Code
                Fast VPS Host for vBulletin:
                A2 Hosting & IONOS

                Comment


                  #10
                  Thanks I will try that tonight. Ah so someone could potentially embed malicious links using that too then.

                  Comment


                    #11
                    Yeah someone could but good thing SoundCloud seems to validate the passed URL and displays an error page if the URL is not a valid SoundCloud track URL.
                    Helpful? Donate. Thanks!
                    Buy me a coffeePayPal QR Code
                    Fast VPS Host for vBulletin:
                    A2 Hosting & IONOS

                    Comment


                      #12
                      It complains about the formating when I paste that code but lets me save it anyway but when I put a Soundcloud link in it says it's not a Soundcloud URL

                      Comment


                        #13
                        In the custom SoundCloud BBCode, make sure the "Disable Automatic Link Parsing Within This BB Code" option is set to Yes. Might as well set other "Disable" options to Yes.

                        As for the format warning, I think that's a bug as the HTML attributes are properly enclosed within double quotes. So you can ignore in this case.
                        Helpful? Donate. Thanks!
                        Buy me a coffeePayPal QR Code
                        Fast VPS Host for vBulletin:
                        A2 Hosting & IONOS

                        Comment


                          #14
                          Amazing! Thank you so much, this worked perfectly. So much easier not having to dig through the embed code to grab track ID. I sent you a coffee btw, although the help you've provided, I should have given enough for a few haha.

                          Comment

                          Users Viewing This Page

                          Collapse

                          There is 1 user viewing this forum topic.

                          • Guest Guest

                          Latest Posts

                          Collapse

                          Working...
                          X
                          Searching...Please wait.
                          An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                          Please push the back button and reload the previous window.'
                          An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                          Please push the back button and reload the previous window.'
                          An internal error has occurred and the module cannot be displayed.
                          There are no results that meet this criteria.
                          Search Result for "|||"