1

I have a future project that I am working on quoting and they have a need for a pretty active community forum. I would love to be able to use the EE Discussion Module but would have a few things that would be preferred to be included. Here are a few...

  1. A WYSIWYG editor for forum posts. Most of the people who use this forum would not be considered techinical gurus, and anything that looks like code would decrease the usage.
  2. Multiple file upload, without previewing or reloading the page.
  3. "like" or rating for forum topics or posts.

Beyond that there are other things the client would like but can be handled by using the forum templates, - social sharing, light boxes for images, etc...

I have already purchased teh Scaffold theme which gives a great starting point for theming and moving forward but I think what is going to be more difficult is core functionality of the module.

Ideally it would be perfect if I could just replace each section of the forum with a field type add-on and then i could extend it on the fly anytime, but that's impossible from my understanding. I did have one twitter reply that discussed creating your own forum with channels and SafeCracker but as discussed performance could be an issue and I dont see the need to reinvent the wheel if its not needed.

Anyone who has had experience or could forward me in the right direction from some more advanced Discussion module usage please let me know.

3

I followed this old EE thread and got a WYSIWYG in place. I modified the forum_themes/scaffold/forum_global/html_footer.html, adding this snippet:

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="/themes/third_party/wygwam/lib/ckeditor/ckeditor.js"></script>
<script src="/themes/third_party/wygwam/lib/ckeditor/adapters/jquery.js"></script>
<script src="/themes/third_party/wygwam/lib/ckeditor/ckeditor-forums.init.js"></script> 

(I used an existing CKEditor install, from WYGWAM, rather than downloading another copy from CKEditor.com.)

My init.js (ckeditor-forums.init.js above) file looks like this:

jQuery(function(){
// ckeditor config
var wysiwyg_nl2br_config = {
    toolbar : 
        [
            ['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink']
        ],
    width : '650px',
    height : '200px',
    forcePasteAsPlainText : 'true',
    autoGrow_onStartup : false,
    enterMode : CKEDITOR.ENTER_P
};

jQuery("textarea#body").ckeditor(function(){
    // attach CKFinder
}, wysiwyg_nl2br_config);

});

Since the client wanted something very simple and sparse. You can, of course, add all the other various plugins and buttons you want.

| improve this answer | |
2

For the all of your 3 required points, the EE discussion forum module file will need to be altered. Yes, the discussion forum have some hooks but those hooks wouldn't be helpful for you.

1) Yes, A WYSIWYG editor can be inserted by updating the template files and including necessary JS. Also, the file upload path should be well defined, module file also need to be altered so that it can parse WYSIWYG contents properly rather than current encoding process. I think, this requirement can be achieved by just inserting WYSIWYG editor into the template as it will store row HTML code which will be parsed at browser.

2) In the multiple file upload, (i) you need to give member facility to upload more than one files with any thread which can be achieved by some JQuery stuffs or plugin, if you would like to have simple just put a constant number of file fields. (ii) you will be need to process all those uploaded files and save the info within the database table. I think, this would be managed within the database table "exp_forum_attachments".

3) For the "like" or rating for forum topics or posts, you will need to extend this module by creating some new database tables for managing/storing likes or rating of forum topics or posts, need to create some new actions/methods into module file to process it.

| improve this answer | |
  • Thanks for the feedback - this will help some in figuring it out. Starting to wonder if creating an add-on might be a better solution. Seems as if the forum module wasn't designed with modification in mind, which is understandable. – Mike McBrien Jun 25 '13 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.