• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Position of Ads' Script ?

Scheduled Pinned Locked Moved Technical Support
11 Posts 2 Posters 2.9k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nullcxN Offline
    nullcxN Offline
    nullcx
    wrote on last edited by
    #1

    Hello

    I am having issues to position my ads script on my page. I don't know where I have to insert the code that I have from my Ad-publishing company. Here's an example what I am trying to accomplish.

    0_1457780921776_Capture.JPG

    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by
    #2

    Those areas are part of the page background. Is placing the ad in the background an option for you? I think that would be the most effective if so.

    nullcxN 1 Reply Last reply
    0
  • nullcxN Offline
    nullcxN Offline
    nullcx
    replied to yariplus on last edited by
    #3

    @yariplus ok, tell me how to put it in the footer then ?:)

    yariplusY 1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    replied to nullcx on last edited by
    #4

    @nullcx It depends a lot on how your script inserts the ad, since pages are loaded dynamically.

    You may be able to use global footer HTML widget. Some scripts don't like being inserted that way though.

    If your script refreshes the ad automatically, an easier way might be to just edit the footer.tpl file in your theme's template folder and insert it before the </body> tag.

    nullcxN 1 Reply Last reply
    0
  • nullcxN Offline
    nullcxN Offline
    nullcx
    replied to yariplus on last edited by
    #5

    @yariplus

    I've tried to put the script @ Global footer - but nothing shows up? Will it work if I edit footer.tpl directly ?

    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by yariplus
    #6

    It depends on the script. It may work on the footer, but the footer is only ever loaded once.

    You may need the script altered to be used with dynamic content such as the HTML widget. Google for instance, has a special way of setting up dynamic ads.

    nullcxN 1 Reply Last reply
    0
  • nullcxN Offline
    nullcxN Offline
    nullcx
    replied to yariplus on last edited by yariplus
    #7

    @yariplus
    This is the code:

    <script type="text/javascript"><!--
        adwise_w = 640;
        adwise_h = 220;
        adwise_publisher_id = 1894;
        adwise_channel_id = 1;
        adwise_ads = 4;
        //-->
    </script>
    <script type="text/javascript" src="//i.adwise.bg/context/context-0.1.js">
    </script>
    
    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by
    #8

    It should work in the footer, but it looks like it's just a static ad, and will never refresh. It uses document.write, so it cannot be used in a widget without modification.

    nullcxN 1 Reply Last reply
    0
  • nullcxN Offline
    nullcxN Offline
    nullcx
    replied to yariplus on last edited by
    #9

    @yariplus

    What the modification should looks like ?

    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by
    #10

    I'm not an expert here, but possibly just by replacing document.write with document.body.insertBefore
    https://jsfiddle.net/60h4cx5z/

    nullcxN 1 Reply Last reply
    0
  • nullcxN Offline
    nullcxN Offline
    nullcx
    replied to yariplus on last edited by
    #11

    @yariplus

    Where this Javascript and HTML should be put in ? Which file ?

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development