Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
CalendarListPlugin 11.6 kB 1 06-Jul-2006 14:13
CalendarListPlugin.JPG 75.2 kB 1 03-Feb-2004 12:42
zip 29.8 kB 2 11-Oct-2011 19:53 Jerry Andrews version 3
SVSchedule.JPG 105.6 kB 1 03-Feb-2004 12:42
calendarplugin1.jpg 100.5 kB 1 08-Jun-2009 18:48
calendarplugin2.jpg 66.1 kB 1 08-Jun-2009 18:48

This page (revision-83) was last changed on 11-Oct-2011 20:27 by Jerry Andrews  

This page was created on 03-Feb-2004 11:51 by

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed one line
The [CalendarListPlugin] provides a view into a schedule of events. (x past days, y futures days)
[{InsertPage page=ScottHurlbertPlugins}]
At line 3 changed one line
Using this plugin you can have a calendar of the the year's events, recording them as you discover them, and the plugin will display a list of the most recent and upcoming events.
The [CalendarListPlugin] provides a view into a schedule of events. There are 3 available views--a list, a weekly calendar, and a monthly calendar. Views are generated from a 2-column table of events, date on the left, description on the right. The view selects events from the list which are between a given number of days in the past and a given number of days in the future and generates a colored display of those events.
At line 5 changed one line
Here are two screen shots. [The first|ScottHurlbert/SVSchedule.JPG] shows the page with the complete schedule. [The second|ScottHurlbert/HomePage.JPG] shows a wiki page called 'HomePage' with a small section of the schedule displayed as a list. The format is a work in progress, but the plugin works. The schedule pages uses wiki markup to build the schedule list. Currently the date format must be precise - exact the date, or exactly the date, a space, and the time with leading zero. I'm working on making the formatting more flexible and the date/time entry lest strict. I'd also like to be able to show unscheduled events.
This page of events:
[this page of events|SVSchedule.JPG]
At line 7 changed one line
[TodoEntryPlugin] and ~TodoListPlugin work together to provide a crude way to manage a todo list on the wiki. These plugins are modeled (plagiarized) from Janne's weblog plugin.
generates this calendar:
At line 9 changed one line
;Note:These plugins are very much a work in progress. They are very crude. Since the list items are stored as pages, there is no way to delete an item - hey, you get a history for free ;-)
[This calendar|CalendarListPlugin/CalendarListPlugin.JPG]
At line 11 changed one line
!~TodoListPlugin syntax:
Using this plugin you can have a calendar of the the year's events, recording them as you discover them, and the plugin will display a list of the most recent and upcoming events.
The schedule pages uses wiki markup to build the schedule list. Currently the date format must be precise - exactly the date, or exactly the date, a space, and the time with leading zero if the hour is under 10. I'm working on making the formatting more flexible and the date/time entry lest strict. I'd also like to be able to show unscheduled events.
CalendarListPlugin depends ''heavily'' on CSS. It wraps every output item in a span or div with a classname. In order for this all to work, you must either get a calendar-specific CSS file integrated with jspwiki.css, or you must deploy a separate .css file in your JSPWiki package and specify it using plugin parameters (see below). If you don't do this, your calendar will not even have separator lines between days (though the LIST format does work reasonably well).
There are a lot of parameters, but most of them are optional. The line below shows the minimum you need. Remember you can add the {{com.hurlbert.jspwiki.plugin}} to your {{}} file to shorten the line further.
!~CalendarListPlugin syntax:
At line 13 changed one line
[{INSERT com.hurlbert.jspwiki.plugin.TodoListPlugin show=UNDONE}]
[{INSERT com.hurlbert.jspwiki.plugin.CalendarList listpagename='MyEvents'}]
At line 17 changed 4 lines
;__show__ (optional): Default: UNDONE\\This determines which tasks are displayed in the task list. Valid values are: UNDONE, DONE, or ALL
;__undoneicon__ (optional): Default: '<img src="attach?page=pic/cb_off.png" />'\\"~UnDoneIcon" This is the html necessary to display whatever icon you would like in the first column of the list for tasks which are uncompleted. The default attempts to display a small unchecked checkbox icon (an unfilled square) that has been attached to the page 'pic' - as it is on the [jspwiki|pic].
;__doneicon__ (optional): Default: '<img src="attach?page=pic/cb_on.png" />'\\"~DoneIcon" This is the html necessary to display whatever icon you would like in the first column of the list for tasks which have been completed. The default attempts to display a small checkbox icon (an unfilled square) with a checkmark in the center. It looks for this icon as an attachment to the page 'pic' - as it is on the [jspwiki|pic].
;__donetext__ (optional): Default: done\\This is the text used to determine whether the task has been completed or not. The default is the word, "done" - if a task begins with "done," such as "done: Buy Dog Food," then it will be considered as completed. If the task just says "Buy Dog Food" it will be considered as uncompleted.
;__listpagename__ (mandatory): This is the name of the wiki page containing the schedule events. The must be in a table, as described below.
At line 22 changed one line
When the list is displayed, the icon will point to the edit page link and the text of the task will point to the view page link of the task. This allows you to see the task by clicking the text or quickly edit the task by clicking the icon so you can mark the task as done (or update the description).
;__format__ (optional): Default: list\\This defines the output format. Valid values are LIST, WEEKLY, or MONTHLY.
At line 24 changed one line
;__futuredays__ (optional): Default: 3\\This is the number of days of events to show on the output. futuredays=21 will show 3 weeks worth of events.
At line 26 changed one line
!Using ~TodoListPlugin
;__pastdays__ (optional): Default: 1\\This is the number of past days events. pastdays=7 will show a weeks worth of past events.
At line 28 changed one line
__Display uncompleted tasks__
;__stylesheet__ (optional): Path to a style sheet to include in the generated page. If you don't include this parameter, you must integrate the stylesheet containing your calendar styles with jspwiki.css or other main stylesheet in the template you're using. By specifying the stylesheet path relative to the JSPWiki root directory, you can avoid this problem. Drop your calendar stylesheet (several are included in the distribution) in the main JSPWiki deployment directory (e.g. same directory as "Wiki.jsp"), and specify the path with this item, e.g. "stylesheet=~WhiteCalendar.css" (or "stylesheet=templates/default/~WhiteCalendar.css").
;__stylename__ (mandatory): This defines a prefix for all the css stylenames build in to the calendar. When the calendar renders, it generates html div blocks for almost all elements. Each of these is given a class with the stylename prefixed to it. This is so you can have multiple styles in your css stylesheets and still assign them seperately on your calendar pages. For example, one of the styles the calendar outputs is called ''prefix''_TimedEventDesc. If you make the stylename parameter equal "myCal_" then the output for this style in the rendered HTML will be ''myCal_TimedEventDesc'' and if there is a matching style in your stylesheets, it will get applied.
!Format of the schedule page (not the output page, the page holding the events).
The schedule format is pretty strict right now. Build a page anyway you like, lines with the following format will be picked up and put in the schedule.
At line 30 changed one line
[{INSERT com.hurlbert.jspwiki.plugin.TodoListPlugin show=UNDONE}]
|02/01/04 03:00 PM|Superbowl
|02/02/04 08:00 PM|Antiques Roadshow SF
|02/09/04 08:00 PM|Antiques Roadshow SF
|02/29/04 05:00 PM|[The Oscars - 76th Annual|]
|03/09/04 10:00 PM|The Shield, Season 3 premier
At line 33 changed one line
__Display completed tasks__
!Using ~CalendarListPlugin
__Display a weekly calendar, with a header like [this screenshot|CalendarListPlugin/CalendarListPlugin.JPG] (Generated from [these events|SVSchedule.JPG])__
At line 35 changed one line
[{INSERT com.hurlbert.jspwiki.plugin.TodoListPlugin show=DONE}]
%%( font-family: Arial; font-size: 60%; )
[{INSERT CalendarList listpagename='SVSchedule' pastdays='3' futuredays='35' format=WEEKLY stylename='PinkCal_'}]
At line 38 changed one line
__Display uncompleted tasks preceded by smiley faces__ (path removed for brevity)
__Display a simple list with the default coloring__
At line 40 changed one line
[{INSERT TodoListPlugin undoneicon='<img src=\"attach?page=pic/smile.png\" />'}]
[{INSERT com.hurlbert.jspwiki.plugin.CalendarList listpagename='SVSchedule'}]
At line 45 changed 3 lines
The attached screenshot, '~TodoSample.jpg,' was created with this content:
[{INSERT com.hurlbert.jspwiki.plugin.TodoEntryPlugin}]
!Bugs, unfinished items.
* The date parsing is very strict. It currently generates a PluginException if the format is wrong. It should ignore or warn.
* Items with no time show up as starting at 12:00 AM. I'd like to just have them sort to the top of the day and have no time, but until I can program someway to tell them apart from something that does start at 12:00 AM I'll leave this alone.
At line 49 changed one line
[{INSERT com.hurlbert.jspwiki.plugin.TodoListPlugin show=UNDONE}]
!Some possible enhancements (feel free to add others)
* Add a calendar title parameter.
* More layouts.
* Move the defaults to the {{}} file.
* Add categories to the events.
* Add an option for hard coding the start and end dates. Currently, the calendar floats through time. I thought of this feature for creating things like a schedule of holidays, or in my case, the year in pictures. Since I already store most of my pictures on line, by date - why not display them as a calendar.
Enjoy - [Scott Hurlbert|]
At line 51 changed 2 lines
!Completed Items
[{INSERT com.hurlbert.jspwiki.plugin.TodoListPlugin show=DONE}]
PS - Now that all that is out of the way, let me add a disclaimer. I have no freaking idea how to code like this! I seem to have a hard time making HTML generation clean. The code always seems to be getting in it's own way. So please, take this program with a grain of salt. I plan on cleaning it up here and there.
If you have any suggestions on how to write such a plugin with a better seperation of event handling vs HTML generation, please share. Thanks, [Scott|ScottHurlbert]
Love this plugin, I use it on my News page to keep track of upcoming birthdays. I added:\\
;__time__ (optional): Default: show time in a HH:MM format. time=NONE do not show the time. Good for tables with just events, like birthdays. \\
to stop the time from showing. (It's set up to do time='HH:MM' or time='HH' if the user wants some other time setup. Thanks again for the code!! -- [FosterSchucker]
Glad you like the plugin. Whenever I get back to it I'm reworking most of the formatting parameters to be CSS based. I'm glad you found the code useful. -- [Scott|ScottHurlbert]
I am kinda new to wiki. I have two questions:
Where do the class files go? Web-inf\lib ?
Do I change the text in the line to insert it at all and if so, how?
{{{[{INSERT com.hurlbert.jspwiki.plugin.CalendarList listpagename='SVSchedule'}]}}}
I have changed the listpagename to a wiki page I have created. Anything else?
This is what I see:
{{{%%( font-family: Arial; font-size: 60%; )
Plugin insertion failed: Could not find plugin com.hurlbert.jspwiki.plugin.CalendarList %% }}}
Thanks -- Dave S
Hi Dave
I run several wikis from set of source code by having a common jar file (renamed to *.war of course) with the wiki code and setting the properties of each wiki to use the jar (the properties and content of each wiki are obviously not in the jar :-). Setting up multi wikis to share a jar is described here, [MultipleWikis] . So, in the case of a jar, the plugins go in the jar under the folder:
where "jspwiki" is the folder that gets made into the jar/war file - jspwiki.war.
However, if you're not running as a war file, then you would put the plugin in a folder called:
However, you can really put the file anywhere you want below ..\classes and then reference it in the insert command. For example:
[[{INSERT com.wherever.someplace.anywhere.plugin.CalendarList ...}]
Remember that where ever you place it you can shorten the insert command by adding the path to the SearchPath in the file.
-- [Scott Hurlbert]
Thanks Scott. One important thing to note is that this Plugin requires the TodoListPlugin.
-- Dave S
David, thanks for pointing this out. __This is a bug.__ You are correct, the CalendarListPlugin currently depends on the TodoListPlugin, but that was not my intention. I'll fix it as soon as I post an update.
-- Thanks, [Scott Hurlbert]
The error message is saying it can not find the class file. You need to make sure that you have put the class so it can be found. In my case it's in the JSPWiki/WEB-INF/classes directory
-- [FosterSchucker]
''5/13/05 NT:\\
Here is a little tip: If you can't get the schedule to display, CHECK THE YEAR! :-)''
''06/19/06 Mike:\\
My plugin installation seems to work in LIST format only. When setting format to WEEKLY and pressing save, the web page hangs,
displaying an empty screen. Does anyone have an idea what may be wrong?
I really want to use nice display of calendar entries...
''2007-23-07 Torben (Torben.Fojuth\\
I have exactly the same Problemen. Has someone solved it in the meanwhile? Any kind of hint would be useful. :D
Q: And where should I put the stylesheets?
--AnonymousCoward, 03-Nov-2006
''31/07/07 Rauly\\
Hi i have a proglem when install CalendarListPlugin, the error is:
Plugin insertion failed: class "com.hurlbert.jspwiki.plugin.CalendarList"'s signer information does not match signer information of other classes in the same package
At line 174 added one line
Know some way to resolve it? thaks
At line 176 added one line
At line 57 changed 7 lines
!Some possible enhancements (feel free to add others)
* Sorting
* Date display
* Filtering - for example, show tasks completed in the last two weeks
* Properties file for icon locations, done text etc? [KieronWilkinson]
** Yes, good suggestion. It's difficult to add a new property file because I run several wikis from a single jar. In this configuration, each wiki instance gets passed the location of it's {{}} at startup. Adding a second properties file would require sending another parameter or some method for the wiki to locate it's specific .properties file. When operating from a common jar request.getRealPath() does not work. It returns null, so the app has no idea where it's running. This makes getting to a properties file inside the WEB-INF file difficult. (If anyone knows a way around this, please share. I saw some solutions that use resourcebundles, but they looked 'hackish.') However, I will look into adding some properties to the {{}} file. Thanks for the idea. [Scott|]
* Add a {{listpagename}} parameter/property so that the todo list could be displayed anywhere, not just on a the parent page. I see this as handy for the completed items. You may not want those hanging out on the same page as your undone tasks. Adding this parameter would allow the plugin to live on any page, but generate it's content based on the 'parent' list page.
I have the same problem as above when trying the 'weekly' format.
Did anyone manage to solve this issue?
Thanks a lot,
At line 65 changed one line
(Hmmm, seems that I'm getting enough ideas here that I'm going to have to get Janne to install the TodoListPlugin on the jspwiki so I can create a todo list to keep track of them. Ha!)
--AnonymousCoward, 21-Nov-2007
At line 67 changed one line
Enjoy - [Scott Hurlbert|]
Am interested in this plugin. Can u give me a jar file.My mail id I compiled the java code and got lot of errors.
I am having problems in the way the calendar is displayed. I don't see the borders for the calendar. Here is what I see...\\
[{Image src='calendarplugin1.jpg' width='900'}]\\
I used the following event list....\\\\
[{Image src='calendarplugin2.jpg' width='900'}]\\
I'm putted:
[{INSERT com.hurlbert.jspwiki.plugin.CalendarList listpagename='MyEvents'}]
And what I see it's
Plugin insertion failed: Plugin failed
calendars without dividing lines (as above) are caused by not including a stylesheet.
--Jerry Andrews, 11-Oct-2011 11:27
Version Date Modified Size Author Changes ... Change note
83 11-Oct-2011 20:27 11.09 kB Jerry Andrews to previous
82 11-Oct-2011 20:25 10.953 kB Jerry Andrews to previous | to last
81 11-Oct-2011 20:24 10.951 kB Jerry Andrews to previous | to last
« This page (revision-83) was last changed on 11-Oct-2011 20:27 by Jerry Andrews