Help with Advertising Code

Discussion in 'vBulletin' started by Pigoo, Aug 14, 2019 at 2:00 PM.

  1. Pigoo

    Pigoo Enthusiast

    108
    73
    +20
    Hello all you experts out there.

    I'm working with a new advertising partner...and they provided me with some ad code for a video advertisement. Problem is...the video ad code doesn't seem to include any sizing information...so the video will play full size in whatever window size the browser is running. The larger the browser window...the larger the video ad...the smaller the window...the smaller the window the video will play in. No matter what size the browser window is...this video ad will play full-size in that window.

    I would like the video to play at a fixed size (let's say 700px wide)...no matter what size browser window is being used by the user.

    Here's the ad code I've been provided...can someone take a look at it...and please modify it with some code that will force it to run in a fixed size window (700px wide for example)...or please let me know what & where some code needs to be added so it runs in a fixed size window.

    <script>
    (function (d,s,n,id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s);
    js.id = id;
    js.className = n;
    js.src = "https://stream.xyz.com/embed/sdk.js?embedId=333cf05e-c1be-499e-53a2-1234c311fe7d";
    fjs.parentNode.insertBefore(js, fjs);
    }(document,'script’,’xyz-stream','stream-sdk-jssdk_xyz.com'));
    </script>
    <div id=“333cf05e-c1be-499e-53a2-1234c311fe7d"></div>


    Thanks very much.:)

    p.s. Website running vBulletin 4.2.5.
     
  2. BirdOPrey5

    BirdOPrey5 #Awesome

    4,197
    912
    +1,721
    You can try editing the last line but no way to know if it will work.

    Try changing the last line to:

    Code:
    <div id=“333cf05e-c1be-499e-53a2-1234c311fe7d" style="width:700px;"></div>
    
     
  3. Pigoo

    Pigoo Enthusiast

    108
    73
    +20
    Hello Bird0Prey5...thanks for giving it a shot. Unfortunately the advertising video still plays super big...and changes size if you increase or decrease the size of the browser window.

    Any more ideas? Please give it another try...and I'll test it.:)

    Thanks
     
  4. BirdOPrey5

    BirdOPrey5 #Awesome

    4,197
    912
    +1,721
    Well it's a one in a hundred shot but I would also try this:

    Code:
    <div style="width:700px; max-width:700px !important;">
    <div id=“333cf05e-c1be-499e-53a2-1234c311fe7d" style="width:700px; max-width:700px !important;"></div>
    </div>
    
     
  5. Pigoo

    Pigoo Enthusiast

    108
    73
    +20
    Hello again Bird0Prey5,

    Just so I'm 100% sure what I should be doing.

    Here's the original code:

    <script>
    (function (d,s,n,id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s);
    js.id = id;
    js.className = n;
    js.src = "https://stream.xyz.com/embed/sdk.js?embedId=333cf05e-c1be-499e-53a2-1234c311fe7d";
    fjs.parentNode.insertBefore(js, fjs);
    }(document,'script’,’xyz-stream','stream-sdk-jssdk_xyz.com'));
    </script>
    <div id=“333cf05e-c1be-499e-53a2-1234c311fe7d"></div>


    Here's the modified code (with the modification you last posted):

    <script>
    (function (d,s,n,id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s);
    js.id = id;
    js.className = n;
    js.src = "
    https://stream.xyz.com/embed/sdk.js?embedId=333cf05e-c1be-499e-53a2-1234c311fe7d";
    fjs.parentNode.insertBefore(js, fjs);
    }(document,'script’,’xyz-stream','stream-sdk-jssdk_xyz.com'));
    </script>
    <div style="width:700px; max-width:700px !important;">
    <div id=“333cf05e-c1be-499e-53a2-1234c311fe7d" style="width:700px; max-width:700px !important;"></div>
    </div>


    Is this modified code correct?

    Thanks again for the help.:)
     
  6. BirdOPrey5

    BirdOPrey5 #Awesome

    4,197
    912
    +1,721
    Yes that is correct.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.