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.
Possible to show advanced (or any?) editor in embedded WP comments?
AaronWebstey
✭✭✭
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!
0
Comments
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.
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
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
Thanks @Bleistivt ! Is this documented somewhere, and I'm just an idiot?
@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:
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
@Bleistivt duh, I probably should have figured that out. Thank you - incredible!!
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. ??
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.