Integrating Vanilla in jamendo’s CMS
We started jamendo with a phpBB forum that we quickly replaced with punBB. Now I think we’ve reached the limits of punBB too (utf8 support, please!) so it’s time to move on to something that’s more of a framework.
My good friend Martin suggested Vanilla, I’ve been looking through the code and it seems to fit. I’ll keep the changes I had to make here, maybe that’ll help other people integrate Vanilla too.
- General integration ======================
I ran the Vanilla install, patched conf/settings.php fixing some paths and options. I’ll have to rewrite all the files at the root of Vanilla inside my own page system.
Vanilla uses many global variables, I hope there won’t be any variable collisions.
- The authentification/session system ======================================
Let’s begin with auth, I have to plug our own auth system into Vanilla. For simplicity’s sake I’ve chosen to mirror my user table with Vanilla’s one. I have a simple script that fills/updates the table for the current logged user at each page. That’s a slight overhead but I think it’s workable.
All these patches are only in the People.Class.Session.php file. I remember having to change 5+ files for punBB to plug my own Session/Auth system, that’s quite a change ;-)
- AJAX =======
The remote ajax endpoints call appg/init_ajax.php. I had to patch this file to call my CMS inside of a php chdir().
- Extensions =============
I installed a bunch of extensions. Some of them will be incompatible for one of the following reasons :
- they don’t call init_ajax.php in their ajax calls.
- they include a file after init_ajax.php, but the include will fail because of the chdir() I made. I could undo it, though.
- they use some template features I didn’t keep in my patched theme.
- Internationalization =======================
jamendo is being translated in 10 languages so we have to deal with i18n issues all the time.
I took some time to choose a solution to achieve it. I finally decided to use a different “Discussion” table for each language. I patched Framework.Functions.php / GetTableName() to add the language identifier when appropriate. (For LUM_Discussion, LUM_DiscussionWatch, LUM_Bookmark, LUM_Comment, and maybe whispers but I didn’t activate the feature)
- Other patches ================
Here is a list of the misc. patches I had to make :
- Vanilla.Class.DiscussionManager / SaveDiscussion() : Save the newly posted discussionID somewhere.