In this case, I am only adding the Google code to the bottomads.php file, but it can be used for any ad placement.
Step 1:
Open bottomads.php (found in the root of DFH)
Step 2:
Find
- Code: Select all
<?php
///////////////////////////////////////////////////////////////////////////
// Product: Daddy's File Host
// Version: 1.2
//
// by DaddyScripts.com
//
// original source code by Jim (j-fx.ws) and Steven (galaxyscripts.com)
//////////////////////////////////////////////////////////////////////////
?>
<!--Add any ads after this line-->
Step 3:
Add the mod coding. (For this example you will see how I added my Google Ad-Sense code [Info Edited of coarse ])
- Code: Select all
<?php
///////////////////////////////////////////////////////////////////////////
// Product: Daddy's File Host
// Version: 1.2
//
// by DaddyScripts.com
//
// original source code by Jim (j-fx.ws) and Steven (galaxyscripts.com)
//////////////////////////////////////////////////////////////////////////
?>
<?php if ($_SESSION['islogged'] <> true) { ?>
<!--Is a Guest...So display ads-->
<script type="text/javascript"><!--
google_ad_client = "YOUR INFO";
/* YOUR INFO */
google_ad_slot = "YOUR INFO";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php }else{
//Is member...Do not display ads
}
?>
Feel free to remove my <!--Comments--> as they are not needed for the mod to work.
Step 4:
Fill in your own ad information. Then save and upload.
That's it, your done!
I am still working around with this, so I will reply if I modify it at all. If you run into any issues just reply and we will try to work them out.
That's all for now...