1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Inserting ad within the thread

Discussion in 'Troubleshooting and Problems' started by Jeff Fuqua, Aug 29, 2014.

  1. Jeff Fuqua

    Jeff Fuqua Well-Known Member

    I had been using this code on a previous style (non-responsive) and it has worked well. Now, with a responsive style, it's creating some strange results. For example, if I produce the 6th post in a thread, and hit the submit button, I am taken to a new screen where it will be either blank or contains the ad.

    Here's what I am using:

    <xen:hook name="ad_message_below" />
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 5">
    <table style="background-color: #f5f7f8;" width="100%" border="0" cellspacing="0" cellpadding="0">
    <td style="padding-top: 15px; padding-bottom: 0px;"><div align="center"><div style="float:middle;">
    <!-- BEGIN RICH-MEDIA Burst Media CODE -->
    <script type="text/javascript" language="JavaScript">
    rnum=Math.round(Math.random() * 100000);
    if (window.self != window.top) {nf=''} else {nf='NF/'};
    document.write(ts+'script src="http://www.burstnet.com/cgi-bin/ads/ad12798a.cgi/v=2.3S/sz=300x250A/NZ/'+rnum+'/'+nf+'RETURN-CODE/JS/">'+ts+'/script>');
    </script><noscript><a href="http://www.burstnet.com/ads/ad12798a-map.cgi/ns/v=2.3S/sz=300x250A/" target="_top">
    <img src="http://www.burstnet.com/cgi-bin/ads/ad12798a.cgi/ns/v=2.3S/sz=300x250A/" border="0" alt="Click Here" /></a>
    <!-- END Burst Media CODE --></div>
    <div style="clear:both"></div>
    Anything stand out as being something which might cause some issues?
  2. Walter

    Walter Well-Known Member

    I had the blank page issue too and I added the following to prevent it:

    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 5 AND {$firstPost} AND !{$message.conversation_id}">
  3. Jeff Fuqua

    Jeff Fuqua Well-Known Member

    Thanks. Would that put an ad after the first post as well? And conversations? I really just want it after the sixth.
  4. Walter

    Walter Well-Known Member

    No, only on the 6th
    Jeff Fuqua likes this.
  5. Jeff Fuqua

    Jeff Fuqua Well-Known Member

    Outstanding. Thanks for taking the time to help.

Share This Page