Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

Plugin x_menu_params
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Plugin x_menu_params

Plugin x_menu_params 7 years, 4 months ago #33715

To make this plugin compatible with php7
this code needs to be changed
class plgSystemX_Menu_Params extends JPlugin {
	var $_resources = '';
	
	function plgSystemX_Menu_Params(&$subject, $pluginconfig) {
		parent::__construct($subject, $pluginconfig);
		$this->_resources = dirname(__FILE__).'/x_menu_params/xml/';
	}

in x_menu_params.php
Can you tell me what I need to insert/change it to fix it.
Thank you!
Here is the complete code bellow just in case.
<?php
/**
 * @package Sj Megamenu
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 * @copyright (c) 2012 YouTech Company. All Rights Reserved.
 * @author YouTech Company https://www.smartaddons.com
 *
 */
defined('_JEXEC') or die('Restricted access');


jimport('joomla.plugin.plugin');

class plgSystemX_Menu_Params extends JPlugin {
	var $_resources = '';
	
	function plgSystemX_Menu_Params(&$subject, $pluginconfig) {
		parent::__construct($subject, $pluginconfig);
		$this->_resources = dirname(__FILE__).'/x_menu_params/xml/';
	}

	function onContentPrepareForm($form, $data) {
		$language = JFactory::getLanguage();
		$language->load('plg_system_x_menu_params');
		$doc 		= JFactory::getDocument();
		$plg_path 	= JURI::root(true).'/plugins/system/x_menu_params/';
		if ($form->getName()=='com_menus.item') {
			JHtml::_('jquery.framework');
			JForm::addFormPath($this->_resources);
			if($data['id'] && $data['parent_id'] == 1) {
				JHtml::_('jquery.ui', array('core', 'more', 'sortable'));				
				$doc->addScript($plg_path.'assets/js/jquery-ui.draggable.min.js');
				$doc->addStyleSheet($plg_path.'assets/css/bootstrap.css');
				$doc->addStyleSheet($plg_path.'assets/css/font-awesome.min.css');
				$doc->addStyleSheet($plg_path.'assets/css/modal.css');
				$doc->addStyleSheet($plg_path.'assets/css/sjmegamenu.css');
				// $doc->addScript($plg_path.'assets/js/modal.js');
				$doc->addScript( $plg_path. 'assets/js/sjmegamenu.js' );
				$form->loadFile('menus_edit_params', false);
			}
			else {
				$form->loadFile('menus_edit_params_child', false);
			}
		}
	}
}
Last Edit: 7 years, 4 months ago by CyrusXxX.
The topic has been locked.

Re: Plugin x_menu_params 7 years, 4 months ago #33734

Fixed it hahaha!
The topic has been locked.

Re: Plugin x_menu_params 6 years, 5 months ago #36843

[25-Jun-2018 06:46:22 America/New_York] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgSystemX_Menu_Params has a deprecated constructor in /plugins/system/x_menu_params/x_menu_params.php on line 14

#0 Call to a member function get() on null

make this plugin compatible with php7
this code needs to be changed
Can you tell me what I need to insert/change it to fix it.
Thank you!
Last Edit: 6 years, 5 months ago by alexdialup@ya.ru.
The topic has been locked.

Re: Plugin x_menu_params 6 years, 5 months ago #36846

The topic has been locked.

Re: Plugin x_menu_params 6 years, 4 months ago #36962

hello!
after update joomla to 3.8.10 when i came to menu item i have Error 500
Please help, how can i fix this problem?

<extension type="plugin" version="3.0" group="system" method="upgrade">
<name>System - Extra Menu Params</name>
<author>YouTech Company</author>
<creationDate>November 2012</creationDate>
<copyright>Copyright (c) 2012 YouTech Company</copyright>
<license>www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>contact@ytcvn.com</authorEmail>
<authorUrl>www.ytcvn.com</authorUrl>
<version>3.0.1</version>
<description>YouTech Extra Params plugin for Joomla 3.0.x</description>
The topic has been locked.

Re: Plugin x_menu_params 6 years, 3 months ago #37006

Dear Sir,

Fix menu item. link download here: dev.ytcvn.com/pkdownload/x_menu_params.zip

Thanks
The topic has been locked.
The following user(s) said Thank You: tshirazi
  • Page:
  • 1
  • 2
Time to create page: 0.23 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes