This project is read-only.

Integrate Nearforums in Orchard

Topics: General, Writing modules
Feb 1, 2012 at 9:17 AM

What do you think of integrating nearforums in Orchard? We really nead a forum module...

This is the old discussion begun by techieg

Actually I'm developing a site with Orchard by I can join the team..

Feb 1, 2012 at 9:28 AM

Go for it.

Feb 1, 2012 at 12:29 PM

Yes, I go for it.

I need to figure out how to proceed with the integration, do you have some advice?

Feb 1, 2012 at 7:11 PM
Edited Feb 1, 2012 at 7:12 PM

Well, you obviously need to move the code into a module. You should probably first determine how much you can include as compiled dlls (maintaining a fork of an active code project is not necessarily fun). Another thing to consider is whether it's using any http modules (these will be problematic in Orchard). Then, look at routes (you need to move those into implementations of IRouteProvider) and well, global.asax.cs in general (you don't have access to that from a module) and shared resources such as scripts.

You will have to determine if you want to keep the data structured like it is today or break it down into content parts, which would be more Orchard-y.

Then you will have to look at how they build their views and translate all that into Orchard themed templates.

Finally, the admin screens will probably also require some work to get consistent with the rest of Orchard.

Did you contact the authors of that forum to see if they would be interested in helping with this?

Feb 1, 2012 at 8:44 PM
Edited Feb 1, 2012 at 8:44 PM

Or!! help me :)

Feb 1, 2012 at 9:12 PM

I followed some links and noticed something interesting about NearForums and Orchard:

I also asked Jorge to tell us why he brought NearForums to the Outercurve Foundation, and what he hoped he will be able to accomplish with the Foundation.

I first learned about the Foundation from the Orchard CMS project. I've learned that having the project inside Outercurve does not constrain it to any technology, project methodology or governance. Our main goal is to make the NearForums project grow and make a product that people and companies can rely on. To ensure that inside the project, we wanted to have as much input and as many collaborators as we possibly can. There are many open source projects out there that have strong dependency on the person who found it and we wanted to avoid that. I hope bringing the project to Outercurve will help us build a great community project!

From ...

Feb 2, 2012 at 8:11 AM

I wrote here (let's see what they answer). 

I quickly looked at the code, probably the hardest thing is to convert the db to nhibernate, or you think it is appropriate to maintain the data as it is?


Feb 2, 2012 at 8:17 AM

I think it's better to use a solution already complete rather than rewrite all the code..

Do you want to join the team?

Feb 2, 2012 at 10:34 AM
Edited Feb 2, 2012 at 10:34 AM

The problem with integrating any external system is that it's not designed towards Orchard's content system; consequently you lose out on a whole lot of functionality - particularly templating ability (, alternates, reusing existing shapes, and so on), and also the ability to plug in parts from other modules.

So I would say Jetski's project is more promising because it uses proper Orchard-friendly content parts and types.

If NearForums can be integrated without too much hassle then it's certainly a nice option to have ... But I suspect it might not be so easy for a largish project like that! (And yes, converting the DAL is probably a major undertaking, but trying to maintain it as is brings its own problems, specifically the need to manage multiple databases for multi-tenancy compatibility...)

Feb 2, 2012 at 10:45 AM

I agree with everything you wrote, we should understand and make a decision on what to do...

On the other side redo all the work that was done in Nearforums is a considerable effort...

Feb 2, 2012 at 11:52 AM

The question is, what does NearForums do that Orchard doesn't already do?

Creating editing UI isn't hard - just reusing existing editors with some slightly forum-specific tasks.

Let's have a look at NearForum's feature list:

  • Navigation in forums, topics and tags

Orchard already has tags which are just a content part and can be added to anything.

  • Users can sign-in using Facebook / Twitter accounts and/or custom single sign-on with your site.

A Facebook / Twitter sign-in would be a very nice standalone membership module and benefit anyone. No reason to tie it to forums.

  • SEO Friendly


  • Rss feeds and short urls


  • Fast quoting

Quoting needs some thought - maybe we can just borrow their Javascript for this?

  • Full Web administration


  • SQL Server or MySql database

Check. (Well, I believe there's a MySQL provider for Orchard, haven't tested it myself yet).

Check (and additionally Orchard modules can be installed from within admin).

  • Visual html editor (TinyMCE) for posts with XSS prevention

Check. Except in Orchard we also have the options of CKEditor, Markdown or BBCode.

  • Support for smileys/emoticons and other replacements

Easily done with an IHtmlFilter. (Again would make a nice standalone module).

  • Flexible layout and easy theming


  • Accessible HTML markup and non intrusive javascript


  • Alternate Mobile layout template

Can be done with Theme Switcher. Future versions of Orchard may have better mobile theming built in.

So ... a lot of stuff in NearForums are things we already have for free in Orchard. And I'd say the benefits of an Orchard-centric forum module outweigh the extra work (but actually it's possible that integrating everything from NearForums will be more work than is required to finish Jetski's module...)

Feb 6, 2012 at 6:16 PM

Last weekend I looked at the code of nearforums and I concluded that there is less work to continue with Jetski5822's forum module. 

There are really so much stuff to convert to Orchard in Nearforums....

Feb 6, 2012 at 6:37 PM

Yay for that! The nice thing is that being open source, you can look at what they did and take inspiration where it makes sense.

Feb 6, 2012 at 7:03 PM

fantastic news. I would take a fork of my code and work off that, doing pull requests periodically. 

does this work for you?

Feb 6, 2012 at 7:38 PM
Jetski5822 wrote:

fantastic news. I would take a fork of my code and work off that, doing pull requests periodically. 

does this work for you?

Ok, good!

This month I will be very busy, but from the beginning of March I will be able to work seriously..


Feb 6, 2012 at 8:47 PM
Edited Feb 6, 2012 at 8:49 PM

The features implemented in NGM.Forum are indeed already interesting to provide a forum.

It seems that it has been inspired by forums like MSDN ones. e.g :

Here are some thoughts to make it even closer :

- Categories : Allow to put each forum in a category and regroup them in a summary view Nb Threads / answered
Nb total messages
Add last answer : Author, Link

- Forums :
Display the forum description
Last post with link, author, date
Friendly dates :  … ago

- Threads :
Ask a question or Start a discussion
Body : tiny_mce/plugins/codeblock
Select Forum to publish in
User Avatar, Author view in Details
Signature : Profile field 
Vote : Was this helpful?
Nb views : does the User View part works and can display the counter ?

- Search :
Can the Threads and replies be indexed (Title, Body) ?
Does the summary shape have to be overriden to be well displayed in Search results (Title, link with anchor, ...) ? 

Feb 6, 2012 at 8:55 PM

We should also think about what could be done using the new fetaures available with 1.3 and 1.4 : 

Projection :

Filters : Unanswered,Answered, ...

Sort : Recent, Nb views

RSS : by forum and state


Rules and Voting : 

Recognition points

Achievements Earned

Thread statistics: Views, …


Tokens and Rules (Email action) :

Alert me

Report as abuse


Tokens and Autoroute :

Friendly urls : {Container.Slug}/{Content.Slug}

Feb 6, 2012 at 9:04 PM

Agreed.. There is alot of stuff that was done pre- 1.3.

I think Projections is a must, movign away from typed views.... and also provide RSS out of the box.

The popularity algorithum could be a 'sorting' filter on the projection.

Feb 6, 2012 at 9:07 PM

Facebook/Twitter sign on is part of the open auth module... more social integration could hang off these modules.

Feb 6, 2012 at 9:43 PM

They are all good ideas, just implement them! :-)

Feb 6, 2012 at 11:08 PM

lol!! I started.... I just need to to get going again on them!!! :)

I implemented categorys i nthe dev branch, but rolled the code back. I would like more of a view from people on how you would implement categories... as I think this should be the number one priority.

Feb 6, 2012 at 11:14 PM

I really believe that categories are a concern that is orthogonal to any specific content type. Thus, the module should depend on, say taxonomies, to implement this.

Feb 6, 2012 at 11:15 PM

Ah you see, this is the argument. Some people think that maybe overkill.....

Feb 6, 2012 at 11:27 PM

Writing less code is overkill?

Feb 6, 2012 at 11:44 PM

Ah but thats not what I said. ;)

Me and Sebastien spoke about this a while ago.... And this may only hold true at that point in time but here was our conversation to help give more perspective.


Ive got to a point in my Forum module where people are asking about 'Categories' and we discussed either having this integrated directly in to the Forum module, and I suggested using your Taxonomy module.

Obviously I would like to keep this out of the forum module. What would you suggest? Could your module do what I am talking about? here is an example...

Orchard   <- Category
      Discussions     <- ForumPart
      Help and Support

Could your taxonomy module do the category stuff?


Doable. But from a user’s perspective, they would have to go to the Taxonomies menu item to create new categories. If it’s ok for you then it’s ok for me. Though it’s so simple so create a one-level category for Forums, that it would be risky to be based on taxonomies. It’s just having a ForumCategoryRecord, a Controller to Edit those ones, and a link from a FroumREcord to ForumCategoryREcord, plus a dropdownlist in Forum editor to select a category.

Because I don’t see what you could reuse from taxonomy but the selection and the edition of categories. Pros and cons.


of course im open to either implementation as long as its the right implementation. <- That was me.

Feb 6, 2012 at 11:48 PM

BTW Here was my brain dump whilst working on this mod :- - Its probably slightly out of date now.

Feb 6, 2012 at 11:49 PM

If it's ok that those categories can only ever contain that one type of item, sure, that's fine. On the other hand, you could create your own admin screens for these categories and still use taxonomies underneath, as a kind of data store.

Feb 7, 2012 at 10:47 PM

Let me just give my perspective: I'd like 'Categories' to be an optional feature of the forums module. This way I can either use them (for probably the majority of forums I set up), but I can provide an alternate categorisation (e.g. linking a forum directly to a product, or perhaps hierarchical many-to-many categories using Mechanics), and I can even switch them off entirely if I just want a single board.

So whatever option you go with, have it enabled as a separate feature.

Personally I think it makes perfect sense to use one of the many existing categorisation systems (Mechanics, Taxonomies, even Tags) rather than reinventing that wheel yet again!

The nice thing about using Mechanics for this would be that to create a new category, you'd just click on New > Category, and then it'll appear in the drop-down list when you create a Forum.

Jun 15, 2012 at 10:04 AM
Edited Jun 15, 2012 at 10:04 AM

What's the status of this forum project currently?