Topic: Attachments (pun_attachment)

The pun_attachment extension has been released! This is the first version of the extension. It allows users to attach files to posts. You can find more information about pun_attachment on the extension's Wiki page.
Download links:

Of course, you can get it with the help of the pun_repository extension. It would be great for us to get feedback with your suggestion about the extension's further improvement.

Re: Attachments (pun_attachment)

Thank's !

Good job.

Re: Attachments (pun_attachment)

Thanks for working on that extension in the last days !! Will test it and search for Bugs wink

Re: Attachments (pun_attachment)

Thanks ! Happy to see this release !

But after installing it, I cannot modify any post anymore...

With the debug mode, I got this error :

The error occurred on line 21 in ******/edit.php(75) : eval()'d code

Database reported: Unknown column 'secure_str' in 'field list' (Errno: 1054).

So I desactivated the extensions sad

5 (edited by demo-world 2009-07-17 05:32)

Re: Attachments (pun_attachment)

Will there be a way to manage / sort files uploaded in an post ? Up to now they will be sorted alphabetically , but i want to put them in a way i want ?

Is it possible to sort the files in a way i upload them to the post ? First upload is also the first file showing, and so on ?

Re: Attachments (pun_attachment)

thank si will translate and test it.

Re: Attachments (pun_attachment)

I get the following error:
Unable to copy .htaccess file to the new subfolder with name "../extensions/pun_attachment/attachments/7b0d0baa2468065ac751c1bacea3dd8e"

the attachments folder is set to 777.

Re: Attachments (pun_attachment)

SiedleR wrote:

Thanks ! Happy to see this release !

But after installing it, I cannot modify any post anymore...

With the debug mode, I got this error :

The error occurred on line 21 in ******/edit.php(75) : eval()'d code

Database reported: Unknown column 'secure_str' in 'field list' (Errno: 1054).

So I desactivated the extensions sad

Is it a fresh install or an upgrade from another version of the extension? If it is an upgrade, post the version of your extension before upgrading, please.

Re: Attachments (pun_attachment)

It's fresh. But I had an alpha version installed a long time ago, but this was removed correctly (also a long time ago).

10

Re: Attachments (pun_attachment)

demo-world wrote:

Will there be a way to manage / sort files uploaded in an post ? Up to now they will be sorted alphabetically , but i want to put them in a way i want ?

Is it possible to sort the files in a way i upload them to the post ? First upload is also the first file showing, and so on ?

You can add a feature request to the Wiki page of the pun_attachment.

11

Re: Attachments (pun_attachment)

maststef wrote:

I get the following error:
Unable to copy .htaccess file to the new subfolder with name "../extensions/pun_attachment/attachments/7b0d0baa2468065ac751c1bacea3dd8e"

the attachments folder is set to 777.

Is there .htaccess file in the directory "<FORUM_ROOT>/extensions/pun_attachment/attachments"?

12

Re: Attachments (pun_attachment)

Fixed the upgrading process from 1.0a version of the extension and released new version of the pun_attachment - 1.0.1.

Re: Attachments (pun_attachment)

When I try to install 1.0.1 it errors out because it can't copy .htaccess to the random directory it generates.  The random directory it generates belongs to apache:apache and has permissions 750.  Is there any way I can modify the extension to create the directory using a user:group of my choosing?

Re: Attachments (pun_attachment)

Great, thanks!

Any way to make this extension see files that used to be attached with Frank's mod in PunBB 1.2.x?

Re: Attachments (pun_attachment)

Possible bug, might just be my forum:

When editing permissions for attachments for Guests, it doesn't retain my selected options.

16 (edited by guest1234 2009-07-19 10:09)

Re: Attachments (pun_attachment)

Slavok wrote:

Is there .htaccess file in the directory "<FORUM_ROOT>/extensions/pun_attachment/attachments"?

Yes it's there.

I just deleted everything that had to do with pun_attachment (extension folder from 1.0, cleaned db manually). Then uploaded pun_attachment 1.0.1. Set the attachments folder inside it to 777. Then clicked "Install" in admin panel. Same error. The directory that should contain the htaccess file get's created. But the file can't be copied into it.

I have PunBB 1.3.4.

17

Re: Attachments (pun_attachment)

Tatsujin wrote:

When I try to install 1.0.1 it errors out because it can't copy .htaccess to the random directory it generates.  The random directory it generates belongs to apache:apache and has permissions 750.  Is there any way I can modify the extension to create the directory using a user:group of my choosing?

In the next release of pun_attachment this file will be created by the extension.

TomeOne wrote:

Possible bug, might just be my forum:

When editing permissions for attachments for Guests, it doesn't retain my selected options.

Thanks for reporting, fixed in [1257].

TomeOne wrote:

Great, thanks!

Any way to make this extension see files that used to be attached with Frank's mod in PunBB 1.2.x?

We are planning to work on the migration tool.

Re: Attachments (pun_attachment)

wow, nice work, I have just installed the latest version and everything works fine... thx guys wink

19

Re: Attachments (pun_attachment)

pun_attachment 1.0.2 has been released. Bug reported by TomeOne was fixed.

Re: Attachments (pun_attachment)

Problem: when I did the upgrade via the manage extensions screen, I chose to upgrade and install, and it renamed the pun_attachment folder to pun_attachment.old and inserted a new pun_attachment folder.

This means all attachments posted with the previous version now become unusable, it seems.

I still see a list of attached files posted under "Manage attachments" but none of them are available to download or view.

Re: Attachments (pun_attachment)

New attachments also can't be added... is this just a permissions issue perhaps?

Re: Attachments (pun_attachment)

I still can't install the extension because the .htaccess file can't be copied into the random string folder. By the way, the folder is created, but when I try to delete it manually through ftp I get the error "No such directory exists", when I then reload the file/folder list, the  folder is gone. But if I don't try to delete the "non-existant" folder, the folder does NOT get deleted.
On the server is running Linux + Apache + Plesk. Maybe there are some problems with permissions?

23

Re: Attachments (pun_attachment)

TomeOne wrote:

Problem: when I did the upgrade via the manage extensions screen, I chose to upgrade and install, and it renamed the pun_attachment folder to pun_attachment.old and inserted a new pun_attachment folder.

This means all attachments posted with the previous version now become unusable, it seems.

I still see a list of attached files posted under "Manage attachments" but none of them are available to download or view.

Thanks for reporting this. It is an issue of pun_repository. We will think how to solve this.

24

Re: Attachments (pun_attachment)

TomeOne wrote:

Problem: when I did the upgrade via the manage extensions screen, I chose to upgrade and install, and it renamed the pun_attachment folder to pun_attachment.old and inserted a new pun_attachment folder.

This means all attachments posted with the previous version now become unusable, it seems.

I still see a list of attached files posted under "Manage attachments" but none of them are available to download or view.

To hotfix this, you can manually copy old folder with attachments to the FORUM_ROOT."extensions/pun_attachment/attachments/"

25

Re: Attachments (pun_attachment)

maststef wrote:

I still can't install the extension because the .htaccess file can't be copied into the random string folder. By the way, the folder is created, but when I try to delete it manually through ftp I get the error "No such directory exists", when I then reload the file/folder list, the  folder is gone. But if I don't try to delete the "non-existant" folder, the folder does NOT get deleted.
On the server is running Linux + Apache + Plesk. Maybe there are some problems with permissions?

Try to replace the lines 140, 141 of manifest.xml with this code:

            if (!touch(FORUM_ROOT.$basepath.$newname.'/.htaccess'))
                message('Can\'t create the .htaccess file in the new directory!');
            $fhtp = fopen(FORUM_ROOT.$basepath.$newname.'/.htaccess', 'w');
            if (!$fhtp)
                message('Can\'t open the .htaccess file');
            fwrite($fhtp, '<Limit GET POST PUT>'."\n".'Order Allow,Deny'."\n".'Deny from All'."\n".'</Limit>');
            fclose($fhtp);
            if (!touch(FORUM_ROOT.$basepath.$newname.'/index.html'))
                message('Can\'t create the index.html file in the new directory!');
            $fip = fopen(FORUM_ROOT.$basepath.$newname.'/index.html', 'w');
            if (!$fip)
                message('Can\'t open the index file');
            fwrite($fip, '<html><head><title>403 - No access</title></head><body><h1>Error 403</h1>No access</body></html>');
            fclose($fip);

If there are any errors related with creating files, contact with you hoster.