Skip to content

Conversation

@kii-chan-reloaded
Copy link

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.

Copy link
Owner

@zioth zioth left a 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'] = '';
Copy link
Owner

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.

Comment on lines +31 to +33
if (empty($points)) {
$points = ".*";
}
Copy link
Owner

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.

@kii-chan-reloaded
Copy link
Author

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!

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