Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code to XCL - PHP7 and MySQL ENGINE=InnoDB #9

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed README
Empty file.
145 changes: 145 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/2.0.0/active.svg)](https://github.com/xoopscube/xcl)
![License GPL](https://img.shields.io/badge/License-GPL-green)
![X-Updare Store](https://img.shields.io/badge/X--Update%20Store-Pending-red)

## ///// — MultiMenu :: Custom Navigation Blocks

![alt text](https://repository-images.githubusercontent.com/461634439/038a5641-d653-4d78-ba55-898667ae7d)


MODULE | MultiMenu
------------ | -------------
Description | MultiMenu module allows you to display customized menus.
Render Engine| Smarty v2 and XCube Layout
Version | 2.3.1
Author | Tom Hayakawa
Author | Update by @gigamaster Nuno Luciano (XCL7)
Copyright | 2005-2022 Authors
License | GPL


##### :computer: The Minimum Requirements



Apache, Nginx, etc. PHP 7.2.x
MySQL 5.6, MariaDB InnoDB utf8 / utf8mb4
XCL version 2.3.+



-----

## Module MultiMenu v.2.3.+

Refactor code to XCL - PHP7 and MySQL ENGINE=InnoDB

### Description

multiMenu module allows you to display customized menus.
Original module by Solo, luinithil, Wolf and contributions by Domifara, Naoki Sawada, Naoki Okino, Nobunobu, Yoshi Sakai, Toshihiro Takehara (aka nouphet).

### Setting matching methods

The following methods describe the logic of MultiMenu links management on the UI screen.

#### Specify URL with full path as usual

**Example**: https://github.com/xoopscube/xcl

#### Specification by module name
[Module_name]
[Module_name]xxxx.php?xxxx=xxxx

**Example:**

Link ==>[news]
Title ==> News
Display: News

**Example:**

Link ==> [news]article.php?storyid=11
Title ==> Important news
Display: Important news


#### Always show submenu

+[module_name]
+[module_name]xxxx.php?xxxx=xxxx

**Example:**

Link ==> +[news]
Title ==> News
Display: (Always displayed)
News
News post
Archive

**Example:**
Link ==> @[news]article.php?storyid=11
Title ==> Important news
Display: (Always displayed)
Important news
News post
Archive

#### Display the submenu only with module
when the corresponding module is displayed (same operation as the main menu)

@[Module_name]
@[Module_name]xxxx.php?xxxx=xxxx

**Example:**
Link ==> @[news]
Title ==> News
Display: (Normal)
News
Display: (when the corresponding module is displayed)
News
News post
Archive

**Example:**
Link ==> @[news]article.php?storyid=11
Title ==> Important news
Display: (Normal)
Important news
Display: (when the corresponding module is displayed)
Important news
News post
Archive

#### Show as custom submenu
-[Module_name]
-[Module_name]xxxx.php?xxxx=xxxx
-https://github.com/xoopscube/xcl

Links that start with a sign are added to submenus of menus that have links that do not start with a-sign.
The way the sub menu is displayed changes depending on the attributes of the parent menu, as shown in the examples.
If displayed at the same time as the submenu, a custom submenu will be added to the bottom of the module submenu.

### Changelog

[refactor code]
v.2.30 PHP7 and MySQL ENGINE=InnoDB for XCL

[Update]
v1.20
* Rewritten exclusively for XOOPS Cube Legacy 2.1.x
* Improvement of security (POST foreach deployment is abolished)
* Supports PHP5 only
* Fixed to work without system module
* HTTP_POST_VARS deprecated
* Change block template file name
* Fixed block management not working
62 changes: 36 additions & 26 deletions html/modules/multiMenu/admin/admin_action.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
<?php
if (!defined('XOOPS_ROOT_PATH')) exit();
/**
* @package Multimenu
* @version 2.3.1
* @author Gigamaster, 2020 XCL PHP7
* @author Tom Hayakawa
* @copyright Copyright 2005-2021 XOOPSCube Project
* @license https://github.com/xoopscube/xcl/blob/master/docs/GPL_V2.txt
*/

$root = XCube_Root::getSingleton();
$op = $root->mContext->mRequest->getRequest('op') ;
$op = empty($op) ? '' : $op;
$class = new multimenu($menu_num);
if ( ! defined( 'XOOPS_ROOT_PATH' ) ) {
exit();
}

$root = XCube_Root::getSingleton();
$op = $root->mContext->mRequest->getRequest( 'op' );
$op = empty( $op ) ? '' : $op;
$class = new multimenu( $menu_num );

switch($op) {
case "new":
$class->im_admin_new();
break;
case "edit":
$class->im_admin_edit();
break;
case "update":
$class->im_admin_update();
break;
case "del":
$class->im_admin_del();
break;
case "move":
$class->im_admin_move();
$class->im_admin_list();
break;
default:
$class->im_admin_list();
break;
switch ( $op ) {
case "new":
$class->im_admin_new();
break;
case "edit":
$class->im_admin_edit();
break;
case "update":
$class->im_admin_update();
break;
case "del":
$class->im_admin_del();
break;
case "move":
$class->im_admin_move();
$class->im_admin_list();
break;
default:
$class->im_admin_list();
break;
}
?>
Loading