kornikopic
Admin
 Admin
| Posts: 661 |   | Karma: 11
|
Re:Send from frontend - 2008/05/29 22:58
Hello,
Edit the code in order to insert a Send button isn't easy and it's not the best solution.
If your student wants to leave the page, he can't because he must wait the end of the send process.
So, you can scheduled the newsletter normally but you can define automatically. For example, you can schedule your newsletter 1h in the future.
5 min would be better but you don't know if your student will edit the newsletter more than 5 min, so it isn't optimized.
You can edit a file in order to automate the scheduling process.
Find the line 323 of the file mailings.acajoom.html.php (<joomla>/administrator/components/com_acajoom/) :
| Code: | <input type="text" name="senddate" class="inputbox" size="20" maxlength="25" value="<?php echo $mailingEdit->send_date; ?>" />
|
Replace by :
| Code: | <?php
$date = date_parse($mailingEdit->send_date);
$timestamp = mktime($date['hour'] + 2, $date['minute'], $date['second'], $date['month'], $date['day'], $date['year']);
$send_date = date('Y-m-d H:i:s', $timestamp);
?>
<input type="text" name="senddate" class="inputbox" size="20" maxlength="25"
value="<?php echo $send_date; ?>" />
|
I add 2 hours, because by default, there's one hour less on the current time. So, to add 1 hour on the current time, I must add 2 hours.
Let me know if you have any problem.
Post edited by: kornikopic, at: 2008/05/29 23:03
*** Please, read our official documentation before posting. Thank you ***
Best regards, Jonathan |
|
|
| | To post on the forum you need to sign in. |