[pmwiki-users] Can a markup function set $HTMLHeaderFmt?
5ko at 5ko.fr
Thu Sep 7 00:05:45 CDT 2017
Functions processing markup can set global $HTMLHeaderFmt entries when
they process the main (browsed, requested) page. The SideBar and other
pages called from the skin template are processed after the main page,
and after the HTTP headers and the HTML headers have already been
output, so setting $HTMLHeaderFmt from the SideBar does nothing.
Main.GroupHeader is actually "included" in the browsed page and
processed with it; this and other included pages should be able to set a
If your button is in the SideBar, simply set the $HTMLHeaderFmt entry
directly in local/Group.php or in local/config.php.
PmWeekly Blog : http://www.pmwiki.org/News
If you upgrade : http://www.pmwiki.org/Upgrades
On 2017-09-07 00:59, SteP wrote:
> Can a markup function set
> $HTMLHeaderFmt? Can it always or are there
> restrictions? I ask because what I see happening with this recipe
> http://www.pmwiki.org/wiki/Cookbook/AddThisWidget-Talk (the one by
> Carlos AB) is weird and puzzles
> me. If I put the markup (:addThis :) directly in a wiki page then all
> is well: a "Share" button is rendered
> and hovering over it pops up a menu from
> http://s7.addthis.com/js/250/addthis_widget.js. However, if I
> put the same markup in an included file, such as Site.Sidebar, or
> the button is still
> rendered but addthis_widget.js isn't downloaded at all, so the menu is
> missing. This happens, I think,
> because the element $HTMLHeaderFmt['addthis'] == "\n" (see the code
> below) instead of carrying the
> <script> tags that should go into the <header>. What's going on?
More information about the pmwiki-users