Interest in forum solution?

Permalink 3 users found helpful
Is there any interest in a forum solution?
I started to build one based on a small presentation I held a while ago.

It's not complete, but I think the structure is simple and would be easy to extend. Was just wondering if there's any interest, maybe even someone who's be happy to help work on it together?

>https://github.com/ortic/concrete5-forum...

Remo
View Replies:
mnakalay replied on at Permalink Reply
mnakalay
Hi Remo,

A conversation about the need for a forum platform resurfaces from time to time -sporadically- so there's probably some interest but I'm not sure it is overwhelming.

Forums are a big hassle to manage and It seems many are just happier using Facebook groups instead.

I don't mean to sound discouraging and my opinion is based on limited "data" so "face-value" is not to be trusted.

I for one will happily download and study anything you code :)
mnakalay replied on at Permalink Reply
mnakalay
I quote "Instead of using pages for everything, this forum uses a lean structure that should be more performant than a page + attribute based solution. In order to handle the requests and still have clean urls, we are overriding the view method in the page type controller. That way we can handle all requests in an elegant way and keep SEO friendly URLs."

Right there you made my point (about studying) and my day, thank you!
RickJ replied on at Permalink Reply
Yes, I would be very interested in a forum solution.
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi Remo,

I've seen the same thing as mnaklay, that over the last 3 years there have been requests for a forum add-on.

A forum that could be installed and managed through concrete5 would be very interesting. Especially for those who want to self-host their forums, but don't know how to install, manage, and update dedicated forum software.

I agree that using Facebook is easy, free, and offers a lot of features, but for some the privacy issues and restrictions can be a problem. One example is that Facebook appears willing to take down groups based on complaints from users and governments with limited investigation into the merits of the complaint.

I would also be interested in studying the code you came up with.
Remo replied on at Permalink Reply
Remo
Thanks for the feedback guys!

I'll keep this on my todo list. Got to take care of money business for a bit though.

@mnakalay, @MrKDilkington the interesting magic (read hacky part) is found here:
https://github.com/ortic/concrete5-forum/blob/master/controllers/pag... That's what I'm doing to handle all my sub-page request to ensure we've got pretty urls despite that I don't create pages for each topic. The ancient forum I'm using on concrete5.ch uses a very similar approach.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@Remo

That is excellent news.

I am happy to help test it.
Gondwana replied on at Permalink Reply
Gondwana
tl;dr: yes!

I used to run a phpBB forum alongside a c5 site for the group's other pages. I never liked having the two separate environments, and users rarely went from one to the other. Had there been a good forum block (or whatever) in c5, I could have integrated everything nicely.
typoman76 replied on at Permalink Reply
typoman76
Hi Remo.
Was on your presentation on the swiss meeting. And yes we had some requests for a forum with concrete5. Actually have some private need for a interested based group on hobbies. And a school internal blackboard done like a forum.
So yes. There is a need for this. I can help with testing and design.
hemiipatu replied on at Permalink Reply
I have actually been actively looking to try and get a forum onto my recently founded concrete5 site to no avail so this kind of project is something that I am very happy to see.

Whilst my skills in programming aren't up to scratch to help this project as much as I would like I am more than happy to offer testing and bug reporting and would love to see this project go live/become a stable solution for the new version of concrete5.
martamius replied on at Permalink Reply
Hey Remo, I am very interested in such a project. I just submitted a PR for a couple additions I made.

Cheers!
Remo replied on at Permalink Reply
Remo
Thanks! Just back from vacation, happy to see someone contributing code! I'll move the inline JavaScript into an asset, see my motivation herehttps://github.com/concrete5/concrete5/issues/6148,... but it's a nice feature which I'll definitely add.
martamius replied on at Permalink Reply
Absolutely. Was just doing quick development to get it working. Moving javascript to a central file is the way to go.
C5DK replied on at Permalink Reply
C5DK
Hi Remo,

I have turned down a forum solution to clients a lot of times with the answer "it might be available some day". So I think it would be neat to be able to offer a community forum.

So we are very interested in this!

/Michael
Concrete5 Danmark
Remo replied on at Permalink Reply
Remo
Good to hear! Unfortunately I only ever get about a request for a forum every second year, but I'll try to get a basic version up and running though, even if I currently won't make any money from it.
C5DK replied on at Permalink Reply
C5DK
Hi,
We have tested it out, and even made a delete button (not related to permission yet). We have discussed the possibility of making the creating of an answer threaded. Here is an example:

-Discussion submission
-Answer
--Answer
---Answer
-Answer
--Answer
---Answer
----Answer
--Answer

That would be cool, unfortunately I do not have the skills to do just that.
So if anyone has a good idea on how to implement this, please share!
Remo replied on at Permalink Reply
Remo
I used to like this kind of structure, but for a few years I prefer the simplicity of a flat stucture. Having long discussions with multiple "threads" in one topic I find messy. If you want to build a reddit clone, it's what you'd want, but they also have some fancy sorting and most forums these days are flat and most people are happy with it.

Having said that, it's not on my todo list and will most likely not get there either. Implementing this in a basic version is simple though, all you need is to save the parent ID and use a simple recursion in the output.

You can also use the concrete5 conversations block, there you get this kind of functionality!
C5DK replied on at Permalink Reply
C5DK
Makes sense!
What about email notifications?
Remo replied on at Permalink Reply
Remo
Definitely on my list, also check the issues on githubhttps://github.com/ortic/concrete5-forum/issues/2...
Remo replied on at Permalink Reply
Remo
Hey guys

those who were watching my git repo might have seen some more activity.
Rich Xigo is sponsoring some of the missing functionality:https://www.concrete5.org/profile/-/view/10986/...

I'd be happy to incorporate some feedback if anyone has some time to spare and check the current state of the forum package.
maar replied on at Permalink Reply
maar
Hi Remo,

I have followed your progress in silent. I am still in thinking mode, and as you progress the full picture begins to evolve. As of now it is actually usable, so I will try to find time to test it out and see if I can come up with some good ideas.

One thing that already came up was the possibility to highlight a post and then answer that post wit it's content copied in to my answer post. Just a thought.

I'm also thinking on some how to implement code blocks (could be neat).

But all in all I begin to follow your drift and understand the way you are going.

This definitely have a lot of potentials.

/Michael
mnakalay replied on at Permalink Reply
mnakalay
Hi Michael, if by code block you mean highlighted code block" I have to point out to my new package in the marketplace. It allows you to add plugins to CKeditor. And from the CKeditor website you can download several code highlighter plugins. Once installed the plugins will work anywhere there's an instance of CKeditor (that means in your blog package as well)

I also think the Autoembed plugin for CKeditor would make an awesome addition to any forum or blog because it allows you to embed stuff from thousands of providers directly in your content without having to use extra blocks: Youtube videos, Instagram posts, Flickr images... You name it.

I have several video tutorials but if you watch this one you'll see what I mean:https://www.youtube.com/watch?v=rFDyl75b0G8&list=PLA2G5TtC1VNaO6...

And the package is here:https://www.concrete5.org/marketplace/addons/ckeditor-pluginator/...

And if by "code block" you meant something totally different, then... oups... sorry...
maar replied on at Permalink Reply
maar
I'm not sure what to reply here.

Regarding our Blog Package, we have embedded our own CKEditor because of a lot of special functionality such as Private File/Image manager for each user and so on.

Regarding the forum discussed here, I was thinking about "code /code" functionality or maybe a little more exotic. But as the forum editor is a clean text editor (as of right now), I do not believe that your add-on would fit in here.

But it is still interesting to know.

/Michael
mnakalay replied on at Permalink Reply
mnakalay
Custom CKeditor? That must have been a pain to implement!
maar replied on at Permalink Reply
maar
Not that much. We did that in our Blog Package for concrete5 6x. We tried to use Redactor in the 7x branch and got it to work with the core version. But in the 8x branch we desided to go our own way.
Remo replied on at Permalink Reply
Remo
Thanks for your feedback guys.

I don't think I'll want to add an WYSIWYG editor. While some people would like that, I believe it's too much and just causes a messy output in the end. It might be something one can add by overriding an element or hook into an event. Let's see, maybe I'll make that possible at some point, but it's low prio for now.

I do think that being able to highlight code is helpful, I also wouldn't want this to require another add-on. I've created an issue for this herehttps://github.com/ortic/concrete5-forum/issues/16... I'll need this to upgrade concrete5.ch

I definitely like the idea of having a best answer that one can easily and quickly spot, also created an issue for thishttps://github.com/ortic/concrete5-forum/issues/17...
JohntheFish replied on at Permalink Reply
JohntheFish
With that in mind, my Syntax Anywhere addon can pick up [ code ]...[ /code ] or html < code > and < pre > markers anywhere on a page, irrespective of whatever block is used to enter/display the text containing code.

https://www.concrete5.org/marketplace/addons/syntax-anywhere1/...

You can apply it with a block, one page at a time, or globally to an entire site.
maar replied on at Permalink Reply
maar
I think that all this is great and good to know. But for this forum, I have to agree with Remo. Code highlight should be a part of the forum package.
mnakalay replied on at Permalink Reply
mnakalay
Just my 2 cents because I did some research on that recently, there seem to be 2 possible ways: JS highlighter or PHP highlighter.

One thing is for sure the highlighter has to do its work when generating the page and not on save (for the PHP one)

Using code like we do here in this forum with bbCode tags and replacing those tags with HTML PRE and CODE tags would probably be the best way if no WYSIWYG is to be used.

Having said so bbCode has plenty of other tags.

Also, what do you think of file attachment?
Remo replied on at Permalink Reply
Remo
File attachment is there, but for now just a single file
mnakalay replied on at Permalink Reply
mnakalay
Is multi-files attachment something you would want to include?
mnakalay replied on at Permalink Reply
mnakalay
2 code highlighters in PHP I'm aware of:

Highlight.php which is a port of Highlight.js. License seems to be MIT. I say seems because the license's text is MIT but it doesn't have the header. Updated regularly, last one 17 days ago (https://github.com/scrivo/highlight.php)

The second one, GeSHi, has been for long the de-facto standard for PHP based code highlighting for a while. Nothing happened for a long time. One release in November 2013. Then another in November 2014. Then nothing until may 2017 when 2 releases came out on the same day with new languages and support for PHP 7. Nothing since. License for that one is GPL (http://qbnz.com/highlighter/)

Last but not least, Highlighter.php is more modern, using namespacing, autoloading...
GeSHi is more "old school".

Hope it helps.
Remo replied on at Permalink Reply
Remo
- multi file attachment: I'm not opposed to it as long as it doesn't add a ton of JavaScript. Maybe just duplicate the input type=file once a file is selected. Whoever wants something fancy can override the element

- file set: you can already override the config, I'll document that. A UI might be okay at some point, but it's low prio. If you're building websites you should be able to override a file.

- spam: I'm running quite a few forums. All of them smaller than concrete5.org, but I never had any spam problem. I'll consider this if I start having problems or if I receive a pull request

- I'll look into highligher.php thanks. I'm a dinosaur who used geshi a lot. I'll try to see if I can add this as some kind of markdown extension, then we get nice bullet lists and auto-linking too
mnakalay replied on at Permalink Reply
mnakalay
Concerning spam, I have my personal website with a form in the footer. I really don't get much traffic but before I implemented spam control I received maybe a dozen spammy emails a day, not kidding.

I know it's an annoyance and concern for many people and I know for some it simply never happens. It's just that I'd be surprised if it never comes up.

Having said so, the easiest solution is to hook into C5's spam system, as terrible as it is, and if someone needs it they can get the Akismet package from the marketplace.

And then maybe no need to implement manual "denunciation"
Remo replied on at Permalink Reply
Remo
Well, if your form isn't protected for sure, I receive way more requests, but I'm blocking them. A forum isn't a form too. I'd recommend that you enable mail verification which will block a lot more spammers.

The registration has to be smart, if it is, the forum will not have a lot of spam issues.
Remo replied on at Permalink Reply
Remo
highlight.php still requires css. Wouldn't it be easier to add another 2kb JS (http://prismjs.com/). That way one could easily customize it or even remove it.
mnakalay replied on at Permalink Reply
mnakalay
I think using the PHP solution or the JS solution (I do like Prism lot) would be exactly the same in terms of difficulty.

With the PHP solution, check for the presence of code using str_pos and if yes, replace whatever tags we use to mark code with PRE and CODE and run the result through the highlighter.

With JS, do exactly the same but instead of running it through the highlighter, load the JS and CSS.

Prism is very light but each language requires a separate file. The difficult way would be to allow users to specify the language and load the script accordingly but I really don't think this is necessary. Using a version with CSS, PHP, Javascript and HTML (most of which are included in the core if memory serves) works in most cases and the HTML highlighter also works pretty well on PHP and JS if needed.

I also developed a package to add Prism to Ckeditor (not live yet) so I did some testing with it.
mnakalay replied on at Permalink Reply
mnakalay
Just off the top of my head, a few things that would be good to have:
1- Permalinks
2- A setting to specify a fileset or maybe a folder where attached files will be put
3- A way to mark a post as spam and, if the user is logged-in mark them as a spammer (like we do here)
4- a setting to chose to automatically hide forum post pages from autonav
walkingstick replied on at Permalink Reply
walkingstick
I noticed you are actually building this. I'd love to give it a try. I downloaded the files from GitHub and uploaded them to my packages directory, but when I attempt to install it on my site I get the error:

An unexpected error occurred.
Default value for parameters with a class type hint can only be NULL

I know you probably aren't ready to support this, but if you can point me in the right direction, I'd appreciate it.
mnakalay replied on at Permalink Reply
mnakalay
You need PHP 7 for the forum to work. You can read about that specific error message here:https://github.com/ortic/concrete5-forum/issues/18...
walkingstick replied on at Permalink Reply
walkingstick
Thanks, I'll talk with my server admin.
walkingstick replied on at Permalink Reply
walkingstick
That did the trick. Thanks.
walkingstick replied on at Permalink Reply
walkingstick
I've got an instance set up on a site of mine and am playing around with it. Looks good so far. I'm not sure if you want feedback yet on possible features (or not) but here are a couple thoughts: It would be nice to be able to have categories, to put topics under. Also, the ability to reply to specific comments instead of to the whole thread would be good too.
Remo replied on at Permalink Reply
Remo
Sure, I never mind feedback!

You can already create as many forum pages as you like. They serve as categories!

I never liked the forum style we have here. I find it messy, I never know where the most recent message is found. (I know I can change the mode here). I very much prefer a simple and chronological conversation. If a topic starts to have hundreds of answers things went wrong anyway, someone should have split the conversation into something new. At least that's my thinking and for as long as no body is paying me to add a threaded discussion style, it's going to stay how it is - sorry!
walkingstick replied on at Permalink Reply
walkingstick
Okay. I think I understand how I can use multiple forums for categories, but then I don't see any way to adjust the forum template to add in navigation to the different forums. It looks like I'd have to change the default template to make any changes to the navigation structure. So, is there a way to make it so I can use alternate page templates, or modify the one it uses?
Remo replied on at Permalink Reply
Remo
Why would you want to have different templates per topic? Haven't seen many cases where that's useful. Not saying it doesn't exist, but I can't imagine why this would be a common request, but maybe I'm missing something.

Just add a file with the same handle to your theme and you're good to go!
walkingstick replied on at Permalink Reply 2 Attachments
walkingstick
I don't want a separate template for each forum, just a separate template from the main site (this will be in a back-end intranet.) Right now when I try to edit the Forum template it has the header and footer from the main site, with a full-width version of the forum in between. I want to swap out the header and footer, and make the forum only partial width with a navigation (topic?) structure to the left, so the user can jump between forums, etc...
Remo replied on at Permalink Reply
Remo
That's becaue of the view.php in your theme, have a look at that file and try to add a sidebar there. Or override the forum.php and topic.php in your own project.
Remo replied on at Permalink Reply
Remo
I've added some instructions herehttps://github.com/ortic/concrete5-forum/blob/master/README.md#custo...

There's nothing special about the way the forum works, it's all concrete5 page types and single pages.
walkingstick replied on at Permalink Reply
walkingstick
Thanks. I'll give it a whirl.
walkingstick replied on at Permalink Reply 2 Attachments
walkingstick
We got everything working except for the page that displays the actual topic. See attached. The one with the sidebar is the Intranet template, but the one with the topic is still displaying the main site's template.

Here's what my programmer had to say:

"Sooo close on the Forum plugin, the forum page itself did indeed accept the override of the template (the last option in his instructions), but overriding a topic, does not work. Adding any topic.php file to the theme results in the view.php template being used and no content included."

Any ideas?
walkingstick replied on at Permalink Reply
walkingstick
Do you have any more suggestions on what to try here?
walkingstick replied on at Permalink Reply
walkingstick
Other than getting the forum topic page to use the correct template, I've got this all up and running. Would love to try it out with some visitors to the site, but can't do it until I get this template to display correctly. I'd love to hear some ideas how to do that. Thanks!
walkingstick replied on at Permalink Reply 1 Attachment
walkingstick
Is there a way to make each new topic's page default to: Attributes --> Exclude From Nav ?

If you look at my attachment, you'll see I set up multiple forums as you suggested earlier, and have them linked in the left-hand navigation. But now any new topics created will also appear in that navigation automatically.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@walkingstick

The Forum Topic page type is installed by default, but isn't exposed on the Page Types page. I imagine this is done because they are not meant to be used on their own.

In install.xml, the Forum Topic page type has the internal attribute set. You can remove that attribute to expose the page type on future installs or re-installs. Another option is editing the PageTypes database table, changing the Forum Topic row "ptIsInternal" column to 0. Before making any changes to the database make a full site backup (database and files) first.
https://github.com/ortic/concrete5-forum/blob/master/install.xml#L33...

@Remo

This is a very useful add-on, thank you for sharing it. The code makes great reference too.

One question about uninstalling the add-on. Leftover pages using the Forum and Forum Topic page types throw errors when visited. Do you think a pre-install warning or post-uninstall steps could be added?
Remo replied on at Permalink Reply
Remo
Sure, a warning doesn't hurt, created an issue for nowhttps://github.com/ortic/concrete5-forum/issues/19...

Yes, I didn't want users to play around with the topic page type, there should hardly ever be a need to work with it directly. Setting attributes might be one of those cases though. I'll think about it, created an issue herehttps://github.com/ortic/concrete5-forum/issues/20...