EX-Talk

Summary: Talk page for EX.
Maintainer: Petko
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

No edit link for first section

Trying this recipe for the first time. I notice that I get no edit link for the first section, if there is no text or no anchor before the first heading. The first edit link will then appear for the second section, but will open the first section for editing, and the next edit link will open the previous section etc. - HansB

Can you make a page where I could experience this? For testing purposes, you can enable (or disable) the recipe on pmwiki.org, then organize a page so that I can review it. --Petko

Okay, I re-read your message and made such a page. Thanks, bug confirmed, to do. --Petko

Released version 20230312 which fixes this case, and possibly others. PmWiki adds a (:groupheader:) markup at the start which didn't match the expected pattern for headings. Similarly, a (:nl:) markup could cause this, now fixed. One case that was not fixed is when there is a PTV on the same line before the heading, as in (:PTV:Value:)!!Heading. Not sure how to fix this. --Petko

Okay, there may be rare cases with some markup on the same line before the heading, where it wouldn't work, but it becomes very complex to catch all these cases. Added to EX#known_issues, I'll see if something can be done to improve this. Not sure if SectionEdit handles these correctly. --Petko

Thank you Petko! I like this recipe! - HansB


Edit links to appear only to editors

A request: can the edit links be hidden when a user has no edit authorisation? - HansB Well, I can just load the recipe conditionally:

if (CondAuth($pagename,'edit'))
  include_once("$FarmD/cookbook/ex.php");

If you do this, read LocalCustomizations#configphp-order and see the note for CondAuth(). Or wait a few hours for 20230313, I'll be adding a variable $EnableAuthLinksEX that will do this correctly. --Petko

Talk page for the EX recipe (users?).