diff --git a/bl-kernel/abstract/content.class.php b/bl-kernel/abstract/content.class.php index 710605f5..dcb72fa0 100644 --- a/bl-kernel/abstract/content.class.php +++ b/bl-kernel/abstract/content.class.php @@ -17,6 +17,7 @@ class Content { return($this->vars!==false); } + // Returns the value from the $field, FALSE if the field doesn't exist. public function getField($field) { if(isset($this->vars[$field])) { @@ -38,7 +39,7 @@ class Content { private function build($path) { - if( !Sanitize::pathFile($path, 'index.txt') ) { + if( !Sanitize::pathFile($path.'index.txt') ) { return false; } diff --git a/bl-kernel/abstract/dbjson.class.php b/bl-kernel/abstract/dbjson.class.php index ef881474..04dffaa9 100644 --- a/bl-kernel/abstract/dbjson.class.php +++ b/bl-kernel/abstract/dbjson.class.php @@ -45,6 +45,7 @@ class dbJSON public function restoreDB() { $this->db = $this->dbBackup; + return true; } diff --git a/bl-kernel/abstract/plugin.class.php b/bl-kernel/abstract/plugin.class.php index 42a76d4e..c459d252 100644 --- a/bl-kernel/abstract/plugin.class.php +++ b/bl-kernel/abstract/plugin.class.php @@ -103,13 +103,27 @@ class Plugin { return ''; } - public function setDb($array) + public function setDb($args) { $tmp = array(); - // All fields will be sanitize before save. - foreach($array as $key=>$value) { - $tmp[$key] = Sanitize::html($value); + foreach($this->dbFields as $key=>$value) + { + if(isset($args[$key])) + { + // Sanitize value + $tmpValue = Sanitize::html( $args[$key] ); + + // Set type + settype($tmpValue, gettype($value)); + + // Set value + $tmp[$key] = $tmpValue; + } + else + { + $tmp[$key] = false; + } } $this->db = $tmp; diff --git a/bl-kernel/admin/themes/default/css/default.css b/bl-kernel/admin/themes/default/css/default.css index af0da748..b9cfd13c 100644 --- a/bl-kernel/admin/themes/default/css/default.css +++ b/bl-kernel/admin/themes/default/css/default.css @@ -179,17 +179,53 @@ button.delete-button:hover { text-transform: uppercase; } -#jstagList { - margin-top: 5px; +#bludit-tags { + margin-top: 15px; } -#jstagList span { - background: #f1f1f1; - border-radius: 3px; - color: #2672ec; +#bludit-tags .uk-button { + padding: 0 12px !important; + margin-left: 10px; +} + +#jstagList { + margin-top: 15px; +} + +#jstagList span.unselect, +#jstagList span.select { + margin-top: 5px; margin-right: 5px; - padding: 3px 10px; + padding: 1px 15px; cursor: pointer; + display: inline-block; + border-radius: 3px; + background: #f1f1f1; + vertical-align: middle; +} + +#jstagList span.unselect:before { + font-family: FontAwesome; + content: "\f067"; + padding-right: 5px; +} + +#jstagList span.unselect { + color: #AAA; +} + +#jstagList span.unselect:hover { + color: #888; +} + +#jstagList span.select:before { + font-family: FontAwesome; + content: "\f00c"; + padding-right: 5px; +} + +#jstagList span.select { + color: #2672ec; } /* ----------- BLUDIT IMAGES V8 ----------- */ @@ -229,6 +265,36 @@ button.delete-button:hover { font-size: 0; } +/* Bludit Menu v8 */ + +#bludit-menuV8 { + display: none; + z-index: 1020; + position: absolute; + overflow: hidden; + border: 1px solid #CCC; + background: #FFF; + color: #333; + border-radius: 2px; + list-style-type: none; + padding: 5px; + margin: 0; +} + +#bludit-menuV8 li { + padding: 8px 12px; + cursor: pointer; +} + +#bludit-menuV8 li:hover { + background-color: #2672ec; + color: #fff; +} + +#bludit-menuV8 li i { + margin-right: 10px; +} + /* ----------- BLUDIT QUICK IMAGES ----------- */ #bludit-quick-images { diff --git a/bl-kernel/admin/themes/default/init.php b/bl-kernel/admin/themes/default/init.php index 5b271e07..c674843b 100644 --- a/bl-kernel/admin/themes/default/init.php +++ b/bl-kernel/admin/themes/default/init.php @@ -21,20 +21,21 @@ class HTML { { $html = ''; -$script = ''; -'; echo $html.$script; } @@ -67,108 +68,32 @@ $(document).ready(function() { echo $html; } - public static function tagsAutocomplete($args) + public static function tags($args) { - // Tag array for Javascript - $tagArray = 'var tagArray = [];'; - if(!empty($args['value'])) { - $tagArray = 'var tagArray = ["'.implode('","', $args['value']).'"]'; + // Javascript code + include(PATH_JS.'bludit-tags.js'); + + $html = '
これは、あなたのWebサイト「 {{WEBSITE_NAME}} 」からの通知です。<\/p>
ご依頼のログインアクセスコードにアクセスするには、次のリンクをクリックしてください: <\/p>
{{LINK}}<\/p>", + "there-are-no-scheduled-posts": "予約された投稿はありません。", + "show-password": "パスワードを表示", + "edit-or-remove-your=pages": "ページの編集または削除します。", + "edit-or-remove-your-blogs-posts": "ブログ記事の編集または削除します。", + "general-settings": "全般設定", + "advanced-settings": "詳細設定", + "manage-users": "ユーザー管理", + "view-and-edit-your-profile": "プロフィールの確認と編集。", + + "password-must-be-at-least-6-characters-long": "パスワードは6文字以上必要です", + "images": "画像", + "upload-image": "画像をアップロード", + "drag-and-drop-or-click-here": "ドラッグ・アンド・ドロップもしくはクリックします", + "insert-image": "画像を挿入", + "supported-image-file-types": "サポートする画像ファイルタイプ", + "date-format": "日付の書式", + "time-format": "時間の書式", + "chat-with-developers-and-users-on-gitter":"[Gitter](https:\/\/gitter.im\/dignajar\/bludit)で開発者やユーザーとチャットする", + "this-is-a-brief-description-of-yourself-our-your-site":"ここには、あなた自身やサイトについての説明文を書きます。文章を変更するには、管理パネルから設定→プラグインと進み、aboutプラグインの設定から変更します。", + "profile-picture": "プロフィール画像", + "the-about-page-is-very-important": "aboutページは、潜在的なクライアントやパートナーにとって重要かつ強力なツールです。検索でたどり着いた人にとってAboutページは、Webサイトについて最初の情報源となります。\n", + "change-this-pages-content-on-the-admin-panel": "このページを編集するには、管理パネルから管理→ページと進み、aboutページをクリックします。", + "about-your-site-or-yourself": "このサイトやあなた自身について", + "welcome-to-bludit": "Bluditへようこそ", + + "site-information": "サイト情報", + "date-and-time-formats": "日付と時間の書式", + "activate": "有効化", + "deactivate": "無効化", + + "cover-image": "カバー画像", + "blog": "ブログ", + "more-images": "その他の画像", + "double-click-on-the-image-to-add-it": "ダブルクリックで画像を挿入します。", + "click-here-to-cancel": "ここをクリックしてキャンセル。", + "type-the-tag-and-press-enter": "タグを入力してEnterを押します。", + "manage-your-bludit-from-the-admin-panel": "[管理パネル]({{ADMIN_AREA_LINK}})からBluditを管理する", + "there-are-no-images":"画像はありません。" +} diff --git a/bl-languages/pt_BR.json b/bl-languages/pt_BR.json deleted file mode 100644 index 351902f7..00000000 --- a/bl-languages/pt_BR.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "language-data": - { - "native": "Português (Brasil)", - "english-name": "Portuguese", - "last-update": "2015-09-21", - "author": "Hackdorte", - "email": "hackdorte@sapo.pt", - "website": "https://twitter.com/hackdorte" - }, - - "username": "Nome de usuário", - "password": "Senha", - "confirm-password": "Confirmar senha", - "editor": "Editor", - "dashboard": "Painel", - "role": "Cargo", - "post": "Postagem", - "posts": "Postagens", - "users": "Usuários", - "administrator": "Administrador", - "add": "Adicionar", - "cancel": "Cancelar", - "content": "Conteúdo", - "title": "Título", - "no-parent": "Sem parente", - "edit-page": "Editar página", - "edit-post": "Editar postagem", - "add-a-new-user": "Adicionar novo usuário", - "parent": "Parente", - "friendly-url": "URL amigável", - "description": "Descrição", - "posted-by": "Publicado por", - "tags": "Tags", - "position": "Posição", - "save": "Salvar", - "draft": "Rascunho", - "delete": "Deletar", - "registered": "Registrado", - "Notifications": "Notificações", - "profile": "Perfil", - "email": "Email", - "settings": "Configurações", - "general": "Geral", - "advanced": "Avançado", - "regional": "Regional", - "about": "Sobre", - "login": "Entrar", - "logout": "Sair", - "manage": "Administrar", - "themes": "Temas", - "prev-page": "Pág. anterior", - "next-page": "Pág. seguinte", - "configure-plugin": "Configurar plugin", - "confirm-delete-this-action-cannot-be-undone": "Confirmar exclusão. Esta operação não poderá ser desfeita.", - "site-title": "Título do site", - "site-slogan": "Slogan do site", - "site-description": "Descrição do site", - "footer-text": "Texto do rodapé", - "posts-per-page": "Postagens por páginas", - "site-url": "URL do site", - "writting-settings": "Configurações de escrita", - "url-filters": "Filtros para URL", - "page": "página", - "pages": "páginas", - "home": "Início", - "welcome-back": "Bem vindo(a)", - "language": "Idioma", - "website": "Website", - "timezone": "Zona horária", - "locale": "Codificação", - "new-post": "Nova postagem", - "new-page": "Nova página", - "html-and-markdown-code-supported": "Códigos HTML e Markdown são aceitos", - "manage-posts": "Gerenciar postagens", - "published-date": "Data de publicação", - "modified-date": "Data de modificação", - "empty-title": "Título vazio", - "plugins": "Plugins", - "install-plugin": "Instalar plugin", - "uninstall-plugin": "Desinstalar plugin", - "new-password": "Nova senha", - "edit-user": "Editar usuário", - "publish-now": "Publicar", - "first-name": "Nome", - "last-name": "Sobrenome", - "bludit-version": "Bludit versão", - "powered-by": "Feito com", - "recent-posts": "Postagens recentes", - "manage-pages": "Gerenciar páginas", - "advanced-options": "Opções avançadas", - "user-deleted": "Usuário Deletado", - "page-added-successfully": "Página criada com sucesso", - "post-added-successfully": "Postagem criada com sucesso ", - "the-post-has-been-deleted-successfully": "Postagem eliminada com sucesso", - "the-page-has-been-deleted-successfully": "Página deletada com sucesso", - "username-or-password-incorrect": "Nome ou senha incorretos", - "database-regenerated": "Base de dados regenerada", - "the-changes-have-been-saved": "As alterações foram salvas!", - "enable-more-features-at": "Habilitar mais funções em", - "username-already-exists": "Usuário não existe", - "username-field-is-empty": "O campo **Nome** não pode ficar vazio.", - "the-password-and-confirmation-password-do-not-match": "Ops! As senhas são diferentes.", - "user-has-been-added-successfully": "Usuário criado com sucesso", - "you-do-not-have-sufficient-permissions": "Você não tem permissão. Por favor entre em contato com o administrador do site", - "settings-advanced-writting-settings": "Configurações->Avançado->Configurações de escrita", - "new-posts-and-pages-synchronized": "Novas postagens e páginas sincronizadas.", - "you-can-choose-the-users-privilege": "Pode alterar os previlégios dos usuários. O editor só poderá gerenciar páginas e postagens.", - "email-will-not-be-publicly-displayed": "O endereço de email não é visível. Recomendado para recuperar sua senha e receber notificações.", - "use-this-field-to-name-your-site": "Utilize este campo para adicionar um título para seu site, ele aparecerá na parte superior das páginas.", - "use-this-field-to-add-a-catchy-phrase": "Utilize este campo se desejar adicionar um slogan ao nome do seu site.", - "you-can-add-a-site-description-to-provide": "Pode adicionar um descrição para promover uma biografia do seu site.", - "you-can-add-a-small-text-on-the-bottom": "Pode adicionar um pequeno texto no final da página. ex: copyright, autor, etc.", - "number-of-posts-to-show-per-page": "Número de postagens para mostrar por página.", - "the-url-of-your-site": "URL do seu site.", - "add-or-edit-description-tags-or": "Adicionar ou editar a descrição, tags e alterar URL amigável.", - "select-your-sites-language": "Selecione o idioma padrão do seu site.", - "select-a-timezone-for-a-correct": "Selecione a zona horária correta do seu país.", - "you-can-use-this-field-to-define-a-set-of": "Use este campo para o correto conjunto de idioma, país e preferências especiais.", - "you-can-modify-the-url-which-identifies": "Pode alterar a URL para facilitar a sua localização de forma legível. Em 150 caractéres.", - "this-field-can-help-describe-the-content": "Resumo do conteúdo da postagem. Em 150 caractéres.", - "write-the-tags-separated-by-comma": "Criar tags separadas por vírgulas. ex: tag1, tag2, tag3", - "delete-the-user-and-all-its-posts": "Eliminar usuário e suas postagens", - "delete-the-user-and-associate-its-posts-to-admin-user": "Eliminar usuário e associar postagens ao administrador", - "read-more": "Ler mais", - "show-blog": "Ver blog", - "default-home-page": "página de início padrão", - "version": "Versão", - "there-are-no-drafts": "Não há rascunhos", - "create-a-new-article-for-your-blog":"Criar um novo artigo para seu blog.", - "create-a-new-page-for-your-website":"Criar nova página para seu site.", - "invite-a-friend-to-collaborate-on-your-website":"Convidar amigos para colaborar com seu site.", - "change-your-language-and-region-settings":"Modificar as configurações de idioma e região.", - "language-and-timezone":"Idioma e zona horária", - "author": "Autor", - "start-here": "Começe aqui", - "install-theme": "Instalar tema", - "first-post": "Primeira postagem", - "congratulations-you-have-successfully-installed-your-bludit": "Parabéns, você instalou **Bludit** com sucesso", - "whats-next": "Siguientes pasos", - "manage-your-bludit-from-the-admin-panel": "Gerencie seu Bludit em [painel de administração](./admin/)", - "follow-bludit-on": "Siga Bludit em", - "visit-the-support-forum": "Visite o [fórum](http://forum.bludit.com) para obter ajuda", - "read-the-documentation-for-more-information": "Leia a [documentación](http://docs.bludit.com) para mais informações", - "share-with-your-friends-and-enjoy": "Compartilhe com os seus amigos para que desfrutem também", - "the-page-has-not-been-found": "A página não foi localizada.", - "error": "Erro", - "bludit-installer": "Instalador do Bludit", - "welcome-to-the-bludit-installer": "Bem vindo(a) ao instalador do Bludit", - "complete-the-form-choose-a-password-for-the-username-admin": "Crie uma senha e informe um endereço de email para o usuário « admin »", - "password-visible-field": "Senha, este campo é visível.", - "install": "Instalar", - "the-password-field-is-empty": "Preencha o campo da senha", - "your-email-address-is-invalid":"O endereço do email é inválido", - "proceed-anyway": "Continuar assim mesmo!", - "drafts":"Rascunhos", - "ip-address-has-been-blocked":"O endereço de IP foi bloqueado.", - "try-again-in-a-few-minutes": "Volte e tente daqui uns minutinhos!" -} diff --git a/bl-plugins/about/languages/ja_JP.json b/bl-plugins/about/languages/ja_JP.json new file mode 100644 index 00000000..353242d5 --- /dev/null +++ b/bl-plugins/about/languages/ja_JP.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "About", + "description": "サイトやあなた自身についての概要を表示します。" + } +} \ No newline at end of file diff --git a/bl-plugins/about/metadata.json b/bl-plugins/about/metadata.json index 83f2154e..9f14586c 100644 --- a/bl-plugins/about/metadata.json +++ b/bl-plugins/about/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "1.0", - "releaseDate": "2016-01-15", + "version": "1.1", + "releaseDate": "2016-02-15", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-plugins/disqus/languages/ja_JP.json b/bl-plugins/disqus/languages/ja_JP.json new file mode 100644 index 00000000..e956511f --- /dev/null +++ b/bl-plugins/disqus/languages/ja_JP.json @@ -0,0 +1,12 @@ +{ + "plugin-data": + { + "name": "Disqus comment system", + "description": "Disqusはブログにコメント機能を提供するWebサイトです。プラグインを使用するにはDisqus.comに登録する必要があります。" + }, + + "disqus-shortname": "Disqusサイト名(ショートネーム)", + "enable-disqus-on-pages": "ページのDisqusを有効", + "enable-disqus-on-posts": "記事ページのDisqusを有効", + "enable-disqus-on-default-home-page": "規定のホームページのDisqusを有効" +} \ No newline at end of file diff --git a/bl-plugins/disqus/metadata.json b/bl-plugins/disqus/metadata.json index 83f2154e..7eec067d 100644 --- a/bl-plugins/disqus/metadata.json +++ b/bl-plugins/disqus/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "1.0", - "releaseDate": "2016-01-15", + "version": "1.1", + "releaseDate": "2016-02-13", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-plugins/disqus/plugin.php b/bl-plugins/disqus/plugin.php index c81de08e..3eb8bb67 100644 --- a/bl-plugins/disqus/plugin.php +++ b/bl-plugins/disqus/plugin.php @@ -2,14 +2,14 @@ class pluginDisqus extends Plugin { - private $disable; + private $enable; public function init() { $this->dbFields = array( 'shortname'=>'', 'enablePages'=>false, - 'enablePosts'=>true, + 'enablePosts'=>false, 'enableDefaultHomePage'=>false ); } @@ -20,25 +20,17 @@ class pluginDisqus extends Plugin { global $Url; - // Disable the plugin IF ... - $this->disable = false; + $this->enable = false; - if( (!$this->getDbField('enablePosts')) && ($Url->whereAmI()=='post') ) { - $this->disable = true; + if( $this->getDbField('enablePosts') && ($Url->whereAmI()=='post') ) { + $this->enable = true; } - elseif( (!$this->getDbField('enablePages')) && ($Url->whereAmI()=='page') ) { - $this->disable = true; + elseif( $this->getDbField('enablePages') && ($Url->whereAmI()=='page') ) { + $this->enable = true; } - elseif( !$this->getDbField('enableDefaultHomePage') && ($Url->whereAmI()=='page') ) + elseif( $this->getDbField('enableDefaultHomePage') && ($Url->whereAmI()=='home') ) { - global $Site; - - if( Text::isNotEmpty($Site->homePage()) ) { - $this->disable = true; - } - } - elseif( ($Url->whereAmI()!='post') && ($Url->whereAmI()!='page') ) { - $this->disable = true; + $this->enable = true; } } @@ -71,41 +63,41 @@ class pluginDisqus extends Plugin { public function postEnd() { - if( $this->disable ) { - return false; + if( $this->enable ) { + return '
'; } - $html = ''; - return $html; + return false; } public function pageEnd() { - if( $this->disable ) { - return false; + global $Url; + + // Bludit check not-found page after the plugin method construct. + // It's necesary check here the page not-found. + + if( $this->enable && !$Url->notFound()) { + return ''; } - $html = ''; - return $html; + return false; } public function siteHead() { - if( $this->disable ) { - return false; + if( $this->enable ) { + return ''; } - $html = ''; - return $html; + return false; } public function siteBodyEnd() { - if( $this->disable ) { - return false; - } + if( $this->enable ) { - $html = ' + $html = ' '; - return $html; + return $html; + } + + return false; } -} +} \ No newline at end of file diff --git a/bl-plugins/googletools/languages/ja_JP.json b/bl-plugins/googletools/languages/ja_JP.json new file mode 100644 index 00000000..4c577039 --- /dev/null +++ b/bl-plugins/googletools/languages/ja_JP.json @@ -0,0 +1,12 @@ +{ + "plugin-data": + { + "name": "Google Tools", + "description": "Google Search Consoleでサイトを検証するためのメタタグとGoogle AnalyticsでトラッキングするためのJavaScriptコードを生成します。" + }, + + "google-webmasters-tools": "Google Search Console", + "google-analytics-tracking-id": "Google Analytics トラッキングID", + "complete-this-field-with-the-google-site-verification": "Google Seach Consoleがサイト所有権を確認するためのメタタグを入力します。", + "complete-this-field-with-the-tracking-id": "Google Analyticsがトラッキングをするために生成したトラッキングIDを入力します。" +} \ No newline at end of file diff --git a/bl-plugins/googletools/metadata.json b/bl-plugins/googletools/metadata.json index 83f2154e..7eec067d 100644 --- a/bl-plugins/googletools/metadata.json +++ b/bl-plugins/googletools/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "1.0", - "releaseDate": "2016-01-15", + "version": "1.1", + "releaseDate": "2016-02-13", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-plugins/latest_posts/languages/ja_JP.json b/bl-plugins/latest_posts/languages/ja_JP.json new file mode 100644 index 00000000..8dcc5764 --- /dev/null +++ b/bl-plugins/latest_posts/languages/ja_JP.json @@ -0,0 +1,10 @@ +{ + "plugin-data": + { + "name": "Latest posts", + "description": "公開された最近の投稿を表示します。" + }, + + "amount-of-posts": "投稿表示数", + "show-home-link": "ホーム・リンクを表示" +} \ No newline at end of file diff --git a/bl-plugins/latest_posts/metadata.json b/bl-plugins/latest_posts/metadata.json index 83f2154e..7eec067d 100644 --- a/bl-plugins/latest_posts/metadata.json +++ b/bl-plugins/latest_posts/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "1.0", - "releaseDate": "2016-01-15", + "version": "1.1", + "releaseDate": "2016-02-13", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-plugins/maintancemode/languages/ja_JP.json b/bl-plugins/maintancemode/languages/ja_JP.json new file mode 100644 index 00000000..3ad5df64 --- /dev/null +++ b/bl-plugins/maintancemode/languages/ja_JP.json @@ -0,0 +1,10 @@ +{ + "plugin-data": + { + "name": "Maintenance mode", + "description": "メンテンナンス・モードに設定します。管理エリアにはアクセスできます。" + }, + + "enable-maintence-mode": "メンテンナンス・モードを有効にする", + "message": "メッセージ" +} \ No newline at end of file diff --git a/bl-plugins/maintancemode/metadata.json b/bl-plugins/maintancemode/metadata.json index 83f2154e..7eec067d 100644 --- a/bl-plugins/maintancemode/metadata.json +++ b/bl-plugins/maintancemode/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "1.0", - "releaseDate": "2016-01-15", + "version": "1.1", + "releaseDate": "2016-02-13", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-plugins/opengraph/languages/ja_JP.json b/bl-plugins/opengraph/languages/ja_JP.json new file mode 100644 index 00000000..bfa01ff9 --- /dev/null +++ b/bl-plugins/opengraph/languages/ja_JP.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "Open Graph", + "description": "Open Graph protocol(OGP)を有効にすると、Webページがソーシャルグラフ上のリッチなオブジェクトになります。" + } +} \ No newline at end of file diff --git a/bl-plugins/opengraph/metadata.json b/bl-plugins/opengraph/metadata.json index 83f2154e..7eec067d 100644 --- a/bl-plugins/opengraph/metadata.json +++ b/bl-plugins/opengraph/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "1.0", - "releaseDate": "2016-01-15", + "version": "1.1", + "releaseDate": "2016-02-13", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-plugins/pages/languages/ja_JP.json b/bl-plugins/pages/languages/ja_JP.json new file mode 100644 index 00000000..613663ed --- /dev/null +++ b/bl-plugins/pages/languages/ja_JP.json @@ -0,0 +1,10 @@ +{ + "plugin-data": + { + "name": "Page list", + "description": "ページをリストにして表示します。" + }, + + "home": "ホーム", + "show-home-link": "ホーム・リンクを表示" +} \ No newline at end of file diff --git a/bl-plugins/pages/metadata.json b/bl-plugins/pages/metadata.json index 83f2154e..7eec067d 100644 --- a/bl-plugins/pages/metadata.json +++ b/bl-plugins/pages/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "1.0", - "releaseDate": "2016-01-15", + "version": "1.1", + "releaseDate": "2016-02-13", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-plugins/rss/languages/ja_JP.json b/bl-plugins/rss/languages/ja_JP.json new file mode 100644 index 00000000..16e3ac94 --- /dev/null +++ b/bl-plugins/rss/languages/ja_JP.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "RSS Feed", + "description": "サイトのRSSフィードを生成します。" + } +} \ No newline at end of file diff --git a/bl-plugins/rss/metadata.json b/bl-plugins/rss/metadata.json index 83f2154e..7eec067d 100644 --- a/bl-plugins/rss/metadata.json +++ b/bl-plugins/rss/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "1.0", - "releaseDate": "2016-01-15", + "version": "1.1", + "releaseDate": "2016-02-13", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-plugins/simplemde/languages/ja_JP.json b/bl-plugins/simplemde/languages/ja_JP.json new file mode 100644 index 00000000..44c0792a --- /dev/null +++ b/bl-plugins/simplemde/languages/ja_JP.json @@ -0,0 +1,10 @@ +{ + "plugin-data": + { + "name": "SimpleMDE", + "description": "シンプルで美しく埋め込み可能なJavaScript製Markdownエディタ(@WesCossick作)Bludit用にDiego Najarにより移植されました。" + }, + "toolbar": "ツールバー", + "tab-size": "タブのサイズ", + "autosave": "自動保存" +} \ No newline at end of file diff --git a/bl-plugins/simplemde/metadata.json b/bl-plugins/simplemde/metadata.json index 455c5c78..0a559f5c 100644 --- a/bl-plugins/simplemde/metadata.json +++ b/bl-plugins/simplemde/metadata.json @@ -5,6 +5,6 @@ "version": "1.10.0", "releaseDate": "2015-01-22", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-plugins/simplemde/plugin.php b/bl-plugins/simplemde/plugin.php index 8c397704..61d53830 100644 --- a/bl-plugins/simplemde/plugin.php +++ b/bl-plugins/simplemde/plugin.php @@ -77,6 +77,7 @@ class pluginsimpleMDE extends Plugin { public function adminBodyEnd() { global $layout; + global $Language; $html = ''; @@ -105,6 +106,11 @@ class pluginsimpleMDE extends Plugin { simplemde.value(text + content + "\n"); }'.PHP_EOL; + // This function is necesary on each Editor, it is used by Bludit Images v8. + $html .= 'function editorAddImage(filename) { + addContentSimpleMDE(""); + }'.PHP_EOL; + $html .= '$(document).ready(function() { '.PHP_EOL; $html .= 'simplemde = new SimpleMDE({ element: document.getElementById("jscontent"), @@ -125,12 +131,6 @@ class pluginsimpleMDE extends Plugin { toolbar: ['.Sanitize::htmlDecode($this->getDbField('toolbar')).'] });'; - // This is the event for Bludit images - $html .= '$("body").on("dblclick", "img.bludit-thumbnail", function() { - var filename = $(this).data("filename"); - addContentSimpleMDE(""); - });'; - $html .= '}); '; } diff --git a/bl-plugins/sitemap/languages/ja_JP.json b/bl-plugins/sitemap/languages/ja_JP.json new file mode 100644 index 00000000..a002b3e4 --- /dev/null +++ b/bl-plugins/sitemap/languages/ja_JP.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "Sitemap", + "description": "Webページをリスト化し、検索エンジンにサイトコンテンツの構造を伝えるためのsitemap.xmlファイルを生成します。" + } +} diff --git a/bl-plugins/sitemap/metadata.json b/bl-plugins/sitemap/metadata.json index 7fa41df1..04bbb6f7 100644 --- a/bl-plugins/sitemap/metadata.json +++ b/bl-plugins/sitemap/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "1.0.2", + "version": "1.1", "releaseDate": "2016-01-30", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-plugins/tags/languages/ja_JP.json b/bl-plugins/tags/languages/ja_JP.json new file mode 100644 index 00000000..07f7cf95 --- /dev/null +++ b/bl-plugins/tags/languages/ja_JP.json @@ -0,0 +1,11 @@ +{ + "plugin-data": + { + "name": "Tags list", + "description": "すべてのタグを表示します。" + }, + "tag-sort-order": "タグ・リストの順番", + "tag-sort-alphabetical": "アルファベット順", + "tag-sort-count": "タグの利用回数順", + "tag-sort-date": "最初に利用されたタグ順" +} diff --git a/bl-plugins/tags/metadata.json b/bl-plugins/tags/metadata.json index 83f2154e..7eec067d 100644 --- a/bl-plugins/tags/metadata.json +++ b/bl-plugins/tags/metadata.json @@ -2,9 +2,9 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "1.0", - "releaseDate": "2016-01-15", + "version": "1.1", + "releaseDate": "2016-02-13", "license": "MIT", - "requires": "Bludit v1.0", + "requires": "Bludit v1.1", "notes": "" -} \ No newline at end of file +} diff --git a/bl-themes/blogme/assets/css/main.css b/bl-themes/blogme/assets/css/main.css index c0d89b2b..f829adbd 100644 --- a/bl-themes/blogme/assets/css/main.css +++ b/bl-themes/blogme/assets/css/main.css @@ -1,4 +1,4 @@ -@import url("http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Raleway:400,800,900"); +@import url("//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Raleway:400,800,900"); /* Future Imperfect by HTML5 UP @@ -3432,4 +3432,4 @@ padding: 1.5em; } - } \ No newline at end of file + } diff --git a/bl-themes/future-imperfect/assets/css/main.css b/bl-themes/future-imperfect/assets/css/main.css index 3b189eb3..6b29d9a6 100644 --- a/bl-themes/future-imperfect/assets/css/main.css +++ b/bl-themes/future-imperfect/assets/css/main.css @@ -1,4 +1,4 @@ -@import url("http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Raleway:400,800,900"); +@import url("//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Raleway:400,800,900"); /* Future Imperfect by HTML5 UP @@ -3432,4 +3432,4 @@ padding: 1.5em; } - } \ No newline at end of file + } diff --git a/index.php b/index.php index 1be0dbf9..dec231f3 100644 --- a/index.php +++ b/index.php @@ -37,4 +37,4 @@ if($Url->whereAmI()==='admin') { // Site else { require(PATH_BOOT.'site.php'); -} +} \ No newline at end of file diff --git a/install.php b/install.php index 09b79420..ca0215a1 100644 --- a/install.php +++ b/install.php @@ -107,24 +107,32 @@ include(PATH_HELPERS.'log.class.php'); include(PATH_HELPERS.'date.class.php'); include(PATH_KERNEL.'dblanguage.class.php'); -// --- LANGUAGE --- - -// Try to detect language from HTTP -$explode = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); -$localeFromHTTP = empty($explode[0])?'en_US':str_replace('-', '_', $explode[0]); +// --- LANGUAGE and LOCALE --- +// Language from the URI if(isset($_GET['language'])) { $localeFromHTTP = Sanitize::html($_GET['language']); } +else { + // Try to detect the locale + if( function_exists('locale_accept_from_http') ) { + $localeFromHTTP = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']); + } + else { + $explodeLocale = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); + $localeFromHTTP = empty($explodeLocale[0])?'en_US':str_replace('-', '_', $explodeLocale[0]); + } +} -if( !Sanitize::pathFile(PATH_LANGUAGES.$localeFromHTTP.'.json') ) { +// Check if the dictionary exists, otherwise the default language is English. +if( !file_exists(PATH_LANGUAGES.$localeFromHTTP.'.json') ) { $localeFromHTTP = 'en_US'; } +// Get language file $Language = new dbLanguage($localeFromHTTP); -// --- LOCALE --- - +// Set locale setlocale(LC_ALL, $localeFromHTTP); // --- TIMEZONE --- @@ -132,7 +140,7 @@ setlocale(LC_ALL, $localeFromHTTP); // Check if timezone is defined in php.ini $iniDate = ini_get('date.timezone'); if(empty($iniDate)) { - // Timezone not defined in php.ini, then UTC as default. + // Timezone not defined in php.ini, then set UTC as default. date_default_timezone_set('UTC'); } @@ -229,15 +237,15 @@ function checkSystem() } // Finish with the installation. -function install($adminPassword, $email, $timezoneOffset) +function install($adminPassword, $email, $timezone) { global $Language; $stdOut = array(); - $timezone = timezone_name_from_abbr('', $timezoneOffset, 0); - if($timezone === false) { $timezone = timezone_name_from_abbr('', $timezoneOffset, 0); } // Workaround bug #44780 - date_default_timezone_set($timezone); + if( date_default_timezone_set($timezone) ) { + date_default_timezone_set('UTC'); + } $currentDate = Date::current(DB_DATE_FORMAT); @@ -361,7 +369,7 @@ function install($adminPassword, $email, $timezoneOffset) 'uriPage'=>'/', 'uriTag'=>'/tag/', 'url'=>PROTOCOL.DOMAIN.HTML_PATH_ROOT, - 'cliMode'=>'true', + 'cliMode'=>false, 'emailFrom'=>'no-reply@'.DOMAIN ); @@ -580,6 +588,7 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' ) + @@ -673,15 +682,14 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )