scriptygoddess

04 Aug, 2002

Full Calendar in MT

Posted by: kristine In: MT hacks

I've always loved the appearance of the calendars to see where I'm at in my blogging history. Before this time, I've always hand coded out tables to point to my archives, or added on to previous tables that I had from Blogger/Greymatter. But now that all of my archives are in Movable Type, I finally got a chance to put the tables together all on one page. Calendar Archives.

Here's how I do it.

Note: I'm using a modification on Dawn's calendar tutorial to get alternating colors in the calendar.

I created a new Archive Template named Date-Based Calendar Archive. It generates the calendar for each month.

<div class="calendar">
<div align="center"><B><$MTArchiveDate format="%B, %Y"$></B></div>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0" WIDTH="140"><TR>
<TD class="calhead">S</TD><TD class="calhead">M</TD><TD class="calhead">T</TD><TD class="calhead">W</TD><TD class="calhead">T</TD><TD class="calhead">F</TD><TD class="calhead">S</TD></TR>
<MTCalendar month="this">
<MTCalendarWeekHeader><TR HEIGHT="20"><? $counter = 0; ?></MTCalendarWeekHeader>
<TD class="calbody" style="<MTCalendarIfToday>background-color: #4e4e4e;</MTCalendarIfToday>" BGCOLOR="<? echo $counter++ % 2 ? '#222222' : '#111111' ?>"><MTCalendarIfEntries>
<a href="http://kadyellebee.com/mt/past/<$MTEntryDate format="%Y/%m/%d.php"$>" title="<MTEntries> | <$MTEntryTitle encode_html="1"$> | </MTEntries>">
<$MTCalendarDay$></A></MTCalendarIfEntries>
<MTCalendarIfNoEntries><$MTCalendarDay$></MTCalendarIfNoEntries>
<MTCalendarIfBlank><BR></MTCalendarIfBlank>
</td><MTCalendarWeekFooter></tr>
</MTCalendarWeekFooter></MTCalendar>
</table></div>

I bolded the path to my archives, because you'd want to change that – Because I have daily archives turned on, my calendar links to that day's posts. And I have an archive filename (daily: <$MTArchiveDate format="%Y/%m/%d.php"$>) turned on to point to a specific location. If you don't have daily archiving turned on, you can still use this, you just need to modify it a bit first.

Now that I've created this template, I go into the Blog Config under Archiving and clicked Add New… to add this to the list. I selected Monthly and Date-based Calendar Archive Template to pair these things together. I gave it an archive filename, for easy linking in my master template: <$MTArchiveDate format="%Y/%m/cal.php"$>.

Putting it all together on the Master Calendar page took a bit of PHP and some help from my husband – his PHP knowledge goes much beyond mine! I wanted a 3-column format, with the oldest calendar on the top. Because I wanted to use MT to generate this list, I created a new index template named Master Calendar Archives and set its output file to cal.php. Inside my formatting, here's the contents:

<table>
<?php
$cals = '<MTArchiveList archive_type="Monthly"><$MTArchiveDate format="%Y/%m/cal.php"$>,</MTArchiveList>';
$cals = strrev($cals);
$i=0;
$tok = strtok($cals, ',');
do {
if ($i%3==0) { print '<tr>'; }
print '<td valign="top">';
include ('/home/love/public_html/hopelessromantics/mt/past/'.strrev($tok));
print '</td>';
if ($i%3==2) { print '</tr>'; }
$i++;
} while ($tok = strtok(','));
?>
</table>

Rebuild and view your calendar! Feel free to post questions, and I'll try my best to answer; or make Eric come and answer the harder ones!

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

78 Responses to "Full Calendar in MT"

1 | .::faithjean.com::.

January 8th, 2004 at 3:28 pm

Avatar

20 things on My 2 Do list
1. Add smilies in the comments 2. | Category | 3. Counting for (x) Recent entries 4. Statistics: " x entries", "x comments", "x users online", "x on this page" script 5. Last 50 referrers 6. 10 most commented entries7….

2 | .::faithjean.com::.

January 8th, 2004 at 3:24 pm

Avatar

20 things on My 2 Do list
1. Add smilies in the 2. | Category | 3. Counting for (x) Recent entries 4. Statistics: " x entries", "x comments", "x users online", "x on this page" script 5. Last 50 referrers 6. 10 most commented entriescomments 7….

3 | Electrosketch!

December 28th, 2003 at 12:09 pm

Avatar

What code resources do you use?
The JavaScript Source is a great place to find javascript resources and Scripty Goddess is a goldmine of PHP and other scripts tailored for the movable type environment. Also, another good source for tips is Girlie Matters. You may also want to check o…

4 | Sillybean

March 9th, 2003 at 8:26 pm

Avatar

Various tricks with archive calendars
These tricks apply to the tiny calendars that appear on your home page, not the full-screen monthly archives from my last post How to link to a full day's entries instead of the last one on that day: – Turn…

5 | Live in the Delirious Cool

August 20th, 2003 at 2:35 pm

Avatar

Things left behind.
Oh, and no more WeatherPixie.

6 | Kit-Kat's Chit-Chat

September 11th, 2003 at 3:21 pm

Avatar

Can you believe how much I'm posting lately?!
LOL. It is so unlike me. The blog bug must have came to visit me again. I added a few new things yesterday – in addition to my layout design. Notify You and Full Archives. Notify You allows you to…

7 | no fixed position / weblog

September 27th, 2003 at 2:48 pm

Avatar

Master To-Do List
To be finished before launch:   FIRST PRIORITY: finalize archiving names/paths of archive files implement calendar-based master archive implement calendar include for the blog index and monthly archives clean up/structure CSS files customized sear…

8 | Sillybean

January 20th, 2003 at 9:22 pm

Avatar

Various tricks with archive calendars
These tricks apply to the tiny calendars that appear on your home page, not the full-screen monthly archives from my

9 | Remarkably unpublished!

January 28th, 2003 at 9:05 am

Avatar

FAQ #4: What scripts and plug-ins do you use with Movable Type?
If it weren't for the generous people who share their code, this site would have long ago lost it's fizz. The related resources below list all the script sources I've used on this site at one time or another. Related resources: Next/prev category entry…

10 | 321Blog

February 5th, 2003 at 4:43 am

Avatar

MT Calendar
I found two tutorials that provide full-page calendar displays within MT. This one seems the simplest to create, using just

11 | gym.blog

January 3rd, 2003 at 9:04 pm

Avatar

Carla, Tabitha, Jayme:
I've installed the MT Authors hack, so now everything gets all nice and sorted by author. This means that

12 | Live in the Delirious Cool

December 6th, 2002 at 5:06 pm

Avatar

Crossing off the days…
My archives list is getting a little long-in-the tooth, and I'd like to find another way to package them. Just another step in my quest for a real whiz-bang blog.

13 | Stitching for Sanity

November 6th, 2002 at 10:19 am

Avatar

Still Can't Sleep
I'm still awake! This sucks! But I have another MT toy, a Calendar Based Archive! And its all thanks to

14 | ETC. Indulging my inner geek

November 3rd, 2002 at 7:50 pm

Avatar

Calendar Archives
I recently tried Kristine's Master Calendar Archives tutorial and I just love the results! I've only been blogging for about

15 | kadyellebee

October 26th, 2002 at 6:21 am

Avatar

mid night ramblings
Once again, dreams of work woke me up, so I figured my energy was better spent doing something entertaining instead

16 | Cynthia Speaks

August 7th, 2002 at 8:09 pm

Avatar

Hopefully…
Well according to this website we may be alright. By sheer luck or Divine intervention, take your pick, I bought

17 | Simply Sara

August 7th, 2002 at 11:21 pm

Avatar

Calendar stuff
Oh those Scripty Goddess's have come up with something very cool, again! You can see the result of the above

18 | Neurotic Fishbowl

August 6th, 2002 at 10:21 pm

Avatar

Calendar Archives
Thanks to the ever-amazing Kristine's post at Scripty Goddess on how to display all your calendars in an archive template

19 | kadyellebee

August 4th, 2002 at 3:35 pm

Avatar

calendar archives
Okay, and I finally put together the code I'm using for my Calendar archive over at scriptygoddess – feel free

20 | Sketchee

May 31st, 2004 at 1:45 am

Avatar

I never did solve it! :|

21 | Hannah

April 18th, 2004 at 12:04 am

Avatar

So, should anything other than the code you posted for the Master Calendar Archives be in our Master Calendar Archives template?
You wrote "inside my formatting;" what did you mean by this?
I am just confused as to whether we need to code something else in the Master Calendar Archives and embed your above code into it, or if that is all that should appear in that particular template.

Thank you. Your work is tremendous. :)
Hannah

22 | kristina

February 4th, 2004 at 4:39 pm

Avatar

The calendar tutorial link is broken–I'm just looking to create alternating checkerboard-style on my calendar. Any tips on a simple way to do that for a MT-minimalist?

23 | gatorlog

July 25th, 2003 at 12:01 am

Avatar

Oh. Sorry. Never mind. Problem fixed right now. Thanks a lot.

24 | Sketchee

August 25th, 2003 at 5:57 pm

Avatar

Okay so I've temporarily gotten my calendar page setup as instructed but need a bit of advise before I finish formatting it. My archives are named by default to be named after the entry id. How do I make the links link to the proper page?

http://www.sketchee.com/calendar.php

25 | gatorlog

July 24th, 2003 at 5:42 pm

Avatar

Hi. this part seems to be weird..
Do I have to change the path?

include ('/home/love/public_html/hopelessromantics/mt/past/'.strrev($tok));
print ";

26 | Donna

July 24th, 2003 at 6:16 pm

Avatar

Gatorlog, yes you do – this question was answered just above, by me. You need to out your own path information in for the script to work properly.

27 | cristine

July 2nd, 2003 at 1:05 pm

Avatar

thanks for all your help. i dunno why i didn't get it the first time. i got it working now. thanks in a million.

28 | kristine

July 2nd, 2003 at 4:00 am

Avatar

This question is a duplicate to one in process on the mtforums – if anybody has the same question, visit this thread. :)

29 | cristine

July 2nd, 2003 at 2:26 am

Avatar

is there suppose to be a special trick on how to do this? i have read this post over and over and over again. did the steps a few times to make sure i am doing it correctly but now i have this error message.

Warning: main(/home/cryssdal/public_html/photoblog/2003/06/cal.php) [function.main]: failed to create stream: No such file or directory in /home/cryssdal/public_html/photoblog/cal.php on line 42

Warning: main() [function.main]: Failed opening '/home/cryssdal/public_html/photoblog/2003/06/cal.php' for inclusion (include_path=") in /home/cryssdal/public_html/photoblog/cal.php on line

please help me. i am still not giving up on this. i know something is just not right.

please! thank you :-(

30 | Donna

July 1st, 2003 at 7:09 am

Avatar

cristine, you need to change the script to reflect your – your path is home/cryssdal/public_html/photoblog; you need to replace home/love/public_html/hopelessromantics with your path as indicated in the instructions – that path belongs to Kristine. Does that make sense?

31 | Mariann

June 12th, 2003 at 12:11 pm

Avatar

Is there a way to display only a small range of months, say September – December? I'm thinking this might be rather useful for my students, but they only need to see events for a specific semester, not the whole year.

32 | cristine

July 1st, 2003 at 2:07 am

Avatar


Warning: main(/home/love/public_html/hopelessromantics/mt/past/2003/06/cal.php) [function.main]: failed to create stream: No such file or directory in /home/cryssdal/public_html/photoblog/cal.php on line 10

Warning: main() [function.main]: Failed opening '/home/love/public_html/hopelessromantics/mt/past/2003/06/cal.php' for inclusion (include_path=") in /home/cryssdal/public_html/photoblog/cal.php on line 10

i think i did everything correctly as you mentioned above, but i have that error message. can you please email me or post an answer here? i thank you very much.

33 | Zeb

June 5th, 2003 at 5:27 am

Avatar

Update – I fiddled around a bit and probably made things worse :(
Now I'm getting this -

Warning: main() [function.main]: Failed opening '/home/httpd/html/asgard.gen.nz/html/blog/archives/2002/12/cal.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/httpd/html/asgard.gen.nz/html/blog/cal.php on line 10

I think it's time for bed for me ~_~
Any & all help appreciated!

34 | Zeb

June 5th, 2003 at 5:21 am

Avatar

Heya. I'm very new to MT and coding etc. so please bear with me. I think I followed the instructions (but obviously went wrong somewhere!) because when I go to view my cal.php file I get the following error msg in every area where I imagine a month is supposed to appear -

Warning: main() [function.main]: open_basedir restriction in effect. File(/home/asgard/public_html/blog/archives/2002/12/cal.php) is not within the allowed path(s): (/home/httpd/html) in /home/httpd/html/asgard.gen.nz/html/blog/cal.php on line 10

The page is located at http://www.asgard.gen.nz/blog/cal.php

Help!

35 | Autumn

May 22nd, 2003 at 2:54 pm

Avatar

Cal, try taking out the "/" on the line 11 in cal.php

Carissa, you should try lissaexplains.com for some help on the center stuff. Since this is a script for a MT plugin, Idunno how greymatter and a plugin for MT and go together. :D

Anyways.. if your site was up and running I might be able to help you.

Until then, check out lissaexplains.com, you'll get tons of support there. :D

36 | Carissa

May 22nd, 2003 at 12:00 pm

Avatar

Hiya… I was wondering I have greymatter right? and my text keeps centering which I dont want. How do I fix it? and I REALLY want to take out the greymatter archives page. Please e-mail me. Much thanks in advance!

37 | iced glare

May 2nd, 2003 at 12:58 pm

Avatar

How would I go about making the clandars I have entries on show on separate pages instead of one big page of all the calendars?

38 | Cal Loughlin

May 4th, 2003 at 3:19 pm

Avatar

I'm getting a:

Parse error: parse error, unexpected '/' in /home/whenthe/public_html/news/cal.php on line 11

on my cal.php

39 | Maria

May 1st, 2003 at 3:59 am

Avatar

No idea about separating the yeas into just showing this year and so on? Anybody?

40 | iced glare

May 1st, 2003 at 1:49 am

Avatar

wow I've never seen a person blog like very day for like the past 3 years..congrats :-/
LOL anyway your calendar archives look beautiful and the dawns tutorial is a broken link!!

41 | Maria

April 10th, 2003 at 9:39 am

Avatar

Is it possible to dived the calender just into showing this year and then each of the past years on individual pages?

Example, just show the calenders for 2003 on cal.php and then have cal2002.php and cal2001.php and so on?

Thanks in advance! :o )

42 | Autumn

February 18th, 2003 at 12:16 pm

Avatar

Ok.. I got it. I fixed it. :) Just ignore the HTML up there.

<a href="http://kadyellebee.com/mt/past/&lt;$MTEntryDate format="%Y/%m/%d.php"$>" title="<MTEntries> | <$MTEntryTitle encode_html="1"$> | </MTEntries>">

in bolded with this:

<a href="http://kadyellebee.com/mt/past/&lt;$MTEntryDate format="%Y_%m_%d.php"$>" title="<MTEntries> | <$MTEntryTitle encode_html="1"$> | </MTEntries>">

and it works good now. Thanks!

44 | Autumn

February 18th, 2003 at 12:07 pm

Avatar

I am a idiot. lol.

Alright, so I fixed the spelling.. now it's leading me to the "correct" place it should be going to. Now though, the archives are not filing themselves into the "02" folder like they should.

http://m.vixon.net/archives/2003/02/

I have all the archive options turned on except for the weekly ones. And the radio button is marked at my original monthly archive (Date Based Archive, not Date Based Calendar Archive) if that helps any. :)

45 | Donna

February 18th, 2003 at 5:32 am

Avatar

Autumn, your path is your site address, the 'path' to your archives; if you used "vixone" somewhere in your calendar template, and your site address is "vixon," the links won't be able to find the archive pages…check how things are spelled and see if that makes a difference.

46 | Donna

February 17th, 2003 at 9:06 pm

Avatar

Try checking your path…I saw "vixone" in the link I followed: http://m.vixone.net/archives/2003/02/15.php

47 | Autumn

February 17th, 2003 at 10:51 pm

Avatar

hmm.. what do you mean? I got a "page can't be displayed" error?

48 | Autumn

February 17th, 2003 at 6:49 pm

Avatar

Ok that helped to get the cal.php to work right. Thanks!

Now though, on the calendar, it won't link to the archive file. Or what I mean is that the archive file is not being stored in m.vixon.net/archives/2003/02

http://m.vixon.net/archives/

You can see the archives there and where the folders are. Any suggestions for this one? :)

49 | Donna

February 17th, 2003 at 4:20 pm

Avatar

Autumn, I actually left the old monthly archive as my default (checked off with the radio button), and I put this code into the calendar archive "file type" box: <$MTArchiveDate format="%Y/%m/cal.php"$> Doe that help?

50 | Autumn

February 17th, 2003 at 1:23 pm

Avatar

I'm sorry I must have forgoten my name.

I created the new one under archiving in the blog config like it said in your instructions. Then it appeared under my Monthly and date-based archive selection. So there's two options under Monthly. I picked the new one. I don't know what to put where it says Archive File Template though. Do I leave that blank?

51 | kristine

February 17th, 2003 at 1:34 am

Avatar

Do you have an archive filename set for your calendar archives? That's in Blog Config under Archiving… The example uses my archive filename of year/month/cal.php as the place the calendars are saved to.

52 | Anonymous

February 17th, 2003 at 1:24 am

Avatar

Alright I tried to follow but I kept on receiving this error:

Warning: Failed opening '/home/vixonne/public_html/t/archives/2003/02/cal.php' for inclusion (include_path=") in /home/vixonne/public_html/t/cal.php on line 9

I used the reverse version too.

It seems to be that I have the same problem Jane did, but I can't get the calendar to show up.

Any suggestions?

53 | nheo

February 3rd, 2003 at 10:09 am

Avatar

If I followed all of that, will MT still create the orignal monthly archives(the ones where all entries are listed)?

That's cool btw! I tested it and it worked. I just wanna know if I original monthly archives will still be generated or not.

Thanks.

54 | Donna

February 4th, 2003 at 11:21 am

Avatar

They should be – when I implemented the calendar, I created the calendar templates, but left the date-based archive as the default. Entries are showing up in the monthly archives just like normal. Sweet!

55 | Donna

February 1st, 2003 at 2:28 pm

Avatar

Kristine, I've set this up, but do I have to give up monthly archives and select the calendar archive as my default in Blog Config? The reason I ask is that everything looks correct on deliriouscool.org/cal.php, but the links are not finding the daily archive pages – I'm not sure they're being generated correctly. Thanks for any thoughts!

56 | brettly

January 25th, 2003 at 10:11 pm

Avatar

I am looking to generate a page with just the current month and the next month that I can include on my front page. Using this code, I figured out the basics enough to change the layout but I am trying to figure out how to get it to just display two months. Can someone show me how to limit it to two months or is there a better way to do it that way? Thanks for the great resource by the way!

57 | jane

January 14th, 2003 at 5:34 pm

Avatar

I just somehow missed the little itty bitty paragraph about daily archiving. Yikes! I think I need to quit for the day! Thanks so much for your help Kristine. You rock!

58 | jane

January 14th, 2003 at 5:04 pm

Avatar

I have got it turned on, but I don't have an archive filename. Evidently I need one. :)
What file name do I need to use?
Thanks so much!

59 | jane

January 14th, 2003 at 1:00 pm

Avatar

Hi there! This is a wonderful tutorial. I am having issues with the same thing as Michael, and I don't know what path I need to use.

This is what I am using now
include ('/home/janeandkevin/public_html/blog/archives/'.strrev($tok));

but it still gives me the error:
Warning: Failed opening '/home/janeandkevin/public_html/blog/archives/2002/12/cal.php' for inclusion (include_path='.:/usr/local/php/share/pear') in /home/janeandkevin.com/data/blog/cal.php on line 10

Do I just not know where my archives are?
Thanks!

60 | jane

January 14th, 2003 at 1:04 pm

Avatar

I got the calendar to show up now. I think I got lucky. But I am having the same problem as Kimmy. I get an error page when I click on the date.

http://www.janeandkevin.com/blog/cal.php

Any ideas? Thanks again! This website is so awesome!

61 | Kristine

January 14th, 2003 at 2:30 pm

Avatar

Hi Jane — do you have daily archiving turned on? If so, do you have an archive filename set there? That's how I have mine set up, so that's how the tutuorial was written :)

62 | Kristine

January 2nd, 2003 at 1:58 pm

Avatar

Hi Maria,

Unforatunately, MT doesn't have the option to change which day the calendar week starts on, and so there hasn't been an easy way to modify this tutorial or any others to fit that. But it is on the "requested feature" list, so hopefully at some point, we'll see that as an option :)

63 | Maria

January 2nd, 2003 at 1:51 pm

Avatar

First of all, thanks for the tutorial! :o )

I just can't figure out to start the calender weeks with Monday instead of Sunday.

Can you please help?

Thanks in advance!

64 | kristine

November 6th, 2002 at 7:01 pm

Avatar

I posted this on the forums, too, but here's the non-reversed version :)

<table>
<?php
$cals = '<MTArchiveList archive_type="Monthly"><$MTArchiveDate format="%Y/%m/cal.php"$>,</MTArchiveList>';
$i=0;
$tok = strtok($cals, ',');
do {
if ($i%3==0) { print '<tr>'; }
print '<td valign="top">';
include ('/home/love/public_html/hopelessromantics/mt/past/'.$tok);
print '</td>';
if ($i%3==2) { print '</tr>'; }
$i++;
} while ($tok = strtok(','));
?>
</table>

65 | Elisabeth

November 6th, 2002 at 10:15 am

Avatar

Wow. After running a few searches on how to do this I stumble into this page, which is EXACTLY what I was looking for. Thanks so much for beibng generous enough to sare this with us. I'll definitely credit you on my page.

I followed your instructions and implemented the page without incident. My only question- how would/could I reverse the calendar so that the most recent month is listed first?

66 | Kimmy

November 2nd, 2002 at 10:02 pm

Avatar

Hi there. :) First of all I'd like to say thank you for taking the time to post so many different tutorials on your site. I truly envy your design and coding skills. :)

I know a bit about HTML but will admit that I'm new to CSS and PHP. I followed your tutorial for the Archives calendar and I can get the calendar to show up but when I click on one of the dates (for example: March 15th, 2002) it brings up an error page. When I check inside my folders on the server I can see the problem. When it looks to /archives/2002/10/15.php all that's in the /archives/2002/10/ folder is cal.php. My archives are still listed in html format under the /archives directory but nothing has been moved to .php in the new folders. Can you please help me out?

Sorry to be a pain. Thank you so much for your time. :)

Kimberly

67 | ZureaL

August 19th, 2002 at 11:09 pm

Avatar

Yea, I just pretty much cut & pasted the code right off your page here.

$cals = '<MTArchiveList archive_type="Monthly"><$MTArchiveDate format="%Y/%m/cal.php"$>,</MTArchiveList>';

Is what I've got.

It's wierd that it's saying that it can't find the file, since I only get this error if I point it to the correct directory. If I put in a bogus directory, I get a completely different error, which is why I'm stumped. I checked all file perms on the box, so it's not like the app doesn't have permission TO read the file.

Thanks for the quick reply.

68 | kristine

August 19th, 2002 at 11:02 pm

Avatar

Hmmm, I hadn't seen that error message before, so I did a google-search and found this info:

The "input in flex scanner failed" error is generated when a call to:
require($path)
is made with $path specifying a directory and not a file. Or the target file can not be found.

So I'm thinking that maybe you didn't put the end of your path with the filename on it -

$cals = '<MTArchiveList archive_type="Monthly"><$MTArchiveDate format="%Y/%m/cal.php"$>,</MTArchiveList>';</h3>

See on the 2nd line its got cal.php in it? Maybe check and see what you used for this line – and make sure it has a filename specified instead of just a directory. If that's not it, I'll have my husband look at the code and see if he can see anything else :)

69 | ZureaL

August 19th, 2002 at 10:49 pm

Avatar

I seem to have done everything properly (I bet you've never heard THAT one before), however when I go to my cal.php file, I get the following error:

Fatal error: input in flex scanner failed in /unix/path/to/my/archives on line 1

Where the /unix/path stuff is the proper path to my archives directories. I have all the subdirs (year/mo) and all the files seem to be generated correctly.

The monthly calendar files are generated properly, but it's the main calendar index page that gives me that error.

If I replace the /unix/path/to/archives to a non-existant path, I get a different error about not being able to include file, which is expected. The file format is also correct for the index page, 3 colums, and I see in the source, that it's put the correct filenames (i.e. 2002/08/cal.php) in the source, so it's somewhere in the php scripting that's hosing the thing up.

Sorry for the long post.

Thanks,

Z

70 | Michael

August 14th, 2002 at 1:56 pm

Avatar

Thank you so much :-) Silly me totally missed that it was telling me to add 'tripleb' after /home…I've spent too long trying to debug Linux, I'm a scatterbrain now

71 | kristine

August 14th, 2002 at 1:41 pm

Avatar

Check to make sure that THIS line of the PHP code:

include ('/home/love/public_html/hopelessromantics/mt/past/'.strrev($tok));

has your username in it – the error you are getting says /home/public_html
rather than /home/tripleb/public_html

If that doesn't help, here's a few more suggestions: Is it possible that you didn't set up the archive filename for the Monthly calendars? Also, you could check and make sure you rebuilt the Date-based archives so that the files are for sure in their directories already.

72 | Michael

August 14th, 2002 at 12:02 pm

Avatar

I followed all this to the letter, replacing the relevant parts, however attempting to open my cal.php just gets me
'Warning: Failed opening '/home/public_html/archives/1998/10/cal.php' for inclusion (include_path=") in /home/tripleb/public_html/cal.php on line 12'

In every cell of the table.

Any hints as to what may cause this?

73 | Kymberlie R. McGuire

August 6th, 2002 at 10:22 pm

Avatar

Thanks once again for another great tip! Got my page all worked out today. :-)

74 | shana

August 6th, 2002 at 10:56 am

Avatar

Thanks, Kristine! It worked great and your instructions are easy to understand! I changed mine to a two column layout just because three columns looked really crowded on my layout, but everything still came out great. Thanks! :)

75 | Shelagh

August 4th, 2002 at 3:41 pm

Avatar

The page looks good and I like all the calendar's laid out like that. My only reservation about it is that the page is 215k and took ages to load (on work's crappy connection). Would there be any way to streamline it and reduce the page size?

76 | kristine

August 4th, 2002 at 10:07 pm

Avatar

Yes, your right, it is a heavy page. Each calendar table is heavy to start with. But here's some idea for making it lighter… take out the alternating color option, take out class names for each header, and take out the the title on each table cell. Those things probably would bump it down a bit :)

Here's an untested copy of the code that's been reduced down to its basic form:

<div class="calendar">
<div align="center"><B><$MTArchiveDate format="%B, %Y"$></B></div>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0" WIDTH="140"><TR>
<TD>S</TD><TD>M</TD><TD>T</TD><TD>W</TD><TD>T</TD><TD>F</TD><TD>S</TD></TR>
<MTCalendar month="this">
<MTCalendarWeekHeader><TR HEIGHT="20"></MTCalendarWeekHeader>
<TD><MTCalendarIfEntries>
<a href="http://kadyellebee.com/mt/past/<$MTEntryDate format="%Y/%m/%d.php"$>">
<$MTCalendarDay$></A></MTCalendarIfEntries>
<MTCalendarIfNoEntries><$MTCalendarDay$></MTCalendarIfNoEntries>
<MTCalendarIfBlank><BR></MTCalendarIfBlank>
</td><MTCalendarWeekFooter></tr>
</MTCalendarWeekFooter></MTCalendar>
</table></div>

Hope that gives you somewhere to start with :)

77 | Eli

July 24th, 2004 at 12:31 am

Avatar

I have it working. I was wondering what the additional code would be if I wanted to have each month surrounded by an equally sized box (I noticed that some calender months stretch lower than others) and if I wanted to add a lil space between calenders horizontally.

Is it possible to have a box also around the days that have entries?

Anyhow, good work with the calender page. :)

78 | Tutorials

November 26th, 2004 at 11:50 am

Avatar

Calendar: Full Calendar
scriptygoddess…

Featured Sponsors

About


Advertisements