I'm still wondering how to ease the installation of modules and have been playing around a little bit with the affected files (where you have to change code and patch the sources)
I did my jump into the cold water and here it is
Code: Select all
/********************************************************************************************************
case "modules": //Modules
switch ($p) {
case 2: // Graphical Text MOD
if($phpwcms["gt_mod"]) { //enabled/disable GT MOD
// include language vars for Jérôme's Graphical Text MOD
include_once(PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/main.inc.php');
}
break;
default: echo 'Thanks to Jérôme for his <a href="phpwcms.php?do=modules&p=2">Graphical Text MOD</a>.';
echo '<br> <br>Other modules might follow. GT MOD will be moved to admin section.';
}
break;
*********************************************************************************************************/
case "modules":
require_once(PHPWCMS_ROOT.'/include/inc_module/inc_main/mod.case.inc.php');
break;
/*this above is the changed one*/
Code: Select all
<?php
switch ($p) {
case 2: // Graphical Text MOD
if($phpwcms["gt_mod"]) { //enabled/disable GT MOD
include_once(PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/main.inc.php');
}
break;
case 3: // Caledar Mod
if ($phpwcms["calendar_mod"]) { //enabled/disable calendar mod
include_once("./include/inc_module/mod_calendar/main.inc.php");
}
break;
default: echo 'Thanks to Jérôme for his <a href="phpwcms.php?do=modules&p=2">Graphical Text MOD</a>.';
echo '<br> <br>Other modules might follow. GT MOD will be moved to admin section.';
}
?>
Code: Select all
/*****************************************************
case "modules": //modules
$wcsnav["modules"] = "<strong class=\"navtexta\">".$wcsnav["modules"]."</strong>";
if($phpwcms["gt_mod"]) { //enabled/disable GT MOD
include_once(PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/inc_lang/backend/en/lang.inc.php');
if(!empty($_SESSION["wcs_user_lang"]) && file_exists(PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/inc_lang/backend/'.$_SESSION["wcs_user_lang"].'/lang.inc.php')) {
include_once(PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/inc_lang/backend/'.$_SESSION["wcs_user_lang"].'/lang.inc.php');
}
$subnav .= subnavtext($BL['be_subnav_graphicaltext_mod'], "phpwcms.php?do=modules&p=2", $p, "2", 0);
}
break;
******************************************************/
case "modules": //modules
$wcsnav["modules"] = "<strong class=\"navtexta\">".$wcsnav["modules"]."</strong>";
require_once(PHPWCMS_ROOT.'/include/inc_module/inc_main/mod.nav.inc.php');
break;
/*this above is the changed one*/
Code: Select all
<?php
if($phpwcms["gt_mod"]) { //enabled/disable GT MOD
include_once(PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/inc_lang/backend/en/lang.inc.php');
if(!empty($_SESSION["wcs_user_lang"]) && file_exists(PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/inc_lang/backend/'.$_SESSION["wcs_user_lang"].'/lang.inc.php')) {
include_once(PHPWCMS_ROOT.'/include/inc_module/mod_graphical_text/inc_lang/backend/'.$_SESSION["wcs_user_lang"].'/lang.inc.php');
}
$subnav .= subnavtext($BL['be_subnav_graphicaltext_mod'], "phpwcms.php?do=modules&p=2", $p, "2", 0);
}
if ($phpwcms["calendar_mod"]) { // enabled/disable Calendar Module
include_once ('./include/inc_module/mod_calendar/inc_lang/backend/en/lang.inc.php');
if(file_exists('./include/inc_module/mod_calendar/inc_lang/backend/'.$_SESSION["wcs_user_lang"].'/lang.inc.php')) {
include_once ('./include/inc_module/mod_calendar/inc_lang/backend/'.$_SESSION["wcs_user_lang"].'/lang.inc.php');
}
$subnav .= subnavtext("Calendar Module", "phpwcms.php?do=modules&p=3", $p, "3", 0);
}
?>
Code: Select all
// -------------------------------------------------------------
/***********************************
// Jérôme's Graphical Text MOD
// Coypright (C) 2004 by
if($phpwcms["gt_mod"]) { //enabled/disable GT MOD
require_once ('include/inc_module/mod_graphical_text/inc_front/gt.func.inc.php');
}
************************************/
require_once ('include/inc_module/inc_main/mod.rt.inc.php');
// -------------------------------------------------------------
Code: Select all
<?php
//This goes into content.front.func.inc.php
// Jérôme's Graphical Text MOD
// Coypright (C) 2004 by
if($phpwcms["gt_mod"]) { //enabled/disable GT MOD
require_once ('include/inc_module/mod_graphical_text/inc_front/gt.func.inc.php');
}
// Ionrock's Calendar MOD by Verve...
// Coypright (C) 2004
if($phpwcms["calendar_mod"]) { //enabled/disable Ionrock's Calendar MOD
require_once ('./include/inc_module/mod_calendar/inc_front/func.inc.php');
}
?>
So I now have three new files to mess around with and if nothing is changing within the structure of phpwcms.php and content.front.func.inc.php I only have to insert "three" lines of code when a new version pops up:
Code: Select all
case "modules": //modules
$wcsnav["modules"] = "<strong class=\"navtexta\">".$wcsnav["modules"]."</strong>";
require_once(PHPWCMS_ROOT.'/include/inc_module/inc_main/mod.nav.inc.php');
break;
AND
case "modules":
require_once(PHPWCMS_ROOT.'/include/inc_module/inc_main/mod.case.inc.php');
break;
AND
require_once ('include/inc_module/inc_main/mod.rt.inc.php');
![Laughing :lol:](./images/smilies/icon_lol.gif)
Wow! If no cache is fooling me or some brainy mistake this could be handled very easy.
As I've seen exdata seems to have an option wich requires additional fixing, but this probably could be done apropriately...
Something forgotten? Don't think so.
Greetings
claus[/b]