We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I have started to work on a similar project but since it’s really not a trivial task, i think that i want to put my effort on a community project instead of an isolated attempt to be a PHP ninja coder (which i’m not).

    However, I really need a flat forum.
    Therefore, i have a few questions to ask:

    - Is it possible to push the flat forum up in the roadmap. Like for next release (if i can come with some code for it obviously)... ’-_-

    - Can we use the actual database schema with/for a flat forum ?

    - The third question is the same as Goldsky.
    I would really like the forum to use the extising user facility instead of its custom implemented one.

    - On my test, i have used FormIt and Login a lot to perform user registration and forms control.
    Can we integrate/implement similar system directly into Discuss ?

    In fact, my only concern with Discuss is that it is not a flat forum.
    That huge point appart, i love it and i think it can be a really great addition to the MODx toolset.


    • Discuss is AMAZING!
      Making me fall in love with MODx once again.

      I know that splittinred stated that "Discuss is not, nor ever was intended to be, a SMF-killer", but he should really face the facts: it IS a SMF-killer! Or at least it can be a solid alternative. tongue

      Making it work like a flat forum was pretty simple and without any hacks.
      I’ll submit the additionnal snippets/chunks/etc to git once i cleaned up the code.



      • Discuss really needs some testing, admin and moderation features. The retrieval and displaying of the posts works great. When you get to forums of decent scale like this one, you need the moderation and admin features from projects like SMF. I agree though, it sure could play with the big boys. wink
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • Shaun has done an extremly good job given the time it has taken to develop it to its current state. Not to mention that it is not the only component that he has released for Revo.

          Some of the tricks he used in the xPDO class to query the table and add automatic actions are very enlightful (i don’t even know if this word actually exist).

          Like i said, i have successfully added a flat view of the forum and am actually working on it to propose some changes and improvments to git.

          Most of the relatively simple changes will probably be accepted.

          However, i need some advice on how to implement an efficient plugin system at least for the content field in each post.
          What i mean is it would be nice that user could provide their own BBCode Parser, syntax higlighting, image wrapper.
          For now, Discuss has BBCode totally built in the getContent() function in the xPDO class:

          <?php
          public function getContent() {
          	$message = $this->get('message');
          
          	$tags = array(
          		//bbcodes tags list here - Don't play well with SMF parser
          	);
          	if ($this->xpdo->getOption('discuss.bbcode_enabled',null,true)) {
          		$message = str_replace($tags,array(
          			'<','>',
          			'<strong>','</strong>',
          			'<em>','</em>',
          			'<img src="','">',
          			'<div class="dis-code"><h5>Code</h5><pre>','</pre></div>',
          			'<div class="dis-quote"><h5>Quote</h5><div>','</div></div>',
          			'<span class="dis-strikethrough">','</span>',
          			'<a href="','</a>',
          			'<a href="mailto:','</a>',
          			'<hr />',
          			'<ul>','</ul>','<li>','</li>',
          			'">',
          		),$message);
          	} else {
          		$message = str_replace($tags,'',$message);
          	}
          
          	return $this->_nl2br2($message);
          
          }
          


          Now, i can see that we can use getOption directly from this class.
          Is it relevant performance wise to provide a custom processor directly from this class (and how to do it correctly) ?

          Quick thoughts:
          <?php
          public function getContent() {
          	$message = $this->get('message');
          	
          	//Should contain a processor with the custom BBCode parser
          	if($this->xpdo->getOption('discuss.custom_bbcode_parser',null, 'none') != 'none' ){
          		
          		//$message is processed through this custom bbcode parser
          
          		
          	} else {
          		$tags = array(
          			//bbcode tags list
          		);
          		if ($this->xpdo->getOption('discuss.bbcode_enabled',null,true)) {
          			$message = str_replace($tags,array(
          				'<','>',
          				'<strong>','</strong>',
          				'<em>','</em>',
          				'<img src="','">',
          				'<div class="dis-code"><h5>Code</h5><pre>','</pre></div>',
          				'<div class="dis-quote"><h5>Quote</h5><div>','</div></div>',
          				'<span class="dis-strikethrough">','</span>',
          				'<a href="','</a>',
          				'<a href="mailto:','</a>',
          				'<hr />',
          				'<ul>','</ul>','<li>','</li>',
          				'">',
          			),$message);
          		} else {
          			$message = str_replace($tags,'',$message);
          		}
          		
          		
          		return $this->_nl2br2($message);
          	}
          
          	//The custom bbcode parser should have is own nl2br function
          	return $message;
          }
          


            • 22537
            • 78 Posts
            Hey

            What about a progress report on Discuss?

              • 16895
              • 87 Posts
              You can see the commits to Discuss at GitHub.
              • do you have any specific reason why you use resources as the templates, and not smarty’s tpls or chunks as you have always done?
                  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.
                • If you’re talking about the general behaviour of Discuss, i kinda agree, it’s not the best approach if we want to allow heavy theming features.
                  OTH, it’s still an alpha, so things can change drastically in the next release.
                  • I’m trying to think reverse of how this forum should be done as final.
                    Perhaps I can get my hands dirty on this.

                    The administration side, should it be done from front-end or back-end?
                    I know there is a simple CMP, but giving a moderator level shouldn’t be the same as giving a manager access.
                      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.
                      • 28215
                      • 4,149 Posts
                      I’d be ok with moving away from the Resource-based approach, however, there are a few issues with that:

                      1. Using resources allows the user to specify the URL alias and such; if we moved to a single snippet with its own request handling, it’d break that.
                      2. The Resource approach allows for better caching via Revo’s partial-page caching mechanism. Moving everything to a snippet that uses Smarty would slow Discuss load times, sometimes significantly.
                      3. Currently the Resource approach allows you to basically override *any* part of Discuss’s HTML markup. Moving to a theme-based approach would make this more difficult. That said, I’m not opposed to it.

                      My main concern is URL alias handling and caching.

                        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com

                      This discussion is closed to further replies. Keep calm and carry on.