| View previous topic :: View next topic |
| Author |
Message |
akamax_power
Joined: 10 Dec 2008 Posts: 10
|
Posted: Wed Dec 10, 2008 11:39 pm Post subject: Auto Timestamp |
|
|
Is there a way to have a timestamp at the top of a calendar to know when the last time any changes were made?
ex. Last Updated: 12/10/2008 15:37:00 by User: John
It doesn't even have to have the user just the date and time, preferably right next to where it shows the date, week, or month |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Thu Dec 11, 2008 6:19 pm Post subject: |
|
|
Hi,
This is doable. If you want it next to the day / week / month tabs, you'll have to modify the theme. Can you tell me which theme you are using please? |
|
| Back to top |
|
 |
akamax_power
Joined: 10 Dec 2008 Posts: 10
|
Posted: Thu Dec 11, 2008 11:26 pm Post subject: |
|
|
extrovert
thanks |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Fri Dec 12, 2008 7:45 pm Post subject: |
|
|
Hi,
Edit themes/extrovert/functions.php in Thyme's folder and remove this at line 87:
| Code: |
| echo("\t<td width=204> </td>"); |
Then add this in its place:
| Code: |
global $_cal_sql, $_cal_dbpref, $_cur_cal;
$last_updated = null;
if($_cur_cal->id && !$_cur_cal->type) {
list($last_updated) = $_cal_sql->query("select max(updated) as `u` from {$_cal_dbpref}Events
where calendar = ". intval($_cur_cal->id));
$last_updated = "Last Updated: ". _ex_date("n/j/Y G:i", _ex_localtime($last_updated['u']));
}
echo("\t<td width='204'> {$last_updated} </td>\n");
|
Let me know if you have any trouble. |
|
| Back to top |
|
 |
akamax_power
Joined: 10 Dec 2008 Posts: 10
|
Posted: Fri Dec 12, 2008 8:11 pm Post subject: |
|
|
Perfect!
Thanks |
|
| Back to top |
|
 |
akamax_power
Joined: 10 Dec 2008 Posts: 10
|
Posted: Fri Dec 12, 2008 9:32 pm Post subject: |
|
|
| Actually, one more thing. How do i add that to the printview? |
|
| Back to top |
|
 |
|