In the secondary navigation there is a Upload a new file' link that I would like to remove. Is this possible?
In the secondary navigation there is a Upload a new file' link that I would like to remove. Is this possible?
Since XenForo does not have a Navigation Manager in 1.x, you would use the code-event that we've provided for this.
Code Event: vw_nav_links
Arguments: &$links, &$show_links
Then clear the wiki cache by running this MySQL query:Code:if (isset($links['sub'])) { unset($links['sub']['newattach']; } else { unset($links['wiki_new_attach']); }
Code:TRUNCATE TABLE vw_cache
- lead developer for VaultWiki
This doesn't seem to match with the xenforo interface.
Do I need to add a code event or a code event listener?
Please explain which steps to take. Or consider to add a style property or setting for this.
Create a code event listener that listens to the code-event mentioned above. The callback for your listener should invoke the code given above.
- lead developer for VaultWiki
What do I enter here:
Event Hint:
Execute Callback:
Where and How do I add the callback?
Since you are using the listener directly and not proxying a class, this is the same process as creating any XenForo listener.
1. Create a class like MyAddon_MyClass in the directory library/MyAddon/MyClass.php
2. Add a method (myListener) to that class with the callback signature specified by the XF listener page. (This method should invoke the code provided earlier in some way).
3. For execute callback, you would enter MyAddon_MyClass :: myListener
4. Associate it with the addon MyAddon.
Generally, if the description doesn't say what will be used as a hint, you don't need an event hint. vw_nav_links doesn't use hinting.
- lead developer for VaultWiki
Bookmarks