Example #1
1
 /**
  *
  * @see XenForo_Route_PrefixAdmin_AddOns::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $parts = explode('/', $routePath, 3);
     switch ($parts[0]) {
         case 'languages':
             $parts = array_slice($parts, 1);
             $routePath = implode('/', $parts);
             $action = $router->resolveActionWithIntegerParam($routePath, $request, 'language_id');
             return $router->getRouteMatch('XenForo_ControllerAdmin_Language', $action, 'languages');
         case 'phrases':
             $parts = array_slice($parts, 1);
             $routePath = implode('/', $parts);
             return $router->getRouteMatch('XenForo_ControllerAdmin_Phrase', $routePath, 'phrases');
     }
     if (count($parts) > 1) {
         switch ($parts[1]) {
             case 'languages':
                 $action = $router->resolveActionWithStringParam($routePath, $request, 'addon_id');
                 $parts = array_slice($parts, 2);
                 $routePath = implode('/', $parts);
                 $action = $router->resolveActionWithIntegerParam($routePath, $request, 'language_id');
                 return $router->getRouteMatch('XenForo_ControllerAdmin_Language', $action, 'languages');
             case 'phrases':
                 $action = $router->resolveActionWithStringParam($routePath, $request, 'addon_id');
                 $parts = array_slice($parts, 2);
                 $routePath = implode('/', $parts);
                 return $router->getRouteMatch('XenForo_ControllerAdmin_Phrase', $routePath, 'phrases');
         }
     }
     return parent::match($routePath, $request, $router);
 }
Example #2
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     if (preg_match('#^action/(.*)$#i', $routePath, $match)) {
         $action = 'action' . $router->resolveActionWithIntegerParam($match[1], $request, 'warning_action_id');
     } else {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'warning_definition_id');
     }
     return $router->getRouteMatch('XenForo_ControllerAdmin_Warning', $action, 'userWarnings');
 }
Example #3
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $parts = explode('/', $routePath, 2);
     $action = $parts[0];
     if (isset($parts[1])) {
         switch ($action) {
             case 'super':
                 $action .= $router->resolveActionWithIntegerParam($parts[1], $request, 'user_id');
                 break;
             case 'content':
                 $action .= $router->resolveActionWithIntegerParam($parts[1], $request, 'moderator_id');
                 break;
         }
     }
     return $router->getRouteMatch('XenForo_ControllerAdmin_Moderator', $action, 'moderators');
 }
Example #4
0
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'id');
     $routeMatch = $router->getRouteMatch('Dark_TaigaChat_ControllerPublic_TaigaChat', $action, 'taigachat', $routePath);
     //$routeMatch->setResponseType('jsonText');
     return $routeMatch;
 }
Example #5
0
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $components = explode('/', $routePath);
     $subPrefix = strtolower(array_shift($components));
     $controllerName = '';
     $action = '';
     $intParams = 'page_id';
     $strParams = '';
     $slice = false;
     switch ($subPrefix) {
         case 'special':
             if (!empty($components[1]) && ($components[0] == 'edit-template' || $components[0] == 'delete-template')) {
                 unset($components[1]);
             }
             $controllerName = '_Special';
             $slice = true;
             break;
         case 'archive':
             $controllerName = '_Archive';
             $intParams = 'history_id';
             $slice = true;
             break;
         default:
             $strParams = 'page_slug';
     }
     $routePathAction = implode('/', array_slice($slice ? $components : explode('/', $routePath), 0, 2)) . '/';
     $routePathAction = str_replace('//', '/', $routePathAction);
     if ($strParams) {
         $action = $router->resolveActionWithStringParam($routePathAction, $request, $strParams);
     } else {
         $action = $router->resolveActionWithIntegerParam($routePathAction, $request, $intParams);
     }
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('EWRcarta_ControllerPublic_Wiki' . $controllerName, $action, 'wiki', $routePath);
 }
Example #6
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     if (preg_match('#^auto/(.*)$#i', $routePath, $match)) {
         $action = 'auto' . $router->resolveActionWithIntegerParam($match[1], $request, 'auto_warning_id');
         return $router->getRouteMatch('XenForo_ControllerAdmin_Warning', $action, 'userWarnings');
     }
     return parent::match($routePath, $request, $router);
 }
Example #7
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'profile_post_id');
     }
     return $router->getRouteMatch('XenForo_ControllerPublic_ProfilePost', $action, 'members');
 }
Example #8
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $controller = 'ThreePointStudio_CustomMarkupForUser_ControllerAdmin_CMFU';
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'preset_id');
     }
     return $router->getRouteMatch($controller, $action, 'users', '3ps-cmfu/');
 }
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'node_id');
     if (!class_exists('XFCP_ThemeHouse_SocialGroups_ControllerAdmin_SocialCategory', false)) {
         $createClass = XenForo_Application::resolveDynamicClass('XenForo_ControllerAdmin_Forum', 'controller');
         eval('class XFCP_ThemeHouse_SocialGroups_ControllerAdmin_SocialCategory extends ' . $createClass . ' {}');
     }
     return $router->getRouteMatch('ThemeHouse_SocialGroups_ControllerAdmin_SocialCategory', $action, 'nodeTree');
 }
Example #10
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $controller = 'XenGallery_ControllerPublic_Redirects_XenMedio';
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action == false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'media_id');
     }
     return $router->getRouteMatch($controller, $action);
 }
Example #11
0
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     if (in_array($routePath, array('add', 'save'))) {
         $action = $routePath;
     } else {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'log_id');
     }
     return $router->getRouteMatch('bdApi_ControllerAdmin_Log', $action, 'bdApi');
 }
Example #12
0
 /**
  * @param $routePath
  * @param Zend_Controller_Request_Http $request
  * @param XenForo_Router $router
  * @return false|XenForo_RouteMatch
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $controller = 'sonnb_XenGallery_ControllerAdmin_XenGallery';
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, '');
     }
     return $router->getRouteMatch($controller, $action, 'sonnb_xengallery');
 }
Example #13
0
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'tag_id');
     $majorSection = 'Tinhte_XenTag_Tag';
     if (empty($action) or strtolower($action) == 'index') {
         $majorSection = 'threadsPosts';
     }
     return $router->getRouteMatch('Tinhte_XenTag_ControllerAdmin_Tag', $action, $majorSection);
 }
Example #14
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $controller = 'XenResource_ControllerPublic_Resource';
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'resource_id');
     }
     return $router->getRouteMatch($controller, $action, 'resources');
 }
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $subcomponents = $this->_getSubcomponents();
     $defaultController = $subcomponents['categories']['controller'];
     $action = $router->getSubComponentAction($subcomponents, $routePath, $request, $defaultController);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, 'portalItem_id');
     }
     return $router->getRouteMatch($defaultController, $action, 'portal');
 }
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $routePath = trim($routePath, '/');
     $parts = explode('/', $routePath);
     @(list($id, $action) = $parts);
     $field = $this->getField($action);
     $action = $router->resolveActionWithIntegerParam($routePath, $request, $field[0]);
     $param = '';
     return $router->getRouteMatch('XenGallery_ControllerPublic_Redirects_XFRUserAlbums', $action);
 }
Example #17
0
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'profile_post_id');
     $prefixComments = sprintf('%s/', self::PREFIX_COMMENTS);
     if (strpos($action, $prefixComments) === 0) {
         $request->setParam(self::PARAM_COMMENT_ID, intval(substr($action, strlen($prefixComments))));
         $action = self::PREFIX_COMMENTS;
     }
     return $router->getRouteMatch('bdApi_ControllerApi_ProfilePost', $action);
 }
Example #18
0
 public function match($routePath, \Zend_Controller_Request_Http $request, \XenForo_Router $router)
 {
     if (is_null($this->_controller)) {
         throw new \XenForo_Exception(get_class($this) . ' must define $_controller or overwrite match');
     }
     $action = $routePath;
     if (!is_null($this->_getKey())) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, $this->_getKey());
     }
     return $router->getRouteMatch($this->_controller, $action, $this->_parent);
 }
Example #19
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $components = explode('/', $routePath);
     //$type           = $components[0];
     //$action         = isset( $components[1] ) ? $components[1] : '';
     $controller = 'GeekListings_ControllerAdmin_' . ucfirst($components[0]);
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $action = $router->resolveActionWithIntegerParam($routePath, $request, '');
     }
     return $router->getRouteMatch($controller, $action, 'geeklistings');
 }
Example #20
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $routePath;
     $parts = explode('/', $routePath, 2);
     if (count($parts) == 2) {
         switch ($parts[0]) {
             case 'users':
                 $action = 'users' . $router->resolveActionWithIntegerParam($parts[1], $request, 'user_id');
                 break;
         }
     }
     return $router->getRouteMatch('XenForo_ControllerAdmin_Banning', $action, 'banning');
 }
Example #21
0
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $components = explode('/', $routePath);
     $subPrefix = strtolower(array_shift($components));
     $subSplits = explode('.', $subPrefix);
     $controllerName = '';
     $action = '';
     $intParams = 'event_id';
     $strParams = '';
     $slice = false;
     switch ($subPrefix) {
         case 'monthly':
             $controllerName = '_Monthly';
             $strParams = 'date_select';
             $slice = true;
             break;
         case 'weekly':
             $controllerName = '_Weekly';
             $strParams = 'date_select';
             $slice = true;
             break;
         case 'daily':
             $controllerName = '_Daily';
             $strParams = 'date_select';
             $slice = true;
             break;
         case 'birthdays':
             $controllerName = '_Birthdays';
             $strParams = 'date_select';
             $slice = true;
             break;
         default:
             if (is_numeric(end($subSplits))) {
                 $controllerName = '_Event';
             }
     }
     $routePathAction = ($slice ? implode('/', array_slice($components, 0, 2)) : $routePath) . '/';
     $routePathAction = str_replace('//', '/', $routePathAction);
     $routePathAction = preg_replace('#create/\\d+#i', 'create/', $routePathAction);
     if ($strParams) {
         $action = $router->resolveActionWithStringParam($routePathAction, $request, $strParams);
     } elseif ($intParams) {
         $action = $router->resolveActionWithIntegerParam($routePathAction, $request, $intParams);
     }
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('EWRatendo_ControllerPublic_Events' . $controllerName, $action, 'events', $routePath);
 }
Example #22
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $controller = '';
     $action = $router->resolveActionWithStringParam($routePath, $request, 'game_title');
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'game_id');
     $actions = array_filter(explode('/', $action));
     switch (count($actions)) {
         case 4:
             $controller = '_Field';
             $request->setParam('profile_id', intval($actions[1]));
             $request->setParam('field_id', intval($actions[3]));
             $action = 'index';
             break;
         case 3:
             $controller = '_Field';
             $request->setParam('profile_id', intval($actions[1]));
             $action = 'index';
             break;
         case 2:
             if ($actions[0] == 'profiles') {
                 $controller = '_Profile';
                 $request->setParam('profile_id', intval($actions[1]));
             }
             if ($actions[0] == 'users') {
                 $controller = '_User';
                 $request->setParam('user_id', intval($actions[1]));
             }
             $action = 'edit';
             break;
         case 1:
             if ($actions[0] == 'profiles') {
                 $controller = '_Profile';
                 $action = 'index';
             } else {
                 if ($actions[0] == 'users') {
                     $controller = '_User';
                     $action = 'index';
                 }
             }
             break;
         default:
             $action = 'index';
     }
     return $router->getRouteMatch('autocraft_ControllerAdmin_Game' . $controller, $action, 'autocraft');
 }
Example #23
0
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $controller = 'Nobita_Teams_ControllerPublic_Team';
     $action = $router->getSubComponentAction($this->_subComponents, $routePath, $request, $controller);
     if ($action === false) {
         $parts = explode('/', $routePath);
         $customUrl = reset($parts);
         $customUrl = str_replace('-', '', $customUrl);
         $customUrl = strtolower($customUrl);
         if (in_array($customUrl, Nobita_Teams_Blacklist::$blacklist)) {
             // sytem action filter out
             $action = $router->resolveActionWithIntegerParam($routePath, $request, 'team_id');
         } else {
             $action = $router->resolveActionWithIntegerOrStringParam($routePath, $request, 'team_id', 'custom_url');
         }
         $action = $router->resolveActionAsPageNumber($action, $request);
     }
     return $router->getRouteMatch($controller, $action, TEAM_ROUTE_ACTION);
 }
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $parts = explode('/', $routePath, 2);
     $action = $parts[0];
     if (isset($parts[1])) {
         switch ($action) {
             case 'games':
                 $action .= $router->resolveActionWithIntegerParam($parts[1], $request, 'game_id');
                 break;
         }
     }
     return $router->getRouteMatch("Steam_ControllerAdmin_Steam", $action, 'steam');
     /**
     $subPrefix = strtolower(array_shift($urlComponents));
     
     $controllerName = 'Steam_ControllerAdmin_Steam';
     $routeName = "steam";
     
     //$action = $router->resolveActionWithIntegerParam($routePath, $request, 'garage_id');
     return $router->getRouteMatch($controllerName, $subPrefix, $routeName, $routePath);
     */
 }
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'id');
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('ThemeHouse_SocialUGroups_ControllerPublic_SocialUserGroups', $action, 'forum');
 }
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'promotion_id');
     return $router->getRouteMatch('XenForo_ControllerAdmin_UserGroupPromotion', $action, 'userGroupPromotions');
 }
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'paid_content_id');
     $action = $router->resolveActionAsPageNumber($action, $request);
     return $router->getRouteMatch('ThemeHouse_PayForContent_ControllerAdmin_PaidContent', $action, 'paidContent');
 }
Example #28
0
 /**
  * Match a specific route for an already matched prefix.
  *
  * @see XenForo_Route_Interface::match()
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'post_id');
     return $router->getRouteMatch('XenForo_ControllerPublic_Post', $action, 'forums');
 }
Example #29
0
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'subscription_id');
     return $router->getRouteMatch('bdApi_ControllerAdmin_Subscription', $action, 'bdApi');
 }
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     $action = $router->resolveActionWithIntegerParam($routePath, $request, 'widget_id');
     return $router->getRouteMatch('WidgetFramework_ControllerAdmin_Widget', $action, 'widgetFramework');
 }