guestbook: problem with adding new messages

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
freedux
New Member
New Member
Posts: 6
Joined: Sun Dec 17, 2006 5:48 pm

guestbook: problem with adding new messages

Post by freedux »

hi, i have guestbook 1.1.8 and cmsmadesimple 1.0.2, my guestbook can be found there http://martin.houra.cz/xxx/index.php?page=diskuse ( be free to test it )

guestbook template

Code: Select all

<div class="cms-guestbook">
{if $show_insertbutton}
{$insertbutton}
{/if}
{if $show_errors}
{foreach from=$errors item=error}
	<br /><span style="font-weight:bold;color:red">{$error}</span>
{/foreach}
{/if}
<br />
{$form}
{if $show_smileys}
{$smileys}
{/if}
{if $show_msg}
<br /><br /><strong>{$msg}</strong>
{/if}
{if $show_entries}
{$entrylist}
{/if}
</div>
content

Code: Select all

{cms_module module="Guestbook" number="10" shownow="1" sortasc="0" smiley="0" showaddform="1" lang="en_EN" dateformat="d. m. Y"}
rest is similar to default


all i want is to show my form always, even after i add new message. so i changed this from FALSE to TRUE on line 120 of action.default.php

Code: Select all

$frontend->setShowForm(FALSE);
and added this to line 185 of the same file ( or similar line as dee described it here http://forum.cmsmadesimple.org/index.php/topic,8366.0.html ) to reset the inputs values

Code: Select all

$_POST['sender'] = ''; 
		$_POST['homepage'] = '';
		$_POST['message'] = '';
		$_POST['country'] = '';
		$_POST['location'] = '';
		$_POST['e_mail'] = '';
anyway, when i add new message, everything works quite good..but when i want to add another message without refreshing page, i get a "Your message was already sent" error and whole form disappears ( or without a @ symbol in email address, i get no error and whole form disappears too ), of course nothing is added

so .. do you have any ideas what to do about it ? thanks a lot
Last edited by freedux on Wed Feb 21, 2007 4:30 pm, edited 1 time in total.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: guestbook: problem with adding new messages

Post by Dee »

freedux wrote: and added this to line 185 of the same file ( or similar line as dee described it here http://forum.cmsmadesimple.org/index.php/topic,8366.0.html ) to reset the inputs values

Code: Select all

$_POST['sender'] = ''; 
		$_POST['homepage'] = '';
		$_POST['message'] = '';
		$_POST['country'] = '';
		$_POST['location'] = '';
		$_POST['e_mail'] = '';
Also unset $_POST['uid']:

Code: Select all

	$_POST['sender'] = ''; 
	$_POST['homepage'] = '';
	$_POST['message'] = '';
	$_POST['country'] = '';
	$_POST['location'] = '';
	$_POST['e_mail'] = '';
	unset($_POST['uid']);
Regards,
D
freedux
New Member
New Member
Posts: 6
Joined: Sun Dec 17, 2006 5:48 pm

Re: guestbook: problem with adding new messages

Post by freedux »

it works ! ;) thanks a lot
Post Reply

Return to “Modules/Add-Ons”