Hello everybody! First of all I want to thank you!
I wanted to make some change in the plugin.
1. I wanted to change the word "name" to "имя" in ru.lang.php 'Name' => 'Имя',
this is by default but script show another word "Название" see screenshot below
I tried to change but I did not change nothing.
Q. How to Change this word "Название" on "Имя"?
2. When I send a message, the recipient can not know from whom the message was received because there is a small mistake. I mean, that the subject of the message and the name looks the same. So I decided to make changes to the code
form.view.php Line: 9-10 added
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<?php if (Notification::get('error')) Alert::error(Notification::get('error')); ?>
<br />
<form method="post">
<label><?php echo __('Name'); ?></label><br />
<input class="span3" type="text" name="contact_name" size="40" value="<?php echo $name; ?>" /><br />
<label><?php echo __('Email'); ?></label><br />
<input class="span3" type="text" name="contact_email" size="40" value="<?php echo $email; ?>" /><br />
<label><?php echo __('Subject'); ?></label><br />
<input class="span3" type="text" name="contact_subject" size="40" value="<?php echo $subject; ?>" /><br />
<label><?php echo __('Message'); ?></label><br />
<textarea class="span7" rows="10" cols="100" name="contact_body"><?php echo $body; ?></textarea><br /><br />
<?php if (count($errors) > 0) { ?>
<ul>
<?php foreach($errors as $error) { ?>
<li><?php echo $error; ?></li>
<?php } ?>
</ul>
<?php } ?>
<input type="submit" class="btn" value="<?php echo __('Send'); ?>" name="contact_submit"/>
</form>
contact.plugin.php Line: 43 added
$name = Request::post('contact_name');
$email = Request::post('contact_email');
$subject = Request::post('contact_subject');
$body = Request::post('contact_body');
Line: 63 added
$recipient = $recipient;
$name = $name;
$subject = $subject;
$header = "From: ". $name . " <" . $email . ">\r\n";
Line: 79 added
->assign('name', $name)
->assign('email', $email)
->assign('subject', $subject)
->assign('body', $body)
->assign('errors', $errors)
->render();
Now I have additional field "Subject" , and Now, the recipient sees the correct Name and Subject!
And Thank You Very Much again! GREAT CMS EVER I SAW!
stradfred wrote:Possible to add more fields in administration for a futur update ?
Try this!