Location: PHPKode > projects > PhpGuestbook > phpGuestbook/templates/Standard/smiliesWindow.tpl
{*-------------------------------------------------------------------------------*}
{* Copyright (c) 2003 Thomas Fl├╝eli
{*
{* $Id: smiliesWindow.tpl,v 1.5 2003/12/16 10:11:36 thatrix Exp $
{*-------------------------------------------------------------------------------*}
{include file="Standard/commonHeader.tpl"}
<body> 
<script language="JavaScript" type="text/javascript">{literal}
<!--
function insertCode(code) {
	code = ' ' + code + ' ';
	if (opener.document.phpGuestbookForm.Post.createTextRange && opener.document.phpGuestbookForm.Post.caretPos) {
		var caretPos = opener.document.phpGuestbookForm.Post.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? code + ' ' : code;
		opener.document.phpGuestbookForm.Post.focus();
	} else {
		opener.document.phpGuestbookForm.Post.value  += code;
		opener.document.phpGuestbookForm.Post.focus();
	}
}
function storeCaret(textEl) {
	if (textEl.createTextRange) textEl.caretPos = opener.document.selection.createRange().duplicate();
}
//-->{/literal}
</script>
	<center>
	{include file="Standard/commonTableStart.tpl" WIDTH=180 TITLE=$L_MORE_SMILIES DIR_IMAGES=$DIR_IMAGES}
		<table width="590px" cellspacing="0" style="table-layout:fixed">
			<tr><td></td>
				{section name=allSmilies loop=$SMILIES}
					{if $smarty.section.allSmilies.index is div by 5}
						</tr>
						<tr>
					{/if}
					<td><a href="javascript:insertCode('{$SMILIES[allSmilies].Code}');"><img src="{$SMILIES[allSmilies].Filename}" border="0" alt="{$SMILIES[allSmilies].Description}"></a></td>
				{/section}
			</tr>
		</table><p>
	{include file="Standard/commonTableEnd.tpl" DIR_IMAGES=$DIR_IMAGES}
	<p><a href="javascript:this.close();">{$L_CLOSE_WINDOW}</a></p>
    </center>
{include file="Standard/commonFooter.tpl"}
Return current item: PhpGuestbook