Page 1 of 1

Comment Module out of whack

Posted: Wed Dec 26, 2007 4:25 pm
by dsackett
Ok, so I went along and tested my comment module for my new blog and was surprised to find out that when you press the post button text appears afterwards stating that " string(43) "Smarty error: eval: missing 'var' parameter"" I checked on line 43 and saw it was just . Maybe I altered the code in a way I shouldn't have? I'm not quite sure what went wrong. If anyone could help me figure out what's happening, I'd greatly appreciate it.

EDIT: It does post the comments like it should but if there's a way to fix the error so my guests don't freak out and get scared it'd be nice ;)

Here's the comment module code I have:

Code: Select all

<div id="comments">
<!-- Start Comments Display Template -->
{if FALSE == $errormessage}
{startExpandCollapse id="name" title="$addacomment"}
{else}
{$errormessage}
{/if}
<h3>{$addacomment}</h3>
You may see an error after publishing your comment. Ignore this, it does nothing but make you feel like shit. I'm working on fixing it ;)
{$startform}
{$image}
{if $spamprotect}
{$spamprotectimage}<br />
{/if}

<table>
{if $spamprotect}
	<tr>
		<td>{$entercodetxt}:</td>
		<td>{$inputentercode}</td>
	</tr>
{/if}
	<tr>
		<td>{$yournametxt}(*):</td>
		<td>{$inputyourname}</td>
	</tr>
{if $emailfield}
	<tr>
		<td>{$emailtxt}:</td>
		<td>{$inputemail}</td>
	</tr>
{/if}
{if $websitefield}
	<tr>
		<td>{$websitetxt}:</td>
		<td>{$inputwebsite}</td>
	</tr>
{/if}
	<tr>
		<td>{$commenttxt}(*):</td>
		<td>{$inputcomment}</td>
	</tr>
	<tr>
		<td> </td>
		<td>{$submit} {$cancel}</td>
	</tr>
</table>

{$endform}
{if FALSE == $errormessage}
{stopExpandCollapse} 
{/if}
<ul class="ulcomments">
{foreach from=$items item=entry}
<li>
<b class="date">{$entry->date}</b> <b>|</b> 
		<b>{if $entry->author_email}
		<a href="mailto:{$entry->author_email|escape:"hexentity"}">{$entry->comment_author}</a>
		{else}
		{$entry->comment_author}
		{/if}</b>
		{if $entry->author_website}(<a href="{$entry->author_website}" target="_blank">{$entry->author_website}</a>){/if}
	{$entry->comment_data}
</li>
{/foreach}
</ul>
<!-- End Comments Display Template -->
</div>