MyBB Community Forums

Full Version: Looking to add 400px-100px banner image to header
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good day all.

I am looking to add a vendor banner image  (400px-100px) to the right of the logo in the header.  So it would theoretically be in the area shown in the image below.  I want it to rotate through multiple images that are provided by my vendor accounts on the forum.  I have found a couple of scripts that will work using JS.  However, I am having difficulty placing this location of the image within the space so it is not behind the menu top_links.  In other words they are slightly over top of the bottom of the image.  See the area in red below.

I want the images to rotate at an interval that I select and be able to easily add or remove images as necessary.  I can provide the JS I have found that kind of works if you like.  Any ideas from the community?

Thank you in advance for any help or suggestions provided.

Allen



[Image: banner%20space.png]

I have a couple test images looping right now for you to see what I want.  This solution will work as long as I can move it up 5-10px or so. Click the link below to see the action. They are set to rotate every 10 secs now.

https://www.allensoffroad.com/forum/
You have already added image in header area properly, add this css code and it will show in the right side

#adLink1 {

    float: right;
    margin-top: -120px;

}

But you also want to randomize the ad banner. Have you tried My Advertisement plugin ?
https://community.mybb.com/mods.php?action=view&pid=39

It randomized ad codes/banner in a particular zone on each page refresh.

My suggestion is to try this plugin and add multiple banners in the ad zone Smile
Just a side note: 400px x 100px is a non-standard ad banner size.

IAB specified standard web ad banner sizes are here:
https://en.wikipedia.org/wiki/Web_banner
(11-30-2018, 04:25 AM)WallBB Wrote: [ -> ]You have already added image in header area properly, add this css code and it will show in the right side

#adLink1 {

    float: right;
    margin-top: -120px;

}

But you also want to randomize the ad banner. Have you tried My Advertisement plugin ?
https://community.mybb.com/mods.php?action=view&pid=39

It randomized ad codes/banner in a particular zone on each page refresh.

My suggestion is to try this plugin and add multiple banners in the ad zone Smile

Thank you WallBB.  Now the quetion is where would I add that exactly.  I am not a css person.  I know enough to modify and edit to see what works, but not enough to know where to put it unless told. 

Edit:  There are currently only two images as a testing platform.  I am rotating through the two 5 times currently.  As vendors come on board, and provide banner images, they will be added to the rotation.

(11-30-2018, 05:20 AM)effone Wrote: [ -> ]Just a side note: 400px x 100px is a non-standard ad banner size.

IAB specified standard web ad banner sizes are here:
https://en.wikipedia.org/wiki/Web_banner

Thank you for the reference.  I understand it is not a std size.  The issue is the space created by the logo size and the way it is laid out.  I like the look now, so, fitting it into available space is where I am at. 

Allen

Also WallBB,

the plugin you suggested I looked at.  Below is the main reason that I did not use it.


Quote:By default, there are three zones:
* Header
* Footer
* Postbit

These cannot be deleted and are automatically added to the templates.

I am not looking to drive revenue that way.  The banner images are to show the vendors on the forum and provide links to their individual categories.  The income will be driven to me via vendor association and having them direct customers to me for all sales.  They are there in a supportive/informational roll only.

Thank you again.

(11-30-2018, 04:25 AM)WallBB Wrote: [ -> ]You have already added image in header area properly, add this css code and it will show in the right side

#adLink1 {

    float: right;
    margin-top: -120px;

}

But you also want to randomize the ad banner. Have you tried My Advertisement plugin ?
https://community.mybb.com/mods.php?action=view&pid=39

It randomized ad codes/banner in a particular zone on each page refresh.

My suggestion is to try this plugin and add multiple banners in the ad zone Smile

It actually ended up in global.css and the following.  Well, for full browser window anyway.  Thanks for the help.  I am sure that some day there will be a fully responsive version of MYBB and I will start all over.

#adLink1 {

    float: right;
    margin-top: 9px;

}