Hello all, I'm making an interface for Mambo users to add a DP Coop Module in their CMS. I'm hoping to make DP easy for dummies. I have the Module installing, and I options available for horizontal/vertical alignment, etc. I'm trying to make the option available to change ad type from inside Mambo. I've gotten this working: // Determine which kind of ad we are using: $ad_type = $params->get( 'ad_type', 'link' ); switch ( $ad_type ) { case 'banner': // Banners and Text $new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?s=' . $_SERVER['SERVER_NAME']); break; case 'text': // Text Ads $new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?s=' . $_SERVER['SERVER_NAME'] . '&type=text'); break; case 'link': // Link Only Ads $new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?s=' . $_SERVER['SERVER_NAME'] . '&type=link'); default: // Link Only Ads $new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?s=' . $_SERVER['SERVER_NAME'] . '&type=link'); break; } Code (markup): So if they select "link", they get link only ads, etc. The problem that I am having, is that this only changes the way it is downloaded from the server. It doesn't change the way it is viewed. This could be bad if someone tries using banner ads, and it screws up the template... Then they go back to links, but the banner pops up every once in a while. So I guess my question is... What's the best way to "clear" the downloaded ads? (ps: I'm not much of a coder, so be gentle!)
OK, that leads me to my next question... Can I move the ad_network_ads.txt file out of the root? I'd like to put it into the "modules" directory with the other files, but my attempts at this have failed. How can I do this? Thanks! -Andy
Yes, it can be anywhere since nothing accesses it via HTTP. You would probably need to reference it with it's full file path then.