public function addAssets(ConfigureClientView $event)
 {
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../less/admin/analyticsPage.less', __DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('flagrow/analytics/main');
     } elseif ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js']);
         $event->addBootstrapper('flagrow/analytics/main');
     }
 }
Esempio n. 2
0
 public function rtlClientView(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../less/forum/extension.less']);
     } else {
         if ($event->isAdmin()) {
             $event->addAssets([__DIR__ . '/../../less/admin/extension.less']);
         }
     }
 }
 /**
  * @param ConfigureClientView $event
  */
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js', __DIR__ . '/../../less/forum/extension.less']);
         $event->addBootstrapper('johnhearfield/auth-google/main');
     }
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('johnhearfield/auth-google/main');
     }
 }
 /**
  * @param ConfigureClientView $event
  */
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js', __DIR__ . '/../../less/forum/extension.less']);
         $event->addBootstrapper('vovayatsyuk/auth/magento/main');
     }
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js', __DIR__ . '/../../less/admin/extension.less']);
         $event->addBootstrapper('vovayatsyuk/auth/magento/main');
     }
 }
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../css/forum/forum.css', __DIR__ . '/../../js/forum/dist/extension.js']);
         $event->addBootstrapper('matpompili/imgur-upload/main');
     }
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('matpompili/imgur-upload/main');
     }
 }
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('vingle/share/facebook/main');
     }
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js', __DIR__ . '/../../less/forum/extension.less']);
         $event->addBootstrapper('vingle/share/facebook/main');
     }
 }
Esempio n. 7
0
 /**
  * @param ConfigureClientView $event
  */
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js']);
         $event->addBootstrapper('flarum/akismet/main');
     }
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('flarum/akismet/main');
     }
 }
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js', __DIR__ . '/../../less/forum/extension.less']);
         $event->addBootstrapper('Davis/SocialProfile/main');
     }
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('Davis/SocialProfile/main');
     }
 }
 /**
  * @param ConfigureClientView $event
  */
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js', __DIR__ . '/../../less/forum/extension.less']);
         $event->addBootstrapper('jordanjay29/summaries/main');
     }
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('jordanjay29/summaries/main');
     }
 }
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('sijad/google/analytics/main');
     }
     if ($event->isForum() && ($code = $this->settings->get('sijad-google-analytics.tracking_code'))) {
         $event->view->addFootString($code);
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js']);
         $event->addBootstrapper('sijad/google/analytics/main');
     }
 }
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js']);
         $event->addAssets([__DIR__ . '/../../less/fullPage.less']);
         $event->addBootstrapper('matpompili/login-page/main');
     }
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('matpompili/login-page/main');
     }
 }
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js', __DIR__ . '/../../less/forum/extension.less']);
         $event->addBootstrapper('Davis/SocialProfile/main');
         $js = file_get_contents(realpath(__DIR__ . '/../../assets/js/depend.js'));
         $event->view->addFootString($js);
     }
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('Davis/SocialProfile/main');
     }
 }
Esempio n. 13
0
 /**
  * @param ConfigureClientView $event
  */
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js', __DIR__ . '/../../less/forum/extension.less']);
         $event->addBootstrapper('flarum/subscriptions/main');
     }
 }
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js']);
         $event->addBootstrapper('sijad/spoiler/alert/main');
     }
 }
Esempio n. 15
0
 public function addSettingsPage(ConfigureClientView $event)
 {
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/js/admin/dist/extension.js']);
         $event->addBootstrapper('flarumes/spanish/main');
     }
 }
 /**
  * Modifies the client view for the Forum.
  *
  * @param ConfigureClientView $event;
  */
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js']);
         $event->addBootstrapper('datitisev/moderator-notes/main');
     }
 }
Esempio n. 17
0
 /**
  * @param ConfigureClientView $event
  */
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js', __DIR__ . '/../../less/admin/extension.less']);
         $event->addBootstrapper('hyn/guardian/main');
     }
 }
Esempio n. 18
0
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets(__DIR__ . '/../../js/forum/dist/extension.js');
         $event->addBootstrapper('beeta-dev/ext-ads/main');
     }
 }
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('matpompili/favicon/main');
     }
 }
 /**
  * Modifies the client view for the Admin.
  *
  * @param ConfigureClientView $event
  */
 public function addAdminAssets(ConfigureClientView $event)
 {
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../less/admin/settingsPage.less', __DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('flagrow/image-upload/main');
     }
 }
Esempio n. 21
0
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('hyn/default-group/main');
     }
 }
Esempio n. 22
0
 /**
  * Modifies the client view for the Forum.
  *
  * @param ConfigureClientView $event
  */
 public function addForumAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js']);
         //Include css and java for KaTeX
         $event->view->addHeadString('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.css">');
         $event->view->addHeadString('<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.js"></script>');
         $event->view->addHeadString('<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/contrib/auto-render.min.js"></script>');
         $event->addBootstrapper('flagrow/latex/main');
     }
 }
 /**
  * @param ConfigureClientView $event
  */
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         $event->addAssets([__DIR__ . '/../../less/forum/extension.less']);
     }
 }
Esempio n. 24
0
 /**
  * @param ConfigureClientView $event
  */
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isForum()) {
         // Check that the settings are configured before taking over login.
         $authSettings = SingleSO::settingsAuth($this->settings, false);
         if ($authSettings) {
             // Register the forum script.
             $event->addAssets([__DIR__ . '/../../js/forum/dist/extension.js']);
             $event->addBootstrapper('singleso/singleso-flarum/main');
             // Register some settings for the extension.
             $view = $event->view;
             $actor = $view->getActor();
             // Is the viewing user a guest.
             $guest = (bool) $actor->isGuest();
             // Is the user a manged user.
             $managed = (bool) (!$guest && isset($actor->singleso_id));
             // Logout hook if has logout URL, and is managed user.
             $logout = (bool) $authSettings['logout_url'];
             // Register the extension settings.
             $view->setVariable('singleso-singleso-flarum', ['controller' => SingleSO::CONTROLLER_PATH, 'logout' => $logout, 'managed' => $managed, 'guest' => $guest]);
             // JavaScript could also do the auto-login redirect.
             // Advantages:
             // - Preserve the URL hash (only used on the admin panel?).
             // - Potentially JSONP checking instead of cookie.
             // Disadvantages:
             // - Error pages not handled (pages that require login).
             // - Slower to do the login redirect.
             // - Requires JavaScript (Flarum already requires it).
             // Choosing to use middelware for the auto-login cookie.
             // do {
             // 	// Check if a guest.
             // 	if (!$guest) {
             // 		break;
             // 	}
             //
             // 	// Check if global login cookie configured.
             // 	$globalCookie = $authSettings['global_cookie'];
             // 	if (!$globalCookie) {
             // 		break;
             // 	}
             //
             // 	// Check if request contains the cookie.
             // 	$request = $view->getRequest();
             // 	$cookies = $request->getCookieParams();
             // 	if (!isset($cookies[$globalCookie])) {
             // 		break;
             // 	}
             //
             // 	// If all checks passed, inject the inline script.
             // 	$view->addHeadString(
             // 		'<script>' . $this->autoLoginScript() . '</script>',
             // 		'singleso-singleso-flarum-autologin'
             // 	);
             // } while(false);
         }
     }
     if ($event->isAdmin()) {
         // Register admin panel script.
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('singleso/singleso-flarum/main');
         $view = $event->view;
         // Register the extension settings.
         $view->setVariable('singleso-singleso-flarum', ['controller' => SingleSO::CONTROLLER_PATH]);
     }
 }