If your add-on's content is not stored in forums or in wiki areas, you will need to extend
src/addons/vw/vw/_core/model/autolink/xf2.php in order for the content to render autolinks. (see comments in
src/addons/vw/vw/_hard/core.php resolve_class_name if you have never extended VaultWiki's core classes before)
In the detect_by_item method, you use the current parser to detect what content is being parsed. If the content is from your add-on, you should return either:
- a string like 'myaddon', if the content has autolinks enabled (this allows tweaking for each content if you wish, depending on whatever rules you want to set)
- false, if that content has autolinks disabled
If the content is not from your add-on, you should return the parent method.
In the more_checkboxes method, you should add your 'myaddon' string to the $boxes return value. You can then enable autolinking in your content-type overall in the same VaultWiki setting "Enable auto-links to wiki content"
The way this works is:
1. The parser looks at the current content being parsed and using detect_by_item to see what autolink rule that content follows (the returned string).
2. The parser then checks whether that autolink rule is enabled/disabled, by comparing it to the ticked checkboxes.
3. If all goes well, the autolinker should start finding strings in your content and linking to the appropriate wiki content.