Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for anonymous attachments #25

Open
lwcorp opened this issue Feb 4, 2024 · 2 comments
Open

Support for anonymous attachments #25

lwcorp opened this issue Feb 4, 2024 · 2 comments

Comments

@lwcorp
Copy link

lwcorp commented Feb 4, 2024

This ContentCreator.php section doesn't present attachments in anonymous mode because it states:

phplist restricts download of attachments to subscribers only

While this is technically true, it's because the whole reason for this plugin is that phpList completely ignores the notion of web archive. This is just a download button anyway, so could you:

  1. Add a config option of viewbrowser_anonymous_attachments i.e. Allow anonymous attachments
  2. Change
    if ($personalise && count($attachments = $this->dao->attachments($mid)) > 0) {
    to
    if ((getConfig('viewbrowser_anonymous_attachments') || $personalise) && count($attachments = $this->dao->attachments($mid)) > 0) {
  3. Change this part from
    <a href="./dl.php?id={$a['id']}&amp;uid=$uid">$remotefile</a>
    to something else that does support anonymous downloads.

?

I can assist with any of this, if you like. I know in #23 you've offered to ask phpList for more hooks, but while they should add generic hooks like in that ticket, there's no logic for them to add a dedicated hook just to specific commands from your plugin to disable their protection. I've asked them anyway, but meanwhile duplicating their dl.php and removing the protection might be a better option, again keep in mind it's just a downloader.

@bramley
Copy link
Owner

bramley commented Feb 4, 2024

If the attachment is genuinely public, then you can just put the file somewhere on your web site and include a link to that. There is no need to attach it to the phplist campaign. Or you can do both.
This plugin is just trying to fit-in with the way that phplist works, and I don't want to change this processing.

@lwcorp
Copy link
Author

lwcorp commented Feb 4, 2024

But I just want it add an attachment to the mail, send it and then have everyone see it on the web.
In any case, let's see what they answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants