Is Xenforo's code easy to modify? How does it compare to phpbb's code, as for modifyability / maintainability?

MrFusion

New member
FYI, I want to setup a forum, but I'm still shopping around as to which one to use. I mainly just want the basic buillt-in features but I want to make a few fairly simple modifications, such as I want users to be able to search for other users by a couple of new/custom fields, and also, I want to modify the registration page & login page to add a few fields and some minor logic to go along with those fields, etc. So, not huge changes. But after looking at a couple of forums' code (phpbb & simple machines forum), their code looks incredibly confusing. So I figure I'm going to have to hire a developer, which is sad, because my changes are very small & simple. Is this just the way it is with website code, or am I just looking at poorly written website code?

Thanks very much for any advice!

------------------------
More details about my experience looking through some website code...

I've been looking through phpbb's code and it looks very messy & disorganized. There are some comments but most of them don't help me because I don't know how they go about doing things so their comments are 'greek' to me. I have programming experience, but not with internet stuff, but I'm assuming website code would still follow some kind of organization. But in general it seems like the programmers just put functions & classes in files all over the place, and didn't follow a simple model. I would assume each page would have one file where it starts, and then call various functions/etc to do things, in sequence as it builds the page from the top down. But no, things don't seem to work that way. I just can't even read this phpbb code -- I found some files where the code is supposed to do some things, but then the code doesn't make any sense to me. I know how things are supposed to basically be done, but yet, their code still doesn't seem logical. Obviously it works, but it's just impossible to make even the smallest modification. Am I wrong, and just don't understand enough about website code yet... or is there a big difference between how different websites are coded?

For example, there's a dropdown box on a page that sorts the topics, and I want to modify it so that it has different sort options because the programmers gave it lame options (unlike Xenforo which is good), so I see that the dropdown box submits it's form data to a php file, so I look at the code in that php file, and instead of just reading the dropbox values and making a sql statement to reload the topics, it does all sorts of stuff that seems nutty to me. I can't even make much sense of it. In general, if I were to make the change I want to make with a Visual Basic application, it would take me 5 minutes. But I spent over 3 hours looking at phpbb's code and I can't even figure out what it's doing or how to change it. Can anyone relate to what I'm saying?
 
Many things can be done with option settings, CSS and/or template edits.
Registration page fields for example are set via custom user fields.

Modifying the code is only for more extensive changes.

Once you purchase a license you will be able to post in the forums for support and I suspect a lot of the changes you want to make will be possible,
 
I've worked with a lot of latforms over the years (including forum software like vBulletin 3.x/4.X, phpBB 2.x/3.X, WoltLab 3.x/4.x), from my experience the XenForo 2 codebase is a joy to work with compared to other systems (especially such nightmare spaghetti codebases like WordPress).

XenForo 2 concepts are somewhat inspired by Symfony with (there are a few exceptions for special things) basically one entry point.

If you have solid knowledge of OOP in general and understand concepts like MVC, ORM & Dependency Injection, etc. you should have no problem following XenForo code.

If you have only basic knowledge about such concepts (or PHP programming in general) it IMHO will look a lot more complicated to you though.

Take a look at this video for a high level overview:

You might also be interested in this video series on XenForo development

Also check out the developer documentation:
 
Last edited:
I've been looking through phpbb's code and it looks very messy & disorganized. There are some comments but most of them don't help me because I don't know how they go about doing things so their comments are 'greek' to me. I have programming experience, but not with internet stuff, but I'm assuming website code would still follow some kind of organization. But in general it seems like the programmers just put functions & classes in files all over the place, and didn't follow a simple model.
There is developer documentation elsewhere on XF's site, and topics/videos from the XF team that explain how much of this works. There is a very structured approach as to how XF 2.x was developed. Learning the basics of the system is key to knowing where, when and how to make modifications to your satisfaction. In other words, if you decide on XF, don't just hop in and start modifying--get to know how it works first, then you can make more sense of how to make your modifications.

One thing I have learned, however--never edit XF code, and never edit XF templates. XF has provided us with a system to create our own add-ons (aka plugins), and the add-ons are what can perform a simple (or complicated) search and replace operation on template code. There are also facilities in XF to perform operations that require some sort of data retrieval or computation, and our more advanced add-on developers make their magic happen with those.

Templates can be modified directly, but good luck remembering all those edits every time XF is upgraded (which is ~2 months). Third party styles (themes) provide their own sets of modified templates and likewise, I do not edit those templates either. And as for the styles, always create a copy of the master before changing any of the style properties For testing purposes, I might create a style where I modify a template directly, but I later extract those modifications into add-ons to insert them where needed. (I am being a little vague here--much of this will make more sense once you can use the software directly and see how it all works. XF offers a 3-day demo right on the site here, and it's worth exploring.)

Coming from phpBB myself, I totally understand the frustration. I used it for nearly a decade (from 2002 onward), fighting with it the entire way. Code was arbitrary, and the support forum was unhelpful at best, and downright snotty towards admins at worst. It's like any freeware forum software--you get what you pay for. (With XF, we get what we UNDERpay for. 😉 Seriously, if the license cost me twice as much, it would still be a bargain. I can never get back the hundreds of lost billable hours coding "fixes" to phpBB's trainwreck coding.)
 
Back
Top Bottom