XF 2.0 Duplicate position in xf_post causes my add-on to show error

We're sort of back to square one with that. The main question is how are you subsequently using the $threadId variable?
 
We're sort of back to square one with that. The main question is how are you subsequently using the $threadId variable?

Hey Chris I have a quick question regarding "view reply controllers". I see this thread is regarding that so I wanted to grab your attention real quick.

I've been going through the dev docs all night and I got everything down and it actually is fairly easier than I thought it would be but I'm having an issue with getting a controller to work for a template modification. I'm trying to create a "Most users ever online" add-on and what I did was edit widget_members_online with a template modification to simply add 2 params under the users online module. Those being the text "Most Users Ever Online" and another param being the number of users (that I plan to continue back-end functionality for later).

I'm following this tutorial:

https://xenforo.com/xf2-docs/dev/controller-basics/#view-reply

Anyways the tutorial shows {$hello} and {$world}. Mine is similar and has the 2 params in the template that look just like that right under the users online widget.

What I can't get from the dev docs that I'm forced into asking about specific to "view reply" is what class do you extend for view reply? It shows the function in the link I just gave you but says nothing about the class to extend or "use" directives. If you continue down to the bottom is explains how to properly extend a controller class and I get all that but because mine is based around a template edit I believe "view reply" is correct and not extending a pre-existing controller class. Personally I just don't know which class to extend for "view reply" and what "use" directives I need as it doesn't say at all and only shows the function.

That was the one thing I couldn't find examples for as far as what class to extend. Everything else seemed right on point with explanations and I think I've learned a good bit of it.

Thanks if you can help.
 
@Chris D I didn't mean to make it sound all complicated. Just wondering what class to extend for the "view reply controller" or if I need to extend one at all and if you would suggest any "use" directives for it. As it didn't say.
 
Top Bottom