-
Notifications
You must be signed in to change notification settings - Fork 5
Link destination filter #10
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
base: master
Are you sure you want to change the base?
Link destination filter #10
Conversation
zioth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a couple of minor suggestions, but I think this is a useful feature. I'll try to merge it in soon (with name changes, if you don't make the change yourself).
| $conf['delay'] = 0; | ||
| $conf['linkall_inclusions'] = ''; | ||
| $conf['linkall_exclusions'] = ''; | ||
| $conf['linkall_points_to'] = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably call this linkall_target_inclusions, and create a linkall_target_exclusions to match.
| if (empty($points)) { | ||
| $points = ".*"; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be more efficient to leave this empty, and test empty() in internallink, rather than force an extra regex test every time.
|
Feel free to do as you like with it! I'm not overly familiar with PHP nor how the DokuWiki rendering system works, so I assumed what I had submitted wouldn't be the perfect solution. I had something that worked, though, so I figured I'd at least share the concept. Thanks for all the work you've put into this plugin! It's very convenient! |
This is a little hack I did to make the renderer only render tooltips that point to specific destinations. As an example of why this functionality might be desired, I needed this so that only links to a page in my wiki's "dictionary" namespace would render a tooltip.