Toggle
I may have found a bug in Cookbook:Toggle. I sent the following to the pmwiki-users group today:
In the toggle.php recipe of 2014-02-21, we see the following:
$HTMLFooterFmt['toggle'] = "<script type=\"text/javascript\">document.getElementById(\"{Blog.2014-07-01$id}\").style.display = '{Blog.2014-07-01$style}';</script>";
This should create a simple string that is places into the HTMLFooterFmt hash with the index of "toggle."
How on earth is toggle supposed to function if there is more than one toggle present on the page?
Am I missing something in PHP/PmWiki that would allow this to work?
We don't see anything like this behavior in the older version from 2009-07-23
Perhaps not coincidentally, I have multiple toggles working with the version from 2009-07-23, but not with 2013-02-21
Unless I make the following change:
$HTMLFooterFmt["toggle$id"] = "<script type=\"text/javascript\">document.getElementById(\"{Blog.2014-07-01$id}\").style.display = '{Blog.2014-07-01$style}';</script>";
I do understand there were changes made between 2009 and 2014 (I'm slow in updating) to handle nested divs, but I'm failing to see how that's applicable, here (my targets are nested, for one thing).
UPDATE 2014.07.06: Entirely my mistake. The original download of toggle.php at pmwiki.org did NOT have 'toggle
as an index passed to $HTMLFooterFmt
. I have no idea how it got there, since I believe I only opened the file once I was having an issue. But I must have done it, somehow.....
ToggleEdit and bootstrap icons
My own Cookbook:ToggleEdit recipe creates a wrapper around Toggle, by way of an edit-button.
But the edit-buttons by default are images; as part of bootstrap I've tried to rewrite them using the included css-sprites.
The recipe is not compatible with this format.
the css-sprite gui-icon code (from skin.php
):
What gives?
TOC
Is Cookbook:PageTableOfContents installed, here?
YES.
DONE: add to blog template.
See 2014-07-03 for an issue (not imagined, this time!)
Sourceblock
Cookbook:SourceBlock is not working.
I have it working on my work-wiki.
Here are the errors:
Warning: include_once(/path/tot/cookbook/geshi/geshi.php): failed to open stream: No such file or directory in /path/to/cookbook/sourceblock.php on line 152 Warning: include_once(): Failed opening '/path/to/cookbook/geshi/geshi.php' for inclusion (include_path='.:/usr/lib/php5.4') in /path/to/cookbook/sourceblock.php on line 152 Fatal error: Class 'GeSHi' not found in /path/to/cookbook/sourceblock.php on line 156
Solution
The Geshi source-code has been switched up.
The download from GitHub includes some notes and build-files and a src
directory.
It's the contents of the src
directory that the recipe expects to find at /cookbook/geshi
- particularly geshi.php
Recent Comments