j'ai intallé pour tester en local sur WampServer, une application open source Achievo.
J'ai voulu ajoutée un module et comme indiqué dans la doc ; il y a 2 lignes de codes à modifier pour indiquer le chemin du dossier racine Achievo.
le dossier root pour l'application achievo doit être :
Puis mon module intitulé "ical", doit être situé également à la racine :www/achievo
Je dois configurer le fichier du module ical (ical.php) :www/achievo_module/ical
// Change the config_atkroot so it points to the achievo homedir
//
$config_atkroot = "../../achievo/";
Il y a un problème avec la fonction include_once. Voici les erreurs affichées :
Code : Tout sélectionner
( ! ) Warning: include_once(./atk/include/initial.inc) [function.include-once]: failed to open stream: No such file or directory in C:\wamp\www\achievo\atk.inc on line 15
Call Stack
# Time Memory Function Location
1 0.0013 513056 {main}( ) ..\ical.php:0
2 0.0016 520040 include_once( 'C:\wamp\www\achievo\atk.inc' ) ..\ical.php:15
( ! ) Warning: include_once() [function.include]: Failed opening './atk/include/initial.inc' for inclusion (include_path='.;C:\php\pear') in C:\wamp\www\achievo\atk.inc on line 15
Call Stack
# Time Memory Function Location
1 0.0013 513056 {main}( ) ..\ical.php:0
2 0.0016 520040 include_once( 'C:\wamp\www\achievo\atk.inc' ) ..\ical.php:15
( ! ) Warning: include_once(./version.inc) [function.include-once]: failed to open stream: No such file or directory in C:\wamp\www\achievo_modules\ical\ical.php on line 16
Call Stack
# Time Memory Function Location
1 0.0013 513056 {main}( ) ..\ical.php:0
( ! ) Warning: include_once() [function.include]: Failed opening './version.inc' for inclusion (include_path='.;C:\php\pear') in C:\wamp\www\achievo_modules\ical\ical.php on line 16
Call Stack
# Time Memory Function Location
1 0.0013 513056 {main}( ) ..\ical.php:0
( ! ) Fatal error: Call to undefined function moduleDir() in C:\wamp\www\achievo_modules\ical\ical.php on line 17
Call Stack
# Time Memory Function Location
1 0.0013 513056 {main}( ) ..\ical.php:0le fichier atk.inc situé www/achievo/
<?php
/**
* ATK Include file.. If you strip out stuff you don't need, you
* might have some performance improvement.
* Somethings can't be stripped out.
*/
/**
* @internal This variable indicates where to get all the includes. Usually,
* this is the current dir.
*/
$config_atkroot = "./";
// Atknode is required. Don't remove it.
include_once($config_atkroot."atk/include/initial.inc");
// Uniform textbox sizes
define("TEXT_SMALL", 3);
define("TEXT_LARGE", 10);
// Some uniform colors
define("COLOR_WARNING", "#FCAA60");
define("COLOR_ERROR", "#FF0000");
define("COLOR_OK", "#00FF00");
// Some uniform recordlist highlight color definitions containing the
// color which can be used when the mousepointer hovers over a row
define("COLOR_HIGHLIGHT_WARNING", "#FFCC83");
define("COLOR_HIGHLIGHT_ERROR", "#FF5555");
define("COLOR_HIGHLIGHT_OK", "#66FF66");
?>[/code]
Puis le fichier index.php situé à la racine www/achievo
[code]<?php
/**
* @internal includes
*/
$config_atkroot = "./";
include_once("atk.inc");
include_once("atk/atkbrowsertools.inc");
include_once("achievotools.inc");
atksession();
atksecure();
include "theme.inc";
$theme = &atkinstance('atk.ui.atktheme');
if (atkconfig("fullscreen"))
{
// Fullscreen mode. Use index.php as launcher, and launch app.php fullscreen.
$page = &atkinstance("atk.ui.atkpage");
$ui = &atkinstance("atk.ui.atkui");
$theme = &atkinstance("atk.ui.atktheme");
$output = &atkinstance("atk.ui.atkoutput");
$page->register_style($theme->stylePath("style.css"));
$page->register_script(atkconfig("atkroot")."atk/javascript/launcher.js");
$content = '<script language="javascript">atkLaunchApp(); </script>';
$content.= '<br><br><a href="#" onClick="atkLaunchApp()">'.atktext('app_reopen', "atk").'</a> '.
'<a href="#" onClick="window.close()">'.atktext('app_close', "atk").'</a><br><br>';
$box = $ui->renderBox(array("title"=>atktext("app_launcher"),
"content"=>$content));
$page->addContent($box);
$output->output($page->render(atktext('app_launcher'), true));
$output->outputFlush();
}
else
{
if ($theme->getAttribute('useframes',true))
{
// Regular mode. app.php can be included directly.
include "app.php";
}
else
{
$user = &atkGetUser();
$indexpage = &atknew('atk.ui.atkindexpage');
$indexpage->setUsername(getFullUsername());
$indexpage->setTitle(getAchievoTitle());
$indexpage->setTopSearchPiece(getSearchPiece());
$centerpiece="";
$centerpiecelinks=array();
getCenterPiece($centerpiece,$centerpiecelinks);
$indexpage->setTopCenterPieceLinks($centerpiecelinks);
if($user["name"]=="administrator")
{
$destination = array("atknodetype"=>"pim.pim","atkaction"=>"adminpim");
}
else
{
$destination = array("atknodetype"=>"pim.pim","atkaction"=>"pim");
}
$indexpage->setDefaultDestination($destination);
$indexpage->generate();
}
}
?>
le fichier initial.inc situé www/achievo/atk/include
<?php
/**
* This file is part of the Achievo ATK distribution.
* Detailed copyright and licensing information can be found
* in the doc/COPYRIGHT and doc/LICENSE files which should be
* included in the distribution.
*
* @package atk
* @subpackage include
*
* @copyright (c)2005 Ibuildings.nl BV
* @license http://www.achievo.org/atk/licensing ATK Open Source License
*
* @version $Revision: 6301 $
* $Id: initial.inc 6404 2009-06-17 11:26:32Z max $
*/
/** @internal includes */
require_once($config_atkroot.'atk/include/basics.inc');
require_once($config_atkroot.'atk/modules/atkmoduletools.inc');
require_once($config_atkroot.'atk/include/compatibility.inc');
if (atkconfig('autoload_classes', true)) require_once($config_atkroot.'atk/include/autoload.inc');
if (atkconfig('use_atkerrorhandler', true)) require_once($config_atkroot.'atk/include/errorhandler.inc');
require_once($config_atkroot.'atk/ui/class.atkoutput.inc');
require_once($config_atkroot.'atk/session/class.atksessionmanager.inc');
require_once($config_atkroot."atk/utils/class.atkstring.inc");
require_once($config_atkroot.'atk/include/security.inc');
require_once($config_atkroot.'atk/include/debugging.inc');
if (atkconfig('lock_type')!=="") require_once($config_atkroot.'atk/lock/class.atklock.inc');
atkPreloadModules();
?>
Le fichier version.inc est situé à la racine www/achievo.Désolé pour la longueur du post, mais cela permet d'avoir tous les éléments car j'ai vraiment l'impression que tous ces fichiers sont liés entre eux, mais je ne comprends pas leur structure.
Merci beaucoup pour votre précieuse aide.