Brion, thanks for your answers in your big catchup flurry of emails.
After doing some experimenting, I have some followup questions...
Brion Vibber wrote:
Gordon Mohr (@ Bitzi) wrote:
I'd like my Extension to be able to have an
effect outside the
<!-- start content --> ... <!-- end content --> (especially the
<title> and h1.firstHeading values.
But, I can't find a hook that gets a shot at changing the HTML
which includes those. Am I missing one?
Or, is such a hook trampling on the prerogative of Skins, so it
couldn't be sure to find stable patterns to replace?
If so, can the Skin code be sure the article has already been
parsed/HTMLized, so that it could make use of information found
inside the article body?
The page might never be parsed at all, if it came from the parser cache.
This could be Bad Mojo, but if you simply *must* do this, have your
extension store its data in the parser output structure, and have the
skin check that. (Is that even possible? Who knows, not designed to work
that way.)
I had an approach that worked using a global with no caching enabled.
Based on your comment, I enabled memcached caching to see if the parser
cache would interfere.
The results were not as I expected.
I thought all reloads after the first time a page displayed would lose
my skin's customization, because the content would come from the cache
and the global would not be set during parsing. Instead, pages *usually*
displayed with the skin customization indicating the global was set.
The exception would be after login/logout as a user -- this would
*sometimes* cause one or more pages to revert to a form that looked
like cached content was being used -- and thus none of the extensions'
global values set.
So the effect of caching was almost exactly opposite from what I
expected: reloads showed no evidence of caching; accesses after
user login/logout (when presumably material might have to be reparsed)
showed evidence of caching.
Can you speak any more about why it might be behaving this way?
Is there a hidden determinant of whether caching happens that I'm
overlooking?
(I'm also trying your 'might work' approach of stuffing the
extra data into the ParserOutput object, but that too is working
only intermittently -- again logins/logouts somehow trigger a
path where the necessary info isn't retained.)
Thanks,
- Gordon @ Bitzi