I agree, although I have found it fine to use pastebin for code.
Yeah, I was thinking about child theming or hacking (probably just a custom template really) in a pseudo Pastebin feature/instruction for users. Forums I mod already, I end up just directing people to use Pastebin and then share the URL, seems like the easiest way sometimes.
This new forum is going to deal heavily and primarily on users working with code so I want to make it painfully simple.
It’s hard enough to get people to understand how to wrap their code with code tags so it doesn’t execute, that’s a hurtle enough. But, then when it doesn’t work that’s a few more replies to get it worked out.
I’ve actually never seen any forum do that very well, make it super easy for anyone (as in including beginners/non-tech-savvies) to understand how to add code. I might make a second textarea that says “Paste Your Code Here” in big beautiful letters :).
One idea might be to just make it so the code button wraps code with code and pre tags.
If I come up with a decent solution I’ll try and remember to share it.
Thanks, Bryan
It’s also frustrating that rel=”nofollow” is inserted into HTML inside code tags as this is bad and unintended advice when helping someone.
Pastebin doesn’t look like a viable option as far as actually integrating it. Would require tapping into their api which is a level of programming that is waaay over my head.
An unpleasant, but manageable workaround is to use:
http://centricle.com/tools/html-entities/
to encode the code first, wrap it in code tags and cross your fingers.
Still has issues with quotes and rel=”nofollow”, but going back and editing I managed to get the code to display cleanly how I want it.
Getting users to do this (even if they knew how) will be impossible so ultimately we’ll just have to settle with the “use Pastebin and share the URL” method.
There is https://wordpress.org/extend/plugins/bbpress-post-toolbar/ – but it’s not so pretty and still has it’s glitchy moments.
Another option I suppose would to get in the code and change it so that the code button inserts textarea tags instead and then just style the hell out of them to look and function like they’re not textareas ;). That could sure confuse users though.
I guess we’ll see what 2.2 brings.
Thanks, Bryan