Please upgrade here. These earlier versions are no longer being updated and have security issues.

Possible to show advanced (or any?) editor in embedded WP comments?

AaronWebsteyAaronWebstey Headband AfficionadoCole Harbour, NS ✭✭✭

Another one of those things that I feel like I've read about somewhere else, but I can't for the life of me find a thread about it.

WP comments - works fine, but no a) mentions or b) advanced editor. Is this just the way it is, or is my theme messing something up?

E.g. http://trstriathlon.com/sanders-wurtele-battle-wins-oceanside-70-3/

Thank you!

Comments

  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

    Just upgraded from 1.18 to 2.2, Cloudy pro theme. WP 4.4.2 running MH Newsdesk theme. PHP5.6. I'm wearing black socks and a green and white striped shirt and it is currently about 20C in my office.

    BleistivtThemeSteam
  • Copy this file to your theme (view override):

    https://github.com/vanilla/vanilla/blob/853f946bd29041c7bdc956de669a64d0d20ddedc/applications/vanilla/views/discussion/embed.php#L56

    and change line #56 to WriteCommentForm();

    My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations

    • Vanilla APP » Learn more «
    • iOS & Android App for Vanilla - White label app for your forum
    AaronWebsteyhgtonight
  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

    Thanks @Bleistivt ! Is this documented somewhere, and I'm just an idiot?

  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

    @Bleistivt I just copy it to themes/--themename--/views/discussion/embed.php, correct?

  • Yes. But that was incomplete, sorry. You also need to replace line 19 the same way and add this to your CSS:

    .embed .editor {
      display:block;
    }
    

    My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations

    • Vanilla APP » Learn more «
    • iOS & Android App for Vanilla - White label app for your forum
    hgtonightAaronWebsteyThemeSteam
  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

    @Bleistivt duh, I probably should have figured that out. Thank you - incredible!!

  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

    Very weird behaviour, FYI, that I just noticed - when an article is first posted, the advanced editor won't show up. With regular editor, no problem. If there are already comments on the article - advanced editor will show up. ??

  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭
    edited April 2016

    Notice to anybody trying this - unfortunately, there's a bit more to it than just copying the file and changing those lines. It'll work fine if there is already at least one comment made, but not on brand new posts. The WriteEmbedComments() function does some stuff to create a new discussion - that, for obvious reasons, WriteComments() does not have to do.

    Possible solutions:
    1. Via core edit or plugin, create a config option something like "Allow normal editor in embedded comments". Alter WriteEmbedComments() to fetch the editor view instead of building its own editor inputs, if option is enabled.
    2. Copy WriteEmbedComments to a new function in my theme's modified embed.php view, modify as above, and call it WebsteyWriteComments().

    I will try my best to do #1 (via plugin), but there's a very good chance I'll only have time to do #2. For now, mentions and WYSIWYG are absent from embedded blog comments.

    ThemeSteam
Sign In or Register to comment.