Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
amc_oldsarge
New Member
New Member



Joined: Jan 27, 2005
Posts: 2

PostPosted: Thu Jan 27, 2005 10:07 pm Reply with quote

Pulling out my hair here!!

I would like to embed ExoPHPdesk http://php.exocrew.com/exohelpdesk as a module in my site. Is this possible?

I have phpdesk installed and running properly, when it is run independent of phpnuke. phpdesk is located /var/www/html/modules/HelpDesk/phpdesk

/var/www/html/modules/HelpDesk/index.php =
<?php

if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
$index = 0; // 0 : do not show right blocks - 1:show right blocks
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
OpenTable();
include("modules/HelpDesk/phpdesk");
CloseTable();
include("footer.php");
?>

But if I try running using the following code I get errors:

Warning: main(modules/HelpDesk/phpdesk): failed to open stream: No such file or directory in /var/www/html/modules/HelpDesk/index.php on line 27

Warning: main(): Failed opening 'modules/HelpDesk/phpdesk' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/modules/HelpDesk/index.php on line 27

Any advice would be helpful. I'm new to the game.

Thanks!!

Kyle
 
View user's profile Send private message
PHrEEkie
Subject Matter Expert



Joined: Feb 23, 2004
Posts: 358

PostPosted: Thu Jan 27, 2005 10:57 pm Reply with quote

Well, it be a tab bit more difficult than that...

First off, your error is here:
include("modules/HelpDesk/phpdesk");

include needs a valid filename to work with... is phpdesk (no extension) really a file in modules/HelpDesk? Prolly not Wink hence, failed to stream...

So... what you need is an index.php file for your module that will launch the application. You got the header, open/close tables and footer correct, but it's the content you wanna put between them that is going to be rough. I have no idea how extensive and complicated this filesystem for HelpDesk is, but I can just guess by the name of it that it's fairly complicated.

Start off any module project as you have... get it running on its own outside of Nuke. Start following the logic of the program flow... does it start with an index.php? Sometimes you can just open an index.php that comes with the distrib and just wrap Nuke open tables and junk and you might just get lucky and have something that kinda sorta wants to work, and then tweak from there. You'll run into a whole different nightmare if there are users and passwords involved...

In reality, after tweaking for weeks on end, you'll end up with what's referred to as a 'port'. The HelpDesk itself has support files that it needs to locate to run, so those paths must be altered to work under Nuke etc... it's basically the same exact method that was used to integrate phpBB to Nuke. It's no easy undertaking, and again, depending on the complexity of the program, might very well be impossible for someone new to either Nuke or PHP programming. Ports take a lot of creativity, patience, coffee, cigarettes and curse words. Wink Oh, and a REALLY understanding wife!
 
View user's profile Send private message
amc_oldsarge







PostPosted: Thu Jan 27, 2005 11:43 pm Reply with quote

OK changing it to:

<?php

if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
$index = 0; // 0 : do not show right blocks - 1:show right blocks
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
OpenTable();
include("modules/HelpDesk/phpdesk/index.php");
CloseTable();
include("footer.php");
?>

Gets rid of the error...... but the upper block is now empty. I had/have a strong suspicion this wouldn't work easily, but for navigation/continuity I was hoping to wrap phpnuke around phpdesk. The thought of messing with all the pathing is NOT something I would look forward too.

Thanks for the response.......

Kyle
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©