Forums

wp-banner? (6 posts)

  1. albinoazn
    Member
    Posted 1 year ago #

    Ok, I want to put some advertisement banners on my website, so I downloaded and installed wp-banner. I added a 'client' in the management section, but I don't know how to insert the banner into the page. I went to the plugin homepage, but I didn't understand the instructions. Can somebody dumb them down for me?

    Thank you,
    -Jake Moore

  2. albinoazn
    Member
    Posted 1 year ago #

    Am I allowed to bump after two days?

  3. whooami
    Member
    Posted 1 year ago #

    I went to the plugin homepage

    save us the work, dumb that down. where did you go, link, url, where the instructions are that you read?

  4. albinoazn
    Member
    Posted 1 year ago #

  5. meth0
    Member
    Posted 1 year ago #

    The Author's website illuminates nothing in regards to positioning banners using div tags. It doesn't help that the code used to nest the banner div in a parent element doesn't work. So to save anyone else the hassle...

    After installing the plug-in: -

    1) Open plugins/wp-banner/js/tools.js

    FIND: parentName.appendChild(banner); (line 38)
    REPLACE: parentName.appendChild(banner);
    WITH: document.getElementById(parentName).appendChild(banner);

    2) Decide where you want to display the div banner within the WP theme, you'll need the element tag, id, or class name. By default, it displays as the first div in WP's "container" div. If you want to make the banner display in the "header" div for example, you have to modify the plugin. Open plugins/wp-banner/banner.php

    FIND: echo "<script>InsertElement('id','bannerHook','bannerdiv')</script>"; (~line 110)
    REPLACE: echo "<script>InsertElement('id','content','bannerdiv')</script>";
    WITH: echo "<script>InsertElement('id','header','bannerdiv')</script>";

    The final step would be to modify the banner css (plugins/wp-banner/styles/default.css -> #bannerdiv{}) to fit your theme and if required, the theme's css (#header) as well.

  6. meth0
    Member
    Posted 1 year ago #

    p.s the patch only works with positioning within an id tag.

Topic Closed

This topic has been closed to new replies.

About this Topic