| View previous topic :: View next topic |
| Author |
Message |
timhomewood
Joined: 29 Feb 2008 Posts: 14
|
Posted: Fri Feb 29, 2008 6:58 am Post subject: creating minical for next month |
|
|
I have a monthly minicalendar on my Joomla site which displays the current month. I'd like to have a second monthly minicalendar below it which displays the next month to allow people to go directly to events in the next month.
Is it possible to dynamically display a calendar for the next month, eg by using %month+1 (I know this doesn't work).
Thanks for your help.
Tim |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Fri Feb 29, 2008 2:32 pm Post subject: |
|
|
Hi,
Before the 2nd calendar's $cal->display_month_mini() do this:
| Code: |
$cal->set("time",
gmdate(0,0,0,$cal->mon + 1, 1, $cal->year));
|
Let me know if you have any questions / trouble. |
|
| Back to top |
|
 |
timhomewood
Joined: 29 Feb 2008 Posts: 14
|
Posted: Fri Feb 29, 2008 11:04 pm Post subject: |
|
|
Hi Ian, thanks for the swift response.
I tested the code in the existing mini-cal on the site which shows the current month. I added the code you suggested to the php page which sits in the published components directory for this project (that seemed the correct one to edit - this is a first time at it for me).
Unfortunately the result was the minical displaying January and an error message above the minical:
"Warning: gmdate() expects at most 2 parameters, 6 given in /--(path-removed)--/modules/joomla/projects/contemporary_dance_australia/published/components/monhtly_performance_minicalendar.php on line 44"
You can see the result in the right module at http://www.contemporarydance.com.au/cms. Please excuse the template issues as the site is in early stages of development and isn't yet live.
EDIT: please go to the Test link in the menu at the bottom of the page. I've moved the calendar to display on this page only to clean up the home page. You will see the second minical on the right of this page giving the error. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Mon Mar 03, 2008 6:57 pm Post subject: |
|
|
Hi,
My fault. Please change gmdate to gmmktime |
|
| Back to top |
|
 |
timhomewood
Joined: 29 Feb 2008 Posts: 14
|
Posted: Tue Mar 04, 2008 6:15 am Post subject: |
|
|
| That's great Ian, it works perfectly. Thanks again for the speedy reply and an easily configurable application. |
|
| Back to top |
|
 |
|