The code will not work from the ad box in the admin panel but will work from the emplate post.
Code: 
 <if test="adCodeCheck:|:in_array($post['post']['post_count'],array(1,5,count($post))&&in_array( $this->request['f'],array(1,12,15) ) ">
             http://***/torrent.php*****YOU_REFF&s={$topic['title']}&f={$topic['title']}
        </if>
Be sure to leave something in the ad box in admin panel.
like this :
Code: 
 <!-- where code should have went -->