Jump to content

IP.Board 3.1.0 Dev Update: Ad Code Integration Part 2

Recommended Posts

Yesterday we showed IP.Board 3.1's ad code integration for the first time, today we'd like to give a quick update on the status of this new feature.

First of all, we were excited to read all of the positive feedback and great suggestions. We like to write these blog entries before features are 'set in stone', so that we can more easily and quickly include suggestions from our customers.

Group Setting

In response to your feedback, we've included a new setting that will allow you to hide ads for specified groups.


Ad Placement

Another common concern was the placement of ads within topic view. While we are not going to add an additional setting that gives you the option of showing the ad inside the first post, we do want to show you how easy it is to accomplish this. The ad code is passed into the template bit along with the first post, so you can move it any place you like within in that first post. Here is the code to display the ad:

<if test="adCodeCheck:|:$post['post']['_adCode']">



By default, we have this setup so that the ad is placed after the first post is completely printed. However, if you would like the ad displayed inside the first post, all you need to do is move that display code and place it after this code:

<if test="postSignature:|:$post['post']['signature']">



The same is true of the other ad codes, it's very easy to move them to any place in the template that you would like. Modification Developers There are also a few functions that may be of interest to modification developers. If you want to give users the ability to show ads in your mods, you can easily check permissions before displaying the ad using this new function: IPSAdCode::userCanViewAds(). This will return true/false depending on if the user can view ads or not. Much like the board index, forum view, and topic view, you can have your modification set it it's own global header/footer ads by using a simple function:

IPSAdCode::setGlobalCode( 'header', $yourHeaderAd );

IPSAdCode::setGlobalCode( 'footer', $yourFooterAd );

Once again, thank you for the great feedback!

View full blog entry

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...