Opened on 04/30/2014 at 12:23:08 PM
Closed on 09/18/2014 at 02:00:38 PM
#410 closed change (fixed)
Publishing results of ABP-Sticky study as PDF on adblockplus.org
Reported by: | ben | Assignee: | |
---|---|---|---|
Priority: | P3 | Milestone: | |
Module: | Websites | Keywords: | |
Cc: | fhd, trev | Blocked By: | |
Blocking: | Platform: | Unknown | |
Ready: | yes | Confidential: | no |
Tester: | Verified working: | no | |
Review URL(s): |
Description
Background
I would like to publish the results of an eyetracking test to adblockplus.org, so that I can link to it in this blogpost: https://adblockplus.org/blog/eyetracking-study-results
What to change
Add attached file to website.
Attachments (1)
Change History (14)
Changed on 04/30/2014 at 12:24:37 PM by ben
comment:1 Changed on 05/05/2014 at 10:16:25 PM by fhd
comment:2 Changed on 05/06/2014 at 10:21:35 AM by ben
I apparently don't have the rights for that -- the link takes me to a page that says "Restricted Area."
comment:4 follow-up: ↓ 5 Changed on 05/21/2014 at 05:35:07 AM by fhd
Sorry, was on holiday. Should definitely work now, turns out we've put the non-devs in a group that can do pretty much anything but upload files and images. Can you verify that it works and close this, Ben?
comment:5 in reply to: ↑ 4 Changed on 05/21/2014 at 03:36:19 PM by ben
- Resolution set to fixed
- Status changed from new to closed
Replying to fhd:
Sorry, was on holiday. Should definitely work now, turns out we've put the non-devs in a group that can do pretty much anything but upload files and images. Can you verify that it works and close this, Ben?
comment:6 Changed on 05/22/2014 at 02:49:27 PM by philll
While this issue was only about providing the file and thereby might be fixed or not, I still face the links pointing to box.com.
comment:7 Changed on 05/23/2014 at 07:33:27 AM by ben
I uploaded the file, but could not link to it in the post. I attempted to create a tag for it, then link to that, but it did not work. So I don't know how to replace the box.com link with the file.
comment:8 Changed on 05/23/2014 at 07:42:24 AM by fhd
- Component changed from Unknown to Infrastructure
- Priority changed from Unknown to P3
- Resolution fixed deleted
- Status changed from closed to reopened
Yeah, there's something off, we'll look into it. Reopening.
comment:9 Changed on 05/23/2014 at 08:22:36 AM by trev
The link works now but it offers to download file. We should be better off using https://adblockplus.org/textpattern/files/Ad%20effectiveness%20study%20-%20Adblock%20plus%20-%20April%202014.pdf where the same file is served by the web server rather than Textpattern. We'll need a custom Textpattern plugin to generate that link however.
comment:10 Changed on 05/23/2014 at 08:52:47 AM by trev
- Cc trev added
Linking to this file is now possible via a custom tag, either by file name or ID:
<txp:abp_filedownload filename="Ad effectiveness study - Adblock plus - April 2014.pdf">download</txp:abp_filedownload> <txp:abp_filedownload id="1">download</txp:abp_filedownload>
Unfortunately, Textpattern plugins are stored in the database. Here is the plugin source code:
function abp_filedownload($attrs, $content = NULL) { extract(lAtts(array( 'filename' => '', 'id' => '', ), $attrs)); $file = NULL; if ($id) { $file = fileDownloadFetchInfo('id = '.intval($id)); } elseif ($filename) { $file = fileDownloadFetchInfo("filename = '".doSlash($filename)."'"); } if ($file) { $filename = $file['filename']; if (preg_match('/gz$/i', $filename)) $filename .= a; $url = "/textpattern/files/" . rawurlencode($file['filename']); if ($content) return href(parse($content), $url); else return $content; } }
fhd, could you review? This is essentially file_download_link() combined with a modified version of filedownloadurl() from the Textpattern source. It would have been better to simply override the filedownloadurl() function but this doesn't seem possible in PHP, at least not without extensions.
comment:11 Changed on 09/17/2014 at 05:04:46 PM by saroyanm
- Component changed from Infrastructure to Websites
- Platform set to Unknown
comment:12 Changed on 09/18/2014 at 01:56:15 PM by fhd
Sorry for the delay, looks good to me.
comment:13 Changed on 09/18/2014 at 02:00:38 PM by trev
- Ready set
- Resolution set to fixed
- Status changed from reopened to closed
You can upload the file directly to the blog, form the "File" tab: https://adblockplus.org/textpattern/index.php?event=file