gnuru.tpl.php 2.35 KB
<!-- fill the gnuru wisdom -->
		<SCRIPT TYPE="text/javascript">
			<? $c=0 ?>
			<? foreach ($this->gnuruWisdom as $entry): ?>
				gnuruWisArray.push (new GnuruWisdom (document.createElement ('P'),
   	                                           document.createElement ('P'),
      	                                        document.createElement ('P')));

				gnuruWisArray[<?=$c?>].getTitle ().setAttribute  (
					'ID', 'GNURU_WIS_TITLE');
				gnuruWisArray[<?=$c?>].getTitle ().setAttribute  (
					'CLASS', 'gnuruWisTitle');
				gnuruWisArray[<?=$c?>].getText ().setAttribute   (
					'ID', 'GNURU_WIS_TEXT');
				gnuruWisArray[<?=$c?>].getSource ().setAttribute (
					'ID', 'GNURU_WIS_SOURCE');

				gnuruWisArray[<?=$c?>].getTitle ().appendChild (
					document.createTextNode (
						'<?=$this->plugin('quote', $entry['title'])?>'));

				<? foreach ($entry['text'] as $row): ?>
					gnuruWisArray[<?=$c?>].getText ().appendChild (
						document.createTextNode (
							'<?=$this->plugin('quote', $row)?>'));
					gnuruWisArray[<?=$c?>].getText ().appendChild (
						document.createElement ('BR'));
				<? endforeach ?>

				gnuruWisArray[<?=$c?>].getSource ().appendChild (
					document.createTextNode (
						'<?=$this->plugin('quote', $entry['source'])?>'));

				<? $c++ ?>
			<? endforeach ?>
		</SCRIPT>

		<DIV ID="GNURU" CLASS="gnuru">
			<IMG onMouseOver="javascript: gnuruWake ()"
			     onMouseOut="javascript: gnuruMeditate ()"
				  onClick="javascript: gnuruAsk ()"
			     ID="GNURU_IMG" SRC="images/gnuru-trans.png" ALT="">
			<DIV ONCLICK="gnuruAskEnd ()"
			     ID="GNURU_BUBBLE" CLASS="gnuruBubble">
				<IMG SRC="images/gnuru-bubble.png" ALT="">
				<DIV STYLE="position: absolute; top: 25px; left: 20px; width: 80%">
					<H4><?=_('You need help my padavan?')?></H4><P>
					- <A ONCLICK="gnuruSais ()" 
					     CLASS="gnuruBubble" HREF="#"><?=_('Wisdom')?></A><BR>
					- <A ONCLICK="gnuruSais ()"
					     CLASS="gnuruBubble" 
					     HREF="#"><?=_('more practical help')?></A></DIV>
			</DIV>
			<DIV ONMOUSEUP="gnuruSilence ()"
			     ID="GNURU_SAIS" CLASS="gnuruSais">
				<IMG SRC="images/gnuru-sais.png" ALT="">
				<DIV STYLE="position: absolute; 
				            width: 390px; top: 80px; left: 20px">
					<P CLASS="gnuruWisTitle" ID="GNURU_WIS_TITLE"></P>
					<P ID="GNURU_WIS_TEXT"></P><BR>
					<P ID="GNURU_WIS_SOURCE"></P></DIV>
			</DIV>
		</DIV>