Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

problem in displaying old posts images with advanced editor

Hello,

I 'm using the "Advanced editor" plugin on Vanilla 2.2.1.
I' ve enabled the Wysiwyg option in the settings. For the new posts it's possible
drag and drop images and it works fine: pictures are immediately visible, instead
the old posts show images as icon files to click for view them.
I've enabled the "Reinterpret All Posts As Wysiwyg" option but with no results.
Any idea to solve this issue?

thank you

Comments

  • R_JR_J Admin

    Nope, I have no clue. Maybe anybody else. My only merrit here was that I made that settings available to the admin (that's the plugin where you've posted the question), I don't know how the advanced editor works internally...

    But what I would try is the following: edit a discussion where the image isn't display the way you like it. Don't do any real editing, just save the file again. Reload the page. Is it displayed correct?
    Yes: you'll need a plugin
    No: you'll need to do some SQL transformations

  • RiverRiver MVP
    edited July 2016

    @Mark1215 said:
    Hello,

    I 'm using the "Advanced editor" plugin on Vanilla 2.2.1.
    I' ve enabled the Wysiwyg option in the settings. For the new posts it's possible
    drag and drop images and it works fine: pictures are immediately visible, instead
    the old posts show images as icon files to click for view them.
    I've enabled the "Reinterpret All Posts As Wysiwyg" option but with no results.
    Any idea to solve this issue?

    thank you

    Reinterpret All Posts As Wysiwyg means as it says in the notes.

    The purpose of this option is to normalize the editor format. If older posts edited with another format, such as markdown or BBCode, are loaded, this option will force Wysiwyg.

    This is an impact on the "body" .
    if the image was not previously inserted into the body of the message and was an attachment by another plugin (e.g. fileupload) and not manually inserted into the body, then the force wysiwyg has no impact since it concerns two different things.

    The simplest thing to do is click on insert image in each comment or discussion when editing.

    Otherwise you could add js to select out the image src from the file preview and change the height and width of the image to make it display larger without inserting it into the body per se.

    another option is to read the media table match comment to comment (or discusssion to discussion) and comment id to foreign id (or discussion id respectively to the foreign id) and check for the path in media table and append that to the formatted body of the message.

    probably the EASIEST - another option may be to modify the https://github.com/vanilla/addons/blob/master/plugins/FileUpload/views/link_files.php and change the image width to the message width and make the height auto.

    or change the attach of the editor plugin.

    The last option is to read media table and take file path for appropriate comment and append it to the body in the comment or discussion tables. with img tags surrounding it.. You would only need to do this once.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • RiverRiver MVP
    edited July 2016

    @R_J said:
    Nope, I have no clue. Maybe anybody else. My only merrit here was that I made that settings available to the admin (that's the plugin where you've posted the question),

    yes this is a problem - nowhere to compartmentalize questions about core plugins , since you can't "ask a question" from the add-ons page if the core addon doesn't exist.

    A blank stub in the add-ons for all core plugins (with a note comes with the core, but no specific download option since it comes with core) would be helpful than all the questions would be in one place and not posted to the wrong add-on.

    if the user does not add a tag. but then again how many people ever use tags anyways to find anything? Has anyone ever used a tag to find something on this forum?????

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • @River said:

    A blank stub in the add-ons for all core plugins (with a note comes with the core, but no specific download option since it comes with core) would be helpful than all the questions would be in one place and not posted to the wrong add-on.

    Sounds like a good idea. Check out the vanilla/community repo to file issues and pull requests.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • RiverRiver MVP
    edited July 2016

    @hgtonight said:

    @River said:

    A blank stub in the add-ons for all core plugins (with a note comes with the core, but no specific download option since it comes with core) would be helpful than all the questions would be in one place and not posted to the wrong add-on.

    Sounds like a good idea. Check out the vanilla/community repo to file issues and pull requests.

    glad you like the idea. at least one person likes the idea. I'll put it on my revisit someday list.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

Sign In or Register to comment.