Advertisement:

Author Topic: Post and PM Inline Attachments  (Read 153485 times)

Offline allkary

  • Semi-Newbie
  • *
  • Posts: 24
Re: Post and PM Inline Attachments
« Reply #20 on: August 22, 2014, 09:26:07 AM »
Hello, I get some warnings when installing the mod and when attaching the fails it says "[ Invalid Attachment ] "
Thanks for your time :)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #21 on: August 22, 2014, 07:33:19 PM »
Hi, would you be able to look at the issue of this mod not working on Chrome or Firefox. When I click on Insert Attachment, nothing happens but on IE it works like a charm
I tested it in FireFox during development of the mod, and tested it in Chrome just now.  I don't see where it doesn't function properly.  When I press the "Insert Attachment" link beside the attachment, the text "[attachment=0][/attachment]" gets inserted into the post....

I like the idea of this mod but I am getting inline links instead of inline images:

Am I doing something wrong? Would like the image to be displayed inline like I have done in this post. Thanks.
No, I think the problem resides in the Subs-InlineAttachment.php code.  I've done some rewriting of the code for v1.4, but it is attached if you want to replace your file in the Sources folder....  Lemme know if this solves your problem.  Thanks!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline saurabh1938

  • Semi-Newbie
  • *
  • Posts: 85
    • Gotripperz
Re: Post and PM Inline Attachments
« Reply #22 on: August 23, 2014, 06:15:54 AM »
Hi, would you be able to look at the issue of this mod not working on Chrome or Firefox. When I click on Insert Attachment, nothing happens but on IE it works like a charm
I tested it in FireFox during development of the mod, and tested it in Chrome just now.  I don't see where it doesn't function properly.  When I press the "Insert Attachment" link beside the attachment, the text "[attachment=0][/attachment]" gets inserted into the post....


Hi, I appreciate you looked into the issue, but I tested this on 3-4 machines, it is only working on IE but not on Firefox, Safari, Chrome... I don't know what's happening but issue persists for all the browsers other than IE.

Thanks,
Saurabh
« Last Edit: August 23, 2014, 06:20:12 PM by saurabh1938 »
Visit my forum : www.gotripperz.com

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #23 on: August 24, 2014, 06:34:09 AM »
I would love to fix it, but I can't fix something that I can't reproduce.....  When you click the More Attachments link, does it work?  If not, that suggests that Javascript isn't enabled for your browser....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #24 on: August 24, 2014, 08:13:05 AM »
Uploaded v1.4 - August 23th, 2014
o Fixed multiple issues in the inline attachment validation function.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline marcosdjcm

  • Newbie
  • *
  • Posts: 5
Re: Post and PM Inline Attachments
« Reply #25 on: August 26, 2014, 03:54:15 AM »
Hi, thanks for making this mod, I am having 1 problem with it.

It inserts the link to the attachment in the post but doesn't actually display the image, maybe I'm missing an option somewhere? I want it to display the same way I've attached the images below:




Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #26 on: August 26, 2014, 04:36:28 PM »
Attach the image to your post so that I can see what the problem is with the mod.  If you don't, I'm going to assume that you have a corrupted image.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #27 on: August 27, 2014, 01:45:27 PM »
You could also upload the image somewhere and PM the location of the image if it's a image of a "sensitive" nature....  Just warning me in your PM if that's the case.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline saurabh1938

  • Semi-Newbie
  • *
  • Posts: 85
    • Gotripperz
Re: Post and PM Inline Attachments
« Reply #28 on: August 28, 2014, 05:50:29 PM »
Hi Appreciate your effort in building this great Idea. But somehow it is not compatible with my site's settings... As my forum is not live, I started again from a scratch to install your mod at the beginning. At start it was working fine on all browsers but as I filled it up with other mods and contents and configured settings, it again stopped working on all other browsers except Internet Explorer.

So, In the end I had to uninstall your mod after scratching my brains for 4-5 days. But still a great Idea, somehow it didn't work for me and had to install another ILA mod compatible with my site

Thanks,
Saurabh
Visit my forum : www.gotripperz.com

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #29 on: August 29, 2014, 03:17:01 PM »
If you tell me what mods you are running, I might be able to track down your incompatibility....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline saurabh1938

  • Semi-Newbie
  • *
  • Posts: 85
    • Gotripperz
Re: Post and PM Inline Attachments
« Reply #30 on: September 01, 2014, 06:13:21 PM »
Though I have installed another mod for ILA and it is working very fine for me, but still you helped me and put in your efforts. I wish you luck that your mod does great and you track down the issue.

Below is the screenshot showing the mods I am using
Visit my forum : www.gotripperz.com

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #31 on: September 05, 2014, 09:28:48 PM »
@saurabh1938: Can you at least tell me what inline attachment mod you are using now?  Maybe I can learn something from it......
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline saurabh1938

  • Semi-Newbie
  • *
  • Posts: 85
    • Gotripperz
Re: Post and PM Inline Attachments
« Reply #32 on: September 10, 2014, 02:24:36 PM »
I am using this ILA Mod...  it's not listed on this site

https://github.com/Spuds/SMF-ILA
Visit my forum : www.gotripperz.com

Offline thelastlokean

  • Newbie
  • *
  • Posts: 8
Re: Post and PM Inline Attachments
« Reply #33 on: October 11, 2014, 03:02:54 PM »
It works for me, which is great! The one in the OP, not the one above...  I really think this adds a lot to SMF!  I don't want my users to have to handle hosting their own images, and I haven't seen another mod that integrates image uploads directly into posts!  Has a couple issues/glitches though...  For now I'll be using it anyways.

First off, it doesn't work at all with a WYSIWYG editor.  That is fine that it doesn't show the image, but if your in WYSIWYG mode of the SMF editor, it will not put the [attachment=n][/attachment] code into the editor.  I don't really care if the content actually shows in the WYSIWYG editor, but it would be really nice if it added the code and the editor just let it be... 

Also SCeditor is going to be in 2.1 I hear, and this doesn't seem to work at all with SCeditor no matter what mode you are using it in.

Also if you toggle from source to WYSIWYG mode, any added [attachment] BBCodes disappear and have no effect on the resulting post.

It seems to work fine with all other BBCodes, even custom ones like the 'spoiler' mod and default things like 'glow' and 'shadow', where the BBCode is shown, not its result in the WYSIWYG editor just like in the normal editor.

Last issue, it doesn't show the image in the 'preview' section.  It would really be helpful for proper image sizing with the 'height' and 'width' features if it actually showed the image in the preview window.  Unfortunately it only seems to show the BBCode... Resulting in users with OCD needing to edit posts multiple times to get everything just perfect.
« Last Edit: October 16, 2014, 05:37:16 PM by thelastlokean@gmail.com »

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #34 on: December 06, 2014, 08:37:40 AM »
Uploaded v1.5 - December 6th, 2014
o Fixed attachments not being hidden after use in post with Custom View of Attachments installed.

@thelastlokean: I'm sorry for the late response.  I'll start looking into the issues reported in this thread.....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #35 on: December 06, 2014, 07:41:24 PM »
Update: Okay, I've gotten the preview thing in "source" mode (not WYSIWYG mode) to work, but at the moment, it is only for attachments that have been saved to a particular topic.  In other words, you can't create a post, attach some files to the post-in-progress, add some attachment tags, and preview it without saving at least once.....

I've also written a new form of the attachment bbcode.  It'll look something like this:
Code: [Select]
[attachment id={id} width={width} height={height} float={float}][/attachment]Every parameter except id is optional.  float will float the image to either the left, right or center.  All new "insert attachment x" clicks will use the new form instead of the old form.  Mind you, the old form is still available for backward compatibility....  not to mention keeping my head from exploding from trying to convert all the old forms to the new forms.....

EDIT: This new version will be version 2.0, in case anyone is wondering....
« Last Edit: December 07, 2014, 03:54:10 AM by dougiefresh »
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #36 on: December 13, 2014, 01:04:53 PM »
Uploaded v2.0 - December 7th, 2014
o Added new form of the attachment bbcode, as explained above.
o Fixed preview capability in non-WYSIWYG mode for already saved attachments in posts...
o Changed code that scales image to use global settings only if no size is specified by the user.
o Modified link building code for HS4SMF so that it properly groups the attachments.
o Added support for Highslide Image Viewer.
o Added support for JQLightBox.



@Everybody: As stated in the last post, I've written a new form of the attachment bbcode.  It looks something like this:
Quote
[attachment id={id} height={height} float={float}][/attachment]
Every parameter except id is optional.  float will float the image to either the left, right or centerAll new "insert attachment x" clicks will use the new form instead of the old form.  Mind you, the old form is still available for backward compatibility....

I realize that the PM Attachment preview function is still broken, and and the Post Attachment preview functionality cannot display attachments that haven't been "finalized" outside of preview mode.  These will be the next things on my agenda to fix for this mod....  Mind you, these are NOT small changes that will have to be made!!!

Compatibility with SCeditor is also planned, if possible (which it should be....) 

I asked about how to alter SMF's WYSIWYG editor to handle new bbcodes here, and Arantor said the WYSIWYG editor in SMF cannot deal with complex bbcodes, so it looks like making this mod work in WYSIWYG mode in SMF without mods is not possible.....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,041
    • Arantor on GitHub
Re: Post and PM Inline Attachments
« Reply #37 on: December 13, 2014, 03:20:01 PM »
Seriously... SMF's editor doesn't even handle all its OWN bbcode properly, and good luck adding more to it...
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #38 on: December 19, 2014, 02:48:11 PM »
Uploaded v2.1 - December 19th, 2014
o New BBCodes added: attach, attachthumb, and attachmini.
o Some reorganization of the code to accommodate the new BBCodes.
o Image not scaled if both width and height are specified.
o Parameter validation functions fixed to prevent negative values from being passed.
o No highslide features if image size is smaller than specified max image dimensions.
o Fixed image placement code by removing "block_level" requirements from all BBcodes...
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: Post and PM Inline Attachments
« Reply #39 on: December 23, 2014, 03:54:15 PM »
Uploaded v2.2 - December 22th, 2014
o New BBCode added: attachurl
o margin parameter allowed to be used seperate from the float parameter.
o Fixed the code creating the float parameter so that it works (again)
o Fixed attachmini bbcode to return a blank string if attachment is not an image.
o Added scale parameter to v2.x bbcodes, accepting false, true, yes, and no.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!