Summary: Talk page for BlogCalendar.
Maintainer: HansB
Users: +3 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.


It seems that no matter the actual URL schema of the wiki, the blogcal links end up being of the format ?n=foo, where foo is the name of the page.

The $PageUrl format takes into account $EnablePathInfo (line 102), but the individual entry links (lines 204 and 212) do not.

The following code (lines 200..218 as revised) should allow the proper format; $ScriptUrl?n= has been replaced with $url, which has a similar definition as $PageUrl:

$url = ($EnablePathInfo) 
	? $ScriptUrl.'/'
	: $ScriptUrl.'?n=';

// If there's more than one, prepend different format, and have different output...
if ($count > 1 ) {
	$tooltip = "$count " . $BlogCal['multimessage'] . "\n"  . substr($tooltip, 0, -1) ; //strip the last newline
	$searchresults = MakePageName($pagename, $BlogCal['multiresultpage']);
	// ?q=name%3DBlog%2F20140102*+fmt%3D%23titlespaced
	$out .= "<td class='$class'><a class='bcal-link' href='url$searchresults&q=name%3D" . PUE($pname)  ."*+fmt%3D%23" . PUE($BlogCal['multimessagefmt']) . "' title='". htmlentities($tooltip, ENT_QUOTES) ."'>$daynum</a></td>";
} else {
	if (isset($args['tooltip'])) {
		if ($args['tooltip']=='description' || $args['tooltip']=='Description')
			$tooltip = PageVar($pages[0],'$Description');
		else $tooltip = PageTextVar($pages[0],$args['tooltip']);
	else $tooltip = PageVar($pages[0],'$Titlespaced');
	$out .= "<td class='$class'><a class='bcal-link' href='$url" . $pages[0] . "' title='" . htmlentities($tooltip, ENT_QUOTES) ."'>$daynum</a></td>";

I have tested this with $EnablePathInfo = 1;, but not in other variations.

MichaelPaulukonis July 15, 2014, at 08:04 AM

2008-08-08 Hi Hans. This is a fine cookbook, and works well for me. Is there some way I can modify tooltips to provide a short description of the blog entry for the date over which the cursor is hovering, to aid the user in selecting the blog entry of interest...perhaps using your excellent LinkCssToolTip? Ray.

Here is a possible solution, which needs modifying the script:
At present the tooltip for an existing blog page is the full PageName. when you look at the script code, near the end in the last else {...} block, you find twice title='$pname' as part of the <a> (link) tag.
Say your blog pages got a Summary page text variable. To display it's value as tooltip change title='$pname' to


(watch for all the quotes and dots!).
If you use (:description ...:) markup and want to display that as tooltip, replace instead with


- Maybe I should make a more generic solution, allowing for arbitrary page text variable specification in the markup, or the description markup text. - HansB August 08, 2008, at 12:11 PM
Now implemented in latest update. - HansB August 08, 2008, at 01:00 PM

2008-08-11 Hi Hans. title markup text works perfectly. Thanks for this, and for your extra-ordinary support. Click on my name for working example, in a blog context...Ray.

2008-09-30 I installed BlogCal yesterday and I love it. Today I noticed that my site no longer validates at due to the BlogCal recipe. Can we get this wonderful recipe updated so that it doesn't break validation?
Fixed now in latest update. Thanks for the alert! - HansB October 02, 2008, at 07:20 AM

I'd be interested in learning more about which blog recipes this calendar works with. In other words, I'd like to hear some success stories about setting up blogs.

I'm still a little bit confused about the situation of blog recipes for PmWiki. Many of them are incomplete or discontinued (e.g., Fox Blog). Are people waiting for blogs to be released as a core feature of PmWiki? What is the best option at the moment for setting up a bliki using PmWiki?

Any tips would be greatly appreciated.

matt October 07, 2008, at 11:44 AM

2012-08-30 All of my blog pages are names as YYYYMMDD-PageNameHere. What do I need to change for blogcal to see and display these blog pages? Ian MacGregor

I don't know. It will be difficult to adapt the recipe in the way you want. Look in the script how $pname is constructed. That would need to change greatly. Also note that your naming scheme introduces ambivalence, as there may be more than one pages per day number, so that would need to be addressed too, as we want only one link per day displayed as a simple day number. I cannot help you with the changes, sorry! - HansB August 30, 2012, at 03:49 AM

Thank you, Hans. What I'm going to do is go back and switch my pages over so that the page names comply with the naming scheme used in blog cal. I only have 20 pages so it will be a small project. - Ian MacGregor August 30, 2012

Oh good. And note that you can use YYYY-MM-DD or YYYYMMDD, the latter with config option $BlogCal['isobasic'] = 1; - HansB August 30, 2012, at 06:57 AM

Wouldn't it be possible on the YYYYMMDD-PostTitle format to come back with a searchresults for pages starting with YYYYMMDD? Then there'd just be a simple pagelist (perhaps fmt=#titlespaced as the default, but to powerhouse it, let that be an SDV configurable by the admin or user) that would list all the posts on the day in question. One could choose #include for a full-text list of all posts that day, for example. This makes the recipe compatible with folks who say share a blog and post several times a day (guest posting or multi-author posting), event announcements (there can be several events per day), etc.XES January 28, 2014, at 07:40 PM

I made the edits I suggested, and then some. Hopefully some of my changes will be integrated back into the original, because I don't really want to make a fork. It works with YYYYMMDD-Title and multiple posts on a single date, and still works on YYYYMMDD. It has not been extensively tested for all the variables such as YYYY-MM-DD etc. It's at work on in partnership with the XESBlog bundle. XES January 29, 2014, at 09:13 PM
I spoke to HansB and made a few adjustments, added it to the main page as a new version of the recipe, and I'll document the new features shortly. XES January 30, 2014, at 01:15 PM

Talk page for the BlogCalendar recipe (users).