public static function onBeforePageDisplay(OutputPage &$out, Skin &$skin)
 {
     if (class_exists('ArticleCommentInit') && ArticleCommentInit::ArticleCommentCheck()) {
         $app = F::app();
         // This is the actual entry point for Article Comment generation
         self::$content = $app->sendRequest('ArticleComments', 'index');
         // Load MiniEditor assets (oasis skin only)
         if (ArticleComment::isMiniEditorEnabled()) {
             $app->sendRequest('MiniEditor', 'loadAssets', array('loadStyles' => !ArticleComment::isLoadingOnDemand(), 'loadOnDemand' => true, 'loadOnDemandAssets' => array('/extensions/wikia/MiniEditor/js/Wall/Wall.Animations.js')));
         }
     }
     return true;
 }
Esempio n. 2
0
 /**
  * @param Title $title
  * @return array
  */
 public static function getSquidURLs(Title $title)
 {
     $urls = [];
     $articleId = $title->getArticleId();
     // Only page 1 is cached in varnish when lazy loading is on
     // Other pages load with action=ajax&rs=ArticleCommentsAjax&method=axGetComments
     $urls[] = ArticleCommentsController::getUrl('Content', ['format' => 'html', 'articleId' => $articleId, 'page' => 1, 'skin' => 'true']);
     wfRunHooks('ArticleCommentGetSquidURLs', [$title, &$urls]);
     return $urls;
 }