xoops forums

Mamba

Moderator
Posted on: 2018/4/10 1:47
Mamba
Mamba (Show more)
Moderator
Posts: 10797
Since: 2004/4/23
#1

Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

Resized Image

The Wfdownloads 3.30 Beta-1 is available for testing on XOOPS 2.5.9 and PHP 5.6.+

New in this version: namespaces, autoloading, various fixes, PHP 7 compatibility (tested on PHP 7.2.4)

You can download it from GitHub.

And you can fork it from GitHub as well, and submit your improvements or bug fixes there.

We encourage everybody to open an account on GitHub and get used to working with Git, as this is the current Industry Standard.

Please note:

a) This version is developed and tested ONLY on XOOPS 2.5.9
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

luciorota

Module Developer
Posted on: 2018/6/9 19:47
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#2

Re: Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

Hi
I fork to test but I cannot install.

Fatal error: Class 'WfdownloadsUtility' not found in C:\wamp64\www\xoops.259\modules\wfdownloads\include\oninstall.php on line 49

zyspec

Module Developer
Posted on: 2018/6/11 0:34
zyspec
zyspec (Show more)
Module Developer
Posts: 1043
Since: 2004/9/21
#3

Re: Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

Unfortunately it looks like Mamba forgot to rewrite part of the install function in the ./include/oninstall.php file. You might try replacing lines 41-64 (the xoops_module_pre_install_wfdownloads function) with:
function xoops_module_pre_install_wfdownloads(XoopsModule $module)
{
    include 
__DIR__ '/common.php';
    
/** @var XoopsModulesWfdownloadsUtility $utility */
    
$utility = new XoopsModulesWfdownloadsUtility();
    
//check for minimum XOOPS version
    
$xoopsSuccess $utility::checkVerXoops($module);
    
// check for minimum PHP version
    
$phpSuccess   $utility::checkVerPhp($module);
    if (
false !== $xoopsSuccess && false !==  $phpSuccess) {
        
$moduleTables =& $module->getInfo('tables');
        foreach (
$moduleTables as $table) {
            
$GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' $GLOBALS['xoopsDB']->prefix($table) . ';');
        }
    }
    return 
$xoopsSuccess && $phpSuccess;
}


That should at least get you past the pre-install check for PHP and XOOPs versions.

heyula

Theme Designer
Posted on: 6/26 17:35
heyula
heyula (Show more)
Theme Designer
Posts: 468
Since: 2008/4/24
#4

Re: Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

Quote:

zyspec wrote:
Unfortunately it looks like Mamba forgot to rewrite part of the install function in the ./include/oninstall.php file. You might try replacing lines 41-64 (the xoops_module_pre_install_wfdownloads function) with:
function xoops_module_pre_install_wfdownloads(XoopsModule $module)
{
    include 
__DIR__ '/common.php';
    
/** @var XoopsModulesWfdownloadsUtility $utility */
    
$utility = new XoopsModulesWfdownloadsUtility();
    
//check for minimum XOOPS version
    
$xoopsSuccess $utility::checkVerXoops($module);
    
// check for minimum PHP version
    
$phpSuccess   $utility::checkVerPhp($module);
    if (
false !== $xoopsSuccess && false !==  $phpSuccess) {
        
$moduleTables =& $module->getInfo('tables');
        foreach (
$moduleTables as $table) {
            
$GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' $GLOBALS['xoopsDB']->prefix($table) . ';');
        }
    }
    return 
$xoopsSuccess && $phpSuccess;
}


That should at least get you past the pre-install check for PHP and XOOPs versions.

I get an error in setup
Error: Class 'WfdownloadsUtility' not found

zyspec

Module Developer
Posted on: 6/26 22:09
zyspec
zyspec (Show more)
Module Developer
Posts: 1043
Since: 2004/9/21
#5

Re: Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

looks like this forum "ate" the '\' in the previous post...

replace line 5:
$utility = new XoopsModulesWfdownloadsUtility();

with:
$utility = new XoopsModules\Wfdownloads\Utility();

heyula

Theme Designer
Posted on: 6/27 5:01
heyula
heyula (Show more)
Theme Designer
Posts: 468
Since: 2008/4/24
#6

Re: Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

@Zyspec
Thanks.

laurent454

Just popping in
Posted on: 10/24 12:18
laurent454
laurent454 (Show more)
Just popping in
Posts: 2
Since: 10/24 12:1
#7

Re: Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

Quote:

Mamba wrote:
Resized Image

The Wfdownloads 3.30 Beta-1 is available for testing on XOOPS 2.5.9 and PHP 5.6.+

New in this version: namespaces, autoloading, various fixes, PHP 7 compatibility (tested on PHP 7.2.4)

You can download it from GitHub.

And you can fork it from GitHub as well, and submit your improvements or bug fixes there.

We encourage everybody to open an account on GitHub and get used to working with Git, as this is the current Industry Standard.

Please note:

a) This version is developed and tested ONLY on XOOPS 2.5.9


Hello, when i try to install it, i have a DLL error :( how to solve this please ? Thanks

Mamba

Moderator
Posted on: 10/26 5:27
Mamba
Mamba (Show more)
Moderator
Posts: 10797
Since: 2004/4/23
#8

Re: Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

We don't use any DLL, so this is not coming from XOOPS
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

laurent454

Just popping in
Posted on: 10/28 11:34
laurent454
laurent454 (Show more)
Just popping in
Posts: 2
Since: 10/24 12:1
#9

Re: Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

Okay thanks