Earl
Well-known member
i checked in the Xenforo core code in match method of "XenForo_Route_Prefix_Members" class has
return $router->getRouteMatch('XenForo_ControllerPublic_Member', $action, 'members');
but XenForo_Route_Prefix_Attachments doesn't have "attachments" in it.
return $router->getRouteMatch('XenForo_ControllerPublic_Attachment', $action);
And i found a guide but there is a small problem
this is directly from @Jaxel 's tutorial
https://xenforo.com/community/resources/jaxels-method-for-creating-a-route-controller.1637/
in the example at admincp
and in 2nd part of the example
EWRrio\Route\Streams.php
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
{
$action = $router->resolveActionWithStringParam($routePath, $request, 'string_id');
$action = $router->resolveActionWithIntegerParam($routePath, $request, 'action_id');
$action = $router->resolveActionAsPageNumber($action, $request);
return $router->getRouteMatch('EWRrio_ControllerPublic_Streams', $action, 'streams');
}
according to 1st part of the tutorial the "streams" is the major route, but in the 2nd part "streams" appear after the $action. why appear in two places?
return $router->getRouteMatch('XenForo_ControllerPublic_Member', $action, 'members');
but XenForo_Route_Prefix_Attachments doesn't have "attachments" in it.
return $router->getRouteMatch('XenForo_ControllerPublic_Attachment', $action);
And i found a guide but there is a small problem
this is directly from @Jaxel 's tutorial
https://xenforo.com/community/resources/jaxels-method-for-creating-a-route-controller.1637/
in the example at admincp
and in 2nd part of the example
EWRrio\Route\Streams.php
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
{
$action = $router->resolveActionWithStringParam($routePath, $request, 'string_id');
$action = $router->resolveActionWithIntegerParam($routePath, $request, 'action_id');
$action = $router->resolveActionAsPageNumber($action, $request);
return $router->getRouteMatch('EWRrio_ControllerPublic_Streams', $action, 'streams');
}
according to 1st part of the tutorial the "streams" is the major route, but in the 2nd part "streams" appear after the $action. why appear in two places?
Last edited: