Zum Inhalt springen

TYPO3 4.3 beta und ypslideout

Erstellt am 2. Oktober 2009 · 4 Antworten · letzte Antwort am 2. Oktober 2009

Tags: Update & Upgrade, Frage

berniezh ·

Guten Morgen

TYPO3 4.3 beta und ypslideout wirft folgenden Fehler aus:

Class 'tx_intypslideoutmenu' not found in /var/www/typo3_src-4.3/t3lib/class.t3lib_div.php on line 4936

Kann das jemand nachvollziehen?

Vielen Dank.

Cheers
Bernie

berniezh ·

Bei den 4.2.X Versionen funktionierte es noch reibungslos. Vielen Dank.

<?php
/***************************************************************
*  Copyright notice
*
*  (c) 2007 Armin Bartsch (typo3_extension@intervation.de)
*  All rights reserved
*
*  This script is part of the TYPO3 project. The TYPO3 project 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 2 of the License, or
*  (at your option) any later version.
*
*  The GNU General Public License can be found at
*  http://www.gnu.org/copyleft/gpl.html.
*  A copy is found in the textfile GPL.txt and important notices to the license
*  from the author is found in LICENSE.txt distributed with these scripts.
*
*
*  This script 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.
*
*  This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
 * class.tx_menu_ypslideoutmenu.php
 *
 * Add int_ypslideoutmenu
 *
 * @author Armin Bartsch, typo3.intervation.de <>
 * @package TYPO3
 * @subpackage int_ypslideoutmenut
 */
/**
 * [CLASS/FUNCTION INDEX of SCRIPT]
 *
 *
 *
 *   55: class tslib_tx_menu_ypslideoutmenu extends tslib_tmenu
 *   69:     function extProc_init()
 *   83:     function extProc_beforeLinking($key)
 *  158:     function extProc_beforeAllWrap($item,$key)
 *  198:     function extProc_afterLinking($key)
 *  224:     function extProc_finish ()
 *
 * TOTAL FUNCTIONS: 5
 * (This index is automatically created/updated by the extension "extdeveval")
 *
 */

require_once (PATH_tslib . 'class.tslib_menu.php');

class tslib_tx_menu_ypslideoutmenu extends tslib_tmenu {

	var $extKey = 'int_ypslideoutmenu';
	var $WMjavasctipt_layer = array();
	var $WMtheSubMenu;
	var $WMisSub;
	var $WMparentid = 0;
	var $WMlevel = 0;

	/**
	 * Creating unique menu id string plus other initialization of internal variables (all prefixed "WM")
	 *
	 * @return	void
	 */
	function extProc_init()	{

		$this->WMid = empty($this->WMid) ? $this->WMid : $this->I['uid'];


	}

	/**
	 * Processing before the links are created.
	 * This means primarily creating some javaScript code for the management.
	 *
	 * @param	integer		Pointer to $this->menuArr[$key] where the current menu element record is found
	 * @return	void
	 */
	function extProc_beforeLinking($key)	{

		if ($this->I['uid'])	{

			array_push($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'],$this->I['uid']);
			$this->WMtheSubMenu = $this->subMenu($this->I['uid']);
			array_pop($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId']);
			$this->WMisSub = trim($this->WMtheSubMenu) ? 1 : 0;
			$this->WMid = $this->I['uid'];

			if ($this->WMisSub)	{

				$vartt = count($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'])+2 .'.';

				if (count($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'])) {

					$this->I['linkHREF']['onMouseout'] = sprintf('ypSlideOutMenu.hideMenu("menu%s");', $this->WMid);
					$this->I['linkHREF']['onMouseover'] = sprintf('ypSlideOutMenu.showMenu("menu%s","act%s", menu%s, %d );',
																   $this->WMid,
																   $this->WMid,
																   $this->WMid,
																   count($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'])+1 );

				}
				else {

				  $GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWMmenuItems_l0'] = $this->WMmenuItems;
					$GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWcounter_l0'] = empty($GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWcounter_l0']) ? 1 : $GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWcounter_l0']+1;

        	$this->I['linkHREF']['onMouseout'] = sprintf('ypSlideOutMenu.hideMenu("menu%s");', $this->WMid);
					$this->I['linkHREF']['onMouseover'] = sprintf('ypSlideOutMenu.repositionMenu(menu%s, "act%s");ypSlideOutMenu.showMenu("menu%s")', $this->WMid, $this->WMid, $this->WMid);

				}

				$this->I['val']['ATagParams'] = sprintf('id="act%s" %s ', $this->WMid, $this->I['val']['ATagParams']);

			    $varEnd = end($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId']);
			    $var = empty($varEnd) ? 'null' : sprintf('"menu%s"', $varEnd);

				$GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['javascript_script'][$this->I['uid']] = sprintf('var menu%s = new ypSlideOutMenu("menu%s", "%s", 0, 0, %d, %d, %s)',
																													$this->WMid,
																													$this->WMid,
																													$this->conf[$vartt]['moveTo'] ? $this->conf[$vartt]['moveTo'] : 'down',
																													$this->conf[$vartt]['width'] ? $this->conf[$vartt]['width'] : 170,
																													$this->conf[$vartt]['height'] ? $this->conf[$vartt]['height'] : 20,
																													$var);

				$this->I['val']['linkWrap'] = empty($this->I['val']['linkWrap']) ? '<div>|</div>' : $this->I['val']['linkWrap'];

			} else {

				if (!count($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'])) {

				  $GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWMmenuItems_l0'] = $this->WMmenuItems;
				  $GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWcounter_l0'] = empty($GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWcounter_l0']) ? 1 : $GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWcounter_l0']+1;

				}


				$this->I['val']['ATagParams'] = sprintf('id="act%s" %s ', $this->WMid, $this->I['val']['ATagParams']);
				$this->I['val']['linkWrap'] = empty($this->I['val']['linkWrap']) ? '<div>|</div>' : $this->I['val']['linkWrap'];

			}

		}

	}

	/**
	 * Wrapping the item in a <div> section if 'relativeToTriggerItem' was set
	 *
	 * @param	string		The current content of the menu item, $this->I['theItem'], passed along.
	 * @param	integer		Pointer to $this->menuArr[$key] where the current menu element record is found
	 * @return	string		The modified version of $item, going back into $this->I['theItem']
	 */
	function extProc_beforeAllWrap($item,$key)	{
		//echo t3lib_div::_GP('uid').'k';
		if (!$this->I['spacer'] && isset($this->I['linkHREF']['onMouseout']) && $this->I['val']['doNotLinkIt'] == 1)	{

			if (count($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'])) {

				$item = sprintf('<a class="empty_href" %s onmouseout=%s onmouseover=%s >%s</a>',
								 $this->I['val']['ATagParams'],
								 t3lib_div::slashJS(t3lib_div::quoteJSvalue($this->I['linkHREF']['onMouseout'])),
								 t3lib_div::slashJS(t3lib_div::quoteJSvalue($this->I['linkHREF']['onMouseover'])),
								 $item);
			}
			else {

				$item = sprintf('<a class="empty_href" %s onmouseout=%s onmouseover=%s >%s</a>',
								 $this->I['val']['ATagParams'],
								 t3lib_div::quoteJSvalue($this->I['linkHREF']['onMouseout'], true),
								 t3lib_div::quoteJSvalue($this->I['linkHREF']['onMouseover'], true),
								 $item);

			}

		}
		elseif(!$this->I['spacer'] && $this->I['val']['doNotLinkIt'] == 1) {

		$item = sprintf('<a class="empty_href" %s >%s</a>',
							 $this->I['val']['ATagParams'],
							 $item);

		}
		return $item;

	}

	/**
	 * Processing after linking, basically setting the <div>-layers for the menu items. Also some more JavaScript code is made.
	 *
	 * @param	integer		Pointer to $this->menuArr[$key] where the current menu element record is found
	 * @return	void
	 */
	function extProc_afterLinking($key)	{

		if ($this->I['uid'])	{

			if (!$this->I['spacer'] && $this->WMisSub)	{


				$GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['javascript_layer'][$this->I['uid']] = sprintf('<div id="menu%sContainer"><div id="menu%sContent" class="mmContent"><div class="mmLevel%d">%s</div></div></div>',
																													$this->WMid,
																													$this->WMid,
																													count($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'])+1,
																													$this->WMtheSubMenu);

			}

		}

		$this->WMresult .= $this->I['theItem'];

	}

	/**
	 * Putting things together, in particular the JavaScript code needed for the DHTML menu.
	 *
	 * @return	mixed		Returns the value of a call to the parent function, parent::extProc_finish();
	 */
	function extProc_finish ()	{

		if ($GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWMmenuItems_l0'] && $GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWMmenuItems_l0'] == $GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['WMWcounter_l0'] && is_array($GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['javascript_layer'])) {
		//if ($this->I['pid'] == $this->conf['special.']['value']) {
			$string_layer = implode($GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['javascript_layer'], '');
			$string_js = implode(array_reverse($GLOBALS['TSFE']->applicationData['ypSlideOutMenu']['javascript_script']), ';');
			$string_ges = sprintf('ypSlideOutMenu.set_level_one("%s", "%s", %d, %d, %d, %d, %d, %d, %d);var strDiv = \'<div id="%s">%s</div>\';document.write(strDiv);%s;ypSlideOutMenu.writeCSS();',
								   $this->conf['2.']['moveTo'] ? $this->conf['2.']['moveTo'] : 'down',
								   $this->conf['korek_css'],
								   $this->conf['aniLen'] ? $this->conf['aniLen'] : 0 ,
								   $this->conf['hideDelay'] ? $this->conf['hideDelay'] : 50,
								   $this->conf['minCPUResolution'] ? $this->conf['minCPUResolution'] : 10,
								   $this->conf['kore_ns_x'],
								   $this->conf['kore_ns_y'],
								   $this->conf['kore_so_x'],
								   $this->conf['kore_so_y'],
								   $this->conf['div_id_layer'] ? $this->conf['div_id_layer'] : 'yymenu',
								   str_replace('\'', '\\\'', $string_layer),
								   $string_js);

			$js = sprintf('<script src="%sres/ypSlideOutMenus.js" type="text/javascript"><!-- //--></script>', t3lib_extMgm::siteRelPath($this->extKey));
			$GLOBALS['TSFE']->additionalHeaderData[$this->extKey] = $js;

			if (!isset($this->conf['cssfile']) || $this->conf['cssfile'] == 1)  {

				$css = sprintf('<link rel="stylesheet" type="text/css" href="%sres/ypSlideOutMenus.css" />', t3lib_extMgm::siteRelPath($this->extKey));
				$GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'_1'] = $css;

			}
			elseif (!empty($this->conf['cssfile'])) {

				$css = sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $this->conf['cssfile']);
				$GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'_1'] = $css;


			}
			//echo $GLOBALS['TSFE']->config['config']['removeDefaultJS'].'-';
			if ($GLOBALS['TSFE']->config['config']['removeDefaultJS']) {

			     $GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'_2'] = TSpagegen::inline2TempFile($string_ges, 'js');
			}
			else {

				$GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'_2'] = sprintf('<script type="text/javascript"> /* <![CDATA[*/ <!--
				%s
				// --> /*]]> */ </script>', $string_ges);

			}

		}

		if (is_array($this->mconf['stdWrap.'])) {

			$this->WMresult = $this->WMcObj->stdWrap($this->WMresult,$this->mconf['stdWrap.']);

		}

		return $this->tmpl->wrap($this->WMresult,$this->mconf['wrap']);

	}

}


$GLOBALS['TSFE']->tmpl->menuclasses.=',tx_menu_ypslideoutmenu';


if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/int_ypslideoutmenu/class.tx_menu_ypslideoutmenu.php'])	{
	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/int_ypslideoutmenu/class.tx_menu_ypslideoutmenu.php']);
}

?>