• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

What's the bigger sin?

Marcus

Well-known member
#1
This is worrying me. Completely overwriting a 50 line ControllerPublic action function or fetching a value from $_GET in the model?

I can do either way :)
 

Marcus

Well-known member
#3
I added a &parameter=x to threads in thread_list. I have to access them on thread_view. It's possible with threads links, but not with threads/unread as this function redirects before I can hook in.
 

Marcus

Well-known member
#6
I would have to set ("current_node_id") each time a user visits a node. Do you think it's okay to do that or it's kind of overkill? Or is using a &node_id parameter in the URL which works great now not more common?

I would have to access the simple cache or data registry also in the model. Is that okay?

I am completely open for ideas.

Isn't there already a registry where users are at the moment "Marcus A is visiting the Announcement forum"? I could fetch the node_id value from there. Is that data stored as if the user continues going to different thread pages the former node_id data has to be accessible, too.
 

JulianD

Well-known member
#7
You could try and extend XenForo_ControllerPublic_Thread. Capture the response from actionUnread() and add an additional parameter like (see the array('page') part):

Code:
                        return $this->responseRedirect(
                                XenForo_ControllerResponse_Redirect::RESOURCE_CANONICAL,
                                XenForo_Link::buildPublicLink('threads', $thread, array('page' => $page)) . $hashTag
                        );
I haven't tested this yet. I just looked through the code and I thought this could be accomplished.