diff --git a/.gitignore b/.gitignore index b6bc583a..17801a58 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .DS_Store +!themes/pure +themes/* content/databases content/pages content/posts diff --git a/.htaccess b/.htaccess index 4e4b814e..5a85c80c 100644 --- a/.htaccess +++ b/.htaccess @@ -10,6 +10,6 @@ RewriteRule ^content/(.*)\.txt$ - [R=404,L] # All URL process by index.php RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^(.*) index.php [L] +RewriteRule ^(.*) index.php [PT,L] \ No newline at end of file diff --git a/README.md b/README.md index d12a0f68..d94b5869 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Social ------ - [Twitter](https://twitter.com/bludit) -- [Facebook](https://www.facebook.com/pages/Bludit/239255789455913) +- [Facebook](https://www.facebook.com/bluditcms) - [Google+](https://plus.google.com/+Bluditcms) Requirements diff --git a/admin/controllers/settings.php b/admin/controllers/settings.php index 7ac2747d..f6372a52 100644 --- a/admin/controllers/settings.php +++ b/admin/controllers/settings.php @@ -20,11 +20,16 @@ function setSettings($args) // Add slash at the begin and end. // This fields are in the settings->advanced mode - if(isset($args['advanced'])) { + if(isset($args['form-advanced'])) { $args['url'] = Text::addSlashes($args['url'],false,true); $args['uriPost'] = Text::addSlashes($args['uriPost']); $args['uriPage'] = Text::addSlashes($args['uriPage']); $args['uriTag'] = Text::addSlashes($args['uriTag']); + + if(($args['uriPost']==$args['uriPage']) || ($args['uriPost']==$args['uriTag']) || ($args['uriPage']==$args['uriTag']) ) + { + $args = array(); + } } if( $Site->set($args) ) { diff --git a/admin/themes/default/css/favicon.png b/admin/themes/default/css/favicon.png new file mode 100644 index 00000000..517c6c12 Binary files /dev/null and b/admin/themes/default/css/favicon.png differ diff --git a/admin/themes/default/index.php b/admin/themes/default/index.php index 54c24897..f09e96b9 100644 --- a/admin/themes/default/index.php +++ b/admin/themes/default/index.php @@ -1,20 +1,23 @@ - + + <?php echo $layout['title'] ?> - - - - + - - - + + + + + + + + @@ -96,7 +99,7 @@ $(document).ready(function() { - + \ No newline at end of file diff --git a/admin/views/add-user.php b/admin/views/add-user.php index c7bb96be..911a7192 100644 --- a/admin/views/add-user.php +++ b/admin/views/add-user.php @@ -31,7 +31,7 @@ diff --git a/admin/views/manage-pages.php b/admin/views/manage-pages.php index 7baea676..e0a096c6 100644 --- a/admin/views/manage-pages.php +++ b/admin/views/manage-pages.php @@ -7,6 +7,8 @@ p('Title') ?> p('Parent') ?> + p('Friendly URL') ?> + p('Position') ?> @@ -26,6 +28,8 @@ echo ''; echo ''.($Page->parentKey()?NO_PARENT_CHAR:'').''.($Page->published()?'':''.$Language->g('Draft').' ').($Page->title()?$Page->title():''.$Language->g('Empty title').' ').''; echo ''.$parentTitle.''; + echo ''.$Url->filters('page').'/'.$Page->key().''; + echo ''.$Page->position().''; echo ''; } } diff --git a/admin/views/manage-posts.php b/admin/views/manage-posts.php old mode 100755 new mode 100644 index 349621cd..9cc75728 --- a/admin/views/manage-posts.php +++ b/admin/views/manage-posts.php @@ -6,7 +6,8 @@ p('Title') ?> - p('Published date') ?> + p('Published date') ?> + p('Friendly URL') ?> @@ -24,7 +25,8 @@ echo ''; echo ''.($status?''.$status.'':'').($Post->title()?$Post->title():''.$Language->g('Empty title').' ').''; - echo ''.$Post->date().''; + echo ''.$Post->date().''; + echo ''.$Url->filters('post').'/'.$Post->key().''; echo ''; } diff --git a/install.php b/install.php old mode 100755 new mode 100644 index 628eeca1..844cf5a4 --- a/install.php +++ b/install.php @@ -226,7 +226,7 @@ function install($adminPassword, $email) 'error'=>array( 'description'=>'Error page', 'username'=>'admin', - 'tags'=>'', + 'tags'=>array(), 'status'=>'published', 'date'=>$currentDate, 'position'=>0 @@ -241,7 +241,7 @@ function install($adminPassword, $email) 'description'=>'Welcome to Bludit', 'username'=>'admin', 'status'=>'published', - 'tags'=>'bludit, cms, flat-file', + 'tags'=>array('bludit'=>'Bludit','cms'=>'CMS','flat-files'=>'Flat files'), 'allowComments'=>false, 'date'=>$currentDate ) @@ -264,7 +264,8 @@ function install($adminPassword, $email) 'uriPost'=>'/post/', 'uriPage'=>'/', 'uriTag'=>'/tag/', - 'url'=>'http://'.DOMAIN.HTML_PATH_ROOT + 'url'=>'http://'.DOMAIN.HTML_PATH_ROOT, + 'cliMode'=>true ); file_put_contents(PATH_DATABASES.'site.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX); @@ -304,7 +305,8 @@ function install($adminPassword, $email) array( 'postsIndex'=>array( 'bludit'=>array('name'=>'Bludit', 'posts'=>array('first-post')), - 'cms'=>array('name'=>'cms', 'posts'=>array('first-post')) + 'cms'=>array('name'=>'CMS', 'posts'=>array('first-post')), + 'flat-files'=>array('name'=>'Flat files', 'posts'=>array('first-post')) ), 'pagesIndex'=>array() ), diff --git a/kernel/boot/init.php b/kernel/boot/init.php index c932bf32..d27d2090 100644 --- a/kernel/boot/init.php +++ b/kernel/boot/init.php @@ -134,20 +134,34 @@ $Parsedown = new Parsedown(); $Security = new Security(); // HTML PATHs -$base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/'; +//$base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/'; +$base = empty( $_SERVER['SCRIPT_NAME'] ) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; +$base = dirname($base); + +if($base!=DS) { + $base = $base.'/'; +} + define('HTML_PATH_ROOT', $base); +// Paths for themes define('HTML_PATH_THEMES', HTML_PATH_ROOT.'themes/'); define('HTML_PATH_THEME', HTML_PATH_ROOT.'themes/'.$Site->theme().'/'); define('HTML_PATH_THEME_CSS', HTML_PATH_THEME.'css/'); define('HTML_PATH_THEME_JS', HTML_PATH_THEME.'js/'); +define('HTML_PATH_THEME_IMG', HTML_PATH_THEME.'img/'); + define('HTML_PATH_ADMIN_THEME', HTML_PATH_ROOT.'admin/themes/'.$Site->adminTheme().'/'); +define('HTML_PATH_ADMIN_THEME_JS', HTML_PATH_ADMIN_THEME.'js/'); define('HTML_PATH_ADMIN_ROOT', HTML_PATH_ROOT.'admin/'); define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'content/uploads/'); define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'plugins/'); +define('JQUERY', HTML_PATH_ADMIN_THEME_JS.'jquery.min.js'); + // PHP paths with dependency define('PATH_THEME', PATH_ROOT.'themes/'.$Site->theme().'/'); +define('PATH_THEME_PHP', PATH_THEME.'php'.DS); // Objects with dependency $Language = new dbLanguage( $Site->locale() ); diff --git a/kernel/boot/rules/70.pages.php b/kernel/boot/rules/70.pages.php index ab24060d..2e0400ce 100644 --- a/kernel/boot/rules/70.pages.php +++ b/kernel/boot/rules/70.pages.php @@ -30,26 +30,21 @@ function build_page($key) global $dbUsers; global $Parsedown; - // Page object. + // Page object, content from FILE. $Page = new Page($key); if( !$Page->isValid() ) { return false; } - // Page database. + // Page database, content from DATABASE JSON. $db = $dbPages->getDb($key); if( !$db ) { return false; } - // Foreach field from database. - foreach($db as $field=>$value) - { - // Not overwrite the value from file. - $Page->setField($field, $value, false); - - // Overwrite the value on the db. - //$dbPages->setDb($key, $field, $value); + // Foreach field from DATABASE. + foreach($db as $field=>$value) { + $Page->setField($field, $value); } // Content in raw format @@ -141,6 +136,11 @@ function build_all_pages() // Main // ============================================================================ +// Search for changes on pages by the user. +if( $Site->cliMode() ) { + $dbPages->regenerateCli(); +} + // Filter by page, then build it if( ($Url->whereAmI()==='page') && ($Url->notFound()===false) ) { diff --git a/kernel/boot/rules/70.posts.php b/kernel/boot/rules/70.posts.php index 3fa0fb49..62f6ff9e 100644 --- a/kernel/boot/rules/70.posts.php +++ b/kernel/boot/rules/70.posts.php @@ -34,25 +34,23 @@ function buildPost($key) global $Parsedown; global $Site; - // Post object, this get the content from the file. + // Post object, content from FILE. $Post = new Post($key); if( !$Post->isValid() ) { Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from file with key: '.$key); return false; } - // Page database, this get the contente from the database json. + // Post database, content from DATABASE JSON. $db = $dbPosts->getDb($key); if( !$db ) { Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from database with key: '.$key); return false; } - // Foreach field from database. - foreach($db as $field=>$value) - { - // Not overwrite the value from file. - $Post->setField($field, $value, false); + // Foreach field from DATABASE. + foreach($db as $field=>$value) { + $Post->setField($field, $value); } // Content in raw format @@ -117,6 +115,13 @@ function buildPostsForPage($pageNumber=0, $amount=POSTS_PER_PAGE_ADMIN, $removeU // Main // ============================================================================ +// Search for changes on posts by the user. +if( $Site->cliMode() ) { + if($dbPosts->regenerateCli()) { + reIndexTagsPosts(); + } +} + // Execute the scheduler. if( $dbPosts->scheduler() ) { // Reindex dbTags. diff --git a/kernel/dblanguage.class.php b/kernel/dblanguage.class.php index 7da6c0fa..58a999cc 100644 --- a/kernel/dblanguage.class.php +++ b/kernel/dblanguage.class.php @@ -87,7 +87,7 @@ class dbLanguage extends dbJSON // Returns an array with all dictionaries. public function getLanguageList() { - $files = glob(PATH_LANGUAGES.'*.json'); + $files = Filesystem::listFiles(PATH_LANGUAGES, '*', 'json'); $tmp = array(); diff --git a/kernel/dbpages.class.php b/kernel/dbpages.class.php index d0f112b4..61933d7f 100644 --- a/kernel/dbpages.class.php +++ b/kernel/dbpages.class.php @@ -9,7 +9,7 @@ class dbPages extends dbJSON 'content'=> array('inFile'=>true, 'value'=>''), 'description'=> array('inFile'=>false, 'value'=>''), 'username'=> array('inFile'=>false, 'value'=>''), - 'tags'=> array('inFile'=>false, 'value'=>''), + 'tags'=> array('inFile'=>false, 'value'=>array()), 'status'=> array('inFile'=>false, 'value'=>'draft'), 'date'=> array('inFile'=>false, 'value'=>0), 'position'=> array('inFile'=>false, 'value'=>0) @@ -43,12 +43,17 @@ class dbPages extends dbJSON { if( isset($args[$field]) ) { - // Sanitize if will be saved on database. - if( !$options['inFile'] ) { - $tmpValue = Sanitize::html($args[$field]); + if($field=='tags') { + $tmpValue = $this->generateTags($args['tags']); } else { - $tmpValue = $args[$field]; + // Sanitize if will be saved on database. + if( !$options['inFile'] ) { + $tmpValue = Sanitize::html($args[$field]); + } + else { + $tmpValue = $args[$field]; + } } } // Default value for the field. @@ -120,12 +125,17 @@ class dbPages extends dbJSON { if( isset($args[$field]) ) { - // Sanitize if will be saved on database. - if( !$options['inFile'] ) { - $tmpValue = Sanitize::html($args[$field]); + if($field=='tags') { + $tmpValue = $this->generateTags($args['tags']); } else { - $tmpValue = $args[$field]; + // Sanitize if will be saved on database. + if( !$options['inFile'] ) { + $tmpValue = Sanitize::html($args[$field]); + } + else { + $tmpValue = $args[$field]; + } } } // Default value for the field. @@ -285,6 +295,31 @@ class dbPages extends dbJSON return $this->db; } + // Returns an Array, array('tagSlug'=>'tagName') + // (string) $tags, tag list separeted by comma. + public function generateTags($tags) + { + $tmp = array(); + + $tags = trim($tags); + + if(empty($tags)) { + return $tmp; + } + + // Make array + $tags = explode(',', $tags); + + foreach($tags as $tag) + { + $tag = trim($tag); + $tagKey = Text::cleanUrl($tag); + $tmp[$tagKey] = $tag; + } + + return $tmp; + } + public function regenerateCli() { $db = $this->db; @@ -300,8 +335,10 @@ class dbPages extends dbJSON $fields['status'] = CLI_STATUS; $fields['date'] = Date::current(DB_DATE_FORMAT); + $fields['username'] = 'admin'; - $tmpPaths = glob(PATH_PAGES.'*', GLOB_ONLYDIR); + //$tmpPaths = glob(PATH_PAGES.'*', GLOB_ONLYDIR); + $tmpPaths = Filesystem::listDirectories(PATH_PAGES); foreach($tmpPaths as $directory) { $key = basename($directory); @@ -312,7 +349,8 @@ class dbPages extends dbJSON } // Recovery pages from subdirectories - $subPaths = glob($directory.DS.'*', GLOB_ONLYDIR); + //$subPaths = glob($directory.DS.'*', GLOB_ONLYDIR); + $subPaths = Filesystem::listDirectories($directory.DS); foreach($subPaths as $subDirectory) { $subKey = basename($subDirectory); @@ -335,13 +373,27 @@ class dbPages extends dbJSON // Update all fields from FILE to DATABASE. foreach($fields as $f=>$v) { - if($Page->getField($f)) { - // DEBUG: Validar/Sanitizar valores, ej: validar formato fecha - $this->db[$key][$f] = $Page->getField($f); + // If the field exists on the FILE, update it. + if($Page->getField($f)) + { + $valueFromFile = $Page->getField($f); + + if($f=='tags') { + // Generate tags array. + $this->db[$key]['tags'] = $this->generateTags($valueFromFile); + } + elseif($f=='date') { + // Validate Date from file + if(Valid::date($valueFromFile, DB_DATE_FORMAT)) { + $this->db[$key]['date'] = $valueFromFile; + } + } + else { + // Sanitize the values from file. + $this->db[$key][$f] = Sanitize::html($valueFromFile); + } } } - - // DEBUG: Update tags } // Remove old pages from db diff --git a/kernel/dbposts.class.php b/kernel/dbposts.class.php index 6ff99c93..113d8dff 100644 --- a/kernel/dbposts.class.php +++ b/kernel/dbposts.class.php @@ -8,7 +8,7 @@ class dbPosts extends dbJSON 'description'=> array('inFile'=>false, 'value'=>''), 'username'=> array('inFile'=>false, 'value'=>''), 'status'=> array('inFile'=>false, 'value'=>'draft'), // published, draft, scheduled - 'tags'=> array('inFile'=>false, 'value'=>''), + 'tags'=> array('inFile'=>false, 'value'=>array()), 'allowComments'=> array('inFile'=>false, 'value'=>false), 'date'=> array('inFile'=>false, 'value'=>'') ); @@ -112,26 +112,26 @@ class dbPosts extends dbJSON $args['status'] = 'scheduled'; } - // Tags - if(Text::isNotEmpty($args['tags'])) { - $cleanTags = array_map('trim', explode(',', $args['tags'])); - $args['tags'] = implode(',', $cleanTags); - } - // Verify arguments with the database fields. foreach($this->dbFields as $field=>$options) { + // If the field is in the arguments. if( isset($args[$field]) ) { - // Sanitize if will be saved on database. - if( !$options['inFile'] ) { - $tmpValue = Sanitize::html($args[$field]); + if($field=='tags') { + $tmpValue = $this->generateTags($args['tags']); } else { - $tmpValue = $args[$field]; + // Sanitize if will be saved on database. + if( !$options['inFile'] ) { + $tmpValue = Sanitize::html($args[$field]); + } + else { + $tmpValue = $args[$field]; + } } } - // Default value for the field. + // Default value if not in the arguments. else { $tmpValue = $options['value']; @@ -332,6 +332,31 @@ class dbPosts extends dbJSON return false; } + // Returns an Array, array('tagSlug'=>'tagName') + // (string) $tags, tag list separeted by comma. + public function generateTags($tags) + { + $tmp = array(); + + $tags = trim($tags); + + if(empty($tags)) { + return $tmp; + } + + // Make array + $tags = explode(',', $tags); + + foreach($tags as $tag) + { + $tag = trim($tag); + $tagKey = Text::cleanUrl($tag); + $tmp[$tagKey] = $tag; + } + + return $tmp; + } + // Sort posts by date. public function sortByDate($HighToLow=true) { @@ -353,13 +378,15 @@ class dbPosts extends dbJSON return $a['date']<$b['date']; } + // Return TRUE if there are new posts, FALSE otherwise. public function regenerateCli() { $db = $this->db; - $newPaths = array(); + $allPosts = array(); $fields = array(); + $currentDate = Date::current(DB_DATE_FORMAT); - // Default fields and value + // Generate default fields and values. foreach($this->dbFields as $field=>$options) { if(!$options['inFile']) { $fields[$field] = $options['value']; @@ -367,45 +394,69 @@ class dbPosts extends dbJSON } $fields['status'] = CLI_STATUS; - $fields['date'] = Date::current(DB_DATE_FORMAT); + $fields['date'] = $currentDate; + $fields['username'] = 'admin'; - // Recovery pages from the first level of directories - $tmpPaths = glob(PATH_POSTS.'*', GLOB_ONLYDIR); + // Recovery posts from the first level of directories + $tmpPaths = Filesystem::listDirectories(PATH_POSTS); foreach($tmpPaths as $directory) { - $key = basename($directory); - - if(file_exists($directory.DS.'index.txt')) { - // The key is the directory name - $newPaths[$key] = true; - } - } - - foreach($newPaths as $key=>$value) - { - if(!isset($this->db[$key])) { - $this->db[$key] = $fields; - } - - $Post = new Post($key); - - // Update all fields from FILE to DATABASE. - foreach($fields as $f=>$v) + if(file_exists($directory.DS.'index.txt')) { - if($Post->getField($f)) { - // DEBUG: Validar/Sanitizar valores, ej: validar formato fecha - $this->db[$key][$f] = $Post->getField($f); + // The key is the directory name. + $key = basename($directory); + + // All keys posts + $allPosts[$key] = true; + + // Create the new entry if not exists on DATABASE. + if(!isset($this->db[$key])) { + // New entry on database + $this->db[$key] = $fields; + } + + // Create the post from FILE. + $Post = new Post($key); + + // Update all fields from FILE to DATABASE. + foreach($fields as $f=>$v) + { + // If the field exists on the FILE, update it. + if($Post->getField($f)) + { + $valueFromFile = $Post->getField($f); + + if($f=='tags') { + // Generate tags array. + $this->db[$key]['tags'] = $this->generateTags($valueFromFile); + } + elseif($f=='date') { + // Validate Date from file + if(Valid::date($valueFromFile, DB_DATE_FORMAT)) { + $this->db[$key]['date'] = $valueFromFile; + + if( $valueFromFile>$currentDate ) { + $this->db[$key]['status'] = 'scheduled'; + } + } + } + else { + // Sanitize the values from file. + $this->db[$key][$f] = Sanitize::html($valueFromFile); + } + } } } - - // DEBUG: Update tags } - // Remove old posts from db - foreach( array_diff_key($db, $newPaths) as $key=>$data ) { + // Remove orphan posts from db, the orphan posts are posts deleted by hand (directory deleted). + foreach( array_diff_key($db, $allPosts) as $key=>$data ) { unset($this->db[$key]); } + // Sort posts before save. + $this->sortByDate(); + // Save the database. if( $this->save() === false ) { Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.'); diff --git a/kernel/dbsite.class.php b/kernel/dbsite.class.php index ac3928f0..a10e470b 100644 --- a/kernel/dbsite.class.php +++ b/kernel/dbsite.class.php @@ -17,7 +17,8 @@ class dbSite extends dbJSON 'uriPage'=> array('inFile'=>false, 'value'=>'/'), 'uriPost'=> array('inFile'=>false, 'value'=>'/post/'), 'uriTag'=> array('inFile'=>false, 'value'=>'/tag/'), - 'url'=> array('inFile'=>false, 'value'=>'') + 'url'=> array('inFile'=>false, 'value'=>''), + 'cliMode'=> array('inFile'=>false, 'value'=>true) ); function __construct() @@ -63,8 +64,9 @@ class dbSite extends dbJSON $filters['page'] = $this->db['uriPage']; $filters['tag'] = $this->db['uriTag']; - if(empty($filter)) + if(empty($filter)) { return $filters; + } return $filters[$filter]; } @@ -96,15 +98,6 @@ class dbSite extends dbJSON return $this->db['slogan']; } - public function advancedOptions() - { - if($this->db['advancedOptions']==='true') { - return true; - } - - return false; - } - // Returns the site description. public function description() { @@ -135,6 +128,12 @@ class dbSite extends dbJSON return $this->db['url']; } + // Returns TRUE if the cli mode is enabled, otherwise FALSE. + public function cliMode() + { + return $this->db['cliMode']; + } + // Returns the relative home link public function homeLink() { diff --git a/kernel/dbtags.class.php b/kernel/dbtags.class.php index 92d7b824..8ab3b6bd 100644 --- a/kernel/dbtags.class.php +++ b/kernel/dbtags.class.php @@ -59,25 +59,17 @@ class dbTags extends dbJSON // Foreach post foreach($db as $postKey=>$values) { - $explode = explode(',', $values['tags']); + $tags = $values['tags']; // Foreach tag from post - foreach($explode as $tagName) + foreach($tags as $tagKey=>$tagName) { - $tagName = trim($tagName); - $tagKey = $tagName; - //$tagKey = Text::cleanUrl($tagName); - - // If the tag is not empty. - if(Text::isNotEmpty($tagName)) - { - if( isset($tagsIndex[$tagKey]) ) { - array_push($tagsIndex[$tagKey]['posts'], $postKey); - } - else { - $tagsIndex[$tagKey]['name'] = $tagName; - $tagsIndex[$tagKey]['posts'] = array($postKey); - } + if( isset($tagsIndex[$tagKey]) ) { + array_push($tagsIndex[$tagKey]['posts'], $postKey); + } + else { + $tagsIndex[$tagKey]['name'] = $tagName; + $tagsIndex[$tagKey]['posts'] = array($postKey); } } } diff --git a/kernel/helpers/filesystem.class.php b/kernel/helpers/filesystem.class.php index 33de445f..e5a3310e 100644 --- a/kernel/helpers/filesystem.class.php +++ b/kernel/helpers/filesystem.class.php @@ -3,9 +3,28 @@ class Filesystem { // NEW + + // Returns an array with the absolutes directories. public static function listDirectories($path, $regex='*') { - return glob($path.$regex, GLOB_ONLYDIR); + $directories = glob($path.$regex, GLOB_ONLYDIR); + + if(empty($directories)) { + return array(); + } + + return $directories; + } + + public static function listFiles($path, $regex='*', $extension) + { + $files = glob($path.$regex.'.'.$extension); + + if(empty($files)) { + return array(); + } + + return $files; } public static function mkdir($pathname, $recursive=false) diff --git a/kernel/helpers/theme.class.php b/kernel/helpers/theme.class.php index 58cd2297..4a61984a 100644 --- a/kernel/helpers/theme.class.php +++ b/kernel/helpers/theme.class.php @@ -4,6 +4,17 @@ class Theme { // NEW + public static function favicon($file='favicon.png', $path=HTML_PATH_THEME_IMG, $echo=true) + { + $tmp = ''.PHP_EOL; + + if($echo) { + echo $tmp; + } + + return $tmp; + } + public static function css($files, $path=HTML_PATH_THEME_CSS, $echo=true) { if(!is_array($files)) { @@ -109,6 +120,16 @@ class Theme { } } + public static function jquery($echo=true) + { + $tmp = ''.PHP_EOL; + + if($echo) { + echo $tmp; + } + + return $tmp; + } // OLD @@ -120,17 +141,8 @@ class Theme { return BLOG_URL; } - public static function jquery($path=JS_JQUERY) - { - $tmp = ''.PHP_EOL; - return $tmp; - } - public static function favicon() - { - return ''.PHP_EOL; - } public static function name() { diff --git a/kernel/helpers/valid.class.php b/kernel/helpers/valid.class.php index a3d305e2..d6acbcdc 100644 --- a/kernel/helpers/valid.class.php +++ b/kernel/helpers/valid.class.php @@ -28,7 +28,8 @@ class Valid { public static function date($date, $format='Y-m-d H:i:s') { $tmp = DateTime::createFromFormat($format, $date); - return $tmp && $tmp->format($format) == $date; + + return $tmp && $tmp->format($format)==$date; } } \ No newline at end of file diff --git a/kernel/page.class.php b/kernel/page.class.php index e3dc6b85..7b6c5aa7 100644 --- a/kernel/page.class.php +++ b/kernel/page.class.php @@ -49,15 +49,28 @@ class Page extends fileContent return $this->getField('description'); } - public function tags() + public function tags($returnsArray=false) { - return $this->getField('tags'); - } + global $Url; - public function tagsArray() - { $tags = $this->getField('tags'); - return explode(',', $tags); + + if($returnsArray) { + + if($tags==false) { + return array(); + } + + return $tags; + } + else { + if($tags==false) { + return false; + } + + // Return string with tags separeted by comma. + return implode(', ', $tags); + } } public function position() @@ -141,7 +154,8 @@ class Page extends fileContent public function children() { $tmp = array(); - $paths = glob(PATH_PAGES.$this->getField('key').DS.'*', GLOB_ONLYDIR); + //$paths = glob(PATH_PAGES.$this->getField('key').DS.'*', GLOB_ONLYDIR); + $paths = Filesystem::listDirectories(PATH_PAGES.$this->getField('key').DS); foreach($paths as $path) { array_push($tmp, basename($path)); } diff --git a/kernel/post.class.php b/kernel/post.class.php index 8083f664..883eafff 100644 --- a/kernel/post.class.php +++ b/kernel/post.class.php @@ -118,10 +118,20 @@ class Post extends fileContent $tags = $this->getField('tags'); if($returnsArray) { - return explode(',', $tags); + + if($tags==false) { + return array(); + } + + return $tags; } else { - return $tags; + if($tags==false) { + return false; + } + + // Return string with tags separeted by comma. + return implode(', ', $tags); } } diff --git a/languages/cs_CZ.json b/languages/cs_CZ.json old mode 100755 new mode 100644 diff --git a/languages/de_DE.json b/languages/de_DE.json old mode 100755 new mode 100644 index 7e69d684..2b6dc5f8 --- a/languages/de_DE.json +++ b/languages/de_DE.json @@ -3,7 +3,7 @@ { "native": "Deutsch (Deutschland)", "english-name": "German", - "last-update": "2015-08-09", + "last-update": "2015-09-22", "author": "Edi", "email": "egoetschel@clickwork.ch", "website": "http://www.clickwork.ch" @@ -16,27 +16,27 @@ "dashboard": "Dashboard", "role": "Rolle", "post": "Beitrag", - "posts": "Beiträge", + "posts": "Beiträge", "users": "Benutzer", "administrator": "Administrator", - "add": "Hinzufügen", + "add": "Hinzufügen", "cancel": "Abbrechen", "content": "Inhalt", "title": "Titel", - "no-parent": "Keine übergeordnete Seite", + "no-parent": "Keine übergeordnete Seite", "edit-page": "Seite bearbeiten", "edit-post": "Beitrag bearbeiten", "add-a-new-user": "Neuer Benutzer", - "parent": "Übergeordnete Seite", + "parent": "Übergeordnete Seite", "friendly-url": "Pretty URL", "description": "Beschreibung", - "posted-by": "Veröffentlicht von", - "tags": "Schlagwörter", + "posted-by": "Veröffentlicht von", + "tags": "Schlagwörter", "position": "Position", "save": "Speichern", "draft": "Entwurf", - "delete": "Löschen", - "registered": "Hinzugefügt", + "delete": "Löschen", + "registered": "Hinzugefügt", "Notifications": "Benachrichtigungen", "profile": "Profil", "email": "E-Mail", @@ -50,14 +50,14 @@ "manage": "Verwaltung", "themes": "Themes", "prev-page": "Vorhergehende Seite", - "next-page": "Nächste Seite", + "next-page": "Nächste Seite", "configure-plugin": "Plugin konfigurieren", - "confirm-delete-this-action-cannot-be-undone": "Bestaetige das Loeschen, dieser Vorgang kann nicht rueckgaengig gemacht werden.", + "confirm-delete-this-action-cannot-be-undone": "Bestätige das Löschen, dieser Vorgang kann nicht rückgängig gemacht werden.", "site-title": "Titel der Webseite", "site-slogan": "Untertitel", "site-description": "Informationen zur Website", "footer-text": "Footer-Text", - "posts-per-page": "Beiträge pro Seite", + "posts-per-page": "Beiträge pro Seite", "site-url": "URL der Website", "writting-settings": "Beitrags- und Seiteneinstellungen", "url-filters": "URL-Erweiterungen", @@ -70,80 +70,97 @@ "timezone": "Zeitzone", "locale": "Locale", "new-post": "Neuer Beitrag", - "html-and-markdown-code-supported": "HTML und Markdown werden unterstützt", + "html-and-markdown-code-supported": "HTML und Markdown werden unterstützt", "new-page": "Neue Seite", - "manage-posts": "Beiträge verwalten", - "published-date": "Veröffentlicht", - "modified-date": "Letzte Änderung", + "manage-posts": "Beiträge verwalten", + "published-date": "Veröffentlicht", + "modified-date": "Letzte Änderung", "empty-title": "Kein Titel", "plugins": "Plugins", "install-plugin": "Plugin installieren", "uninstall-plugin": "Plugin deinstallieren", "new-password": "Neues Passwort", "edit-user": "Benutzer bearbeiten", - "publish-now": "Veröffentlichen", + "publish-now": "Veröffentlichen", "first-name": "Vorname", "last-name": "Nachname", "bludit-version": "Bludit Version", "powered-by": "Diese Website wurde eingerichtet mit", - "recent-posts": "Neueste Beiträge", + "recent-posts": "Neueste Beiträge", "manage-pages": "Seiten verwalten", "advanced-options": "Erweiterte Einstellungen", - "user-deleted": "Der Benutzer wurde gelöscht.", - "page-added-successfully": "Die Seite wurde veröffentlicht.", - "post-added-successfully": "Die Seite wurde veröffentlicht.", - "the-post-has-been-deleted-successfully": "Der Beitrag wurde gelöscht.", - "the-page-has-been-deleted-successfully": "Die Seite wurde gelöscht.", + "user-deleted": "Der Benutzer wurde gelöscht.", + "page-added-successfully": "Die Seite wurde veröffentlicht.", + "post-added-successfully": "Der Veitrag wurde veröffentlicht.", + "the-post-has-been-deleted-successfully": "Der Beitrag wurde gelöscht.", + "the-page-has-been-deleted-successfully": "Die Seite wurde gelöscht.", "username-or-password-incorrect": "Der Benutzername oder das Passwort ist falsch.", "database-regenerated": "Die Datenbank wurde neu aufgebaut.", - "the-changes-have-been-saved": "Die Änderungen wurden gespeichert.", - "enable-more-features-at": "Zusätzlich Felder können aktiviert werden unter", + "the-changes-have-been-saved": "Die Änderungen wurden gespeichert.", + "enable-more-features-at": "Zusätzlich Felder können aktiviert werden unter", "username-already-exists": "Diesen Benutzernamen gibt es bereits.", "username-field-is-empty": "Es muss ein Benutzername eingegeben werden.", - "the-password-and-confirmation-password-do-not-match":"Die eingegebenen Passwörter stimmen nicht überein.", - "user-has-been-added-successfully": "Der Benutzer wurde hinzugefügt.", + "the-password-and-confirmation-password-do-not-match":"Die eingegebenen Passwörter stimmen nicht überein.", + "user-has-been-added-successfully": "Der Benutzer wurde hinzugefügt.", "you-do-not-have-sufficient-permissions": "Du bist nicht berechtigt, die Seite aufzurufen.", - "settings-advanced-writting-settings": "Einstellungen->Erweitert->Beitrags- und Seiteneinstellungen", - "new-posts-and-pages-synchronized": "Neue Beitrãge und Seitenwurden synchronisiert.", - "you-can-choose-the-users-privilege": "Rechte des Benutzers. Ein Editor kann nur Seiten anlegen und Beiträge schreiben.", - "email-will-not-be-publicly-displayed": "Die E-Mail wird nicht öffentlich gezeigt. Sie wird für die Wiederherstellung des Passworts und Benachrichtigungen verwendet.", + "settings-advanced-writting-settings": "Einstellungen > Erweitert > Beitrags- und Seiteneinstellungen", + "new-posts-and-pages-synchronized": "Neue Beiträge und Seiten wurden synchronisiert.", + "you-can-choose-the-users-privilege": "Rechte des Benutzers. Ein Editor kann nur Seiten anlegen und Beiträge schreiben.", + "email-will-not-be-publicly-displayed": "Die E-Mail wird nicht öffentlich gezeigt. Sie wird für die Wiederherstellung des Passworts und Benachrichtigungen verwendet.", "use-this-field-to-name-your-site": "Name der Website, wie er auf jeder Seite angezeigt wird.", - "use-this-field-to-add-a-catchy-prhase": "Untertitel oder Slogan der Website.", - "you-can-add-a-site-description-to-provide": "Kurze Beschreibung der Website fúr Suchmaschinen.", - "you-can-add-a-small-text-on-the-bottom": "Text im Fussbereich jeder Seite. Beispielsweise: Copyright-Hinweis, Eigentümer der Website usw.", - "number-of-posts-to-show-per-page": "Anzahl der Beiträge, die auf einer Seite gezeigt werden..", + "use-this-field-to-add-a-catchy-phrase": "Untertitel oder Slogan der Website.", + "you-can-add-a-site-description-to-provide": "Kurze Beschreibung der Website für Suchmaschinen.", + "you-can-add-a-small-text-on-the-bottom": "Text im Fussbereich jeder Seite. Beispielsweise: Copyright-Hinweis, Eigentümer der Website usw.", + "number-of-posts-to-show-per-page": "Anzahl der Beiträge, die auf einer Seite gezeigt werden.", "the-url-of-your-site": "URL der Website.", - "add-or-edit-description-tags-or": "Beschreibungen, Schlagwörter und Pretty URL hinzufügen oder ändern.", + "add-or-edit-description-tags-or": "Beschreibungen, Schlagwörter und Pretty URL hinzufügen oder ändern.", "select-your-sites-language": "Sprache der Website.", - "select-a-timezone-for-a-correct": "Zeitzone für die richtige Anzeige des Datums und der Zeit auf der Website.", + "select-a-timezone-for-a-correct": "Zeitzone für die richtige Anzeige des Datums und der Zeit auf der Website.", "you-can-use-this-field-to-define-a-set-of": "Parameter mit Bezug auf die verwendete Sprache und das Land. Beispielsweise: de_DE, de_CH usw.", - "you-can-modify-the-url-which-identifies":"Der URL kann selbst angepasst werden. Möglich sind höchstens 150 Zeichen.", - "this-field-can-help-describe-the-content": "Kurze Inhaltsbeschreibung. Möglich sind höchstens 150 Zeichen.", - "write-the-tags-separeted-by-comma": "Schlagwörter getrennt durch Kommas. Beispielsweise: Schlagwort1, Schlagwort2, Schlagwort3", - "delete-the-user-and-all-its-posts":"Benutzer und alle seine Beiträge löschen", - "delete-the-user-and-associate-its-posts-to-admin-user": "Benutzer löschen und seine Beiträge dem Administrator zuordnen", + "you-can-modify-the-url-which-identifies":"Der URL kann selbst angepasst werden. Möglich sind höchstens 150 Zeichen.", + "this-field-can-help-describe-the-content": "Kurze Inhaltsbeschreibung. Möglich sind höchstens 150 Zeichen.", + "write-the-tags-separeted-by-comma": "Schlagwörter getrennt durch Kommas. Beispielsweise: Schlagwort1, Schlagwort2, Schlagwort3", + "delete-the-user-and-all-its-posts":"Benutzer und alle seine Beiträge löschen", + "delete-the-user-and-associate-its-posts-to-admin-user": "Benutzer löschen und seine Beiträge dem Administrator zuordnen", "read-more": "Weiterlesen", "show-blog": "Blog zeigen", "default-home-page": "Hauptseite", "version": "Version", - "there-are-no-drafts": "Es sind keine Entwürfe vorhanden.", - "create-a-new-article-for-your-blog":"Einen neuen Beitrag schreiben.", - "create-a-new-page-for-your-website":"Eine neue Seite anlegen.", - "invite-a-friend-to-collaborate-on-your-website":"Einen neuen Benutzer hinzufügen.", - "change-your-language-and-region-settings":"Sprache ändern und Lokalisierung.", - "language-and-timezone":"Sprache und Zeitzone", + "there-are-no-drafts": "Es sind keine Entwürfe vorhanden.", + "create-a-new-article-for-your-blog": "Einen neuen Beitrag schreiben.", + "create-a-new-page-for-your-website": "Eine neue Seite anlegen.", + "invite-a-friend-to-collaborate-on-your-website": "Einen neuen Benutzer hinzufügen.", + "change-your-language-and-region-settings": "Sprache ändern und Lokalisierung.", + "language-and-timezone": "Sprache und Zeitzone", "author": "Autor", "start-here": "Direktzugriff", "install-theme": "Theme installieren", "first-post": "Erster Beitrag", - "congratulations-you-have-successfully-installed-your-bludit": "Gratulation, Du hast erfolgreich **Bludit** installiert!", - "whats-next": "Und so geht es weiter;", + "congratulations-you-have-successfully-installed-your-bludit": "Gratulation, Du hast **Bludit** erfolgreich installiert!", + "whats-next": "Und so geht es weiter:", "manage-your-bludit-from-the-admin-panel": "Verwalte Bludit im [Administrationsbereich](./admin/).", "follow-bludit-on": "Folge Bludit bei", "visit-the-support-forum": "Besuche das [Forum](http://forum.bludit.com), um Hilfe zu erhalten.", - "read-the-documentation-for-more-information": "Lies die [Dokumentation](http://docs.bludit.com) für weitere Informationen.", - "share-with-your-friends-and-enjoy": "Teile Bludit mit Deinen Freunden und geniesse es.", + "read-the-documentation-for-more-information": "Lies die [Dokumentation](http://docs.bludit.com) für weitere Informationen.", + "share-with-your-friends-and-enjoy": "Erzähle Deinen Freunden Bludit und habe Spass daran.", "the-page-has-not-been-found": "Die Seite wurde nicht gefunden.", - "error": "Fehler" - -} \ No newline at end of file + "error": "Fehler", + "bludit-installer": "Bludit-Installer", + "welcome-to-the-bludit-installer": "Willkommen beim Bludit-Installer!", + "complete-the-form-choose-a-password-for-the-username-admin": "Bitte ein Passwort für den Benutzer « admin » wählen
und eine E-Mail-Adresse eingeben.", + "password-visible-field": "Das Passwort wird in Klartext angezeigt!", + "install": "Installieren", + "choose-your-language": "Sprache wählen", + "next": "Weiter", + "the-password-field-is-empty": "Das Passwort-Feld ist leer.", + "your-email-address-is-invalid": "Die E-Mail-Adresse scheint ungültig zu sein.", + "proceed-anyway": "Trotzdem fortfahren...", + "drafts": "Entwürfe", + "ip-address-has-been-blocked": "Die IP-Adresse wurde blockiert.", + "try-again-in-a-few-minutes": "Bitte es nach einigen Minuten noch einmal versuchen.", + "date": "Datum", + "you-can-schedule-the-post-just-select-the-date-and-time": "Um den Beitrag zu einem bestimmten Zeitpunkt zu veröffentlichen, Datum und Zeit wählen.", + "scheduled": "Zeitpunkt bestimmt.", + "publish": "Veröffentlichen", + "please-check-your-theme-configuration": "Bitte die Einstellungen des Themes prüfen." +} diff --git a/languages/en_US.json b/languages/en_US.json old mode 100755 new mode 100644 index 29eac24f..ddc020de --- a/languages/en_US.json +++ b/languages/en_US.json @@ -162,5 +162,6 @@ "you-can-schedule-the-post-just-select-the-date-and-time": "You can schedule the post, just select the date and time.", "scheduled": "Scheduled", "publish": "Publish", - "please-check-your-theme-configuration": "Please check your theme configuration." + "please-check-your-theme-configuration": "Please check your theme configuration.", + "plugin-label": "Plugin label" } diff --git a/languages/es_AR.json b/languages/es_AR.json old mode 100755 new mode 100644 diff --git a/languages/es_ES.json b/languages/es_ES.json old mode 100755 new mode 100644 diff --git a/languages/es_VE.json b/languages/es_VE.json old mode 100755 new mode 100644 diff --git a/languages/fr_FR.json b/languages/fr_FR.json old mode 100755 new mode 100644 diff --git a/languages/ja_JP.json b/languages/ja_JP.json old mode 100755 new mode 100644 diff --git a/languages/pt_BR.json b/languages/pt_BR.json new file mode 100644 index 00000000..9e1af774 --- /dev/null +++ b/languages/pt_BR.json @@ -0,0 +1,159 @@ +{ + "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-separeted-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/languages/ru_RU.json b/languages/ru_RU.json old mode 100755 new mode 100644 diff --git a/languages/zh_TW.json b/languages/zh_TW.json old mode 100755 new mode 100644 diff --git a/plugins/maintancemode/languages/en_US.json b/plugins/maintancemode/languages/en_US.json old mode 100755 new mode 100644 diff --git a/plugins/maintancemode/languages/es_AR.json b/plugins/maintancemode/languages/es_AR.json old mode 100755 new mode 100644 diff --git a/plugins/maintancemode/languages/fr_FR.json b/plugins/maintancemode/languages/fr_FR.json old mode 100755 new mode 100644 diff --git a/plugins/maintancemode/plugin.php b/plugins/maintancemode/plugin.php old mode 100755 new mode 100644 diff --git a/plugins/pages/languages/de_DE.json b/plugins/pages/languages/de_DE.json new file mode 100644 index 00000000..9dd58d16 --- /dev/null +++ b/plugins/pages/languages/de_DE.json @@ -0,0 +1,15 @@ +{ + "plugin-data": + { + "name": "Liste aller Seiten", + "description": "Auflistung aller Seiten.", + "author": "Bludit", + "email": "", + "website": "http://www.bludit.com", + "version": "0.1", + "releaseDate": "2015-09-22" + }, + + "home": "Hauptseite", + "show-home-link": "Hauptseite zeigen" +} diff --git a/plugins/pages/languages/en_US.json b/plugins/pages/languages/en_US.json old mode 100755 new mode 100644 diff --git a/plugins/pages/languages/es_AR.json b/plugins/pages/languages/es_AR.json old mode 100755 new mode 100644 diff --git a/plugins/pages/languages/fr_FR.json b/plugins/pages/languages/fr_FR.json old mode 100755 new mode 100644 diff --git a/plugins/pages/plugin.php b/plugins/pages/plugin.php old mode 100755 new mode 100644 index 42a9247d..c75636f8 --- a/plugins/pages/plugin.php +++ b/plugins/pages/plugin.php @@ -15,7 +15,7 @@ class pluginPages extends Plugin { global $Language; $html = '
'; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
'; @@ -32,49 +32,46 @@ class pluginPages extends Plugin { global $Language; global $pagesParents; global $Site, $Url; - $home = $Url->whereAmI()==='home'; - + $html = '
'; - // If the label is not empty, print it. + // Print the label if not empty. $label = $this->getDbField('label'); if( !empty($label) ) { $html .= '

'.$label.'

'; } $html .= '
'; - - $parents = $pagesParents[NO_PARENT_CHAR]; - $html .= '
diff --git a/themes/pure/languages/en_US.json b/themes/pure/languages/en_US.json old mode 100755 new mode 100644 diff --git a/themes/pure/php/head.php b/themes/pure/php/head.php index ed0bae6a..43d6a590 100644 --- a/themes/pure/php/head.php +++ b/themes/pure/php/head.php @@ -1,13 +1,23 @@ + + + + +<?php echo $Site->title() ?> + Site title - Theme::title( $Site->title() ); - - // - Theme::description( $Site->description() ); + // Favicon from theme/img/ + Theme::favicon('favicon.png'); // if( $Url->whereAmI()=='post' ) { @@ -16,36 +26,18 @@ elseif( $Url->whereAmI()=='page' ) { Theme::keywords( $Page->tags() ); } - - // - // - // - // - Theme::css(array( - 'pure-min.css', - 'grids-responsive-min.css', - 'blog.css', - 'rainbow.github.css' - )); - - Theme::css(array( - 'http://fonts.googleapis.com/css?family=Open+Sans:400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,cyrillic,latin-ext' - ), ''); - - // - Theme::javascript(array( - 'rainbow.min.js' - )); - ?> + + + - + \ No newline at end of file