R
ragtek
Guest
Hi, i'm working on my invite Add-on.
The add-on sends a mail to the invited user with a register link.
Now i need a extraparam for this=> invitecode = $foo
I'm not sure how i can implement this.
The router doesn't accept params.
and if i make something like: http://localhost/xf/upload/register/register/invitecode/daniel
i'm getting an error that the action The controller XenForo_ControllerPublic_Register does not define an action called RegisterInvitecodeDaniel. doesn't exist.
I tried to overwrite the register router:
but that's also not working.
Is this possible?
The add-on sends a mail to the invited user with a register link.
Now i need a extraparam for this=> invitecode = $foo
I'm not sure how i can implement this.
The router doesn't accept params.
PHP:
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
{
return $router->getRouteMatch('XenForo_ControllerPublic_Register', $routePath);
}
i'm getting an error that the action The controller XenForo_ControllerPublic_Register does not define an action called RegisterInvitecodeDaniel. doesn't exist.
I tried to overwrite the register router:
PHP:
class Ragtek_Invite_Route_Prefix_Register implements XenForo_Route_Interface{
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
{
$request->setParam('invitecode', basename($routePath));
return $router->getRouteMatch('XenForo_ControllerPublic_Register', $routePath);
}
}
Is this possible?