- './www/:/application/'
- './config/httpd/httpd.conf:/usr/local/apache2/conf/httpd.conf'
environment:
- VIRTUAL_HOST: dev.fluidbook.com,en.dev.fluidbook.com,dev.elearning.fluidbook.com
- LETSENCRYPT_HOST: dev.fluidbook.com,en.dev.fluidbook.com,dev.elearning.fluidbook.com
+ VIRTUAL_HOST: dev.fluidbook.com,en.dev.fluidbook.com,dev.elearning.fluidbook.com,fr.dev.elearning.fluidbook.com
+ LETSENCRYPT_HOST: dev.fluidbook.com,en.dev.fluidbook.com,dev.elearning.fluidbook.com,fr.dev.elearning.fluidbook.com
networks:
- fluidbook-v3-dev
- nginxproxy
</component>
<component name="ChangeListManager">
<list default="true" id="530ffb50-16c9-4bb3-ad22-e76f531eb78c" name="Default" comment="wip #7474">
- <change afterPath="$PROJECT_DIR$/.docker/syncprodtodev" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/.docker/syncprodtodev.exclude" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/.docker/config/httpd/httpd.conf" beforeDir="false" afterPath="$PROJECT_DIR$/.docker/config/httpd/httpd.conf" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.docker/dev/docker-compose.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.docker/dev/docker-compose.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/framework/application/configs/application.ini" beforeDir="false" afterPath="$PROJECT_DIR$/framework/application/configs/application.ini" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/index.php" beforeDir="false" afterPath="$PROJECT_DIR$/index.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/framework/application/views/scripts/common/footer.phtml" beforeDir="false" afterPath="$PROJECT_DIR$/framework/application/views/scripts/common/footer.phtml" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/framework/library/CubeIT/Bootstrap/Locale.php" beforeDir="false" afterPath="$PROJECT_DIR$/framework/library/CubeIT/Bootstrap/Locale.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/framework/library/CubeIT/Bootstrap/Navigation.php" beforeDir="false" afterPath="$PROJECT_DIR$/framework/library/CubeIT/Bootstrap/Navigation.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/framework/library/CubeIT/Controller/SeoController.php" beforeDir="false" afterPath="$PROJECT_DIR$/framework/library/CubeIT/Controller/SeoController.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/framework/library/CubeIT/Util/Locale.php" beforeDir="false" afterPath="$PROJECT_DIR$/framework/library/CubeIT/Util/Locale.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
- <component name="PropertiesComponent"><![CDATA[{
- "keyToString": {
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "RunOnceActivity.git.unshallow": "true",
- "WebServerToolWindowFactoryState": "true",
- "WebServerToolWindowPanel.toolwindow.highlight.mappings": "true",
- "WebServerToolWindowPanel.toolwindow.highlight.symlinks": "true",
- "WebServerToolWindowPanel.toolwindow.show.date": "false",
- "WebServerToolWindowPanel.toolwindow.show.permissions": "false",
- "WebServerToolWindowPanel.toolwindow.show.size": "false",
- "git-widget-placeholder": "master",
- "ignore.virus.scanning.warn.message": "true",
- "kotlin-language-version-configured": "true",
- "last_opened_file_path": "D:/Works/FluidbookWebV3/.docker",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "project.structure.last.edited": "Project",
- "project.structure.proportion": "0.0",
- "project.structure.side.proportion": "0.2",
- "ruby.rails.projectView.checked": "true",
- "settings.editor.selected.configurable": "project.propVCSSupport.DirectoryMappings",
- "vue.rearranger.settings.migration": "true"
+ <component name="PropertiesComponent">{
+ "keyToString": {
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.git.unshallow": "true",
+ "WebServerToolWindowFactoryState": "true",
+ "WebServerToolWindowPanel.toolwindow.highlight.mappings": "true",
+ "WebServerToolWindowPanel.toolwindow.highlight.symlinks": "true",
+ "WebServerToolWindowPanel.toolwindow.show.date": "false",
+ "WebServerToolWindowPanel.toolwindow.show.permissions": "false",
+ "WebServerToolWindowPanel.toolwindow.show.size": "false",
+ "git-widget-placeholder": "master",
+ "ignore.virus.scanning.warn.message": "true",
+ "kotlin-language-version-configured": "true",
+ "last_opened_file_path": "D:/Works/FluidbookWebV3/.docker",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "project.structure.last.edited": "Project",
+ "project.structure.proportion": "0.0",
+ "project.structure.side.proportion": "0.2",
+ "ruby.rails.projectView.checked": "true",
+ "settings.editor.selected.configurable": "project.propVCSSupport.DirectoryMappings",
+ "vue.rearranger.settings.migration": "true"
}
-}]]></component>
+}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\Works\FluidbookWebV3\.docker" />
<workItem from="1743685828952" duration="2161000" />
<workItem from="1744010760355" duration="3501000" />
<workItem from="1744211486656" duration="5649000" />
+ <workItem from="1744294067933" duration="116000" />
+ <workItem from="1744297988591" duration="226000" />
+ <workItem from="1744391230839" duration="1813000" />
</task>
<task id="LOCAL-00117" summary="fix #1407 @1">
<created>1494411210038</created>
<line>338</line>
<option name="timeStamp" value="1" />
</line-breakpoint>
+ <line-breakpoint enabled="true" type="php">
+ <url>file://$PROJECT_DIR$/framework/library/CubeIT/Bootstrap/Locale.php</url>
+ <line>38</line>
+ <option name="timeStamp" value="2" />
+ </line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
[learning : production]
-dev=false
+dev = false
seo.robots = false
locales.en = elearning.fluidbook.com
locales.fr = fr.elearning.fluidbook.com
+locales.ignore[] = fr
database.params.dbname = fluidbook-v3-elearning
[testing-learning : learning]
-dev=false
+dev = false
seo.robots = false
locales.en = dev.elearning.fluidbook.com
locales.fr = fr.dev.elearning.fluidbook.com
+
database.params.dbname = fluidbook-v3-elearning
database.params.host = fluidbook-v3-dev-mariadb
if (!file_exists($SVG_file)) continue;\r
$SVG = file_get_contents(PUBLIC_PATH . CubeIT_View_Helper_ImageCms::getPath($social['icon']));\r
\r
- $res .= '<style type="text/css">';\r
- $res .= '#s-' . $social_ID . ':hover{background-color: ' . $social['color'] . ';border-color: ' . $social['color'] . ';}';\r
- $res .= '</style>';\r
- $res .= $this->link($SVG, $social['url'], ['id' => 's-' . $social_ID,\r
- 'title' => $social['title'],\r
- 'class' => 'social-link',\r
- 'itemprop' => 'sameAs',\r
- 'target' => '_blank',\r
- 'rel' => 'noopener',\r
- 'data-event' => [\r
- 'category' => 'social',\r
- 'action' => 'go',\r
- 'label' => $social['title']\r
- ]\r
- ]);\r
+ $res .= '<style type="text/css">';\r
+ $res .= '#s-' . $social_ID . ':hover{background-color: ' . $social['color'] . ';border-color: ' . $social['color'] . ';}';\r
+ $res .= '</style>';\r
+ $res .= $this->link($SVG, $social['url'], ['id' => 's-' . $social_ID,\r
+ 'title' => $social['title'],\r
+ 'class' => 'social-link',\r
+ 'itemprop' => 'sameAs',\r
+ 'target' => '_blank',\r
+ 'rel' => 'noopener',\r
+ 'data-event' => [\r
+ 'category' => 'social',\r
+ 'action' => 'go',\r
+ 'label' => $social['title']\r
+ ]\r
+ ]);\r
}\r
$res .= '</div>'; // .footer-external\r
\r
$res .= '<footer class="legal">';\r
$res .= '<div class="footer-inner">';\r
\r
-$res .= '<div class="locale-nav">';\r
-$res .= $this->localeNavigation(true, CubeIT_View_Helper_LocaleNavigation::BIGRAMME);\r
-$res .= '</div>'; // .locale-nav\r
+if (count(Bootstrap::getInstance()->getNotIgnoredLocales()) > 1) {\r
+ $res .= '<div class="locale-nav">';\r
+ $res .= $this->localeNavigation(true, CubeIT_View_Helper_LocaleNavigation::BIGRAMME);\r
+ $res .= '</div>'; // .locale-nav\r
+}\r
\r
$res .= $this->markupDotclear($this->option('footer'));\r
\r
public function getOptionLocales()
{
$res = $this->_getLocalesOption();
+ if (isset($res['ignore'])) {
+ unset($res['ignore']);
+ }
if (isset($res['hub'])) {
unset($res['hub']);
}
return $this->getOption('localesEnabled');
}
+
+ public function getNotIgnoredLocales()
+ {
+ $locales = $this->getAppLocales();
+ $res = [];
+
+ foreach ($locales as $locale) {
+ if (!$this->isIgnoredLocale($locale)) {
+ $res[] = $locale;
+ }
+ }
+ return $res;
+ }
+
+ public function isIgnoredLocale($locale = null)
+ {
+ $locale = $locale ?? $this->getActiveLocale();
+ $opt = $this->_getLocalesOption();
+ if (!isset($opt['ignore']) || !is_array($opt['ignore']) || !in_array($locale, $opt['ignore'])) {
+ return false;
+ }
+ return true;
+ }
+
/**
* @return string
*/
$longTitle = isset($t['longTitle']) && $t['longTitle'] != '' ? $t['longTitle'] : $title;
$seoUrl = isset($t['seourl']) && $t['seourl'] != '' ? $t['seourl'] : '';
$robots = isset($t['robots']) ? $t['robots'] == true : true;
+ $ignored = false;
if ($locale) {
$domain = $this->getLocaleDomain($locale);
+ if ($this->isIgnoredLocale($locale)) {
+ $ignored = true;
+ }
$page = new CubeIT_Navigation_Page_Locale();
$page->setId($locale . '/' . $r->id);
$url = $this->_makeURL($r, $seoUrl, $locale, $title, $parent, $isAdmin);
$page->setEditable(true);
$page->setName($r->label);
$page->setUri($url);
- $page->setSitemap($robots);
+ $page->setSitemap($robots && !$ignored);
$page->setVariant($this->getVariant());
if ($domain['domain']) {
$page->setDomain($domain['domain']);
<?php
-class CubeIT_Controller_SeoController extends CubeIT_Controller_LayoutlessController {
+class CubeIT_Controller_SeoController extends CubeIT_Controller_LayoutlessController
+{
- public function robotsAction() {
+ public function robotsAction()
+ {
- $this->getResponse()->setHeader('Content-type', 'text/plain', true);
- $this->getResponse()->clearBody();
+ $this->getResponse()->setHeader('Content-type', 'text/plain', true);
+ $this->getResponse()->clearBody();
- $robotsConfig = $this->getOpt('seo.robots', true);
+ $robotsConfig = $this->getOpt('seo.robots', true);
+ if (Bootstrap::getInstance()->isIgnoredLocale()) {
+ $robotsConfig = false;
+ }
- $robots = 'User-agent: *' . "\n";
- if ($robotsConfig) {
- $robots .= 'Disallow: /admin/' . "\n";
- $robots .= 'Disallow: /ajax/' . "\n";
- $robots .= 'Disallow: /ajaxpopup/' . "\n";
- } else {
- $robots .= 'Disallow: /' . "\n";
- }
- if ($robotsConfig) {
- $robots .= 'Sitemap: ' . SITE_PROTOCOL . $this->getOption('webhost') . '/sitemap' . "\n";
- }
+ $robots = 'User-agent: *' . "\n";
+ if ($robotsConfig) {
+ $robots .= 'Disallow: /admin/' . "\n";
+ $robots .= 'Disallow: /ajax/' . "\n";
+ $robots .= 'Disallow: /ajaxpopup/' . "\n";
+ } else {
+ $robots .= 'Disallow: /' . "\n";
+ }
+ if ($robotsConfig) {
+ $robots .= 'Sitemap: ' . SITE_PROTOCOL . $this->getOption('webhost') . '/sitemap' . "\n";
+ }
- echo $robots;
- return;
- }
+ echo $robots;
+ return;
+ }
- public function googleverificationAction() {
- $this->getResponse()->setHeader('Content-type', 'text/html', true);
- $this->getResponse()->clearBody();
- $seo = $this->getOption('seo');
- echo 'google-site-verification: ' . $this->getParam('code');
- }
+ public function googleverificationAction()
+ {
+ $this->getResponse()->setHeader('Content-type', 'text/html', true);
+ $this->getResponse()->clearBody();
+ $seo = $this->getOption('seo');
+ echo 'google-site-verification: ' . $this->getParam('code');
+ }
- public function bingverificationAction() {
- $this->getResponse()->setHeader('Content-type', 'text/xml', true);
- $this->getResponse()->clearBody();
- $seo = $this->getOption('seo');
- echo '<?xml version="1.0"?>
+ public function bingverificationAction()
+ {
+ $this->getResponse()->setHeader('Content-type', 'text/xml', true);
+ $this->getResponse()->clearBody();
+ $seo = $this->getOption('seo');
+ echo '<?xml version="1.0"?>
<users>
<user>' . $seo['bing'] . '</user>
</users>';
- }
+ }
- public function sitemapAction() {
- $this->getResponse()->setHeader('Content-type', 'text/xml', true);
- $this->getResponse()->clearBody();
+ public function sitemapAction()
+ {
+ $this->getResponse()->setHeader('Content-type', 'text/xml', true);
+ $this->getResponse()->clearBody();
- $navigation = $this->getSitemapNavigation();
+ $navigation = $this->getSitemapNavigation();
- echo $this->view->navigation($navigation)
- ->sitemap()
- ->setFormatOutput(false)
- ->setMinDepth($this->_getSitemapMinDepth($navigation))
- ->setRole();
- return;
- }
+ echo $this->view->navigation($navigation)
+ ->sitemap()
+ ->setFormatOutput(false)
+ ->setMinDepth($this->_getSitemapMinDepth($navigation))
+ ->setRole();
+ return;
+ }
- protected function getSitemapNavigation() {
- return $this->getNavigation();
- }
+ protected function getSitemapNavigation()
+ {
+ return $this->getNavigation();
+ }
- protected function _getSitemapMinDepth($navigation) {
- $minDepth = 0;
- if ($navigation instanceof CubeIT_Navigation) {
- $minDepth == 1;
- }
- if ($navigation instanceof CubeIT_Navigation_Locale) {
- $minDepth = 2;
- }
- return $minDepth;
- }
+ protected function _getSitemapMinDepth($navigation)
+ {
+ $minDepth = 0;
+ if ($navigation instanceof CubeIT_Navigation) {
+ $minDepth == 1;
+ }
+ if ($navigation instanceof CubeIT_Navigation_Locale) {
+ $minDepth = 2;
+ }
+ return $minDepth;
+ }
}
\ No newline at end of file
if ($k == 'hub') {
continue;
}
+ if($k=='ignore'){
+ continue;
+ }
$e = explode('/', $l, 2);
$r = array('domain' => '', 'segment' => '', 'first' => false);