|
WikiCalendar<< Tell A Friend | Cookbook-V1 | Add Link Bookmarklet >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
GoalCreate a group of pages formatted as a calendar, one page per day. Present people with a picture of a calendar, showing days with and without entries. SolutionNew version: Attach:wikilog-0.2.3.tar.gz for use with PmWiki version 1.0 and above. jr has tested the recipe with a clean install of PmWiki 1.0.8 and everything works perfectly. Just follow the README instructions. For older versions (PmWiki version 0.5):
DiscussionThe README contains detailed installation instructions. In summary:
Important: to allow numeric page names, wikilog redefines $PageTitlePattern: $PageTitlePattern =
"[A-Z0-9]([A-Za-z0-9]*)(-([A-Za-z0-9]+))*";
and makes a corresponding change to $FreeLinkPattern. NOTE: This clashes with the function, Pm kindly spent some time going through a problem with the include function with me and tracked the source down to this. wikilog freesupport.php line 16 should be changed to $PageTitlePattern = "$TitlePattern(?:-$AnyLetter+)*(?:~$TitlePattern)?"; to get it working. Pm is letting John Rankin know. Thanks. Tom Now fixed. Thank you. jr
The script treats references of the form Group . or / followed by 8 digits as a valid page reference. There are various parameters you can set in the wikilog-config.php script to control how it displays, such as choosing between American and European date formats. All the predefined text values, such as day and month names, are defined as variables, with the English values set by default. It also includes a German translation. There is a parameter to set depending on whether you need ThisPage:?logdate= (the default) or ThisPage:&logdate= (for references of the form http:// ... &pagename= ... ) I think it's XHTML compliant, but I may be wrong If it's set up correctly, you should see:
Revision history23 August -- improve use of css for the calendar display, add support for international dates and PmWiki/WikiFarms 21 May -- fixed to work with new [[include: ... ]] markup options 25 April -- simplified installation procedure 21 April -- minor bug fix and improve css support 20 April -- add support for a form to post entries automatically to today; minor bug fixes and display enhancements 1 April -- fix bug that ignored [= ... =] markup, add support for {{Group/free links}}, provide an option to list entries oldest first or newest first 23 March -- fix bug that ignored [[<<]] markup processing and add support for stop characters in the list of entries 18 March -- make the Publish button on news pages a configurable option 15 March -- space titles that are dates if 8 March 2004 -- version that works with 0.6.7 and above, add support for markup to list the latest entries from another group 12 September -- support Publish, make installation more reliable, make translations easier (really, it needs to use the php setlocale function -- any volunteers?) 1 September 2003 -- support other languages and change how days without entries display Released 7 August 2003 ContributorsJohn Rankin (the core calendar display logic came from a free software program by Stephan Uhlmann) Simo Salanne added the ability to use languages other than English Geoff Hopkins and Carlo Strozzi for helping to work out the installation instructions Eric Charikane for suggesting the Publish option and working out a better way to translate the display Albi Rebmann for translating the interface into German. Andres Yver for suggesting the blogging features. NotesObscure bug or "Doctor, it hurts when I go like this..." This belongs on the mailing list...anyway. I am using the latest download of pmwiki in a wikifarm installation. I had created a wikitrails based presentation (I guess you would call it WikiPoint). I wanted a better look so I used a modified print.tmpl to strip the page of all headers and footers. The wikitrails links worked fine in regular viewing and printable page viewing. I added wikilog and then the wikitrails links only apeared in the regular version of the page and not the printable version. I set the wikilog print.tmpl back to it's original state and I still could only see the wikitrails links in the regular version of the page and not in the printable version. I'll throw some thought at it when I have a moment. --RossKowalski I'm a bit afraid of installing this cookbook as I'm not sure what it's going to do and what it'll look like. Can anyone point us to an example web page where this calendar feature has been used in a pmwiki site? See http://wiki.lianza.org.nz/index.php/Calendar/Calendar I tried Calendar on Win/IIS platform. Wikilog.php generated error when the URL did not contain "logdate" parameter. I replaced the line: $logdate = $HTTP_GET_VARS['logdate']; by if (array_key_exists("logdate", $HTTP_GET_VARS)) {
$logdate = $HTTP_GET_VARS['logdate'];
}
Which fixed the problem. Simo Salanne, 1-Oct-2003
10-Oct-2003 The following version of the Frank Hellwig, 2003-11-18 (does not work with the latest calendar version)
How to add multiple entries / day in latest version?
It was really bugging me how the log entries were displayed in descending order from the most far off event to the most recent. So I modified wikilog.php to give the the option of reversing the list. Here is a patch against wikilog-0.6.7: Attach:wikilog_revlog.patch.gz John Blyberg, 2004-03-25 support added 2004-04-01 via a configuration parameter jr
The PmWiki variable for adding headers has changed in PmWiki 0.6 and above. It's used by this tool to colorize the calendar. The old variable is Actually, $HTMLHeaders is deprecated and will be removed in a future release. The correct variable is $HTMLHeaderFmt, which is now an array. --Pm
The latest version has a style sheet to colour the calendar, using $HTMLHeaderFmt, plus fixes a number of things that work slightly differently in version 0.6 of PmWiki --jr
The "Publish"-Function doesnt work with my installation: It produces a page without any Calendar-Entries. I'm using the latest PmWiki. Can anyone provide a solution or at least an ultimate installation instruction for this great Calendar tool? Can you provide a link, and set $EnableDiag = 1; in your local/config.php? jr
Sorry for the delay... Changed the config.php, and here's the link: http://www.interpool-net.de/pmwiki3/pmwiki.php/Calendar/Calendar Maybe I forgot something during the installation process, don't know. Michael Schoemburg, 2004-04-10 This has me stumped. It works fine on my computer running PmWiki version 0.6.14. The problem may be the statement "$GLOBALS['PublishList'] = $PublishList;" 7 lines from the end of wikilog.php. I can replicate your behaviour if I comment out that line. Try the following experiment:
This change works for me. If this fixes the problem, I'll update publish.php also and release a revised version. Although I don't know why. --jr, 2004-04-15
Did not work. But many thanks for your help! Maybe you can send me a notice if you have made any upgrades for that great tool: . --Michael Schoemburg, 2004-04-20 Has this been fixed yet? I am having the same problem as above, and did both the things stated above: http://temp.modwest.com/bacctexas.org can anyone help?? geo@kitecorpus.com Also.. why doesn't the PrintableView Work either for it? seems like that should work at least, but when you press it, nothing appears.. not sure if it has to do with the script or what? anyone know? would be nice for people to be able to go to a month, and hit print to have it print out and put on their wall! Printable view works as specified: it prints GroupPrintHeader, then the current page, then GroupPrintFooter. So if one has the <#>? directive in a GroupHeader and an empty Calendar.Calendar page, you see an empty printable view. If you try the printable view on one of the pages with an entry, you see the entry. As to why publish doesn't work, it may be to do with the site using urls with ?pagename=... and it's not picking up the page correctly. If you can figure out the fix, please post it here!
Can you see it now?? it is there and should show up when someone hits the Print Page button. Repetitive Entrieshow can i create repetitive entries? e.g. i wish to have the same entry valid from april 2nd through to june 6th. can i do that wih free links? How about something like the following. Suppose that we:
Is this a suitable approach? Is there a better one that's simpler to implement?
Problem with Spanish WikiWordThe calendar works fine, but turns off all WikiWords containing extended alphanumeric character like: LeerDocumentación (note the ó) Leaving it like: LeerDocumentación Any ideas?
$AnyLetter = "[A-Üa-ü0-9]"; also try $AnyLetter = ":alnum:?"; and if that works I'll update this script and PageTableOfContents
Yeah It Works great! Thanks. That's the right line.
This change is now included.
wikilog.css is visible outside the calendar groupI could not change the background color of the body of a page in another group. I looked at the HTML and saw a link to wikilog.in the <head> section. wikilog.css starts off with body {
background-color: #f5f5f5;
}
and for some reason that was taking precedence over other directives. Is there a way to get wikilog.css included only for pages in the calendar group? 7qe5skl02@sneakemail.com the body reference is now removed from the css
Support for ISO date formatThere are American format and European format date options for displaying the date (don't know where you got the European format from) but the international standard for date format wich I use and as specified in ISO 8601 is not supported. I've created my own workaround for this (see below) but I would appreciate if the standard is supported in future versions. Thanx for a great add-on! Fix to view ISO date-format: Change line 557 in wikilog.php to switch ($calendar_datestyle)
{
case 0:
return "$month/$day/$year";
case 1:
return "$day.$month.$year";
case 2:
return "$year-$month-$day";
}
And set in wikilog-config.php $calendar_datestyle = 2 Read more: / Per Axbom this feature is now included
It would be fantastic to have either
Thoughts? My question is: Is there a way to display links to all the pages in the calendar group? I just find out it is too difficult to visit pages that i wrote months ago. thanks in advance. --keith pmwiki-2.2.0-beta68 -- Last modified by {{Svogel}}
|