コード例 #1
0
ファイル: news.php プロジェクト: biggtfish/magixcms
 /**
  * @access private
  * Modifie le status de la news
  */
 private function update_published()
 {
     if (isset($this->idnews) and isset($this->published)) {
         parent::u_status_published($this->idnews, $this->published);
         $lang = new backend_db_block_lang();
         $data = $lang->s_data_iso($this->getlang);
         $rss = new backend_controller_rss();
         $rss->run('news', array('idlang' => $data['idlang'], 'iso' => $data['iso']));
     }
 }
コード例 #2
0
ファイル: sitemap.php プロジェクト: biggtfish/magixcms
 /**
  * Si le catalogue est activé, on inscrit les URLs dans le sitemap
  * @access private
  */
 private function writeCatalog($idlang)
 {
     /*instance la classe*/
     $sitemap = new magixcjquery_xml_sitemap();
     $attr_name = parent::s_config_named_data('catalog');
     if ($attr_name['status'] == 1) {
         // Table des langues
         $lang = new backend_db_block_lang();
         // Retourne le code ISO
         $db = $lang->s_data_iso($idlang);
         $sitemap->writeMakeNode(magixcjquery_html_helpersHtml::getUrl() . magixglobal_model_rewrite::filter_catalog_root_url($db['iso'], true), $this->lastmod_dateFormat(), 'always', 0.7);
         foreach (parent::s_catalog_category($idlang) as $data) {
             $sitemap->writeMakeNode(magixcjquery_html_helpersHtml::getUrl() . magixglobal_model_rewrite::filter_catalog_category_url($data['iso'], $data['pathclibelle'], $data['idclc'], true), $this->lastmod_dateFormat(), 'always', 0.8);
         }
         foreach (parent::s_catalog_subcategory_sitemap($idlang) as $data) {
             $sitemap->writeMakeNode(magixcjquery_html_helpersHtml::getUrl() . magixglobal_model_rewrite::filter_catalog_subcategory_url($data['iso'], $data['pathclibelle'], $data['idclc'], $data['pathslibelle'], $data['idcls'], true), $this->lastmod_dateFormat(), 'always', 0.8);
         }
         foreach (parent::s_catalog_sitemap($idlang) as $data) {
             $uri = magixglobal_model_rewrite::filter_catalog_product_url($data['iso'], $data['pathclibelle'], $data['idclc'], $data['pathslibelle'], $data['idcls'], $data['urlcatalog'], $data['idproduct'], true);
             $sitemap->writeMakeNode(magixcjquery_html_helpersHtml::getUrl() . $uri, $this->lastmod_dateFormat(), 'always', 0.9);
         }
     }
 }
コード例 #3
0
ファイル: admin.php プロジェクト: biggtfish/magixcms
 /**
  * URL index du module suivant la langue
  * @param $idlang
  */
 public function sitemap_uri_index($idlang)
 {
     $sitemap = new magixcjquery_xml_sitemap();
     // Table des langues
     $lang = new backend_db_block_lang();
     // Retourne le code ISO
     $db = $lang->s_data_iso($idlang);
     if ($db != null) {
         $sitemap->writeMakeNode(magixcjquery_html_helpersHtml::getUrl() . magixglobal_model_rewrite::filter_plugins_root_url($db['iso'], 'contact', true), $this->lastmod_dateFormat(), 'always', 0.7);
     }
 }
コード例 #4
0
ファイル: admin.php プロジェクト: biggtfish/magixcms
 /**
  * Sauvegarde le fichier de configuration
  * @param $create
  * @param $tab
  */
 private function saveFiles($create, $tab)
 {
     if (isset($this->config_var) and isset($this->config_value)) {
         $iso = backend_db_block_lang::s_data_iso($this->getlang);
         switch ($tab) {
             case 'core':
                 $path = 'locali18n/';
                 $filename = 'local_' . $iso['iso'] . '.conf';
                 break;
             case 'plugin':
                 $path = 'plugins/' . $this->pluginame . '/i18n/';
                 $filename = 'public_local_' . $iso['iso'] . '.conf';
                 break;
         }
         $files = $this->pathConfigFile($path, $filename);
         $data = $this->setConfigFile($path, $filename);
         $replace_with = array_combine($this->config_var, $this->config_value);
         if (is_writable($files)) {
             // Open the file for writing.
             $fh = fopen($files, 'w');
             // Loop through the data.
             foreach ($data as $key => $value) {
                 // If a value exists that should replace the current one, use it.
                 //if ( ! empty($replace_with[$key]) )
                 $value = $replace_with[$key];
                 // Write to the file.
                 fwrite($fh, "{$key} = {$value}" . PHP_EOL);
             }
             // Close the file handle.
             fclose($fh);
             $this->message->getNotify('update');
         } else {
             $this->message->getNotify('error_writable');
         }
     }
 }
コード例 #5
0
ファイル: cms.php プロジェクト: biggtfish/magixcms
 /**
  * @access private
  * Retourne l'image et la langue suivant l'identifiant
  * @param integer $idlang
  * @param $idlang
  * @return string
  */
 private function parent_language($idlang)
 {
     $db = backend_db_block_lang::s_data_iso($idlang);
     return '<img src="/upload/iso_lang/' . $db['iso'] . '.png" alt="' . $db['iso'] . '" /> ' . magixcjquery_string_convert::ucFirst($db['language']);
 }