Comment Module out of whack

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
dsackett
Forum Members
Forum Members
Posts: 16
Joined: Wed Dec 05, 2007 12:56 am

Comment Module out of whack

Post 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>
Last edited by dsackett on Wed Dec 26, 2007 4:47 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”