|
|
Choosing A Webhost: |
Re: event calendar code: msg#00036lang.perl.modules.html-template
Why reinvent the wheel? Sure, HTML::Template is a fantastic module and is quite versatile, but coding up an accurate calendar is by no means a simple task. I recently discovered HTML::CalendarMonthSimple and found it to be extremely useful and easy to use. Combine it with HTML::Template and you have something good going there (this is untested code): cal.pl ------ #!/usr/bin/perl -w use HTML::CalendarMonthSimple; use HTML::Template; my $template = HTML::Template->new(filename => 'cal.html'); my $cal = new HTML::CalendarMonthSimple('month' => '2', 'year' => '2004'); # Format the calendar $cal->width("100%"); $cal->border(1); $cal->bgcolor("#006633"); # Other calendar formatting is available, read perldoc for more info # Set some content in the calendar $cal->addcontent(2, "Groundhog Day!") $cal->addcontent(14, "Valentine's Day!") $template->param(CALENDAR => $cal->as_HTML); print "Content-Type: text/html\r\\r\n"); print $template->output; cal.html -------- <HTML> <BODY> <TMPL_VAR NAME=CALENDAR> </BODY> </HTML> It doesn't get much simpler than that. Supply your own month/year to HTML::CalendarMonthSimple and you can do just about anything. Additionally, HTML::CalendarMonthSimple has the ability to place HTML, links and other text in each day of the calendar ($cal->addcontent), read the docs for more information. It's quite easy. --Joel >Sorry if this post is off-topic but I have a feeling people in this list = >would have definitely come across it. > >I am looking to generate an event calendar using H::T. Can anyone help = >me with some pointers? code snippets? > >I did search the archives but could not find much info. > >Thanks, >Nishi > > > >------------------------------------------------------- >SF.Net is sponsored by: Speed Start Your Linux Apps Now. >Build and deploy apps & Web services for Linux with >a free DVD software kit from IBM. Click Now! >http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click >_______________________________________________ >Html-template-users mailing list >Html-template-users@xxxxxxxxxxxxxxxxxxxxx >https://lists.sourceforge.net/lists/listinfo/html-template-users ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: event calendar code, P Kishor |
|---|---|
| Next by Date: | Re: event calendar code, Philip S Tellis |
| Previous by Thread: | Re: event calendar code, P Kishor |
| Next by Thread: | Re: event calendar code, Philip S Tellis |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |