11
liomj
Re: Mymenus Module with XOOPS 2.5.11-Stable
  • 2024/11/1 5:21

  • liomj

  • Just popping in

  • Posts: 94

  • Since: 2012/4/10


Quote:

Mamba wrote:
Please check out the Beta 6 and see if it works better.


i made some testing with beta6

Error: Error: Undefined constant "_MI_MYMENUS_HELP_OVERVIEW" in file /modules/mymenus/xoops_version.php line 84
and multiple error in undefined constant in line 84-89 135-136, in xoops_version.php

and Error: Error: Undefined constant "_MI_MYMENUS_ADMMENU0" in file /modules/mymenus/admin/menu.php line 44

i uncomment it temporarily and now mymenu is loading and i can access the module admin interface but found another error i cant save the changes in mymenus block.. i would like to try the assign to template feature

Warning: Undefined array key 4 in file /modules/mymenus/blocks/mymenus_block.php line 237

my environment
XOOPS Version XOOPS 2.5.11-Stable
PHP Version 8.2.12
MySQL Version 10.4.32-MariaDB



12
liomj
Re: wgFilemanager released for testing and contribution
  • 2024/8/27 0:03

  • liomj

  • Just popping in

  • Posts: 94

  • Since: 2012/4/10


thank you for a new module for XOOPS

i got this error in modules/system/admin.php?fct=modulesadmin&op=installlist

Error: Error: Undefined constant '_MI_WGFILEMANAGER_NAME' in file /modules/wgfilemanager/xoops_version.php line 34

XOOPS Version XOOPS 2.5.11-Stable
PHP Version 7.4.33
MySQL Version 5.5.5-10.4.27-MariaDB



13
liomj
Re: activate block by default
  • 2024/8/26 23:56

  • liomj

  • Just popping in

  • Posts: 94

  • Since: 2012/4/10


Hi i tried asking ChatGPT AI, I got this answer below. I didnt test it, not sure if it will work.

Yes, in XOOPS CMS, it is possible to have a block automatically activated upon installation of a module. This involves modifying the installation script of the module so that the block is registered and set as active during the installation process. Here's how you can do it:

Step-by-Step Guide
1. Locate the xoops_version.php file in your module:

This file contains the configuration details for your module, including block definitions.

2. Define the Block:

Ensure that your block is defined in the xoops_version.php file under the $modversion['blocks'] array. For example:

$modversion['blocks'][1] = [
    
'file'        => 'block_file.php',
    
'name'        => 'Block Name',
    
'description' => 'Block Description',
    
'show_func'   => 'show_block_function',
    
'template'    => 'block_template.tpl',
    
'edit_func'   => 'edit_block_function',
    
'options'     => 'option1|option2',
];


3. Modify the Installation Script:

Typically, the block is registered during the module installation process. To activate it by default, you can add code to set the block as active in the xoops_version.php file.

Add the following to the module's xoops_version.php file:

// Add the block automatically upon installation
$modversion['onInstall'] = 'module_install_function';

// Custom installation function in your module's include/oninstall.php
function module_install_function(&$module) {
    
$moduleHandler xoops_getHandler('module');
    
$moduleObj $moduleHandler->getByDirname('your_module_name');
    
$blockHandler xoops_getHandler('block');

    
// Loop through the blocks defined in xoops_version.php
    
$blocks $blockHandler->getByModule($moduleObj->getVar('mid'));

    foreach (
$blocks as $block) {
        
// Activate the block
        
$block->setVar('isactive'1);
        
$blockHandler->insert($block);
    }

    return 
true;
}


Replace 'your_module_name' with the actual directory name of your module.

4. Create oninstall.php File:

If not already present, create an oninstall.php file in the include directory of your module and define the module_install_function as shown above.

5. Test the Installation:

Install your module through the XOOPS administration panel and verify that the block is automatically activated upon installation.

Summary
By customizing the installation process, you can ensure that blocks are automatically activated when the module is installed. The key is to modify the xoops_version.php file and create a custom installation function that activates the block.



14
liomj
Re: New Admin Theme for XOOPS
  • 2024/5/29 12:34

  • liomj

  • Just popping in

  • Posts: 94

  • Since: 2012/4/10


i tried the side search box

when i typed blocks - then select the search Results
URL is redirect to - http://localhost/xoops/http%3A//localhost/xoops/modules/system/admin.php%3Ffct%3Dblocksadmin



15
liomj
Re: New Admin Theme for XOOPS
  • 2024/5/29 12:25

  • liomj

  • Just popping in

  • Posts: 94

  • Since: 2012/4/10


1. suggestion : logout button at top

Resized Image
2. suggestion to change color of jgrowl redirect (eg black background & border, white text)

Resized Image
3. blocks icon misalign - chrome/edge



16
liomj
Re: New Admin Theme for XOOPS
  • 2024/5/29 4:37

  • liomj

  • Just popping in

  • Posts: 94

  • Since: 2012/4/10


congratulations formuss and team..this is very nice...

so far so good

XOOPS Version XOOPS 2.5.11-Stable
PHP Version 7.4.33
MySQL Version 5.5.5-10.4.27-MariaDB

suggestion maybe change color for button..hard to see with the red and gray combination
Resized Image



17
liomj
Re: Mymenus Module with XOOPS 2.5.11-Stable
  • 2024/1/16 4:56

  • liomj

  • Just popping in

  • Posts: 94

  • Since: 2012/4/10


Thank you mamba and zyspec

i tried again this version in a new installation

mymenu version 1.54 Beta 2 (https://github.com/xoopsmodules25x/mymenus)

XOOPS Version XOOPS 2.5.11-Stable
PHP Version 7.4.33
MySQL Version 5.5.5-10.4.27-MariaDB

renamed class/Registry.php and Builder.php
Modules successful installed
- when try to access the mymenus administration
Error: SmartyCompilerException: Syntax error in template "file:/modules/mymenus/templates/static/mymenus_admin_menus.tpl" on line 45 "" in file /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php line 45



18
liomj
Re: Assign Smarty variable to PHP with XOOPS 2.5.11-Stable
  • 2024/1/16 4:22

  • liomj

  • Just popping in

  • Posts: 94

  • Since: 2012/4/10


it does not work

actually this is for a customized block for tdmdownload modules

i solved it by editing the php file instead of the template file



19
liomj
Assign Smarty variable to PHP with XOOPS 2.5.11-Stable
  • 2024/1/3 3:29

  • liomj

  • Just popping in

  • Posts: 94

  • Since: 2012/4/10


lasttime before the xoops upgrade to smarty 3 this is working
<{assign var="cid" value=$downloads.cid}>    
<{
php}>
$catid=$this->get_template_vars('cid'); 
<{/
php}>


now after using
XOOPS 2.5.11-Stable with smarty 3

i receive this error
Error ErrorUsing $this when not in object context


how to update this code ?



20
liomj
Mymenus Module with XOOPS 2.5.11-Stable
  • 2024/1/2 2:46

  • liomj

  • Just popping in

  • Posts: 94

  • Since: 2012/4/10


Hi anyone have a working mymenus module with XOOPS 2.5.11-Stable

i have a site using the following environment and is working fine

myMenus version 1.3
XOOPS Version XOOPS 2.5.11-Beta2
PHP Version 7.4.29
MySQL Version 5.5.5-10.4.24-MariaDB


now i would like to try XOOPS 2.5.11-Stable and i have tried using the following environment
----------------
mymenu version 1.54 Beta 2 (https://github.com/xoopsmodules25x/mymenus)
XOOPS Version XOOPS 2.5.11-Stable
PHP Version 7.4.33
MySQL Version 5.5.5-10.4.27-MariaDB
Error : menu is not appearing
Only variables should be assigned by reference in file /modules/mymenus/blocks/mymenus_block.php line 28
Unknown: Non-static method MymenusRegistry::getInstance() should not be called statically in file /modules/mymenus/blocks/mymenus_block.php line 35
--------------------
Mymenu version: 1.54 Beta 5 (https://github.com/mambax7/mymenus)
XOOPS Version XOOPS 2.5.11-Stable
PHP Version 8.2.12
MySQL Version 10.4.32-MariaDB
Error : SmartyException: Unable to load template 'db:mymenus_block.html




TopTop
« 1 (2) 3 4 5 ... 9 »



Login

Who's Online

126 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 126


more...

Donat-O-Meter

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

Latest GitHub Commits