Add "My Started Topics" navigation bar menu item that will display search results containing all the started posts of the currently logged-in user.
Demo:
I've added "My Started Topics" link in the navigation bar on this site. Click on it to see your started posts. It also works if you right-click and choose Open link in new tab.
- Login to your forum.
- Toggle Edit Site slider to ON.
- Click Navigation Bar.
- Click New Navigation Item button.
- Enter Navigation Item Name (e.g. My Started Topics)
- Enter this search JSON URL in the Target URL field.
This search JSON URL contains the *username* placeholder which will be replaced with the currently logged-in username when the user clicks the navigation link.
Code:search?searchJSON=%7B%22starter_only%22%3A1%2C%22author%22%3A%5B%22*username*%22%5D%2C%22channel%22%3A%5B%5D%2C%22sort%22%3A%7B%22created%22%3A%22desc%22%7D%2C%22view%22%3A%22%22%2C%22exclude_type%22%3A%5B%22vBForum_PrivateMessage%22%5D%7D
- Enter this Javascript code in the Link Attributes field.
Code:onclick="this.href=this.href.replace('*username*', encodeURIComponent(pageData.username))" oncontextmenu="this.href=this.href.replace('*username*', encodeURIComponent(pageData.username))"
- Edit User Groups to specify which usergroups can view this navigation link. Since guests don't have any posts, it's recommended to uncheck "Guest Users" usergroup to hide this link to guests. You may also exclude other usergroups that you want to restrict this link to.
- [Optional[ Drag and drop item to re-order in the desired location.
- Click OK button.
- Click Save Changes.
Demo:
I've added "My Started Topics" link in the navigation bar on this site. Click on it to see your started posts. It also works if you right-click and choose Open link in new tab.
Comment