We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46886
    • 1,154 Posts
    Hi All:

    I am finding a few small problems with Discuss, and most are fixable, but one has got me a bit stumped. Hope someone could help out with some advice.

    In the thread, the reply box is there with the typical buttons like bold, italics, preview and so on. But none of them work at all.

    I thought it was because I hadn't installed TinyMCE, so I did that, but it didn't seem to fix the problem. TinyMCE now works within MODX but not in Discuss.

    I looked through the system settings, and found what might be the problem, but not sure. It has the disBBCodeParser as the parser class, but doesn't have a value for the parser class path. I might be barking up the wrong tree here, but nothing else in system settings seems to be related to this problem.

    What is the problem here? Any idea?

    This question has been answered by goldsky. See the first response.

      • 46886
      • 1,154 Posts
      Well I thought I figured it out, I found disBBCodeParser in the discuss files, and set the path to this:
      /core/components/discuss/model/discuss/parser/

      But, that led to a major error, where nothing inside of the category view could be opened, with this error:

      [2014-04-24 01:09:52] (ERROR @ /index.php) Could not load class: disBBCodeParser from disbbcodeparser. [2014-04-24 01:09:52] (ERROR @ /index.php) Problem getting service disParser, instance of class disBBCodeParser, from path /core/components/discuss/model/discuss/parser
      Fatal error: Call to a member function parse() on a non-object in /home/rayxilaw/public_html/core/components/discuss/model/discuss/dispost.class.php on line 618


      So now I am extra stumped. I have changed to {core_path}components/discuss/model/discuss/parser/ which doesn't throw an error but also doesn't seem to work either. Changing to {core_url}components/discuss/model/discuss/parser/ also causes an error.

      I have made a bug report in github for this. Hope I can resolve it soon.
        • 46886
        • 1,154 Posts
        Hmm it turns out the supporting js isn't included. That is a problem without a doubt. Is this a standard js package that just needs to be linked in or some custom implementation that now needs to be re-created?

        Still checking all the files and documentation for answers.

          • 46886
          • 1,154 Posts
          Ok after a bit of research I figured it out, with some help from Christian over at Github.

          I will upload the solution soon. By the way its just the buttons, not the parser, which doesn't work out of the box. And the js solution for that should be pretty simple.
          • discuss.answer
            • 11055 ☆ A M B ☆
            • 3,112 Posts
            I've never used Discuss, but yes, TinyMCE can be added individually into your template.
              Rico
              Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
              MODx is great, but knowing how to use it well makes it perfect!

              www.virtudraft.com

              Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

              Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

              Maintainter/contributor of Babel

              Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
              • 46886
              • 1,154 Posts
              Thanks goldsky, it turns out TinyMCE was a red herring for me. It's just a JS script with a "surroundText" function that I need, and many are available online.

              Thanks for jumping in, I was losing it for a second, which always happens right before I figure it out haha. Then I regain my composure and wish I had kept it together a little better when the heat was on ;-)

              Cheers!
                • 46220
                • 66 Posts
                How did you manage to get TimyMCE incorporated in discuss Andrew? I've been trying to get it to work for about 3 days now (really wanted to solve it on my own), but to no avail.
                  • 46886
                  • 1,154 Posts
                  What problem are you trying to fix? This thread is actually about the bbcode problem with Discuss.

                  Are you talking about making posts in Discuss or writing within the MODX manager?

                  The function I was trying to fix in this thread was to allow bold, underline, and other functions in Discuss, there were a lot of functions that weren't working or worked only sometimes. The whole thing was a red herring, it was a simple problem with a js call, explained here: https://forums.modx.com/thread/91011/js-errors-in-fresh-install

                  Usually we don't want front-end users using things like TinyMCE, because that means they can use html and code. That's why bb code is so useful. [ed. note: nuan88 last edited this post 9 years, 10 months ago.]