View Full Version : 6 months of calendars on one page??
gtojon
04-14-2005, 12:48 PM
I have looked & a couple of post almost had what I wanted. I want to string 6 months of calendars on on page.
Thanks, Jon :)
Brian
04-14-2005, 01:08 PM
Are you familiar with PHP for - next loops?
You could do something like:
for ($N=0; $N<6; $N++) {
$mo = $mo + $N;
if ($mo>12) {$mo=$mo-12; $yr++;}
require ("calendar/showCalendar.php");
}
[This is untested and probably won't work without some additional parameters.]
Did you see the 6-month display thread? There a lot of information in there.
gtojon
04-14-2005, 01:20 PM
Sorry, I'm not really a PHP programmer. I'll see what I can do. Thank you so much....I suppose I better purchase the product!! The support provided so far is worth every penny even if I didn't use the calendar!:clap: :clap:
Thanks, Jon:)
gtojon
04-14-2005, 01:31 PM
Oops, I'm not a PHP programmer...It's not working! I get an error!
http://www.jonsmithers.com/schedule2.php
Help!!
Thanks, Jon
gtojon
04-14-2005, 01:34 PM
This is the code that just displays one calendar.
<?php require ("calendar/showCalendar.php"); ?>
Here is the code that doesn't work!
<p> </p>
<?php for ($N=0; $N<6; $N++) {
$mo = $mo + $N;
if ($mo>12) {$mo=$mo-12; $yr++;}
require ("calendar/showCalendar.php"); ?>
<p> </p>
gtojon
04-14-2005, 01:53 PM
This line works to display one calendar.
<?php require ("calendar/showCalendar.php"); ?>
When I try to display a specific month I still get an error....
<?php require ("calendar/showCalendar.php?>mo=1&yr=2005");
Sorry about this!
Brian
04-14-2005, 02:09 PM
Did you see this thread?
http://www.easyphpcalendar.com/forums/showthread.php?t=2435
Near the bottom (post #16) is a full script that I wrote to display six months on a page...
gtojon
04-14-2005, 04:23 PM
I looked at it and it scared the crap out of me....I haven't programmed anything like that in over 20 years....seriously:tounge_sm !
Ok....that works....boy is that slow in loading. It would be nice if you could just display certaion months.....I tried that & it doesn't work.
Thanks for your help!
Brian
04-14-2005, 06:23 PM
You can display any months you need to. Just set the month and year variables before requiring the script.
<?php
$mo=6;
$yr=3005;
require("calendar/showCalendar.php");
$mo=6;
$yr=3005;
require("calendar/showCalendar.php");
?>
This would print June and July...
gtojon
04-14-2005, 06:52 PM
Thanks....that works better than the example from 2004. In PHP how do I have them side-by-side on the first 3, then down & then the other 3. I know I could study your Demp6.php, but I already have a head ache today.
Thanks a lot, Jon
gtojon
04-14-2005, 06:53 PM
Link to my example....
http://www.jonsmithers.com/schedule2.php
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.