2.0.2 Nuke Port

phpNuke integration forum

2.0.2 Nuke Port

Postby cgarlick » Sun Feb 08, 2009 4:21 pm

I am makeing a Phpnuke port and I am stuck, I figured I would ask and see if anybody has any ideas...

Here is the error message

Code: Select all
Notice: Undefined variable: db_config in /home/content/d/i/s/disturbadmin/html/modules/Roster/install.php on line 788

Notice: Undefined variable: db_config in /home/content/d/i/s/disturbadmin/html/modules/Roster/install.php on line 799

Notice: Undefined variable: db_config in /home/content/d/i/s/disturbadmin/html/modules/Roster/install.php on line 799

Notice: Undefined variable: db_config in /home/content/d/i/s/disturbadmin/html/modules/Roster/install.php on line 799

Notice: Undefined variable: db_config in /home/content/d/i/s/disturbadmin/html/modules/Roster/install.php on line 799

Notice: Undefined variable: db_config in /home/content/d/i/s/disturbadmin/html/modules/Roster/install.php on line 799

Notice: Undefined variable: db_config in /home/content/d/i/s/disturbadmin/html/modules/Roster/install.php on line 805

Notice: Undefined variable: db_config in /home/content/d/i/s/disturbadmin/html/modules/Roster/install.php on line 805

Notice: Undefined variable: db_config in /home/content/d/i/s/disturbadmin/html/modules/Roster/install.php on line 805

If you have any ideas let me know..
cgarlick
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Sat Jul 08, 2006 9:00 pm

2.0.2 Nuke Port

Postby zanix » Mon Feb 09, 2009 4:39 am

$db_config holds the database connection info for the installer
Code: Select all
   /**
    * Update admin account
    */
   include(ROSTER_BASE . 'conf.php');
   define('ROSTER_DB_DIR',  ROSTER_LIB . 'dbal' . DIR_SEP);

   switch( $db_config['dbtype'] )
   {
      case 'mysql':
         include_once(ROSTER_DB_DIR . 'mysql.php');
         break;

      default:
         include_once(ROSTER_DB_DIR . 'mysql.php');
         break;
   }

   $db = new roster_db($db_config['host'], $db_config['database'], $db_config['username'], $db_config['password'], $db_config['table_prefix']);
   $db->log_level();
   $db->error_die();

   if( !is_resource($db->link_id) )
   {
      $tpl->message_die('Failed to connect to database <strong>' . $db_config['database'] . '</strong> as <strong>' . $db_config['username'] . '@' . $db_config['host'] . '</strong><br /><br /><a href="index.php">Restart Installation</a>');
   }


This section of the installer includes the created conf.php file, which holds the database connection info

If I were you, I would create a new installer made specifically to work within phpnuke and not use the Roster installer
The sql setup files are in lib/dbal/structure
mysql_structure.sql is the database table structure
mysql_data.sql is the initial data that is entered into the database

The installer also sets some specific db values as well
Code: Select all
    $db->query("UPDATE `" . $db->table('config') . "` SET `config_value` = '$default_locale' WHERE `config_name` = 'locale';");
    $db->query("UPDATE `" . $db->table('config') . "` SET `config_value` = '" . ROSTER_VERSION . "' WHERE `config_name` = 'version';");
    $db->query("UPDATE `" . $db->table('config') . "` SET `config_value` = '$server_name' WHERE `config_name` = 'website_address';");

The config table, setting the following rows
locale - One of these are valid: enUS, deDE, frFR, esES
version - The current Roster version, as of this post 2.0.2
website_address - the main url for your site, the logo at the top links to this and some addons might use it as well, I know that SigGen does

Then it updates the account table with 3 users and a password
Code: Select all
   $db->query("INSERT INTO `" . $db->table('account') . "` (`account_id`, `name`) VALUES
      (1, 'Guild'),
      (2, 'Officer'),
      (3, 'Admin');");

   $db->query("UPDATE `" . $db->table('account') . "` SET `hash` = '" . $pass_word . "';");


the installer then logs you into RosterCP and directs you to a first time install routine (admin/install_guide.php), which sets up one upload rules and directs you to the addon installer page
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: 2.0.2 Nuke Port

Postby cgarlick » Mon Feb 09, 2009 11:47 am

Ok, thanks for the advice, I think your right but is roster coded in a way that if it is in modules/roster insted of /roster will the roster package need to be modified?

Also if I make an installer for nuke do I need to add in the license for roster?
cgarlick
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Sat Jul 08, 2006 9:00 pm

2.0.2 Nuke Port

Postby zanix » Mon Feb 09, 2009 12:41 pm

It shouldn't matter, roster detects it's path and should run just fine
Roster works in DragonFly CMS with little modification mainly to cmslink.lib.php (make sure you look at that file for your port!) and a new theme to fit in dragonfly a bit better, and DragonFly was derived from phpnuke (they're like monkeys.....I dunno why but just believe me)

As for the license txt file, as long as it's included with the files you're good
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

2.0.2 Nuke Port

Postby PleegWat » Mon Feb 09, 2009 3:27 pm

Roster will auto-detect the paths properly in most cases if it's called directly.

If you're including it from a CMS file, you may need to modify the detection mechanisms and/or the URL generation functions. Both are in lib/cmslink.lib.php
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: 2.0.2 Nuke Port

Postby cgarlick » Tue Feb 10, 2009 12:19 pm

Well I got it kinda working but I have hit a snag, I think Roster's directory structure is getting striped out by Phpnuke or Java? Still looking into it but here are the 2 views..

StandAlone Roster (Pitures broken due to the SQL values set to the Nuke version) What it SHOULD look like
http://www.disturbingthepeaceguild.com/roster/

Nuked version
http://www.disturbingthepeaceguild.com/roster/

I had to add
Code: Select all
include("header.php");
require_once (
"mainfile.php"); 

to index.php so it would place it's self in PhpNuke

Any ideas?
cgarlick
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Sat Jul 08, 2006 9:00 pm

2.0.2 Nuke Port

Postby PleegWat » Tue Feb 10, 2009 5:30 pm

It seems the image path is configured wrong, no addons have been installed, and no data have been uploaded. Apart from that it looks fine.

This one seems to be unmodified though (says rosterdiag). Also, you're running PHP in CGI mode, which we are suspecting to cause some issues that we can't easily track down since none of the devs are on CGI mode.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

2.0.2 Nuke Port

Postby zanix » Tue Feb 10, 2009 10:45 pm

Those 2 views are the same url

But I'm guessing this is the nuked version
http://www.disturbingthepeaceguild.com/modules.php?name=Roster
Last edited by zanix on Tue Feb 10, 2009 10:48 pm, edited 1 time in total.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to phpNuke

Who is online

Users browsing this forum: No registered users and 0 guests

cron