Add adf.ly before downloading files in IP downloads

Status
Not open for further replies.

Yadro

Active Member
582
2010
215
640
How to add adfly before downloading files in IP download =) ? I want IP download system to generate an automatic adfly link means when members click on download button they will redirect to adf.ly and return with download a file ??
 
Last edited:
10 comments
In which template should i paste that script ???

Edit:

Finally edit & insert the script successfully but links generated after clicking on download button is looks like this

Code:
http://adf [dot] ly/2729340/http://yoursite.com/files/get/a963e71e9d2d4355e3ac4104aee40cae/yourfilename.zip
But i want it to convert

Code:
http://adf [dot] ly/EVMf0
 
Last edited:
i can help you, pm me.

In which template should i paste that script ???

Edit:

Finally edit & insert the script successfully but links generated after clicking on download button is looks like this

Code:
http://adf [dot] ly/2729340/http://yoursite.com/files/get/a963e71e9d2d4355e3ac4104aee40cae/yourfilename.zip
But i want it to convert

Code:
http://adf [dot] ly/EVMf0
 
Could anyone post a tutorial or something about how to do this? I know that I'm new, but I think that a lot of people would like to know how to do this for their IP Downloads section only and to work perfectly.

Thanks.
 
Integrate adf.ly to IPB and IP.Downloads

Go to:
ACP -> Look & Feel -> chọn skin -> (Downloads) Download Manager -> fileDisplay

Find:
Code:
<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&amp;module=display&amp;section=download&amp;do=confirm_download&amp;hash={$hash}" base="public" template="idmdd" seotitle="{$file['file_name_furl']}"}' class='download_button rounded right'> <else /> <a href='{parse url="app=downloads&amp;module=display&amp;section=download&amp;do=confirm_download&amp;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>

Replace with:
Code:
<php> $adfAPI = "http://api.adf*****api.php?key=79dc75a7f3261bc49a7fd1727344ea7c&uid=1768354&advert_type=int&domain=adf.ly&url="; $url_hash = $this->registry->getClass('output')->buildSEOUrl( "app=downloads&amp;module=display&amp;section=download&amp;do=confirm_download&amp;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&amp;module=display&amp;section=download&amp;do=confirm_download&amp;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>

Note: in settings of IP.Download you have to turn off Enable anti-leech
 
I want IP download system to generate an automatic adfly link means when members click on download button they will redirect to adf.l
1.jpg

28.jpg

3.jpg

5.jpg


4.jpg

29.jpg

Yes, my modification will do it, please check.

---------- Post added 26th Feb 2013 at 10:21 AM ---------- Previous post was 25th Feb 2013 at 11:15 AM ----------

I have demo at http://5files.com. You can check, it is working with adfly
 
Status
Not open for further replies.
Back
Top