Post and PM Inline Attachments

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

Previous topic - Next topic

dougiefresh

Uploaded v4.9 - October 30th, 2015
o Fixed double Javascript function declaration issue, found by asmith.
o Fixed undefined index error where apparently no attachments were available for the post.
o Fixed undefined variable error that detects whether SCEditor is installed.
o SMF 2.1: Fixed code-breaking syntax error that was found by asmith.




@brynn and @asmith: This update should solve the problems you reported.  Thank you for the reports!

Quote from: hannes_kann_es on October 30, 2015, 02:48:53 PM
when checking "Allow quoted attachment images from another post?", inline attachments will break the Tapatalk-Plugin. Tapatalk users will get an error message that Display() cannot be duplicated in Display.php from tapatalk. Any fix from your side or should I post this on tapatalk-forums?
I have no idea why that option should conflict with anything from the Tapatalk plugin.....

hannes_kann_es

@dougiefresh: disabling the option makes Tapatalk work again. Otherwise every page with attachments can't be loaded inside the app.

dougiefresh

@hannes_kann_es: I have no idea why it should make any sort of difference, since the option is handled within the Subs-InlineAttachments.php file.....  Can you attach your copy of Sources/Display.php?  Maybe there is something different within your Display.php file....  I don't know....

dougiefresh

Quote from: hannes_kann_es on October 30, 2015, 02:48:53 PM
Any fix from your side or should I post this on tapatalk-forums?
Posting about it on the tapatalk forums wouldn't hurt....  Please let me know what you find out.  Meanwhile, I guess I'm going to have do some digging into the Tapatalk plugin for SMF and see if I can figure out what is happening.....

brynn

Hi dougiefresh or anyone who knows the answer  :)

The option "Remove attachment image under post after in-post use" -- what does that mean?  What is "in-post use"?

Thanks!

420Connect.co.uk

Quote from: brynn on November 02, 2015, 04:34:11 AM
Hi dougiefresh or anyone who knows the answer  :)

The option "Remove attachment image under post after in-post use" -- what does that mean?  What is "in-post use"?

Thanks!

It means if that option is checked, you can hide the attachments shown below the actual post, leaving the "inserted" attachments where you have chosen..

Hope that makes sense!  O:)
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

dougiefresh

Quote from: hannes_kann_es on October 30, 2015, 02:48:53 PM
when checking "Allow quoted attachment images from another post?", inline attachments will break the Tapatalk-Plugin. Tapatalk users will get an error message that Display() cannot be duplicated in Display.php from tapatalk. Any fix from your side or should I post this on tapatalk-forums?
What I can do about this is to disable that particular option within the code so that it doesn't break Tapatalk when Tapatalk is detected on the system....  At least until a better solution is found....  I'm trying to write something at the moment to fix this....

Quote from: brynn on November 02, 2015, 04:34:11 AM
The option "Remove attachment image under post after in-post use" -- what does that mean?  What is "in-post use"?
420Connect.co.uk is correct.  I'm also trying to add some inline help stuff to the mod to make it easier to understand....

dougiefresh

Uploaded v4.10 - November 5th, 2015
o "Allow quoted attachments from another post" is ignored if Tapatalk mod is detected.
o "Allow quoted attachments from another post" is now unchecked and disabled when Tapatalk mod is detected.
o Modified ILA admin area so that video options are disabled if embedding video option is not checked.
o Added help strings to the ILA admin area to attempt to clearly define what the options do.
o Added Javascript validation functions to the ILA admin area so that invalid data cannot be entered.
o Fixed issue with scaling ILA option where maximum image size was used instead all the time.




@hannes_kann_es:  Thanks for the bug report!  Hopefully, this update solves the issue for you.  Please note that this update disables that option when the Tapatalk plugin is detected.

brynn

Thanks  420Connect.co.uk :)  Maybe if instead of "in-post use" is says "inline use".  I think I would have figured that out. 

(edit #2 -- Seems like having the attachment under the message should not even be possible, if the attachment is inline.  Why would anyone need the attachment twice in the same message?)

With version 4.9 I'm still having some errors in PMs.  (edit #1 -- I never attached anything, and changed my mind, and never sent the message.  But errors came anyway.)

http://forum.inkscapecommunity.com/index.php?action=pm;sa=send
8: Undefined index: ila_insert
File: /home/brynn/public_html/forum/Themes/default/PersonalMessage.template.php
Line: 1628

http://forum.inkscapecommunity.com/index.php?action=pm;sa=send
8: Undefined index: ila_insert
File: /home/brynn/public_html/forum/Themes/default/PersonalMessage.template.php
Line: 1612

420Connect.co.uk

Catching up on the issues reported here and wondering if the mod is also causing some conflicts with tapatalk as previously suggested, as I too experience a few error messages and broken topics when trying to view them in tapatalk, ones including attachments might just be it! I'll have a play around and report back my findings
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

420Connect.co.uk

Hmm..

I've just getting around to testing out the replacing of 0 to 1-based numbering after installing the latest version and get hit with

Hacking attempt...

when I click on Save  :o

From error log:

File: .../Sources/Subs-InlineAttachmentsAdmin.php
Line: 254
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

dougiefresh

#451
Quote from: brynn on November 10, 2015, 01:36:00 AM
(edit #2 -- Seems like having the attachment under the message should not even be possible, if the attachment is inline.  Why would anyone need the attachment twice in the same message?)
That is my thinking, too, which is why attachments aren't shown again at the bottom of the post by default.  However, someone might want to allow people to download the original image, for whatever purpose, and this option allows them to do so easily....

Quote from: brynn on November 10, 2015, 01:36:00 AM
With version 4.9 I'm still having some errors in PMs.  (edit #1 -- I never attached anything, and changed my mind, and never sent the message.  But errors came anyway.)
@brynn: I've fixed the error messages that you reported.  It turns out that the language file wasn't being loaded.  :(

Quote from: 420Connect.co.uk on November 10, 2015, 07:49:00 AM
I've just getting around to testing out the replacing of 0 to 1-based numbering after installing the latest version and get hit with

Hacking attempt...
@420Connect.co.uk: Huh.... That's one interesting bug report you've got there....  Let me investigate it.

EDIT: I have a feeling that the CONTENTS of the message being processed is responsible for tripping the "hacking attempt" message.....  Looks like a rewrite is necessary....  :o

dougiefresh

Uploaded v4.11 - November 10th, 2015
o Fixed undefined index error in PersonalMessage.template.php, reported by brynn.
o Modified renumbering function to avoid "hacking attempt" error message, reported by 420Connect.co.uk.




@brynn and @420Connect.co.uk:  Thank you for the bug reports!

420Connect.co.uk

Many thanks for the quick fix dougie but I think something strange is still happening..
I can now save without the hacking attempt message, but I think it has possibly renumbered them, 1 number too high?..
e.g: 0 became 2

I'm getting a bit confused about the numbering of them now  :P
& just to confuse things a bit more.. - I'm using this mod to offer my members a pre-formatted drop-down list version of: "[attachment id=0 msg=new]" ..as 'Insert First Attachment' and so on..

(I'm also not sure if I should change my numbering in that mods settings before or after the 1-based change..)

I'll make the coffee's..:P

Much appreciated if you can help untangle my mess  O:)
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

dougiefresh


I'm posting v4.11a with the ILA_Admin_Adjust function disabled in Subs-InlineAttachmentsAdmin.php file.  Attached is the Subs-InlineAttachmentsAdmin.php file.  Just upload it to your Sources folder and the function won't incorrectly modify the posts....

Quote from: 420Connect.co.uk on November 11, 2015, 12:42:51 PM
Much appreciated if you can help untangle my mess  O:)
:o OMG....  Looking at the code, I now understand WHY it happened.  I assume you had two references to inline attachments, like so:
[attach id=0 msg=blah]
[attach id=1 msg=blah]

The code incremented/decremented the first id (id=0) to 1.  When it went to increment the second id (id=1), it saw TWO copies, so it incremented/decremented BOTH copies.....  I can't undo this using code.  I hope you've made a recent database backup of your messages, so you can do a partial restore on the messages....  I'm so sorry!  :o

dougiefresh

Uploaded v4.12 - November 11th, 2015
o Fixed the ILA_Admin_Adjust function so that it doesn't screw up posts with ILA tags.




@Everybody: Dcmouser has brought some bugs and fixes into the light, and I intend on incorporating the fixes into this mod.  The only unfortunate thing is that I'm not sure what version the file he sent me is based on, so it will take me a while to figure out what/where the changes are....

420Connect.co.uk

Quote from: dougiefresh on November 11, 2015, 03:31:57 PM

I'm posting v4.11a with the ILA_Admin_Adjust function disabled in Subs-InlineAttachmentsAdmin.php file.  Attached is the Subs-InlineAttachmentsAdmin.php file.  Just upload it to your Sources folder and the function won't incorrectly modify the posts....

Quote from: 420Connect.co.uk on November 11, 2015, 12:42:51 PM
Much appreciated if you can help untangle my mess  O:)
:o OMG....  Looking at the code, I now understand WHY it happened.  I assume you had two references to inline attachments, like so:
[attach id=0 msg=blah]
[attach id=1 msg=blah]

The code incremented/decremented the first id (id=0) to 1.  When it went to increment the second id (id=1), it saw TWO copies, so it incremented/decremented BOTH copies.....  I can't undo this using code.  I hope you've made a recent database backup of your messages, so you can do a partial restore on the messages....  I'm so sorry!  :o


I'm not sure if that top part was directed at me - should everyone do it or.. hang on for the next release with the other bug fix things?

& RE: my mess..
Unchecking the box restores them to working order thankfully but it's back to 0 as being the first attachment and so on..

As always, a million and one thanks for all your time and effort put into this mod, you are a true legend :)
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

dougiefresh

@420Connect.co.uk: Well, I had uploaded v4.11a with the modified Subs-InlineAttachments.php file attached two posts back....  Then fixed it and uploaded v4.12....  The problem function has been fixed, but I can't unfix the damage that v4.11 did...

420Connect.co.uk

I see.. I think :P

Unchecking the 1-based box and hitting 'save' reverted my messages back to how they were so the attachments now work  :D - (so there was no 'damage' caused! :)), am I okay to go ahead and install the latest version instead? (v4.12)


e2a: .. Just tried out v4.12 and again, it seems to change 0 to 2, instead of 0 to 1.. ???
I can PM you an account if it's easier to see whats going on?

Thanks again!
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

brynn

QuoteHowever, someone might want to allow people to download the original image, for whatever purpose, and this option allows them to do so easily....

I don't understand that.  I can download an image from an inline attachment, assuming I have the option for showing the download link enabled.  Hhmmm....even if I disable showing a download link, I can still download the image/file from inline attachment.

I'll get the current version and let you know about errors  :)

Edit
Wait....my current version is 4.9.  But the version available for download is 4.12.  Can that be correct?  Should be 5.12?

Advertisement: