11
reWARder
Re: duplicating a module
  • 2004/5/31 16:20

  • reWARder

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/5/28


following, there will be the code copied from the xoops_version.php.
does anybody have a plan what could be wrong here?

Quote:

$modversion['name'] = _MI_GAMESREVIEWS_NAME;
$modversion['version'] = "2.1";
$modversion['description'] = _MI_GAMESREVIEWS_DESC;
$modversion['credits'] = "gamesreviews";
$modversion['author'] = "Thomas Wolf
( http://www.mytutorials.info/ )";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 1;
$modversion['image'] = "images/gamesreviews_slogo.png";
$modversion['dirname'] = "gamesreviews";

// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
// All tables should not have any prefix!
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
//$modversion['sqlfile']['postgresql'] = "sql/pgsql.sql";

// Tables created by sql file (without prefix!)
$modversion['tables'][0] = "gamesreviews";
$modversion['tables'][1] = "gamesreviews_categorys";
$modversion['tables'][2] = "gamesreviews_groups";
$modversion['tables'][3] = "gamesreviews_votedata";

// Admin things
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/index.php";
$modversion['adminmenu'] = "admin/menu.php";

// Blocks
$modversion['blocks'][1]['file'] = "gamesreviews_top.php";
$modversion['blocks'][1]['name'] = _MI_GAMESREVIEWS_BNAME1;
$modvertion['blocks'][1]['description'] = "Shows last gamesreviews";
$modversion['blocks'][1]['show_func'] = "b_gamesreviews_top_show";
$modversion['blocks'][1]['edit_func'] = "b_gamesreviews_top_edit";
$modversion['blocks'][1]['options'] = "date|10";
$modversion['blocks'][2]['file'] = "gamesreviews_top.php";
$modversion['blocks'][2]['name'] = _MI_GAMESREVIEWS_BNAME2;
$modvertion['blocks'][2]['description'] = "Shows most visited gamesreviews";
$modversion['blocks'][2]['show_func'] = "b_gamesreviews_top_show";
$modversion['blocks'][2]['edit_func'] = "b_gamesreviews_top_edit";
$modversion['blocks'][2]['options'] = "hits|10";
$modversion['blocks'][3]['file'] = "waiting.php";
$modversion['blocks'][3]['name'] = _MI_GAMESREVIEWS_BNAME3;
$modvertion['blocks'][3]['description'] = "Shows all waiting gamesreviews";
$modversion['blocks'][3]['show_func'] = "b_waiting_show";


// Menu
$modversion['hasMain'] = 1;
$modversion['sub'][1]['name'] = _MI_GAMESREVIEWS_SMNAME1;
$modversion['sub'][1]['url'] = "submit.php";

// ekke dazu 20020704
// Search
$modversion['hasSearch'] = 1;
$modversion['search']['file'] = "include/search.inc.php";
$modversion['search']['func'] = "gamesreviews_search";
//ekke ende
?>

12
Dave_L
Re: duplicating a module
  • 2004/5/31 16:40

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Quote:
a white/blank page


Is PHP Debug on?

13
reWARder
Re: duplicating a module
  • 2004/5/31 21:44

  • reWARder

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/5/28


now it's on

the error message:

Quote:
Fatal error: Call to a member function on a non-object in /home/ocaholic/public_html/xoops/html/modules/gamesreviews/admin/admin_header.php on line 7


the source code:

Quote:

include "../../../mainfile.php";
include XOOPS_ROOT_PATH."/include/cp_functions.php";
include_once XOOPS_ROOT_PATH."/class/xoopsmodule.php";
if($xoopsUser){
$xoopsModule = XoopsModule::getByDirname("gamereviews");
if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
redirect_header(XOOPS_URL."/",3,_NOPERM);
exit();
}
} else {
redirect_header(XOOPS_URL."/",3,_NOPERM);
exit();
}
if ( file_exists("../language/".$xoopsConfig['language']."/main.php") ) {
include "../language/".$xoopsConfig['language']."/main.php";
} else {
include "../language/english/main.php";
}

?>


14
Mithrandir
Re: duplicating a module

Quote:

Call to a member function on a non-object in /home/ocaholic/public_html/xoops/html/modules/gamesreviews/admin/admin_header.php on line 7


Quote:
$xoopsModule = XoopsModule::getByDirname("gamereviews");


You have a mismatch of directory names - gamesreviews on the server, gamereviews in the code.

15
reWARder
Re: duplicating a module
  • 2004/5/31 22:15

  • reWARder

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/5/28


yes, thanks, I've seen this too.

Login

Who's Online

372 user(s) are online (300 user(s) are browsing Support Forums)


Members: 0


Guests: 372


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits