Да хоть гист сделай
плагин нагляднее, там сразу целиком показать можно.
А если код то вот он такой простой.
public function onAfterInitialise()
{
if ($this->app->isClient('site'))
{
$uri = Uri::getInstance();
$params = ComponentHelper::getParams('com_jatoms');
$path = $uri->getPath();
$root = Uri::root(true);
$entry = $root . '/' . $params->get('connect_entry', 'com_jatoms');
if (preg_match('#^' . $entry . '#', $path))
{
list($token, $method) = explode('/',
trim(str_replace($entry, '', $path), '/'), 2);
$uri->setPath($root);
$uri->setVar('option', 'com_jatoms');
$uri->setVar('task', 'connect.' . $method);
$uri->setVar('token', $token);
}
}
}