11
LucaNet
Re: xdonations 1.9- Call to undefined function: getinstance() in...
  • 2006/11/13 17:07

  • LucaNet

  • Friend of XOOPS

  • Posts: 90

  • Since: 2006/5/25


Quote:

bd_csmc wrote:
Okay:

#1 - the instance error is due to the module being unable to find the XOOPS error handler. I have no clue what has changed in 2.0 series, as I haven't kept up with the development of XOOPS for well over a year. Something tells me that I was probably developing xDonations specifically for the 2.2 series...

#2 - xDonations was verified as working with XOOPS 2.2.3 RC1 (http://dev.xoops.org/modules/xfmod/project/?xdonations) last year, by me. If you see a "notice" error, notices in PHP are typically nothing worth worrying about.

If you want to use this module, I suggest using XOOPS 2.2.3. Additionally, the module is in use here on Xoops.org (note the right-hand side of this page), so you might want to check with the current maintainers of Xoops.org to get THEIR copy of xDonations (in case there were any changes that they had to make)



Many many thanks for your attention.

I would like to use XOOPS 2.2.3 version but it is not recommended by developers.

I think someone should do something to improve this very good and useful module working with XOOPS 2.0.x version.

I hope someone will find out a solution, because many people seem to be interested in this module working fine.


Greetings.

12
LucaNet
Re: xdonations 1.9- Call to undefined function: getinstance() in...
  • 2006/11/15 15:35

  • LucaNet

  • Friend of XOOPS

  • Posts: 90

  • Since: 2006/5/25


Could anyone tell me what XOOPS files are involved in xdonations functioning?

13
LucaNet
Re: xdonations 1.9- Call to undefined function: getinstance() in...
  • 2006/11/17 13:21

  • LucaNet

  • Friend of XOOPS

  • Posts: 90

  • Since: 2006/5/25


As bd_csmc wrote "the instance error is due to the module being unable to find the XOOPS error handler."

I tried to solve this issue by myself, but I was not able to do that.

Can anyone tell me how could I solve it, please?

14
LucaNet
Re: xdonations 1.9- Call to undefined function: getinstance() in...
  • 2006/11/20 15:05

  • LucaNet

  • Friend of XOOPS

  • Posts: 90

  • Since: 2006/5/25


Xdonations doesn't work even with 2.0.16 version.

15
LucaNet
Re: xdonations 1.9- Call to undefined function: getinstance() in...
  • 2006/11/22 22:58

  • LucaNet

  • Friend of XOOPS

  • Posts: 90

  • Since: 2006/5/25


I think I solved this issue.

This below, is /xdonations/includes/common.php according with the code in include/common.php contained in 2.2.3 version:

/************************************************************************/
/* Donations - Paypal financial management module for XOOPS 2           */
/* Copyright (c) 2004 by Xoops2 Donations Module Dev Team                */
/* http://dev.xoops.org/modules/xfmod/project/?group_id=1060            */
/* $Id: common.php,v 1.5 2004/10/15 17:58:57 blackdeath_csmc Exp $      */
/************************************************************************/
/*                                                                      */
/* Based on NukeTreasury for PHP-Nuke - by Dave Lawrence AKA Thrash     */
/* NukeTreasury - Financial management for PHP-Nuke                     */
/* Copyright (c) 2004 by Dave Lawrence AKA Thrash                       */
/*                       thrash@fragnastika.com                         */
/*                       thrashn8r@hotmail.com                          */
/*                                                                      */
/************************************************************************/
/*                                                                      */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/*                                                                      */
/* This program is distributed in the hope that it will be useful, but  */
/* WITHOUT ANY WARRANTY; without even the implied warranty of           */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU     */
/* General Public License for more details.                             */
/*                                                                      */
/* You should have received a copy of the GNU General Public License    */
/* along with this program; if not, write to the Free Software          */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  */
/* USA                                                                  */
/************************************************************************/

// This is a stripped-down version of XOOPS common.php, with web-specific code removed.    

    // ############## Activate error handler ##############
    
include_once XOOPS_ROOT_PATH '/class/errorhandler.php';
    
$xoopsErrorHandler =& XoopsErrorHandler::getInstance();
    
// Turn on error handler by default (until config value obtained from DB)
    
$xoopsErrorHandler->activate(true);
    
    
set_magic_quotes_runtime(0);    
    include_once 
XOOPS_ROOT_PATH.'/class/logger.php';    
    
$xoopsLogger =& XoopsLogger::instance();    
    
$xoopsLogger->startTime();    
    
define('XOOPS_DB_CHKREF'0);
    
    
// ############## Include common functions file ##############    
    
include_once XOOPS_ROOT_PATH.'/include/functions.php';    

    
// #################### Connect to DB ##################    
    
require_once XOOPS_ROOT_PATH.'/class/database/databasefactory.php';    
    
$xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();    

    
// ################# Include required files ##############    
    
require_once XOOPS_ROOT_PATH.'/kernel/object.php';    
    require_once 
XOOPS_ROOT_PATH.'/class/criteria.php';    

    
// #################### Include text sanitizer ##################    
    
include_once XOOPS_ROOT_PATH.'/class/module.textsanitizer.php';    

    
// ################# Load Config Settings ##############    
    
$config_handler =& xoops_gethandler('config');    
    
$xoopsConfig =& $config_handler->getConfigsByCat(XOOPS_CONF);    

    
// #################### Error reporting settings ##################
    
error_reporting(0);

    if (
$xoopsConfig['debug_mode'] == 1) {
        
error_reporting(E_ALL);
    } else {
        
// Turn off error handler
        
$xoopsErrorHandler->activate(false);
    }

    
// ################# Include version info file ##############    
    
include_once XOOPS_ROOT_PATH."/include/version.php";    

    
// #################### Include site-wide lang file ##################    
    
if (file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php")) {        
        include_once 
XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php";    
    } else {        
        include_once 
XOOPS_ROOT_PATH."/language/english/global.php";    
    }    

    
// ################ Include page-specific lang file ################    
    
if (isset($xoopsOption['pagetype']) && false ===strpos($xoopsOption['pagetype'], '.')) {        
        if (
file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/".$xoopsOption['pagetype'].".php")) {                                    include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/".$xoopsOption['pagetype'].".php";        
        } else {            
            include_once 
XOOPS_ROOT_PATH."/language/english/".$xoopsOption['pagetype'].".php";        
        }    
    }    
    
$xoopsOption = array();    
    if ( !
defined("XOOPS_USE_MULTIBYTES") ) {        
        
define("XOOPS_USE_MULTIBYTES",0);    
    }

?>




I replaced that above with the one below, according with the code in include/common.php contained in 2.0.xx version:



/************************************************************************/
/* Donations - Paypal financial management module for XOOPS 2           */
/* Copyright (c) 2004 by Xoops2 Donations Module Dev Team                */
/* http://dev.xoops.org/modules/xfmod/project/?group_id=1060            */
/* $Id: common.php,v 1.5 2004/10/15 17:58:57 blackdeath_csmc Exp $      */
/************************************************************************/
/*                                                                      */
/* Based on NukeTreasury for PHP-Nuke - by Dave Lawrence AKA Thrash     */
/* NukeTreasury - Financial management for PHP-Nuke                     */
/* Copyright (c) 2004 by Dave Lawrence AKA Thrash                       */
/*                       thrash@fragnastika.com                         */
/*                       thrashn8r@hotmail.com                          */
/*                                                                      */
/************************************************************************/
/*                                                                      */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/*                                                                      */
/* This program is distributed in the hope that it will be useful, but  */
/* WITHOUT ANY WARRANTY; without even the implied warranty of           */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU     */
/* General Public License for more details.                             */
/*                                                                      */
/* You should have received a copy of the GNU General Public License    */
/* along with this program; if not, write to the Free Software          */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  */
/* USA                                                                  */
/************************************************************************/

// This is a stripped-down version of XOOPS common.php, with web-specific code removed.    

    // ############## Activate error handler ##############
              
global $xoopsLogger$xoopsErrorHandler;
    
              include_once 
XOOPS_ROOT_PATH '/class/logger.php';
              
$xoopsLogger =& XoopsLogger::instance();
    
$xoopsErrorHandler =& $xoopsLogger;
              
$xoopsLogger->startTime();
              
$xoopsLogger->startTime'XOOPS Boot' );
    
    
set_magic_quotes_runtime(0);    
    include_once 
XOOPS_ROOT_PATH.'/class/logger.php';    
    
$xoopsLogger =& XoopsLogger::instance();    
    
$xoopsLogger->startTime();    
    
define('XOOPS_DB_CHKREF'0);
    
    
// ############## Include common functions file ##############    
    
include_once XOOPS_ROOT_PATH.'/include/functions.php';    

    
// #################### Connect to DB ##################    
    
require_once XOOPS_ROOT_PATH.'/class/database/databasefactory.php';    
    
$xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();    

    
// ################# Include required files ##############    
    
require_once XOOPS_ROOT_PATH.'/kernel/object.php';    
    require_once 
XOOPS_ROOT_PATH.'/class/criteria.php';    

    
// #################### Include text sanitizer ##################    
    
include_once XOOPS_ROOT_PATH.'/class/module.textsanitizer.php';    

    
// ################# Load Config Settings ##############    
    
$config_handler =& xoops_gethandler('config');    
    
$xoopsConfig =& $config_handler->getConfigsByCat(XOOPS_CONF);    

    
// #################### Error reporting settings ##################
              
if ( $xoopsConfig['debug_mode'] == || $xoopsConfig['debug_mode'] == ) {
                  
error_reporting(E_ALL);
                  
$xoopsLogger->enableRendering();
                  
$xoopsLogger->usePopup = ( $xoopsConfig['debug_mode'] == );
              } else {
                  
error_reporting(0);
                  
$xoopsLogger->activated false;
              }

    
// ################# Include version info file ##############    
    
include_once XOOPS_ROOT_PATH."/include/version.php";    

    
// #################### Include site-wide lang file ##################    
    
if (file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php")) {        
        include_once 
XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php";    
    } else {        
        include_once 
XOOPS_ROOT_PATH."/language/english/global.php";    
    }    

    
// ################ Include page-specific lang file ################    
    
if (isset($xoopsOption['pagetype']) && false ===strpos($xoopsOption['pagetype'], '.')) {        
        if (
file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/".$xoopsOption['pagetype'].".php")) {                                    include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/".$xoopsOption['pagetype'].".php";        
        } else {            
            include_once 
XOOPS_ROOT_PATH."/language/english/".$xoopsOption['pagetype'].".php";        
        }    
    }    
    
$xoopsOption = array();    
    if ( !
defined("XOOPS_USE_MULTIBYTES") ) {        
        
define("XOOPS_USE_MULTIBYTES",0);    
    }

?>




Now the IPN test of Xdonations 1.9beta works properly with XOOPS 2.0.xx.



I'm sorry for my dreadful English. I hope you understand what I mean.




Greetings,

Luca

16
DarinAllan
Re: xdonations 1.9- Call to undefined function: getinstance() in...

Luca this worked great for me, I now have a working IPN function on 2.0.16. Cheers, thanks for your persistance ;o)

17
LucaNet
Re: xdonations 1.9- Call to undefined function: getinstance() in...
  • 2006/12/5 15:08

  • LucaNet

  • Friend of XOOPS

  • Posts: 90

  • Since: 2006/5/25



18
kotis
Re: xdonations 1.9- Call to undefined function: getinstance() in...
  • 2007/4/27 21:01

  • kotis

  • Just popping in

  • Posts: 82

  • Since: 2002/12/23


LucaNet you ROCK... that one solved my problem... THANK YOU!!!

19
Peekay
Re: xdonations 1.9- Call to undefined function: getinstance() in...
  • 2007/7/15 11:20

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Many thx LucaNet!
A thread is for life. Not just for Christmas.

20
BDW
Re: xdonations 1.9- Call to undefined function: getinstance() in...
  • 2007/7/30 12:16

  • BDW

  • Quite a regular

  • Posts: 280

  • Since: 2002/9/28


I've been waiting all this time and i hadnt noticed this.

Anways' nice one. This should be included with the release.

Login

Who's Online

334 user(s) are online (252 user(s) are browsing Support Forums)


Members: 0


Guests: 334


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