<?php
  include_once '../doc-typo3-funcs.php';
  $doxygen_vars = array(	"title" => "TYPO3 4.0.1: typo3_src-4.0.1/typo3/sysext/cms/tslib/media/scripts/example_keepRollover.php Source File",
				"datetime" => "Sat Dec 2 19:22:30 2006",
				"date" => "2 Dec 2006",
				"doxygenversion" => "1.4.6",
				"projectname" => "TYPO3 4.0.1",
				"projectnumber" => "4.0.1"
			);
  get_header($doxygen_vars);
?>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="dirs.html"><span>Directories</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="nav">
<a class="el" href="dir_c8daf1ad746050abf985cc546c89e248.html">typo3_src-4.0.1</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_18071ae4545d8b3e0364d30c0659c74a.html">typo3</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_57bf1ed8249c1fd5b014486d01bcb27a.html">sysext</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_21aa24ee31dafa72450e939d0692a893.html">cms</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_da3d3c31fb60c430897a32b4a10f682b.html">tslib</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_5d5928c48a24a7022098bcc9e1331896.html">media</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_cdcc1b4ce87312c897e9f35885142bfd.html">scripts</a></div>
<h1>example_keepRollover.php</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 &lt;?php
<a name="l00002"></a>00002 <span class="comment">/***************************************************************</span>
<a name="l00003"></a>00003 <span class="comment">*  Copyright notice</span>
<a name="l00004"></a>00004 <span class="comment">*</span>
<a name="l00005"></a>00005 <span class="comment">*  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)</span>
<a name="l00006"></a>00006 <span class="comment">*  All rights reserved</span>
<a name="l00007"></a>00007 <span class="comment">*</span>
<a name="l00008"></a>00008 <span class="comment">*  This script is part of the TYPO3 project. The TYPO3 project is</span>
<a name="l00009"></a>00009 <span class="comment">*  free software; you can redistribute it and/or modify</span>
<a name="l00010"></a>00010 <span class="comment">*  it under the terms of the GNU General Public License as published by</span>
<a name="l00011"></a>00011 <span class="comment">*  the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00012"></a>00012 <span class="comment">*  (at your option) any later version.</span>
<a name="l00013"></a>00013 <span class="comment">*</span>
<a name="l00014"></a>00014 <span class="comment">*  The GNU General Public License can be found at</span>
<a name="l00015"></a>00015 <span class="comment">*  http://www.gnu.org/copyleft/gpl.html.</span>
<a name="l00016"></a>00016 <span class="comment">*  A copy is found in the textfile GPL.txt and important notices to the license</span>
<a name="l00017"></a>00017 <span class="comment">*  from the author is found in LICENSE.txt distributed with these scripts.</span>
<a name="l00018"></a>00018 <span class="comment">*</span>
<a name="l00019"></a>00019 <span class="comment">*</span>
<a name="l00020"></a>00020 <span class="comment">*  This script is distributed in the hope that it will be useful,</span>
<a name="l00021"></a>00021 <span class="comment">*  but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00022"></a>00022 <span class="comment">*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00023"></a>00023 <span class="comment">*  GNU General Public License for more details.</span>
<a name="l00024"></a>00024 <span class="comment">*</span>
<a name="l00025"></a>00025 <span class="comment">*  This copyright notice MUST APPEAR in all copies of the script!</span>
<a name="l00026"></a>00026 <span class="comment">***************************************************************/</span>
<a name="l00052"></a>00052 function user_keepRolloverAtOnClick($I,$conf)   {
<a name="l00053"></a>00053         $itemRow = $conf['parentObj']-&gt;menuArr[$I['key']];
<a name="l00054"></a>00054 
<a name="l00055"></a>00055                 <span class="comment">// Setting the document status content to the value of the page title on mouse over</span>
<a name="l00056"></a>00056         <span class="keywordflow">if</span> (!$I['linkHREF']['TARGET'])  {
<a name="l00057"></a>00057                 $I['linkHREF']['HREF']=<span class="charliteral">'#'</span>;
<a name="l00058"></a>00058                 $I['linkHREF']['onClick'].='ARO_setLocation'.($conf['setLocation']).<span class="charliteral">'('</span>.$itemRow['uid'].',\''.$I['theName'].<span class="charliteral">'\'</span>); <span class="keywordflow">return</span> <span class="keyword">false</span>;';
<a name="l00059"></a>00059         } <span class="keywordflow">else</span> {
<a name="l00060"></a>00060                 $I['linkHREF']['onClick'].='ARO_setActiveImg<span class="charliteral">'.'</span>(\''.$I['theName'].<span class="charliteral">'\'</span>);';
<a name="l00061"></a>00061         }
<a name="l00062"></a>00062         <span class="keywordflow">if</span> ($I['linkHREF']['onMouseover'])      $I['linkHREF']['onMouseover']='ARO_'.$I['linkHREF']['onMouseover'];
<a name="l00063"></a>00063         <span class="keywordflow">if</span> ($I['linkHREF']['onMouseout'])       $I['linkHREF']['onMouseout']='ARO_'.$I['linkHREF']['onMouseout'];
<a name="l00064"></a>00064 
<a name="l00065"></a>00065         <span class="keywordflow">if</span> ($conf['parentObj']-&gt;isActive($itemRow['uid']))      {
<a name="l00066"></a>00066                 $conf['parentObj']-&gt;WMextraScript.='
<a name="l00067"></a>00067 &lt;script type=<span class="stringliteral">"text/javascript"</span>&gt;
<a name="l00068"></a>00068         <span class="comment">/*&lt;![CDATA[*/</span>
<a name="l00069"></a>00069  ARO_Image = <span class="stringliteral">"'.$I['theName'].'"</span>;
<a name="l00070"></a>00070  '.$I['linkHREF']['onMouseover'].'
<a name="l00071"></a>00071         <span class="comment">/*]]&gt;*/</span>
<a name="l00072"></a>00072 &lt;/script&gt;
<a name="l00073"></a>00073                 ';
<a name="l00074"></a>00074         }
<a name="l00075"></a>00075 
<a name="l00076"></a>00076                 <span class="comment">// Update the link in the parent object:</span>
<a name="l00077"></a>00077         $conf['parentObj']-&gt;I = $I;     <span class="comment">// setting internal $I - needed by setATagParts() function!</span>
<a name="l00078"></a>00078         $conf['parentObj']-&gt;setATagParts();     <span class="comment">// Setting the A1 and A2 of the internal $I</span>
<a name="l00079"></a>00079         $I = $conf['parentObj']-&gt;I;     <span class="comment">// retrieving internal $I</span>
<a name="l00080"></a>00080         $I['parts']['ATag_begin']=$I['A1'];     <span class="comment">// Setting the ATag_begin to the value of this $I</span>
<a name="l00081"></a>00081 
<a name="l00082"></a>00082                 <span class="comment">// Debug:</span>
<a name="l00083"></a>00083         <span class="keywordflow">if</span> ($conf['debug'])     {
<a name="l00084"></a>00084                         <span class="comment">// Outputting for debug example:</span>
<a name="l00085"></a>00085                 echo 'ITEM: &lt;h2&gt;'.htmlspecialchars($itemRow['uid'].': '.$itemRow['title']).'&lt;/h2&gt;';
<a name="l00086"></a>00086                 <a class="code" href="classt3lib__div.html#a61f663a08044f49c4525ec2c91f1cd1">t3lib_div::debug</a>($itemRow);
<a name="l00087"></a>00087                 <a class="code" href="classt3lib__div.html#a61f663a08044f49c4525ec2c91f1cd1">t3lib_div::debug</a>($I);
<a name="l00088"></a>00088                 echo '&lt;hr /&gt;';
<a name="l00089"></a>00089         }
<a name="l00090"></a>00090 
<a name="l00091"></a>00091                 <span class="comment">// Returns $I:</span>
<a name="l00092"></a>00092         <span class="keywordflow">return</span> $I;
<a name="l00093"></a>00093 }
<a name="l00094"></a>00094 
<a name="l00095"></a>00095 ?&gt;
</pre></div><?php
  include_once '../doc-typo3-funcs.php';
  get_footer();
?>