Lets say you run a free classified ads website. You need to insert some paid ads like banners or Google adwords between your free ads. Here is how you can do this.

Posted Image

PHPRunner 5.x, 6.x and 7.x

1. Open List page in Visual Editor and switch to HTML mode

2. Find the following code snippet
{BEGIN grid_row}


and insert the following after this snippet
{BEGIN showheader}<TR>
   
<TD colSpan=20>    
     
<H1>{$header}</H1></TD></TR>{END showheader}


3. Add the following code to List page BeforeProcess event. We need to reset the counter when page is loaded.

$_SESSION["rec_count"]=0;


4. Add BeforeMoveNextList (List page: After record processed) event:
if ($_SESSION["rec_count"]==5)
{
$row
["showheader"]=true;
$row
["header"]='<a href="http://www.xlinesoft.com/phprunner/">
<img src="http://www.xlinesoft.com/phprunner/images/banner01.gif">
</a>'
;
}
$_SESSION
["rec_count"]++;

Post a Comment