Jump to content

Getting Parse error....PLEASE HELP


brgreen

Recommended Posts

My Joomla website ios getting this message after I installed template:

 

Parse error: syntax error, unexpected T_STRING in /home/randblaw/public_html/modules/mod_djmultitreemenu/mod_djmultitreemenu.php on line 3

I went and located referencing file in error message. I can not see where the error is in the code. Can some one please fix this error for me. I have attached the code below.

 

Thanks You.

 

 

<?php/*** @version 1.6.2 stable* @package DJ-MultiTree Menu* @copyright Copyright © 2010 Blue Constant Media LTD, All rights reserved.* @license http://www.gnu.org/licenses GNU/GPL* @author url: http://design-joomla.eu* @author email contact@design-joomla.eu* @developer Szymon Woronowski - szymon.woronowski@design-joomla.eu*** DJ-MultiTree Menu 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 3 of the License, or* (at your option) any later version.** DJ-MultiTree Menu 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 DJ-MultiTree Menu. If not, see <http://www.gnu.org/licenses/>.**/

// no direct access

defined('_JEXEC') or die('Restricted access');

// Include the syndicate functions only oncerequire_once(dirname(__FILE__).DS.'helper.php');

$app = JFactory::getApplication();

$document = JFactory::getDocument();if($params->get('css',1) || !file_exists(JPATH_ROOT.DS.'templates'.DS.$app->getTemplate().DS.'css'.DS.'djmultitreemenu_fx.css')) { $css_fx = 'modules/mod_djmultitreemenu/assets/css/djmultitreemenu_fx.css';} else { $css_fx = 'templates/'.$app->getTemplate().'/css/djmultitreemenu_fx.css';}if($params->get('css',1) || !file_exists(JPATH_ROOT.DS.'templates'.DS.$app->getTemplate().DS.'css'.DS.'djmultitreemenu.css')) { $css = 'modules/mod_djmultitreemenu/assets/css/djmultitreemenu.css';} else { $css = 'templates/'.$app->getTemplate().'/css/djmultitreemenu.css';}if($params->get('moo',1)) { JHTML::_('behavior.mootools'); $js = 'modules/mod_djmultitreemenu/assets/js/djmultitreemenu.js'; $document->addScript($js); $document->addStyleSheet($css); $document->addStyleSheet($css_fx); $effect = $params->get('effect'); if($effect!='linear') $effect.=':out'; if(!is_numeric($duration = $params->get('duration'))) $duration = 200; if(!is_numeric($delay = $params->get('delay'))) $delay = 1200; $height_fx = ($params->get('height_fx')) ? 'true' : 'false'; $width_fx = ($params->get('width_fx')) ? 'true' : 'false'; $opacity_fx = ($params->get('opacity_fx')) ? 'true' : 'false'; $submenu_tree = $params->get('submenu_tree',2); $options = "{transition: '$effect', duration: $duration, delay: $delay, submenu_tree: $submenu_tree, height_fx: $height_fx, width_fx: $width_fx, opacity_fx: $opacity_fx, mid: $module->id }"; $wrapper_id = $params->get('wrapper'); $js = " (function($){ // Mootools Safe Mode ON window.addEvent('domready',function(){ var DJTreeMenusAll = $('dj-mtmenu$module->id').getChildren('li.dj-up'); var wrapper = $('$wrapper_id'); DJTreeMenusAll.each(function(djmenu){ if(djmenu.getElement('.dj-drop')) { DJTreeMenus.include(new DJTreeMenu(djmenu,0,wrapper,$options)); } else { djmenu.addEvent('mouseenter',function(){ djmenu.addClass('hover'); }); djmenu.addEvent('mouseleave',function(){ djmenu.removeClass('hover'); }); } }); }); })(document.id);"; $document->addScriptDeclaration($js); } else { if(preg_match('/MSIE 6.0/',$_SERVER['HTTP_USER_AGENT'])) { // IE6 JHTML::_('behavior.mootools'); $css = $css_fx; $js = 'modules/mod_djmultitreemenu/assets/js/ie6Hover.js'; $document->addScript($js); } $document->addStyleSheet($css);}$params->def('module_id',$module->id);$djtreemenu = new modDJMultiTreeMenuHelper();require(JModuleHelper::getLayoutPath('mod_djmultitreemenu'));?>

Link to comment
Share on other sites

Sorry here you go.

 

<?php/*** @version 1.6.2 stable* @package DJ-MultiTree Menu* @copyright Copyright (C) 2010 Blue Constant Media LTD, All rights reserved.* @license http://www.gnu.org/licenses GNU/GPL* @author url: http://design-joomla.eu* @author email contact@design-joomla.eu* @developer Szymon Woronowski - szymon.woronowski@design-joomla.eu*** DJ-MultiTree Menu 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 3 of the License, or* (at your option) any later version.** DJ-MultiTree Menu 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 DJ-MultiTree Menu. If not, see <http://www.gnu.org/licenses/>.**/
// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only oncerequire_once(dirname(__FILE__).DS.'helper.php');
$app = JFactory::getApplication();
$document = JFactory::getDocument();if($params->get('css',1) || !file_exists(JPATH_ROOT.DS.'templates'.DS.$app->getTemplate().DS.'css'.DS.'djmultitreemenu_fx.css')) {   $css_fx = 'modules/mod_djmultitreemenu/assets/css/djmultitreemenu_fx.css';} else {   $css_fx = 'templates/'.$app->getTemplate().'/css/djmultitreemenu_fx.css';}if($params->get('css',1) || !file_exists(JPATH_ROOT.DS.'templates'.DS.$app->getTemplate().DS.'css'.DS.'djmultitreemenu.css')) {   $css = 'modules/mod_djmultitreemenu/assets/css/djmultitreemenu.css';} else {   $css = 'templates/'.$app->getTemplate().'/css/djmultitreemenu.css';}if($params->get('moo',1)) {      JHTML::_('behavior.mootools');   $js = 'modules/mod_djmultitreemenu/assets/js/djmultitreemenu.js';   $document->addScript($js);   $document->addStyleSheet($css);   $document->addStyleSheet($css_fx);      $effect = $params->get('effect');   if($effect!='linear') $effect.=':out';   if(!is_numeric($duration = $params->get('duration'))) $duration = 200;   if(!is_numeric($delay = $params->get('delay'))) $delay = 1200;   $height_fx = ($params->get('height_fx')) ? 'true' : 'false';   $width_fx = ($params->get('width_fx')) ? 'true' : 'false';   $opacity_fx = ($params->get('opacity_fx')) ? 'true' : 'false';   $submenu_tree = $params->get('submenu_tree',2);      $options = "{transition: '$effect', duration: $duration, delay: $delay, submenu_tree: $submenu_tree,      height_fx: $height_fx, width_fx: $width_fx, opacity_fx: $opacity_fx, mid: $module->id }";      $wrapper_id = $params->get('wrapper');      $js = "   (function($){ // Mootools Safe Mode ON      window.addEvent('domready',function(){      var DJTreeMenusAll = $('dj-mtmenu$module->id').getChildren('li.dj-up');      var wrapper = $('$wrapper_id');      DJTreeMenusAll.each(function(djmenu){         if(djmenu.getElement('.dj-drop')) {            DJTreeMenus.include(new DJTreeMenu(djmenu,0,wrapper,$options));         } else {            djmenu.addEvent('mouseenter',function(){               djmenu.addClass('hover');            });            djmenu.addEvent('mouseleave',function(){               djmenu.removeClass('hover');            });         }      });      });      })(document.id);";   $document->addScriptDeclaration($js);   } else {      if(preg_match('/MSIE 6.0/',$_SERVER['HTTP_USER_AGENT'])) { // IE6      JHTML::_('behavior.mootools');      $css = $css_fx;      $js = 'modules/mod_djmultitreemenu/assets/js/ie6Hover.js';      $document->addScript($js);   }   $document->addStyleSheet($css);}$params->def('module_id',$module->id);$djtreemenu = new modDJMultiTreeMenuHelper();require(JModuleHelper::getLayoutPath('mod_djmultitreemenu'));?>

Link to comment
Share on other sites

This is how it looks in dreamweaver when i open the file. I tried formatting the best i could for you.

 

<?php/*** @version 1.6.2 stable* @package DJ-MultiTree Menu* @copyright Copyright (C) 2010 Blue Constant Media LTD, All rights reserved.* @license
http://www.gnu.org/licenses GNU/GPL* @author url: http://design-joomla.eu* @author email contact@design-joomla.eu* @developer Szymon Woronowski -
szymon.woronowski@design-joomla.eu*** DJ-MultiTree Menu 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 3 of the License, or* (at your option) any later version.** DJ-MultiTree Menu 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 DJ-MultiTree Menu. If not, see <http://www.gnu.org/licenses/>.**/
// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only oncerequire_once(dirname(__FILE__).DS.'helper.php');
$app = JFactory::getApplication();
$document = JFactory::getDocument();if($params->get('css',1) || !file_exists(JPATH_ROOT.DS.'templates'.DS.$app->getTemplate().DS.'css'.DS.'djmultitreemenu_fx.css')) {
$css_fx = 'modules/mod_djmultitreemenu/assets/css/djmultitreemenu_fx.css';} else {	$css_fx = 'templates/'.$app
>getTemplate().'/css/djmultitreemenu_fx.css';}if($params->get('css',1) || !file_exists(JPATH_ROOT.DS.'templates'.DS.$app
>getTemplate().DS.'css'.DS.'djmultitreemenu.css')) {	$css = 'modules/mod_djmultitreemenu/assets/css/djmultitreemenu.css';} else {	$css = 'templates/'.$app
>getTemplate().'/css/djmultitreemenu.css';}if($params->get('moo',1)) {		JHTML::_('behavior.mootools');	$js =
'modules/mod_djmultitreemenu/assets/js/djmultitreemenu.js';	$document->addScript($js);	$document->addStyleSheet($css);	$document->addStyleSheet($css_fx);	
$effect = $params->get('effect');	if($effect!='linear') $effect.=':out';	if(!is_numeric($duration = $params->get('duration'))) $duration = 200;	if(!is_numeric($delay =
$params->get('delay'))) $delay = 1200;	$height_fx = ($params->get('height_fx')) ? 'true' : 'false';	$width_fx = ($params->get('width_fx')) ? 'true' : 'false';
$opacity_fx = ($params->get('opacity_fx')) ? 'true' : 'false';	$submenu_tree = $params->get('submenu_tree',2);		$options = "{transition: '$effect', duration:
$duration, delay: $delay, submenu_tree: $submenu_tree,		height_fx: $height_fx, width_fx: $width_fx, opacity_fx: $opacity_fx, mid: $module->id }";	
$wrapper_id = $params->get('wrapper');		$js = "	(function($){ // Mootools Safe Mode ON		window.addEvent('domready',function(){		var
DJTreeMenusAll = $('dj-mtmenu$module->id').getChildren('li.dj-up');		var wrapper = $('$wrapper_id');		DJTreeMenusAll.each(function(djmenu){		
if(djmenu.getElement('.dj-drop')) {				DJTreeMenus.include(new DJTreeMenu(djmenu,0,wrapper,$options));			} else {			
djmenu.addEvent('mouseenter',function(){					djmenu.addClass('hover');				});			
djmenu.addEvent('mouseleave',function(){					djmenu.removeClass('hover');				});			}		});		});	
})(document.id);";	$document->addScriptDeclaration($js);	} else {		if(preg_match('/MSIE 6.0/',$_SERVER['HTTP_USER_AGENT'])) { // IE6	
JHTML::_('behavior.mootools');		$css = $css_fx;		$js = 'modules/mod_djmultitreemenu/assets/js/ie6Hover.js';		$document->addScript($js);	}
$document->addStyleSheet($css);}$params->def('module_id',$module->id);$djtreemenu = new
modDJMultiTreeMenuHelper();require(JModuleHelper::getLayoutPath('mod_djmultitreemenu'));?>

Link to comment
Share on other sites

I literally did nothing but properly format the code, and it no longer throws a parse error.

 

<?php
/***
@version 1.6.2 stable*
@package DJ-MultiTree Menu*
@copyright Copyright (C) 2010 Blue Constant Media LTD, All rights reserved.*
@license http://www.gnu.org/licenses GNU/GPL*
@author url: http://design-joomla.eu*
@author email contact@design-joomla.eu*
@developer Szymon Woronowski - szymon.woronowski@design-joomla.eu***
DJ-MultiTree Menu 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 3 of the License, or* (at your option) any later version.**
DJ-MultiTree Menu 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 DJ-MultiTree Menu.
If not, see <http://www.gnu.org/licenses/>.**/

// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only oncerequire_once(dirname(__FILE__).DS.'helper.php');
$app = JFactory::getApplication();
$document = JFactory::getDocument();
if($params->get('css',1) || !file_exists(JPATH_ROOT.DS.'templates'.DS.$app->getTemplate().DS.'css'.DS.'djmultitreemenu_fx.css')) {
$css_fx = 'modules/mod_djmultitreemenu/assets/css/djmultitreemenu_fx.css';
} else {
$css_fx = 'templates/'.$app->getTemplate().'/css/djmultitreemenu_fx.css';
}
if($params->get('css',1) || !file_exists(JPATH_ROOT.DS.'templates'.DS.$app->getTemplate().DS.'css'.DS.'djmultitreemenu.css')) {
$css = 'modules/mod_djmultitreemenu/assets/css/djmultitreemenu.css';
} else {
$css = 'templates/'.$app->getTemplate().'/css/djmultitreemenu.css';
}
if($params->get('moo',1)) {
JHTML::_('behavior.mootools');
$js = 'modules/mod_djmultitreemenu/assets/js/djmultitreemenu.js';
$document->addScript($js);
$document->addStyleSheet($css);
$document->addStyleSheet($css_fx);
$effect = $params->get('effect');
if($effect!='linear') $effect.=':out';
if(!is_numeric($duration = $params->get('duration'))) $duration = 200;
if(!is_numeric($delay = $params->get('delay'))) $delay = 1200;
$height_fx = ($params->get('height_fx')) ? 'true' : 'false';
$width_fx = ($params->get('width_fx')) ? 'true' : 'false';
$opacity_fx = ($params->get('opacity_fx')) ? 'true' : 'false';
$submenu_tree = $params->get('submenu_tree',2);
$options = "{transition: '$effect', duration: $duration, delay: $delay, submenu_tree: $submenu_tree,
height_fx: $height_fx, width_fx: $width_fx, opacity_fx: $opacity_fx, mid: $module->id }";
$wrapper_id = $params->get('wrapper');
$js = "
(function($){ // Mootools Safe Mode ON
window.addEvent('domready',function(){
var DJTreeMenusAll = $('dj-mtmenu$module->id').getChildren('li.dj-up');
var wrapper = $('$wrapper_id');
DJTreeMenusAll.each(function(djmenu){
if(djmenu.getElement('.dj-drop')) {
DJTreeMenus.include(new DJTreeMenu(djmenu,0,wrapper,$options));
} else {
djmenu.addEvent('mouseenter',function(){
djmenu.addClass('hover');
});
djmenu.addEvent('mouseleave',function(){
djmenu.removeClass('hover');
});
}
});
});
})(document.id);
";
$document->addScriptDeclaration($js);
} else {
if(preg_match('/MSIE 6.0/',$_SERVER['HTTP_USER_AGENT'])) { // IE6
	JHTML::_('behavior.mootools');
	$css = $css_fx;
	$js = 'modules/mod_djmultitreemenu/assets/js/ie6Hover.js';
	$document->addScript($js);
}
$document->addStyleSheet($css);
}
$params->def('module_id',$module->id);
$djtreemenu = new modDJMultiTreeMenuHelper();
require(JModuleHelper::getLayoutPath('mod_djmultitreemenu'));
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.