Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Mambo-Invision Power Board Bridge Advanced Install, IPB4Mambo Installation Instructions
vujsa
post Jun 2 2005, 09:12 PM
Post #1


Absolute Newbie
Group Icon

Group: Admin
Posts: 888
Joined: 20-February 05
From: Indianapolis, Indiana, USA (Midwest)
Member No.: 2,714



Here is a tutorial I did for Antilost.com. Thought it might be useful here as well.
Original Post
QUOTE(vujsa @ www.AntiLost.com - May 13 2005 @ 12:31 AM)
Tutorial Finished!

Here is the deal, the original release of invision4mambo is no longer supported by the individual that developed it.  Additionally, the bridge was written for Mambo 4.5.1 but doesn't work for Mambo 4.5.2. 

The installation method for invision4mambo is what causes the bridge not to work for newer versions of Mambo.  This is caused by original Mambo files being completely overwritten with new files provided in the installation package for invision4mambo.  So what happens is that when you install the new files, you replace some of the Mambo 4.5.2 files with modified versions of the Mambo 4.5.1 files.  So you get several Fatal Errors as a result because Mambo 4.5.2 is looking for Mambo 4.5.2 functions in Mambo 4.5.1 files. sad.gif

Instead of a simple file replacement installation, I am writing a new installation method that is more complex but should allow for better flexibility including not losing all of your existing mods.  This should work for Mambo 4.5.2 and above as well.

RELATED READING:


REQUIRED FILES: 
FOREWORD: 
This installation procedure should only be attempted on a new installation of Mambo.  You can use your current installation of IPB be errors may occur especially if Mods have been applied to IPB. 
 
(It is possible to install this bridge over an existing Mambo installation if you are not concerned about losing all user information contained in the Mambo database.) 
 
Mambo and IPB MUST use the same database  in order to work. 
 
Your username, password, and email address must be the same in both Mambo and IPB. 

Installation Steps: Section 1 - Getting Started:  



  1. Create a new database for IPB and Mambo to use. (Skip if there is already a database created even if they use separate database, will discuss merging databases later) 

  2. Install Mambo Open Source on your server in the root web directory (/public_html/). 

  3. Install Invision Power Board on your server in you intended forum directory (/public_html/forum/). 

  4. Upload your  IBP_SDK files to your sever in a new directory inside of the forum directory (/public_html/forum/ipb_sdk/). 

  5. Open the IPB index.php file for editing. (/public_html/forum/index.php
    - Find: 
    CODE
    $ibforums->js_base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?s='.$ibforums->session_id.'&';
     
    - Add After: 
    CODE
    // IPB SDK 1.0  
    require_once ("/home/username/public_html/forum/ipbsdk/ipbsdk_class.inc.php");  
    $SDK = new IPBSDK();
     
    >> Be sure to change /home/username/public_html/forum/ipb_sdk/ipbsdk_class.inc.php to your path. 

  6. Test your IPB SDK installation by pointing your browser to the example directory in the ipb_sdk directory. (http://www.yourdomain.arg/forum/ipb_sdk/examples/index.html)

 
 
So far we haven't done anything to damage the existing installation of Mambo or IPB. 
 
If you haven't done a full website backup yet, now would be a really good time to do so.  At the absolute very least. you need to backup all of your databases NOW. 
Failure to properly backup your data could result in a complete lose of data after performing the following steps. 
 
Additionally, there will be absolutely no support found for the following steps so don't come crying to me.  You backup files will be the only way to ensure that you do not lose your data. 
 
Installation Steps: Section 2 - Database Merging:
Read This Tutorial: 
Merging SQL Databases In Cpanel With phpMyAdmin, Using SQL after Fantastico installs

 
Installation Steps: Section 3 - User Information Preparation:



  1. In the Mambo Administration Panel, be sure that there is only one (1) user registered.  This should be you and only you.  Delete any other accounts that are present. 

  2. Record all of the information listed in your Mambo user account to be compared to your IPB user account.  (username, email address, password). 

  3. Open your IPB Admin CP, be sure that your user information matches the information in Mambo. (username, email address, password) - You should have user ID number "1".  If not, then use your ID number in the following instructions instead of "1". 

  4. Now in cPanel, Using phpMyAdmin 
    In your database: 
    - Find your user name in mos_users and change ID to "1". 
    - Find your user name in mos_core_acl_aro and change value to "1". 
     
    Again, if there are any other users listed in either of these database tables, delete those entries.  Your username should be the only record in either of these database tables.

 
 
Installation Steps: Section 4 - Mambo File Modifications:

This Section Of Instructions Has Been Tested And Will Work On Mambo Versions 4.5.1 AND 4.5.2.
Use these steps instead of the file replacement instructions in the original invision4mambo installation.  Using the file replacement installation method WILL NOT work for Mambo 4.5.2, this method WILL work but is more difficult to do.

In the file /MAMBO/index.php

Find:
CODE
include_once( 'globals.php' );
require_once( 'configuration.php' );


Add Before: - (Be sure to replace the pathways and urls with your information.)

CODE
//INVISION4MAMBO
//SDK Setup - Change the path to the path to IBSDK/ipbsdk_class.inc.php
require_once "C:/Program Files/wamp/www/sdkb3/ipbsdk_class.inc.php";
$SDK =& new IPBSDK();

require_once ("C:/Program Files/wamp/www/invision/invision4mambo.php");
$invision4mambo = new invision4mambo();

//Invision Board Variables (Change to the path to your forums)
$invisionboard->vars['url'] = "http://www.alt-man.co.uk/invision/";


----------------------------------------------------------------------------------------------------------------------------------

In the file /MAMBO/administration/components/com_users/admin.users.html.php

Find:
CODE

    <table class="adminform">
    <tr>
    <th colspan="2">
    User Details
    </th>
    </tr>



Add After:
CODE

    <tr>
    <td colspan='2'>
    <b>Cannot edit most of the settings as you are using invision4mambo.</b>
    </td>
    </tr>

               


----------------------------------------------------------------------------------------------------------------------------------

In the file /MAMBO/administration/components/com_users/admin.users.php

Find:
CODE
if (!$row->check()) {
  echo "<script> alert('".$row->getError()."'); window.history.go(-2); </script>\n";
  exit();
}

Replace With:
CODE
//if (!$row->check()) {
// echo "<script> alert('".$row->getError()."'); window.history.go(-2); </script>\n";
// exit();
//}



----------------------------------------------------------------------------------------------------------------------------------

In the file /MAMBO/administration/components/com_users/toolbar.users.html.php

Find: - Note that there is an execption here between 4.5.1 and 4.5.2
CODE
  mosMenuBar::addNew();

- OR FOR Mambo 4.5.2 Find:

  mosMenuBar::addNewX();



Replace With: - Note that there is an execption here between 4.5.1 and 4.5.2
CODE
  //mosMenuBar::addNew();

- OR FOR Mambo 4.5.2 Replace With:

  //mosMenuBar::addNewX();


Find:
CODE
  mosMenuBar::deleteList();



Replace With:
CODE
  //mosMenuBar::deleteList();


----------------------------------------------------------------------------------------------------------------------------------

In the file /MAMBO/administration/components/com_users/toolbar.users.php
CODE

>>>>>>>>>>>>>>>>>>>>>>>>>>>> No Changes Needed <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


----------------------------------------------------------------------------------------------------------------------------------

In the file /MAMBO/components/com_login/login.html.php
CODE

>>>>>>>>>>>>>>>>>>>>>>>> No Changes Needed <<<<<<<<<<<<<<<<<<<<<<<<<<<


----------------------------------------------------------------------------------------------------------------------------------

In the file /MAMBO/components/com_login/login.php

Find:
CODE
// load the html drawing class
require_once( $mainframe->getPath( 'front_html' ) );


Add Before:
CODE
//INVISION4MAMBO
header("Location: ".$invisionboard->vars['url']."login.html");



----------------------------------------------------------------------------------------------------------------------------------

In the file /MAMBO/components/com_registration/registration.html.php

CODE
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> No Changes Needed <<<<<<<<<<<<<<<<<<<<<<<<<<<


----------------------------------------------------------------------------------------------------------------------------------

In the file /MAMBO/components/com_registration/registration.php

Find:
CODE
switch( $task ) {
case "lostPassword":
lostPassForm( $option );
break;

case "sendNewPass":
sendNewPass( $option );
break;

case "register":
registerForm( $option, $mosConfig_useractivation );
break;

case "saveRegistration":
saveRegistration( $option );
break;

case "activate":
activate( $option );
break;
}


Replace With:
CODE
switch( $task ) {
case "lostPassword":
//INVISION4MAMBO
//lostPassForm( $option );
header("Location: ".$invisionboard->vars['url']."index.php?act=Reg&CODE=10");
break;

case "sendNewPass":
//INVISION4MAMBO
//sendNewPass( $option );
header("Location: ".$invisionboard->vars['url']."index.php?act=Reg&CODE=10");
break;

case "register":
//INVISION4MAMBO
//registerForm( $option, $mosConfig_useractivation );
header("Location: ".$invisionboard->vars['url']."register.html");
break;

case "saveRegistration":
//INVISION4MAMBO
//saveRegistration( $option );
header("Location: ".$invisionboard->vars['url']."register.html");
break;

//INVISION4MAMBO
//case "activate":
//activate( $option );
//break;
}


----------------------------------------------------------------------------------------------------------------------------------


In the file /MAMBO/components/com_user/user.php

Find:
CODE
$access->canEditOwn = $acl->acl_check( 'action', 'edit', 'users', $my->usertype, 'content', 'own' );


Add After:
CODE
//INVISION4MAMBO
header("Location: ".$invisionboard->vars['url']."my-controls.html");


----------------------------------------------------------------------------------------------------------------------------------

In the file /MAMBO/components/com_user/user.html.php

CODE
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> No Changes Needed <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


----------------------------------------------------------------------------------------------------------------------------------

In the file /MAMBO/includes/mambo.php

In: 
    function login( $username=null,$passwd=null ) {

Find:
CODE
  global $acl;


Add After:
CODE
  global $SDK, $invision4mambo; //INVISION4MAMBO


Find:
CODE
  $username = trim( mosGetParam( $_POST, 'username', '' ) );
  $passwd = trim( mosGetParam( $_POST, 'passwd', '' ) );


Add After::
CODE
  //INVISION4MAMBO
  $invisionpass = $passwd;



Find:
CODE
  $remember = trim( mosGetParam( $_POST, 'remember', '' ) );


Add After:

CODE
  //INVISION4MAMBO
  if(!$invision4mambo->is_member_in_mambo($username)){
  if($SDK->login($username,$invisionpass,1)){
    $member = $SDK->get_info($SDK->name2id($username));
    $member['password'] = $invisionpass;
    $invision4mambo->create_account($member);
  }
  }


Find:
CODE
    // fudge the group stuff


Add Before:
CODE
    //INVISION4MAMBO
    if(!$SDK->login($username,$invisionpass)){
    echo "<script>alert(\""._LOGIN_INCORRECT."\"); window.history.go(-1); </script>\n";
    exit();
    }


IN:
function logout() {

Find:
CODE
  //mosCache::cleanCache('com_content');


Add Before:
CODE
  global $SDK; //INVISION4MAMBO


Find:
CODE
  @session_destroy();


Add After:
CODE

  //INVISION4MAMBO
  $SDK->logout();


Installation Steps: Section 5 - Invision File Modifications:

The original invision4mambo installation instructions reguarding the modification and replacement of Invision files will work fine.

Well, That's it!  You should have a successful installation of an Invision and Mambo bridge using invision4mambo.

For support, I suggest using the related reading links above.  I will not be offering full public support for this modification.  Too many things going right now.  Sorry. mellow.gif

I hope that this guide will be usefull. cool.gif

vujsa


Happy modding, cool.gif

vujsa
Go to the top of the page
 
+Quote Post
Proton
post Jun 4 2005, 04:00 AM
Post #2


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 54
Joined: 2-May 05
Member No.: 4,637



Thanks, this has been helpful.
I have been using mambo open source for about a year now. Its a very good content management system. Gives the user extensive control over their website content.
Go to the top of the page
 
+Quote Post
Baralis
post Oct 21 2005, 07:41 AM
Post #3


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 4
Joined: 21-October 05
Member No.: 9,219



thank you for this I was thinking of using mambo and phpbb, but after reading a previous post I started looking elsewhere. Now I have read this I think I wil be using invasion and mambo.
Go to the top of the page
 
+Quote Post
little0run
post Oct 29 2005, 03:42 AM
Post #4


Advanced Member
Group Icon

Group: Members
Posts: 114
Joined: 22-May 05
Member No.: 5,329



Can this be upgraded to work with IPB 2.1?
Go to the top of the page
 
+Quote Post
miCRoSCoPiC^eaRt...
post Nov 28 2005, 06:22 PM
Post #5


PsYcheDeLiC dR3aMeR
Group Icon

Group: Admin
Posts: 2,242
Joined: 29-January 05
From: Nakorn Chaisri, Thailand
Member No.: 2,411



Little problem here Vujsa - this tutorial needs reviewing. Half the functions you told to replace have become deprecated in Mambo 4.5.3 - and so are a bunch of files.

So this won't work on it anymore. I couldn't find a good part in the new one.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Finishing The Look Of Your Newly Install Web Script(2)
  2. Phpbb - Installation Tutorial ( For Newbies Based On Astahost Cpane)l(5)


 



- Lo-Fi Version Time is now: 13th October 2008 - 05:48 AM