Ads/image/code between links of dlp

All support enquiries for other DaddyScripts' scripts go in here...

Ads/image/code between links of dlp

Postby aryan481 » Fri Apr 24, 2015 3:40 pm

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
aryan481
Standard Member
 
Posts: 11
Joined: Sun Oct 05, 2014 2:11 pm

Re: Ads/image/code between links of dlp

Postby SamEA » Mon Apr 27, 2015 8:25 am

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.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Ads/image/code between links of dlp

Postby aryan481 » Tue Apr 28, 2015 9:06 am

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); ?
aryan481
Standard Member
 
Posts: 11
Joined: Sun Oct 05, 2014 2:11 pm

Re: Ads/image/code between links of dlp

Postby SamEA » Sun May 10, 2015 6:17 pm

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
}
?>
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Ads/image/code between links of dlp

Postby aryan481 » Fri Jun 12, 2015 9:48 pm

thank you very much :D :D
aryan481
Standard Member
 
Posts: 11
Joined: Sun Oct 05, 2014 2:11 pm

Re: Ads/image/code between links of dlp

Postby SamEA » Tue Jun 16, 2015 4:19 am

No problem :)
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm


Return to Other DS Scripts!

Who is online

Users browsing this forum: No registered users and 2 guests

cron