merlin
I'm writing a plug-in, which will aggregate certain section (for example, "===== Members =====") in all given pages and then build a report (all gathered info together).
Is there any API to get a section with given name for a page with given ID (as "edit section" button do) into a string?
Something like rawWikiSlices(), but with section name parameter instead of range parameter.
chi
Hi,
have a look at p_cached_instructions() in inc/parserutils.php. This function turns a wiki page into an associative array of instructions for the parser. You can use this array then to parse/search for specific sections of the page (hint: use along with wikiFN() to get the $file parameter).
HTH
merlin
Thank you, it's even better than I thought, passing alredy parsed content to me.
merlin
It's working, but sometimes p_cached_instructions() returns empty array. After browser refresh, all is ok.
The page wasn't changed and cache wasn't cleared, and I think it wasn't expired (or expiration time is less than three hours?).
Anyway, the function is described as "Returns the render instructions for a file, Uses and creates a serialized cache file", so it should return filled array even if cached version isn't found.
Each time, all data passed there are the same.
Also, I noticed that it happens only on the Road2Web hosting, and works fine on my home server.