News:

Wondering if this will always be free?  See why free is better.

Main Menu

Post and PM Inline Attachments

Started by dougiefresh, July 26, 2014, 09:14:08 PM

Previous topic - Next topic

dougiefresh

Uploaded v5.0 - February 17th, 2016
o Added help link and popup window to the Post screen.
o Rewrote bbcode handling code to properly handle each bbcode.
o Modified Sources/Help.php operation to use different line to look for.
o Fixed issue where PMs with inline attachments only showed "[ Attachment ]"
o Fixed issue where SimplePortal didn't display embedded attachments.
o Fixed undefined index error in Subs-InlineAttachments.php when using HS4SMF mod.
o Fixed several undefined variable errors in Subs-InlineAttachments.php.
o Fixed incompatibility with PM Attachments version 2.0 Beta 1.
o Fixed PM issue where "[attachment id=0 msg=new]" returns "[ Attachment ]".
o Changed inline TXT files so that they are parsed (for security reasons!)




@Everybody:  Hopefully this updates solves the problems mentioned by everybody.  I'm sorry about the long wait for this update, but hopefully it has been worth the wait.....

DenDen60

Thanks DougieFresh, I was able to install it but there were still a few error message. See attached images.

DenDen60

Quote from: laetabi on March 13, 2016, 02:00:03 PM
Could I suggest an improvement for all the dumb users around?   I have many  :o

1) Change the SMF icon for 'Insert Image' so that it gives members two options:

    a) Enter Image Location... http:// (as now for selecting from an external hosting site or web page)
    b) Browse your computer... have the Browse button below this in the same window, just like it is for attachments

2) When using the Browse button and an image file is selected from their computer, use the Inline Attachments mod and the existing SMF code for uploading attachments to insert the BBC [ attachment = 1 ] etc, directly into the post where they have placed their cursor.



I second the motion. :-)

dougiefresh

Quote from: Denis Pageau on February 18, 2017, 09:06:16 AM
Thanks DougieFresh, I was able to install it but there were still a few error message. See attached images.
1st image: Attach your Sources/Help.php and Themes/Espagnol/PersonalMessage.template.php so that I can see what is going on.

2nd image: Whoops....  Forgot to put the ILA.css file where it needs to go....  Sorry about that....

DenDen60


dougiefresh

Uploaded v5.1 - February 23rd, 2017
o Added an operation to copy ILA.css to proper folder.




@Denis Pageau:  I was able to get your PersonalMessage.template.php file to work correctly with the mod.  My instructions are going to assume you have a Windows machine available....

What I did was open a copy of Notepad2, copy the replace box (Ctrl-E, then E), type in the following in the Search String field:
Code (Search for) Select
\r\n\r\n
and this in the Replace with field:
Code (Replace with) Select
\r\n
Check the Transform backslashes box, then click Replace All.  That fixed the file for me....  I've attached the fixed file for you....

LG965

Hello Doug,
I have two problem:
-Fixed issue where SimplePortal didn't display embedded attachments, don't work
-Automatically image resize, in image dispayed by ILA attach don't work (in 4.15 worked, resize image width=700px, but I do not know how)

Any ideas?



lf123123

#567
Quote from: dougiefresh on February 16, 2017, 06:11:35 PM
Quote from: dougiefresh on February 16, 2017, 03:35:18 PM
Quote from: lf123123 on December 30, 2016, 04:41:06 AM
1) Old attachments now allegedly need to be approved by a moderator. When trying to approve them, I get an error that I don't have access to this area, although I'm logged in as an administrator. My board is configured such that new attachments do not need approval. In the database, all attachments are marked as approved.

The image which I attached to this post shows what the approval area looks like. Pleae notice that the corresponding post has two attachments. The "approval area" only shows one of them and doesn't display the filename. Something's definitely wrong here.

New attachments don't have this problem. No problems other than this one and the one mentioned as 2. have appeared after the update.

Can someone please tell me what I can do the get all attachments working again, ideally without having to manually touch each of them?
I've managed to reproduce something similar to this bug report.  It seems to happen when an attachment is referenced, but doesn't  exist.  For example, a post containing no attachments and also contains this line:
[attach=0]
brings up what you have described/pictured.  I'm looking into how to get rid of those issues....
A simple check to see if the specified attachment ID actually exists solved the issue that I could see.  It will be included in the next version.

Thank you for solving both problems I reported!




Edit: One more thing: Is is possible to hide the "inline attachment parameters" from the new post dialog altogether? With the Dilber MC theme we are using, this parameters list gets displayed like you can see in the attachment and I would rather not have it there at all. The option "Include link for ILA popup window parameters?" does not seem to have a visible effect.

lf123123

Quote from: LG965 on February 24, 2017, 04:21:59 AM
-Automatically image resize, in image dispayed by ILA attach don't work (in 4.15 worked, resize image width=700px, but I do not know how)

I can confirm that this also happens on my forum, but was unsure whether this mod is the source of the problem and therefore didn't report it yet. I noticed that for all affected images (for some it works, for some it doesn't), the size of the image is not displayed correctly. Example: While one of the images may be so large that it should be resized (e.g. 4000x3000 pixels), the size shown may just be 92x180 pixels.

dougiefresh

I'm sorry, the way you are reporting your problems is confusing.... 

Quote from: LG965 on February 24, 2017, 04:21:59 AM
-Fixed issue where SimplePortal didn't display embedded attachments, don't work
Are you reporting that SimplePortal still doesn't display the embedded attachments?  If so, I will need you to PM me some forum/website credentials to your forum, and a link of where to go so that I might be able to see the problem so that I can fix it....

Quote from: LG965 on February 24, 2017, 04:21:59 AM
-Automatically image resize, in image dispayed by ILA attach don't work (in 4.15 worked, resize image width=700px, but I do not know how)
Are you reporting that using the width=700px parameter doesn't work?  What version are you using?  I've tested the width parameter and it has worked for me....

dougiefresh

Uploaded v5.2 - February 24th, 2017
o Fixed issue where popup option wasn't linked to anything....
o Fixed responsive CSS image stuff that I added in version 5.0.
o Fixed scale parameter to disable/enable responsive stuff on request.
o Added admin option to enable responsive CSS image stuff.
o Added bbcode option to scale parameter to invert responsive settings.

lf123123

Quote from: dougiefresh on February 24, 2017, 08:46:40 PM
o Fixed issue where popup option wasn't linked to anything....

Thank you! I can confirm that the behaviour has changed when I updated to the latest version, but everything still looks like shown in the screenshot in this post, with the exception noted below. Note that the inline attachment parameters are not shown in a popup window, but above the fields where you enter information about your new post.

What has changed is the following:

  • The option "Include link for ILA popup window parameters?" does now effect whether the question mark shown in the screenshot mentioned above is visible or not. The inline attachment parameters are visible in any case.
  • When I click the X above the inline attachment parameters, now I will be sent back to the topic I wanted to write an answer to
I'm still looking for a way (manual edit would be okay) to hide the inline attachment parameters from the "new reply" page. I tried to edit Themes/default/Post.template.php, but was only able to get rid of the ILA-related question mark, but that doesn't help.

Quote from: dougiefresh on February 24, 2017, 04:45:53 PM
Are you reporting that using the width=700px parameter doesn't work?  What version are you using?  I've tested the width parameter and it has worked for me....

When I said something about this issue in this post, I did understand him differently. Anyway, here is the problem I'm experiencing, but again, I'm unsure if this mod is actually the source of the problem:

I set "Restrict images to maximum width of:" to "500", same for the height restriction. For some images, it works fine. For others, it doesn't. These images aren't resized although they are far wider than 500 pixels. That can lead to scrollbars appearing in posts. For all affected images, I noticed the following: When I set the inline attachments mod to display the size of the images in pixels, a wrong size is shown for all of these images. The width shown is less than the 500 pixels I set above*, while in reality the width might be 3000 pixels and the image is displayed with a width of 3000 pixels.

* That was at least until version 5.1. Since the update to 5.2, I'm not shown the size of images anymore, even though I set "Download link and counter setting:" to "Filename, Size, Dimensions and Count". In order to get it working again, I tried to set the option to a different value and then set it to "Filename, Size, Dimensions and Count" again, but that didn't help. I'm now shown a label of thefollowing form:  [filename] ([filesize] - [count]). I'm only mentioning this to give you the complete picture, this issue doesn't bother me at all.

Kinsman

Is there a way to stop the bazillion examples always displaying above the posting box?

DenDen60


dougiefresh

@lf123123:  I'll look into it some more.....

Quote from: Kinsman on February 26, 2017, 01:33:40 AM
Is there a way to stop the bazillion examples always displaying above the posting box?
@Kinsman:  Have you upgraded to version 5.2 yet?

Quote from: Denis Pageau on February 26, 2017, 03:42:42 PM
Thank you DougieFresh it worked. 8)
@Denis Pageau:  You're welcome!

DenDen60

Making the image insertion process more userfriendly.

here is an idea on how to make the process of integrating image in a post easier.

It is based on EZPortal's approach. (View attachment)






dougiefresh

@Denis Pageau:  Wow.....  That would be a hell of an improvement over the current method of inserting it....  A hell of a lot more complicated, too....  I would need time to implement this properly, and right now, I don't have time to implement something so drastic....  In a few days or next week, maybe....

Kinsman


Quote from: Kinsman on February 26, 2017, 01:33:40 AM
Is there a way to stop the bazillion examples always displaying above the posting box?
@Kinsman:  Have you upgraded to version 5.2 yet?
[/quote]

Yep, still not seeing any way to remove them?

DenDen60

Quote from: dougiefresh on February 27, 2017, 08:00:50 PM
@Denis Pageau:  Wow.....  That would be a hell of an improvement over the current method of inserting it....  A hell of a lot more complicated, too....  I would need time to implement this properly, and right now, I don't have time to implement something so drastic....  In a few days or next week, maybe....


Yes it would be a hell of an improvement. The present approach is OK forpeople who understand coding or want to learn, but for others, it is complicated.




dougiefresh

Quote from: Kinsman on February 26, 2017, 01:33:40 AM
Is there a way to stop the bazillion examples always displaying above the posting box?
Version 5.2 doesn't put the ILA.css file in the right place.  I'm trying to fix this issue, along with other issues that have been found....

Advertisement: