101

Re: Attachments (pun_attachment)

I've commented them, but still not effective. Do I need to refresh hooks?

102

Re: Attachments (pun_attachment)

Why have you commented that line?

103

Re: Attachments (pun_attachment)

So what do I do to remove them?

104

Re: Attachments (pun_attachment)

Sorry, I haven't read what do you want. But... what do you want? What do you want leave?

105

Re: Attachments (pun_attachment)

Remove everything about the picture when attached and make it look like it was embedded. Please scroll to the bottom of page 4 to understand very well.

Re: Attachments (pun_attachment)

Attachments is broken in 1.4.2. It won't install.

107

Re: Attachments (pun_attachment)

No, it SHOULD work. What doesn't work? What error is displayed?

108 (edited by arshen 2014-01-26 11:47)

Re: Attachments (pun_attachment)

Hi,
I install "pun_attachment" successful, but when i upload image files (jpeg, png,...), do not work. no any preview and can't download the images.
Other files work excellent.
what is wrong? what should i do?
you can see this problem here: http://ask.daskhat.ir/misc.php?action=p … mp;preview
thank you.

Re: Attachments (pun_attachment)

Check the web server logs.

110 (edited by arshen 2014-01-26 11:48)

Re: Attachments (pun_attachment)

unfortunately i can't find server logs in Cpanel!!
where is it? how can i check it?
i use share host with Cpanel.

thank you.

111

Re: Attachments (pun_attachment)

Hi,
I have a problem with images and zip files now!!!!
images don't display, and zip files download as a corrupted file!
and when i once download a file, the download counter count it 4 time.(i test it for zip files)
i don't know where is the problem?!
you can see this problem at: http://ask.daskhat.ir/topic/47/view/

Thank for any help, and sorry for my English.

112

Re: Attachments (pun_attachment)

I try to install pun_attachment v1.0.5, but I got the message : This extension is not compatible with your PunBB version.

Where could I got the right extension for my 1.4.2 version?

113 (edited by arshen 2014-02-19 12:55)

Re: Attachments (pun_attachment)

carolle wrote:

I try to install pun_attachment v1.0.5, but I got the message : This extension is not compatible with your PunBB version.

Where could I got the right extension for my 1.4.2 version?

Here is a list of extensions for download latest version : http://punbb.informer.com/extensions/

114

Re: Attachments (pun_attachment)

Hi ! I am trying to translate to French, but have no idea what salt keywords is about.
"Some more salt keywords, change if you want to", says the lang file.
Can anyone explain to me ? (I know about keywords, but "salt" ???)
Thanks in advance

https://agora.chauvigne.info/
PunBB 1.4.6
PHP: 8.0.24
Base de données    SQLite3 3.27.2

115

Re: Attachments (pun_attachment)

I met an issue with the time zone.
Error message above the post with attachment

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. ...

So, I added

date_default_timezone_set('Europe/Paris');

on line 6 of attach_func.php

No more error message and the date displays correctly.

I do not understand why the extension does not take into account the time-zone setting entered in the general configuration of the forum.

https://agora.chauvigne.info/
PunBB 1.4.6
PHP: 8.0.24
Base de données    SQLite3 3.27.2

116

Re: Attachments (pun_attachment)

What attracts you pun_attachment? He is no longer supported.

117

Re: Attachments (pun_attachment)

Well, it's an official extension, on an official list of extensions for PunBB 1.4x, on the official PunBB forum. And it can run correctly. I did not notice it was not supported any more. It's not written anywhere. For someone like me new to PunBB, the present forum should be the first place to get information. Even if I browsed your PunBB International forum with a great interest.
Thank your for all the advices you provide. You are very helpful.

https://agora.chauvigne.info/
PunBB 1.4.6
PHP: 8.0.24
Base de données    SQLite3 3.27.2

118

Re: Attachments (pun_attachment)

Good luck to you.

119 (edited by Popov 2023-02-28 11:08)

Re: Attachments (pun_attachment)

Error when the actual attachment doesn't exist.

Got error 'PHP message: PHP Warning:  getimagesize(./extensions/pun_attachment/attachments/94fd47...626d/3e57...838.attach): failed to open stream: No such file or directory in /home/XXX/forum/extensions/pun_attachment/include/attach_func.php on line 297'

I assume the error comes when the getimagesize function cannot find the actual file.

How to fix it?

Do we need to add a check if the file exists?

Edit:

My quick fix is to check if file_exists in the functions show_attachments and show_attachments_post

$show_image = false;
if (in_array($attach['file_ext'], array('png', 'jpg', 'gif', 'tiff')) && $forum_config['attach_disp_small'] == '1')
{
    $attach_file_path = FORUM_ROOT.$forum_config['attach_basefolder'].$attach['file_path'];
    if ( file_exists($attach_file_path) ) {
        list($width, $height,,) = getimagesize($attach_file_path);
        $attach['img_width' ] = $width;
        $attach['img_height'] = $height;
        $show_image = ($attach['img_height'] <= $forum_config['attach_small_height']) &&
                      ($attach['img_width' ] <= $forum_config['attach_small_width' ]);
    }
}
I'm using PunBB at Forex Forum since 2006.