I want to add a Navbar link for "My Recent Posts" like in the Mod Add "My Started Topics" Navigation Bar Menu Item. So I took a look at the link in the user dropdown menu at the top of the page. The JSON search string would be like
The next thing I did was decoding URI with this result
In "authorid":["2"] "2" is my actual userid. I understood that this has to be dynamically changed to the calling userid on click on the Navbar link.
So my idea was to use the onclick from the mod Add "My Started Topics" Navigation Bar
and to change it for the use of the actual userid. This the point where Í got stuck. How can I determine and reference the actual userid? Can I derive it from the username and if yes, how?
Ideas anybody?
Thanks in avdance.
Code:
searchJSON=%7B%22authorid%22%3A%5B%222%22%5D%2C%22view%22%3A%22topic%22%2C%22channel%22%3A%222%22%2C %22exclude_type%22%3A%5B%22vBForum_PrivateMessage% 22%5D%2C%22sort%22%3A%7B%22lastcontent%22%3A%22des c%22%7D%7D
Code:
{"authorid":["2"],"view":"topic","channel":"2","exclude_type":["vBForum_PrivateMessage"],"sort":{"lastcontent":"desc"}}
So my idea was to use the onclick from the mod Add "My Started Topics" Navigation Bar
Code:
onclick="this.href=this.href.replace('*username*', encodeURIComponent(pageData.username))" oncontextmenu="this.href=this.href.replace('*username*', encodeURIComponent(pageData.username))"
Ideas anybody?
Thanks in avdance.




Comment