Exemplo n.º 1
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');
     }
 }
Exemplo n.º 2
0
 public function addAssets(ConfigureClientView $event)
 {
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/../../js/admin/dist/extension.js']);
         $event->addBootstrapper('hyn/default-group/main');
     }
 }
Exemplo n.º 3
0
 public function addSettingsPage(ConfigureClientView $event)
 {
     if ($event->isAdmin()) {
         $event->addAssets([__DIR__ . '/js/admin/dist/extension.js']);
         $event->addBootstrapper('flarumes/spanish/main');
     }
 }
Exemplo n.º 4
0
 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');
     }
 }
Exemplo n.º 6
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']);
         }
     }
 }
 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');
     }
 }
 /**
  * @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__ . '/../../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');
     }
 }
Exemplo n.º 10
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->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');
     }
 }
 /**
  * @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->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');
     }
 }
 /**
  * @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');
     }
 }
 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');
     }
 }
Exemplo n.º 18
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]);
     }
 }