Page 1 of 1

Ads/image/code between links of dlp

PostPosted: Fri Apr 24, 2015 3:40 pm
by aryan481
hello.
is there any way to add ads/image/HTML code between links which have protracted?

i can add something in sidebar/harder/footer but any way to add between links ?something which will be show between links on all links protracted pages ?


thank You

Re: Ads/image/code between links of dlp

PostPosted: Mon Apr 27, 2015 8:25 am
by SamEA
After how many lines do you wish to add an advert? You could simply check how many links there are by checking the array size and for example dividing it by two to insert an advert halfway through the links.

Re: Ads/image/code between links of dlp

PostPosted: Tue Apr 28, 2015 9:06 am
by aryan481
after half of page or just after 5 links,

i found this in index page :
Code: Select all
<center>
<p>Hidden Links:<BR>
<?php
$fop =  fopen('./files/'.$_GET['ID'].'.dlp', 'r');
$links = fread($fop, filesize('./files/'.$_GET['ID'].'.dlp'));
fclose($fop);
$links = explode("\n", $links);
$arrayNo = count($links);
$i = 0;
while ($links[$arrayNo] <> $links[$i]) {
?>
<p><a href="<?php echo $links[$i];?>"><?php echo $links[$i];?></a></p>
<?php
$i++;
}
?>
</center>


does i need to enter code after $arrayNo = count($links); ?

Re: Ads/image/code between links of dlp

PostPosted: Sun May 10, 2015 6:17 pm
by SamEA
To display ads in between the links:

Find:
Code: Select all
while ($links[$arrayNo] <> $links[$i]) {
?>


Replace with:

Code: Select all
while ($links[$arrayNo] <> $links[$i]) {
if($i == round(($arrayNo - 1) /2)) {
?>

<!--YOUR HTML CODE HERE-->

<?php
}
?>

Re: Ads/image/code between links of dlp

PostPosted: Fri Jun 12, 2015 9:48 pm
by aryan481
thank you very much :D :D

Re: Ads/image/code between links of dlp

PostPosted: Tue Jun 16, 2015 4:19 am
by SamEA
No problem :)