Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove "Edit section" button #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Cyrille37
Copy link

@Cyrille37 Cyrille37 commented Jan 6, 2019

Small update :

  • Remove the "Edit section" button on each Letter section
  • by that way, it solves too the preg_replace() "/e" modifier that was removed since Php7.x release

Let me know
Thanks & Cheers

@michitux
Copy link
Collaborator

michitux commented Jan 6, 2019

It would be much cleaner to use the HTML_SECEDIT_BUTTON-event for this. A possibility would be to trigger "fake" sections before and after the plugin and use them to register when to start/stop preventing the default action of that event. Have a look at the include plugin for an example how to use such "fake" sections.

@Cyrille37
Copy link
Author

@michitux Ok, I have a try ...

@Cyrille37
Copy link
Author

Cyrille37 commented Jan 6, 2019

I've read some doc but it's to hard for me, sorry, I do not find how to do.

My patch is simple and make alphainfex working with DW release 2018-04-22b "Greebo". Without this fixe the plugin stopped to work. Perhaps you can merge it and create an issue to optimize the fixe later ?

Thanks & Cheers

@Cyrille37
Copy link
Author

There is an alternative, found at https://www.dokuwiki.org/plugin:alphaindex:discussion : it changes the $conf['maxtoclevel'] before calling p_render(), then restore this global configuration value.

@Cyrille37
Copy link
Author

New push with the use of $conf['maxtoclevel'] hack. It is more efficient, no more regex replacement.

@Cyrille37
Copy link
Author

New push that use $conf['maxtoclevel'] hack to do not display index entries in TOC. Should be an option ~TODO ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants