So heres the deal i want to use the javascript from adblockdetector.com to detect is anyone downloading files from my site has an adblocker.
The only way i can figure out how to make everything work for the most part is by using iframe.
Im using gravity forms with wordpress to upload the files using a custom field.
this lets the file linked in the custom field to be a downloadable link <?php $customField = get_post_custom_values("file_attachment"); if (isset($customField[0])) { echo 'Download Now!
'; } ?>
I chose to use <?php $customField = get_post_custom_values("file_attachment"); if (isset($customField[0])) { echo ''; } ?>
once the iframe has been setup it either blocks the content from being downloaded or shows a download link after a timer.
for the download link in the iframe when i try to call for
<?php $customField = get_post_custom_values("file_attachment"); if (isset($customField[0])) { echo 'Download Now!
'; } ?>the iframe tries to load a invalid page and not the file in the custom field.
you can see what im working with on my site gfuzz.net/?p=110
if there is a way i can combine all the code without using iframe that would be awesome.
here are the files im using to make all of this work.
<?php $customField = get_post_custom_values("file_attachment"); if (isset($customField[0])) { echo ''; } ?> calls to>This script is whats detects if an adblock program is running then loads the code.html page once the adblock has been disabledcode.html calls for a timerthats where the <?php $customField = get_post_custom_values("file_attachment"); if (isset($customField[0])) { echo 'Your code will be ready soon
Thank you for choosing gFuzz
after 20 seconds has past the timer loads dl.phpDownload Now!
'; } ?>was put
the only issue i have is when i try to echo the file. it just tries to load a page
as
‘.$customField[0].’.html
i dont want this link to open a page i want it to link to the file i have in the custom field of the parent page.
I tried to explain my situation as best i can if anyone can give me some pointers that would be great thank you.