Page 1 of 1

How I integrated (without database) and without wrapper

Posted: Tue Jan 22, 2008 4:23 am
by Dannymh
Forgive me if it is NOT ok to post this, please delete it if so but I thought I would share how I have managed to integrate SMF and Joomla! without having to use the wrapper or modify the system.

Joomla and SMF must be in the same database
includePHP or other php content module/mambot

Step 1: Create a section (I called mine Interactive)
Step 2: Create a Category (Community)
Step 3: Install the PHP module
Step 4: Add an article and add the following PHP code to be executed (or put it in a file and include the file)

Code: Select all

global $forum_version, $time_start, $maintenance, $mtitle, $mmessage, $mbname, $language, $boardurl, $webmaster_email, $cookiename, $db_server, $db_name, $db_user, $db_passwd, $db_prefix, $db_persist, $db_error_send, $boarddir, $sourcedir, $db_last_error, $db_connection, $modSettings, $memcached, $cache_hits, $cache_count, $db_cache, $db_count, $board, $topic, $scripturl, $context, $HTTP_SESSION_VARS,  $rand_code, $ban, $log_time, $timeOnlineUpdated, $old_url, $USER_AGENT, $admin_time, $ID_MSG_LAST_VISIT, $unread_messages, $sc, $settings, $user_info, $user_settings, $ID_MEMBER, $txt, $board_info, $options, $db_show_debug, $language_dir, $forum_copyright;

$here = getcwd();
require "index.php";

Step 5: Save the article
Step 6: Create a link to the article (You can load it now if you want and it will display the front of the forum, but the links don't work
Step 7: Edit SMF settings.php and point the basedir at the new URL (i.e. http://yourdomain/community-forum)
Step 8: That's it. Your forums will now be fully wrapped inside your site without using the wrapper. Your URL will now look something like

** It is important to note that whatever the URL is normally, remove the ".html" from it or this will not work. Once you removed the .php this all works with the standard Joomla SEF. ... hp/board=1

Hope this helps. I took some of the instructions from the CMS made easy steps and they have so far worked perfectly for me besides a few template issues.


Re: How I integrated (without database) and without wrapper

Posted: Mon Feb 11, 2008 7:23 am
by Gantry
Interesting method Dan.  I'm wondering if you could outline specifically what those template issues were?

Re: How I integrated (without database) and without wrapper

Posted: Mon Feb 11, 2008 10:36 pm
by Dannymh
The issues are essentially to do with javascript templates.

What you should do is as follows:
1 - On your Joomla stylesheet, append all methods to have !Important after them so they are always default over SMF
2 - Include your SMF stylesheet into your joomla one
3 - Download and install the SMF mod "Joomla mambo code clean up
4 - If you are using J! 1.5 then edit the mod before installing it to use "JEXEC" instead of MOS whatever

The only remaining issue which I need to resolve are
1 - Private messaging system, the URL's are not appended correctly. just need to edit the PM code in 1 place to hard code "index.php?"
2 - Inline modify is not working.

TBH though I am sick to death of SMF, sure it is a great forum, but this whole debate with Joomla is just laughable. I am looking at fully and correctly integrating phpBB as a stop gap until I can move to a further solution of Joo!BB and Fireboard (Joo!BB for private forums, FIreboard for every day forums)

Re: How I integrated (without database) and without wrapper

Posted: Wed Aug 13, 2008 9:07 pm
by Olden
I cannot get it to work. The error message is located below:
Warning: chdir() [function.chdir]: open_basedir restriction in effect. File(/forum) is not within the allowed path(s): (N:\hosted\fsa;N:\hosted\phpsession\;N:\hosted\phpupload) in N:\hosted\fsa\modules\mod_php\mod_php.php(36) : eval()'d code on line 7

Re: How I integrated (without database) and without wrapper

Posted: Wed Aug 13, 2008 9:43 pm
by Dannymh
That means you most likely either have the path incorrect or do not have the permissions to open it.

Do a search online for "Warning: chdir() [function.chdir]: open_basedir restriction in effect" in Google

You should find your specific answer that way.

My advice is not to bother though there are limitations with this way like PM's and it's just a pain in the ass. There is jfusion and also sjsb which may work. But my aim is to get off of SMF ASAP now I have been using it for a year I realise how piss poor it actually is, so much so that I am thinking of switching to wordpress with SimpleForum but most likley I will play with some other integrations instead


Re: How I integrated (without database) and without wrapper

Posted: Sat Aug 16, 2008 2:13 am
Why are you taking so much of headache bro??
The best and easy way is to do it by using the SMF Bridge by

I have used it several times and it just works like a charm..
Just try it once and you will know it..
No need to bend on all this big errors...