Post and PM Inline Attachments

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

Previous topic - Next topic

aegersz

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Beowulf1976

#641
Quote from: dougiefresh on July 05, 2017, 06:22:34 PM
@Beowulf1976:  I just got back from a movie and dinner with the wife, and I installed both mods on a clean 2.0.14 forum.  I'm not seeing the issue you are.  (Image attached is what I'm seeing)  The fact that you appear to have a portal and/or chatbox installed makes me suspect it as the cause of your issue(s) that you are reporting....  Can you uninstall the portal/chatbox and see if that either of those are the source of your issue?

Simple Portal (which included the chat box) is not the issue, on testing thoroughly I have found that it is This Mod

I uninstalled your Post and PM Inline Attachments mod to test whether it was this mod, and it still showed to be borked, so it is the above mod that is causing the borked pm system :( Unfortunately - which is usually the case of luck for me, I cannot simply uninstall it as it has many errors. *sigh* All I can do is "Disable attachments" within the PM settings section, which I assume renders that part of your mod useless :( (unless your mod enables the ability to send attachments in pm separately)

Thank you and I am sorry for not first checking prior to posting a bug report *sigh*

EDIT: Obviously "Disable All Attachments" within the PM Attachments menu does stop your mod from working (the pm part) but it does fix the issue with my borked looking pm's.
"Them as can do has to do for them as can't. And someone has to speak up for them as has no voices."

dougiefresh

@Beowulf1976: Well, I'm happy to hear that you've isolated the problem to a specific mod.  Even happier that the problem mod isn't this one!

That leaves the whole issue of the PM Attachments mod....  Sigh...

dougiefresh

UPDATE:  I was trying to update this mod for SMF 2.1 Beta 3, when I discovered that the new beta has some form of inline attachment code included!  Makes me wonder if I should continue updating this mod for SMF 2.1 Beta 3....  In any case, I will have to figure out how to integrate my functionality with the SMF 2.1 Beta 3's, or just completely replace their functionality with my own....  Worse case will be to leave their functionality in place and stop development for SMF 2.1 Beta 3.....

dougiefresh

Uploaded v5.8 - July 8th, 2017
o Updated source code for SMF 2.1 Beta 1 & 2.  Templates are still unedited.
o Remvoed support for SMF 2.1 Beta 1 & 2.
o Attempt fix for issue where incomplete information was pulled for attachments.




@aegersz:  This update should (hopefully) solve the issues you reported between this mod and the Play Media Attachments mod.  You MAY need the updated Play Media Attachments mod, as well....

@Beowulf1976:  I haven't looked any further into your bug report yet....

@rjen

I am using you mod now, and it works nicely, but I have two 'issues'

Forumversion 2.0.14
PHP version: 7.1

Issue Number 1:
Every time I access the admin section for Inline attachments I get en error in the log:

Quote8: Undefined index: ila_one_based_numbering
Bestand: /home/deb77453/domains/fjr-club.nl/public_html/Sources/Subs-InlineAttachmentsAdmin.php
Regel: 132

The source code involved is this:


129: function askNumber()
130: {
131: var now_renumber = document.getElementById("ila_one_based_numbering").checked ? 1 : 0;
==>132: if (now_renumber != ' . $modSettings['ila_one_based_numbering'] . ')
133: document.getElementById("renumber_attachment_tags").value = (confirm("' . $txt['ila_one_based_numbering_ask'] . '") ? 1 : 0);
134: else


Issue Number 2:
I cannot seem to get two attachments showing next to each other: the attachment information seems to break the alignment, is there a solution for this?

If I deactivate the 'Download link and counter setting:' in admin it works, but when I activate it I get below display
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

dougiefresh

@rjen:  I've fixed issue number 1 for the next version.  I'll look into issue number 2 and see what I can do....

Beowulf1976

Quote from: dougiefresh on July 07, 2017, 02:19:15 PM
@Beowulf1976: Well, I'm happy to hear that you've isolated the problem to a specific mod.  Even happier that the problem mod isn't this one!

That leaves the whole issue of the PM Attachments mod....  Sigh...

Eeep, I am sorry :(

I've pm'd you on your own forum btw. :)

Best wishes
"Them as can do has to do for them as can't. And someone has to speak up for them as has no voices."

dougiefresh

Quote from: Beowulf1976 on July 11, 2017, 09:23:22 PM
Eeep, I am sorry :(

I've pm'd you on your own forum btw. :)
No worries.  PM Attachment mod is one I'm going to have to look at sooner than later....  Replied on XPtsp.com forum.

albertlast

In Subs-InlineAttachment i found IFNULL,
like mention in another thread i recommend to use COALESCE instead.

dougiefresh

#650
Uploaded v5.9 - August 31st, 2017
o Completed SMF 2.1 Beta 3 template edits.  Javascript edits still needed.
o Replaced IFNULL with COALESCE in database queries for better Postgres support.




@albertlast:  I had made the changes a while ago, but hadn't uploaded the new mod.  Those changes are in this version.  Thanks for noticing!

UPDATE:  Here is what I've figured out about SMF 2.1 Beta 3's attachment posting stuff.  It looks like SMF 2.1 Beta 3 is virtually identical to SMF 2.0.x's Post template code.  The only difference is the Javascript that replaces the "SMF 2.0.x-ish" interface with a drag-and-drop/picture-preview interface.  So I've still got to figure out how to modify the Javascript to add the "insert attachment" option that SMF 2.0.x has beside the uploaded attachments....

darkmoon2010

Hi,
we are using your excellent Mod in our forum and it works very good.

Only one issue requested by our users, when they attach a picture and klick on the preview button, before saving the article, thy can be only seen [Invalid Attachment] instead of the picture. When they press the save button everything looks fine.

Do you have any idea, how this could be solved ?

Forumversion 2.0.14
PHP version: 5.5.9
Post and PM Inline Attachments   5.9



Best regards
Thomas


dougiefresh

#652
Quote from: darkmoon2010 on September 04, 2017, 12:01:25 PM
Only one issue requested by our users, when they attach a picture and klick on the preview button, before saving the article, thy can be only seen [Invalid Attachment] instead of the picture. When they press the save button everything looks fine.
I know for sure that I will not be able to do anything with the PHP code, as the attachment verification and handling is done MUCH MUCH farther down than the preview request will ever get....  I MIGHT be able to do something with Javascript, but only if I can get the fully qualified pathname from the input buttons....

pellet_newb

Can I get an example of [attachment][/attachment] with a width parameter?  Does attachment overwrite the width?  I've tried attach as well  [attach=1 width=500][/attach] and it does not work.  Thanks

dougiefresh

Quote from: pellet_newb on September 05, 2017, 06:28:05 PM
Can I get an example of [attachment][/attachment] with a width parameter?  Does attachment overwrite the width?  I've tried attach as well  [attach=1 width=500][/attach] and it does not work.  Thanks
I looked at the code briefly and didn't find a reference to the width function.  I admit I may have overlooked something....  Let me investigate....

pellet_newb


dougiefresh

Quote from: dougiefresh on September 06, 2017, 08:50:47 PM
Quote from: pellet_newb on September 05, 2017, 06:28:05 PM
Can I get an example of [attachment][/attachment] with a width parameter?  Does attachment overwrite the width?  I've tried attach as well  [attach=1 width=500][/attach] and it does not work.  Thanks
I looked at the code briefly and didn't find a reference to the width function.  I admit I may have overlooked something....  Let me investigate....
Quote from: pellet_newb on September 07, 2017, 11:26:55 AM
See attached.
Yeah, I know what the documentation says.  I wrote it!  Geez....  So let me clarify what I meant (since it doesn't seem obvious): I didn't see the reference to the width parameter in the CODE that builds the HTML used to display the picture.  I also told you I'd investigate.  Bothering me about your bug report so soon doesn't help me at all, unless you've got something to contribute....

dougiefresh

Uploaded v5.10 - September 8th, 2017
o Fixed the HTML building code so various parameters work properly.
o Fixed undefined array element error in Subs-InlineAttachments.php.




@pellet_newb:  I installed the mod on a clean localhost forum and managed to duplicate your bug report, but only when the attach tag is used with an image that has a thumbnail generated.  I traced it to the SMF-styled HTML code branch and it was missing the style portion of the statement.  Including it has fixed the issue (at least for me)!  Hopefully, this update fixes the bug report you posted!  Thank you!

pellet_newb

Thanks @dougiefresh, what about Tapatalk support?  Here is a screen shot of what our inline attachments looks like in Tapatalk:

aegersz

@dougie, i noticed that you handle pdf files in some way (was looking at the settings) but i have attached both pdf and text files but there was no display unlike your picture processing.

I don't know if that is contingent on the browser too.

I would REALLY love to have an embedded PDF and text viewer process the attachment inline.

is that possible ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Advertisement: