Topic on Extension talk:BedellPenDragon

Leucosticte (talkcontribs)

With reference to this edit, I don't think the RefCallback hook exists yet. If memory serves, I tried modifying Extension:Cite's Cite_body.php to add that hook, but couldn't get it to do what I wanted, which was to cause <ref> and </ref> tags, and everything in between them, to render as blank when Extension:BedellPenDragon's BedellPenDragon::renderGetBpdProp was in the process of doing a $parser->recursiveTagParse() on the page_props.pp_value. My goal was to make it so that users could include references in those values, like this:

{{PageSummary|'''[[Non-monogamy]]''' is a blanket term which covers several types of [[interpersonal relationship]]s in which an individual forms multiple and simultaneous [[Human sexuality|sexual]] or [[Romantic love|romantic]] bonds.<ref>[http://www.cat-and-dragon.com/stef/poly/Labriola/nonmonog.html Are you open to an alternative lifestyle?]</ref> |This can be contrasted with its opposite, [[monogamy]], and yet may arise from the same [[Psychology of sexual monogamy|psychology]].<ref>[http://www.routledge.com/books/Understanding-Non-Monogamies-ISBN 978-0-415-80055-6 Barker, Langdridge. 2009. Understanding Non-Monogamies. Routledge]</ref> The term has been criticized as it may evoke to imply that monogamy is the norm and that any other way of relating is somehow a deviation of that norm.}}

without having Template:New articles at PolyWiki‎ do this (see the "non-monogamy" item):

For an explanation of Template:PageSummary and Template:New articles at PolyWiki‎, see Extension:BedellPenDragon#.22New_Pages.22_or_.22Did_You_Know.22_descriptions_via_metadata_from_the_pages_themselves_.28requires_RecentPages_extension.29. I've filed this glitch as bugzilla:56404. Thanks.

Leucosticte (talkcontribs)

Right off the bat I see there's a problem here:

                        $wgBedellPenDragonDisableRef = true;
                        if ( $raw ) {
                                return $prop;
                        }
                        $parsed = $parser->recursiveTagParse ( $prop );
                        return $parsed;
                        $wgBedellPenDragonDisableRef = false;

It's going to be hard for it to make $wgBedellPenDragonDisableRef be false after it's already returned from the function; the order of those last two lines should be reversed. I'll keep playing around with it.

Kghbln (talkcontribs)

Well, admittedly I just looked at the calls to hooks within the code and added the RefCallback to the extension's infobox. I did not investigate further into this. Since quite a number of hooks do not seem to be documented on this wiki, the absence of it does not provide certainty in this respect. However, I am sorry in case I have caused confusion here.

Leucosticte (talkcontribs)

Oh, it's no big deal. Maybe before too long, it will exist. Perhaps if I'm going to post code that has hook functions that don't work, I should put a comment indicating that next time; then there won't be confusion. Probably no one else stumbled upon the page and got confused anyway; it's kind of an obscure extension.

Leucosticte (talkcontribs)
Leucosticte (talkcontribs)

Oh wait, no, it's not fixed.

Leucosticte (talkcontribs)
Fixed

Okay, now it's fixed by the adding of BedellPenDragon::stripRefTags(). It turns out that even disabling Cite entirely didn't solve the problem.

Reply to "RefCallback hook"