PreFiX
Member
Code:
<?php
class prefixaddon_Route_Prefix_Public implements XenForo_Route_Interface
{
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
{
$action = $router->resolveActionWithStringParam($routePath, $request, 'string_id');
$action = $router->resolveActionAsPageNumber($action, $request);
$actions = explode('/', $action);
switch ($actions[0])
{
case 'informacija': $controller = 'Informacija'; break;
default: $controller = 'Pagrindinis';
}
return $router->getRouteMatch('prefixaddon_ControllerPublic_'.$controller, $action, 'paslaugos');
}
public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{
$actions = explode('/', $action);
switch ($actions[0])
{
case 'serveris': $intParams = 'serveris_id'; $strParams = 'serveris_url'; break;
case 'paslauga': $intParams = 'paslauga_id'; $strParams = 'paslauga_url'; break;
}
$action = XenForo_Link::getPageNumberAsAction($action, $extraParams);
if ($intParams)
{
return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, $intParams, $strParams);
}
else
{
return XenForo_Link::buildBasicLinkWithStringParam($outputPrefix, $action, $extension, $data, $strParams);
}
}
}
But I don't understand how do I should use $_GET["anything"] on xenforo any help?
with link like http://example.com/Controller/Something.Value
http://example.com/Controller/Something.Value/AnotherString.AnotherValue