I have noticed that there is no posts relating to Adf.ly in this forum. So I wanted to help users have the ability to make some extra money using Adf.ly and the IP Downloads. It is a simple tutorial and it should not take more than five minutes.
I am assuming that you have a forum running IP Downloads, and that you do not have an Adf.ly account. In this tutorial, you need to create an Adf.ly account. Just go to the Adf.ly website and create one. Once that is done, I would recommend linking it to your Paypal account. I am also assuming that you have your checking account linked with Paypal as well.
Now that we have that out of the way, you need to go to your main Adf.ly account page. Then navigate over to Tools, and finally API Documentation. There, you will see an API code in a box. Copy that and save it somewhere, you'll need it later. Once you have that key, you will need to go to your ACP of your forum, go to Look & Feel, then to your skin, then click Manage Template & CSS. Once you are there, look for under templates (Downloads) Download Manager. Then find fileDisplay and using Ctrl+F, find the following:
<if test="canDownload:|$file['file_cost'] or $file['file_nexus']) OR $purchased == 'ACTIVE' OR $this->memberData['idm_bypass_paid'] OR $this->memberData['member_id'] == $file['file_submitter']"> <if test="dynUrls:|:$this->settings['idm_dynamic_urls']"> <a href='{parse url="app=downloads&module=display&section=download&do=confirm_download&hash={$hash}" base="public" template="idmdd" seotitle="{$file['file_name_furl']}"}' class='download_button rounded right'> <else /> <a href='{parse url="app=downloads&module=display&section=download&do=confirm_download&id={$file['file_id']}" base="public" template="idmdownload" seotitle="{$file['file_name_furl']}"}' class='download_button rounded right'> </if> {$this->lang->words['dpage_button_short']} </a> </if>
Then replace the above with this: (MAKE SURE TO EDIT THE PART THAT SAYS TO EDIT IT!)
<php> $adfAPI = "PLACE API CODE HERE; $url_hash = $this->registry->getClass('output')->buildSEOUrl( "app=downloads&module=display&section=download&do=confirm_download&hash=".$hash, 'public', $file['file_name_furl'], 'idmdd' ); $url_hash = file_get_contents($adfAPI . $url_hash);$url_id = $this->registry->getClass('output')->buildSEOUrl( "app=downloads&module=display&section=download&do=confirm_download&id={$file['file_id']}", 'public', $file['file_name_furl'], 'idmdownload' ); $url_id = file_get_contents($adfAPI . $url_id); </php> <if test="canDownload:|$file['file_cost'] or $file['file_nexus']) OR $purchased == 'ACTIVE' OR $this->memberData['idm_bypass_paid'] OR $this->memberData['member_id'] == $file['file_submitter']"> <if test="dynUrls:|:$this->settings['idm_dynamic_urls']"> <a href='{$url_hash}' target=_blank class='download_button rounded right'> <else /> <a href='{$url_id}' target=_blank class='download_button rounded right'> </if> {$this->lang->words['dpage_button_short']} </a> </if>
Please make sure to omit http://somewebsite.com from the end of your API code and do not add anything after. Once all that is done, you should be able to have your Adf.ly linking all of your downloads! I would recommend using this on a forum that highly utilizes the IP Downloads like WebFlake.
I hope I helped any user wanting this feature on their forum.