• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP XenForo_Link类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中XenForo_Link的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_Link类的具体用法?PHP XenForo_Link怎么用?PHP XenForo_Link使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了XenForo_Link类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: autoTag

 /**
  * Inserts tag links into an HTML-formatted text.
  *
  * @param string $html
  * @param array $tags
  * @param array $options
  * @return string
  */
 public static function autoTag($html, array $tags, array &$options = array())
 {
     if (empty($tags)) {
         return $html;
     }
     $html = strval($html);
     $htmlNullified = utf8_strtolower($html);
     $htmlNullified = preg_replace_callback('#<a[^>]+>.+?</a>#', array(__CLASS__, '_autoTag_nullifyHtmlCallback'), $htmlNullified);
     $htmlNullified = preg_replace_callback('#<[^>]+>#', array(__CLASS__, '_autoTag_nullifyHtmlCallback'), $htmlNullified);
     // prepare the options
     $onceOnly = empty($options['onceOnly']) ? false : true;
     $options['autoTagged'] = array();
     // reset this
     // sort tags with the longest one first
     // since 1.0.3
     usort($tags, array(__CLASS__, '_autoTag_sortTagsByLength'));
     foreach ($tags as $tag) {
         $offset = 0;
         $tagText = utf8_strtolower($tag['tag']);
         $tagLength = utf8_strlen($tagText);
         while (true) {
             $pos = utf8_strpos($htmlNullified, $tagText, $offset);
             if ($pos !== false) {
                 // the tag has been found
                 if (self::_autoTag_hasValidCharacterAround($html, $pos, $tagText)) {
                     // and it has good surrounding characters
                     // start replacing
                     $displayText = utf8_substr($html, $pos, $tagLength);
                     $template = new XenForo_Template_Public('tinhte_xentag_bb_code_tag_tag');
                     $template->setParam('tag', $tag);
                     $template->setParam('displayText', $displayText);
                     $replacement = $template->render();
                     if (strlen($replacement) === 0) {
                         // in case template system hasn't been initialized
                         $replacement = sprintf('<a href="%s">%s</a>', XenForo_Link::buildPublicLink('tags', $tag), $displayText);
                     }
                     $html = utf8_substr_replace($html, $replacement, $pos, $tagLength);
                     $htmlNullified = utf8_substr_replace($htmlNullified, str_repeat('_', utf8_strlen($replacement)), $pos, $tagLength);
                     // sondh@2012-09-20
                     // keep track of the auto tagged tags
                     $options['autoTagged'][$tagText][$pos] = $replacement;
                     $offset = $pos + utf8_strlen($replacement);
                     if ($onceOnly) {
                         // auto link only once per tag
                         // break the loop now
                         break;
                         // while (true)
                     }
                 } else {
                     $offset = $pos + $tagLength;
                 }
             } else {
                 // no match has been found, stop working with this tag
                 break;
                 // while (true)
             }
         }
     }
     return $html;
 }
开发者ID:maitandat1507,项目名称:Tinhte_XenTag,代码行数:68,代码来源:Integration.php


示例2: actionPromote

 public function actionPromote()
 {
     if (!$this->perms['promote']) {
         return $this->responseNoPermission();
     }
     $input = $this->_input->filter(array('thread_id' => XenForo_Input::UINT, 'promote_date' => XenForo_Input::UINT, 'promote_icon' => XenForo_Input::STRING, 'attach_data' => XenForo_Input::UINT, 'image_data' => XenForo_Input::STRING, 'medio_data' => XenForo_Input::UINT, 'date' => XenForo_Input::STRING, 'hour' => XenForo_Input::UINT, 'mins' => XenForo_Input::UINT, 'ampm' => XenForo_Input::STRING, 'zone' => XenForo_Input::STRING, 'delete' => XenForo_Input::STRING));
     $ftpHelper = $this->getHelper('ForumThreadPost');
     list($thread, $forum) = $ftpHelper->assertThreadValidAndViewable($input['thread_id']);
     if ($this->_request->isPost()) {
         $this->getModelFromCache('EWRporta_Model_Promotes')->updatePromotion($input);
         $this->getModelFromCache('EWRporta_Model_Caches')->emptyBlockCache(array('block_id' => 'RecentFeatures'));
         $this->getModelFromCache('EWRporta_Model_Caches')->emptyBlockCache(array('block_id' => 'RecentNews'));
     } else {
         $threadPromote = $this->getModelFromCache('EWRporta_Model_Promotes')->getPromoteByThreadId($thread['thread_id']);
         $visitor = XenForo_Visitor::getInstance();
         $datetime = $threadPromote ? $threadPromote['promote_date'] : $thread['post_date'];
         $datetime = new DateTime(date('r', $datetime));
         $datetime->setTimezone(new DateTimeZone($visitor['timezone']));
         $datetime = explode('.', $datetime->format('Y-m-d.h.i.A.T'));
         $datetime = array('date' => $datetime[0], 'hour' => $datetime[1], 'mins' => $datetime[2], 'meri' => $datetime[3], 'zone' => $datetime[4]);
         $icons = $this->getModelFromCache('EWRporta_Model_Promotes')->getPromoteIcons($thread);
         $viewParams = array('thread' => $thread, 'icons' => $icons, 'threadPromote' => $threadPromote, 'datetime' => $datetime, 'nodeBreadCrumbs' => $ftpHelper->getNodeBreadCrumbs($forum));
         return $this->responseView('EWRporta_ViewPublic_Promote', 'EWRporta_Promote', $viewParams);
     }
     return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, XenForo_Link::buildPublicLink('threads', $thread));
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:26,代码来源:Thread.php


示例3: actionIndex

 /**
  * Check and apply the association request.
  *
  * @return XenForo_ControllerResponse_Redirect|XenForo_ControllerResponse_View
  */
 public function actionIndex()
 {
     $mcAssoc = $this->getMcAssoc();
     $inputData = $this->_input->filterSingle('data', XenForo_Input::STRING);
     $visitor = XenForo_Visitor::getInstance();
     $isAdmin = $visitor['is_admin'];
     $visitorName = $visitor['username'];
     try {
         $data = $mcAssoc->unwrapData($inputData);
         $username = $mcAssoc->unwrapKey($data->key);
         if ($username != $visitorName) {
             throw new Exception("Username does not match.");
         }
         $this->handleData($visitor, $data);
         return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, XenForo_Link::buildPublicLink("mc-association/view"));
     } catch (Exception $e) {
         if ($inputData == null) {
             $message = "No data provided.";
         } else {
             $message = $e->getMessage();
         }
         $opts = XenForo_Application::get('options');
         $message .= "<br /><pre>Credentials in use" . json_encode(["site_id" => $opts->mcAssocSiteId, "instance_secret" => $opts->mcAssocInstanceSecret, "shared_secret" => $opts->mcAssocSharedSecret]) . "</pre>";
         return $this->responseView('AssociationMc_ViewPublic_Error', 'association_error', array("exceptionMessage" => $isAdmin ? $message : "Please contact an administrator for more information."));
     }
 }
开发者ID:adamjdev,项目名称:XenForo-MCASSOC,代码行数:31,代码来源:Confirm.php


示例4: generateHtmlRecurrence

 public function generateHtmlRecurrence($days, $amount, $currency, $comment, array $data, XenForo_View $view)
 {
     $data[] = utf8_strtolower($currency);
     $data[] = $amount;
     $processorModel = $this->_getProcessorModel();
     $itemId = $processorModel->generateItemId('bdshop', XenForo_Visitor::getInstance(), $data);
     $processorNames = $processorModel->getProcessorNames();
     $processors = array();
     foreach ($processorNames as $processorId => $processorClass) {
         $processors[$processorId] = bdPaygate_Processor_Abstract::create($processorClass);
     }
     $recurringInterval = false;
     $recurringUnit = false;
     if ($days > 0) {
         if ($days % 360 == 0) {
             $recurringInterval = $days / 365;
             $recurringUnit = bdPaygate_Processor_Abstract::RECURRING_UNIT_YEAR;
         } elseif ($days % 30 == 0) {
             $recurringInterval = $days / 30;
             $recurringUnit = bdPaygate_Processor_Abstract::RECURRING_UNIT_MONTH;
         } else {
             $recurringInterval = $days;
             $recurringUnit = bdPaygate_Processor_Abstract::RECURRING_UNIT_DAY;
         }
     }
     return implode('', bdPaygate_Processor_Abstract::prepareForms($processors, $amount, $currency, $comment, $itemId, $recurringInterval, $recurringUnit, array(bdPaygate_Processor_Abstract::EXTRA_RETURN_URL => XenForo_Link::buildPublicLink('full:shop/thanks'))));
 }
开发者ID:E2Dev,项目名称:bdPaygates,代码行数:27,代码来源:StockPricing.php


示例5: buildLink

 /**
  *
  * @see XenForo_Route_Prefix_Forums::buildLink()
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (isset($data['social_forum_id'])) {
         if (ThemeHouse_SocialGroups_SocialForum::hasInstance()) {
             $socialForum = ThemeHouse_SocialGroups_SocialForum::getInstance()->toArray();
         } else {
             $socialForum = $data;
         }
         $class = XenForo_Application::resolveDynamicClass('ThemeHouse_SocialGroups_Route_Prefix_SocialForums', 'route_prefix');
         $router = new $class();
         $link = $router->buildLink('social-forums', 'social-forums', $action, $extension, $socialForum, $extraParams);
         if (XenForo_Application::isRegistered('routeFiltersOut')) {
             $routeFilters = XenForo_Application::get('routeFiltersOut');
             if (isset($routeFilters['social-forums'])) {
                 foreach ($routeFilters['social-forums'] as $filter) {
                     if (array_key_exists('find_route', $filter) && array_key_exists('replace_route', $filter)) {
                         list($from, $to) = XenForo_Link::translateRouteFilterToRegex($filter['find_route'], $filter['replace_route']);
                         $newLink = preg_replace($from, $to, $link);
                     } else {
                         $newLink = $link;
                     }
                     if ($newLink != $link) {
                         $link = $newLink;
                         break;
                     }
                 }
             }
         }
         return $link;
     }
     return parent::buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, $extraParams);
 }
开发者ID:ThemeHouse-XF,项目名称:SocialGroups,代码行数:36,代码来源:Forums.php


示例6: actionTogglePrivate

 public function actionTogglePrivate()
 {
     $this->_assertPostOnly();
     $idExists = $this->_input->filterSingle('exists', array(XenForo_Input::UINT, 'array' => true));
     $ids = $this->_input->filterSingle('id', array(XenForo_Input::UINT, 'array' => true));
     $nodeModel = $this->_getNodeModel();
     $nodes = $nodeModel->getAllNodes();
     $permissionEntries = $this->_getPermissionModel()->getAllContentPermissionEntriesByTypeGrouped('node');
     $privateNodes = array();
     foreach ($permissionEntries['system'] as $nodeId => $nodePermissions) {
         if (!empty($nodePermissions['general']['viewNode']) && $nodePermissions['general']['viewNode'] == 'reset') {
             $privateNodes[$nodeId] = true;
         }
     }
     foreach ($nodes as $nodeId => $node) {
         if (isset($idExists[$nodeId])) {
             $itemActive = !empty($ids[$nodeId]) ? 1 : 0;
             if (!empty($privateNodes[$nodeId]) != $itemActive) {
                 // TODO: better approach that doesn't rely on every
                 // permission having "revoke" value
                 $this->_setPermissionRevokeStatus($node['node_id'], 0, 0, $itemActive);
             }
         }
     }
     return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, XenForo_Link::buildAdminLink('nodes/private', $node));
 }
开发者ID:ThemeHouse-XF,项目名称:PrivateNodes,代码行数:26,代码来源:Node.php


示例7: _log

 protected function _log(array $logUser, array $content, $action, array $actionParams = array(), $parentContent = null)
 {
     $dw = XenForo_DataWriter::create('XenForo_DataWriter_ModeratorLog');
     $dw->bulkSet(array('user_id' => $logUser['user_id'], 'content_type' => 'resource_category', 'content_id' => $content['resource_category_id'], 'content_user_id' => $logUser['user_id'], 'content_username' => $logUser['username'], 'content_title' => $content['category_title'], 'content_url' => XenForo_Link::buildPublicLink('resources/categories', $content), 'discussion_content_type' => 'resource_category', 'discussion_content_id' => $content['resource_category_id'], 'action' => $action, 'action_params' => $actionParams));
     $dw->save();
     return $dw->get('moderator_log_id');
 }
开发者ID:ThemeHouse-XF,项目名称:ResCats,代码行数:7,代码来源:Category.php


示例8: _log

 /**
  * @param array $logUser
  * @param array $content
  * @param $action
  * @param array $actionParams
  * @param null $parentContent
  * @return mixed
  */
 protected function _log(array $logUser, array $content, $action, array $actionParams = array(), $parentContent = null)
 {
     $dw = XenForo_DataWriter::create('XenForo_DataWriter_ModeratorLog');
     $dw->bulkSet(array('user_id' => $logUser['user_id'], 'content_type' => sonnb_XenGallery_Model_Photo::$xfContentType, 'content_id' => $content['content_id'], 'content_user_id' => $content['user_id'], 'content_username' => $content['username'], 'content_title' => XenForo_Helper_String::wordWrapString($content['title'], 140), 'content_url' => XenForo_Link::buildPublicLink('gallery/photos', $content), 'discussion_content_type' => sonnb_XenGallery_Model_Photo::$xfContentType, 'discussion_content_id' => $content['content_id'], 'action' => $action, 'action_params' => $actionParams));
     $dw->save();
     return $dw->get('moderator_log_id');
 }
开发者ID:Sywooch,项目名称:forums,代码行数:15,代码来源:Photo.php


示例9: buildLink

 /**
  * Method to build a link to the specified page/action with the provided
  * data and params.
  *
  * @see XenForo_Route_BuilderInterface
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (!empty($data['ip_id'])) {
         $extraParams['ip_id'] = $data['ip_id'];
     }
     return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'user_id', 'username');
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:13,代码来源:SpamCleaner.php


示例10: actionSave

 /**
  * Saves changes to the messages/discussions in the mdoeration queue.
  *
  * @return XenForo_ControllerResponse_Abstract
  */
 public function actionSave()
 {
     $this->_assertPostOnly();
     $queue = $this->_input->filterSingle('queue', XenForo_Input::ARRAY_SIMPLE);
     $this->_getModerationQueueModel()->saveModerationQueueChanges($queue);
     return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, XenForo_Link::buildPublicLink('moderation-queue'));
 }
开发者ID:hahuunguyen,项目名称:DTUI_201105,代码行数:12,代码来源:ModerationQueue.php


示例11: buildLink

 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if ($action == 'categories' && isset($data['categorytitle'])) {
         $data['title'] = $data['categorytitle'];
     }
     return XenForo_Link::buildSubComponentLink($this->_getSubcomponents(), $outputPrefix, $action, $extension, $data);
 }
开发者ID:NixFifty,项目名称:XenForo-SimplePortal,代码行数:7,代码来源:Lpmanage.php


示例12: match

 /**
  * Attempts to match the routing path. See {@link XenForo_Route_Interface} for further details.
  *
  * @param string $routePath Routing path
  * @param Zend_Controller_Request_Http $request Request object
  * @param XenForo_Router $router Routing object
  *
  * @return XenForo_RouteMatch|bool
  */
 public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
 {
     if (!XenForo_Application::isRegistered('routeFiltersIn')) {
         return false;
     }
     $filters = XenForo_Application::get('routeFiltersIn');
     if (!$filters) {
         return false;
     }
     foreach ($filters as $filter) {
         if (isset($filter['match_regex'])) {
             $from = $filter['match_regex'];
             $to = $filter['match_replace'];
         } else {
             list($from, $to) = XenForo_Link::translateRouteFilterToRegex(urldecode($filter['replace_route']), urldecode($filter['find_route']));
         }
         $newRoutePath = preg_replace($from, $to, $routePath);
         if ($newRoutePath != $routePath) {
             $match = $router->getRouteMatch();
             $match->setModifiedRoutePath($newRoutePath);
             return $match;
         }
     }
     return false;
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:34,代码来源:Filter.php


示例13: _pageContainer

 protected function _pageContainer()
 {
     $threadLinkString = 'threadLinkString';
     $threadLink = XenForo_Link::buildPublicLink($threadLinkString);
     $prefix = rtrim(str_replace($threadLinkString, '', $threadLink), '/');
     //TODO Global Variable
     if (!isset($GLOBALS['ThreadInOverlay_overlayLinks'])) {
         return;
     }
     foreach ($GLOBALS['ThreadInOverlay_overlayLinks'] as $link => $action) {
         $linkPrefixed = $prefix . $link;
         $regEx = '/<a href="' . preg_quote($linkPrefixed, '/') . '"[^>]*>/i';
         $offset = 0;
         $matches = array();
         do {
             $matched = preg_match($regEx, $this->_contents, $matches, PREG_OFFSET_CAPTURE, $offset + 1);
             if ($matched) {
                 $offset = $matches[0][1];
                 $found = $matches[0][0];
                 if (strpos($found, 'class="') !== false) {
                     // there is a class attribute already
                     if (strpos($found, 'OverlayTrigger') === false) {
                         $replacement = str_replace('class="', 'class="OverlayTrigger ', $found);
                     }
                 } else {
                     // no class yet
                     $replacement = str_replace('<a', '<a class="OverlayTrigger"', $found);
                 }
                 // all seems find, update content now
                 $this->_contents = substr_replace($this->_contents, $replacement, $offset, strlen($found));
             }
         } while ($matched);
     }
 }
开发者ID:ThemeHouse-XF,项目名称:ThreadInModal,代码行数:34,代码来源:TemplatePostRender.php


示例14: getBreadcrumbsForContent

 public function getBreadcrumbsForContent(array $content)
 {
     $breadCrumbs = $this->_getCategoryModel()->getCategoryBreadcrumb($content);
     $breadCrumbs = array_values($breadCrumbs);
     $breadCrumbs[] = array('href' => XenForo_Link::buildPublicLink('full:resources', $content), 'value' => $content['title']);
     return $breadCrumbs;
 }
开发者ID:ThemeHouse-XF,项目名称:PayForContent,代码行数:7,代码来源:Resource.php


示例15: getVisibleModerationQueueEntriesForUser

 /**
  * Gets visible moderation queue entries for specified user.
  *
  * @see XenForo_ModerationQueueHandler_Abstract::getVisibleModerationQueueEntriesForUser()
  */
 public function getVisibleModerationQueueEntriesForUser(array $contentIds, array $viewingUser)
 {
     /* @var $profilePostModel XenForo_Model_ProfilePost */
     $profilePostModel = XenForo_Model::create('XenForo_Model_ProfilePost');
     $profilePosts = $profilePostModel->getProfilePostsByIds($contentIds);
     $profileUserIds = array();
     foreach ($profilePosts as $profilePost) {
         $profileUserIds[] = $profilePost['profile_user_id'];
     }
     $users = XenForo_Model::create('XenForo_Model_User')->getUsersByIds($profileUserIds, array('join' => XenForo_Model_User::FETCH_USER_PRIVACY, 'followingUserId' => $viewingUser['user_id']));
     $output = array();
     foreach ($profilePosts as $profilePost) {
         if (!isset($users[$profilePost['profile_user_id']])) {
             continue;
         }
         $user = $users[$profilePost['profile_user_id']];
         $canManage = true;
         if (!$profilePostModel->canViewProfilePostAndContainer($profilePost, $user, $null, $viewingUser)) {
             $canManage = false;
         } else {
             if (!XenForo_Permission::hasPermission($viewingUser['permissions'], 'profilePost', 'editAny') || !XenForo_Permission::hasPermission($viewingUser['permissions'], 'profilePost', 'deleteAny')) {
                 $canManage = false;
             }
         }
         if ($canManage) {
             $output[$profilePost['profile_post_id']] = array('message' => $profilePost['message'], 'user' => array('user_id' => $profilePost['user_id'], 'username' => $profilePost['username']), 'title' => new XenForo_Phrase('profile_post_for_x', array('username' => $user['username'])), 'link' => XenForo_Link::buildPublicLink('profile-posts', $profilePost), 'contentTypeTitle' => new XenForo_Phrase('profile_post'), 'titleEdit' => false);
         }
     }
     return $output;
 }
开发者ID:Sywooch,项目名称:forums,代码行数:35,代码来源:ProfilePost.php


示例16: buildLink

 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     $actions = explode('/', $action);
     switch ($actions[0]) {
         case 'top-owned-games':
             $intParams = 'owned_id';
             $strParams = '';
             break;
         case 'top-played-games':
             $intParams = 'played_id';
             $strParams = '';
             break;
         case 'top-recently-played-games':
             $intParams = 'recent_id';
             $strParams = '';
             break;
         default:
             $intParams = '';
             $strParams = '';
             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);
     }
 }
开发者ID:WENKz,项目名称:Steam-Authentication-for-XenForo,代码行数:28,代码来源:Steam.php


示例17: navigationTabs

 public static function navigationTabs(&$extraTabs, $selectedTabId)
 {
     $options = XenForo_Application::get('options');
     if (XenForo_Visitor::getInstance()->hasPermission('players', 'view') && $options->displayPlayersTab && $options->displayPlayers) {
         $extraTabs['players'] = array('title' => new XenForo_Phrase('players'), 'href' => XenForo_Link::buildPublicLink('full:players'), 'position' => 'home', 'linksTemplate' => 'player_tab_links');
     }
 }
开发者ID:Quartzcraft,项目名称:Website,代码行数:7,代码来源:Listener.php


示例18: getContentLink

 /**
  * Gets the link to the specified content.
  *
  * @see XenForo_ReportHandler_Abstract::getContentLink()
  */
 public function getContentLink(array $report, array $contentInfo)
 {
     // we can't have non-participants view a conversation at this point, so don't provide a link
     // maybe check if the visitor has permission to view the conversation and build the link then?
     return '';
     return XenForo_Link::buildPublicLink('conversations/message', array('conversation_id' => $contentInfo['conversation']['conversation_id'], 'title' => $contentInfo['conversation']['title']), array('message_id' => $report['content_id']));
 }
开发者ID:namgiangle90,项目名称:tokyobaito,代码行数:12,代码来源:ConversationMessage.php


示例19: run

 public function run()
 {
     /* @var $classModel ThemeHouse_Objects_Model_Class */
     $classModel = XenForo_Model::create('ThemeHouse_Objects_Model_Class');
     $classes = $classModel->getAllClasses();
     if (self::$_dependencies instanceof XenForo_Dependencies_Public) {
         $routes = self::$_data['routesPublic'];
     } elseif (self::$_dependencies instanceof XenForo_Dependencies_Admin) {
         $routes = self::$_data['routesAdmin'];
     }
     foreach ($classes as $class) {
         $routePrefix = '';
         if (self::$_dependencies instanceof XenForo_Dependencies_Public) {
             $routePrefix = isset($class['route_prefix']) ? $class['route_prefix'] : '';
         } elseif (self::$_dependencies instanceof XenForo_Dependencies_Admin) {
             $routePrefix = isset($class['route_prefix_admin']) ? $class['route_prefix_admin'] : '';
         }
         if ($routePrefix && !isset($routes[$routePrefix])) {
             $routes[$routePrefix]['build_link'] = 'all';
             if (self::$_dependencies instanceof XenForo_Dependencies_Public) {
                 $routes[$routePrefix]['route_class'] = 'ThemeHouse_Objects_Route_Prefix_Objects';
             } elseif (self::$_dependencies instanceof XenForo_Dependencies_Admin) {
                 $routes[$routePrefix]['route_class'] = 'ThemeHouse_Objects_Route_PrefixAdmin_Objects';
             }
         }
     }
     if (self::$_dependencies instanceof XenForo_Dependencies_Public) {
         XenForo_Link::setHandlerInfoForGroup('public', $routes);
     } elseif (self::$_dependencies instanceof XenForo_Dependencies_Admin) {
         XenForo_Link::setHandlerInfoForGroup('admin', $routes);
     }
     parent::run();
 }
开发者ID:ThemeHouse-XF,项目名称:Objects,代码行数:33,代码来源:InitDependencies.php


示例20: prepareParams

 public function prepareParams()
 {
     if (!empty($this->_params['_user']['user_id'])) {
         call_user_func_array(array('bdApi_ViewApi_Helper_Subscription', 'prepareDiscoveryParams'), array(&$this->_params, $this->_response, bdApi_Model_Subscription::TYPE_USER, $this->_params['_user']['user_id'], XenForo_Link::buildApiLink('users', $this->_params['_user'], array('oauth_token' => '')), isset($this->_params['_user']['bdapi_user']) ? $this->_params['_user']['bdapi_user'] : ''));
     }
     parent::prepareParams();
 }
开发者ID:burtay,项目名称:bdApi,代码行数:7,代码来源:Single.php



注:本文中的XenForo_Link类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP XenForo_Locale类代码示例发布时间:2022-05-23
下一篇:
PHP XenForo_Helper_String类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap