Skip to content

Commit

Permalink
Merge pull request #2 from bludit/bluditv2
Browse files Browse the repository at this point in the history
Bluditv2
  • Loading branch information
clickwork-git committed Oct 13, 2017
2 parents 7105d50 + e461594 commit 7e4f880
Show file tree
Hide file tree
Showing 130 changed files with 19,261 additions and 3,284 deletions.
10 changes: 10 additions & 0 deletions bl-kernel/boot/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@
// Default language file, in this case is English
define('DEFAULT_LANGUAGE_FILE', 'en.json');

// Session timeout server side, gc_maxlifetime
// 3600 = 1hour
define('SESSION_GC_MAXLIFETIME', 3600);

// Session lifetime of the cookie in seconds which is sent to the browser
// The value 0 means until the browser is closed
define('SESSION_COOKIE_LIFE_TIME', 0);

// Set internal character encoding
mb_internal_encoding(CHARSET);

Expand Down Expand Up @@ -302,6 +310,8 @@
define('DOMAIN_UPLOADS_PROFILES', DOMAIN.HTML_PATH_UPLOADS_PROFILES);
define('DOMAIN_UPLOADS_THUMBNAILS', DOMAIN.HTML_PATH_UPLOADS_THUMBNAILS);

define('DOMAIN_ADMIN', DOMAIN_BASE.ADMIN_URI_FILTER);

define('DOMAIN_TAGS', Text::addSlashes(DOMAIN_BASE.TAG_URI_FILTER, false, true));
define('DOMAIN_CATEGORIES', Text::addSlashes(DOMAIN_BASE.CATEGORY_URI_FILTER, false, true));
define('DOMAIN_PAGES', Text::addSlashes(DOMAIN_BASE.PAGE_URI_FILTER, false, true));
Expand Down
2 changes: 1 addition & 1 deletion bl-kernel/boot/rules/69.pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
*/
$pagesByParentByKey = array(PARENT=>array());

$posts = array();
$staticContent = $staticPages = buildStaticPages();

// ============================================================================
// Main
Expand Down
5 changes: 4 additions & 1 deletion bl-kernel/dbpages.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public function getPublishedDB()

// Returns an array with a list of keys/database of static pages
// By default the static pages are sort by position
public function getStaticDB()
public function getStaticDB($onlyKeys=false)
{
$tmp = $this->db;
foreach ($tmp as $key=>$fields) {
Expand All @@ -286,6 +286,9 @@ public function getStaticDB()
}
}
uasort($tmp, array($this, 'sortByPositionLowToHigh'));
if ($onlyKeys) {
return array_keys($tmp);
}
return $tmp;
}

Expand Down
12 changes: 12 additions & 0 deletions bl-kernel/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@ function buildPagesByParent($onlyPublished=true) {
}
}

function buildStaticPages() {
global $dbPages;

$tmp = array();
$staticPages = $dbPages->getStaticDB($onlyKeys=true);
foreach ($staticPages as $pageKey) {
$staticPage = buildPage($pageKey);
array_push($tmp, $staticPage);
}
return $tmp;
}

// Returns an Array with all pages existing on the system
// (boolean) $allPages, TRUE returns all pages with any status, FALSE all published pages
/*
Expand Down
15 changes: 7 additions & 8 deletions bl-kernel/helpers/session.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,22 @@ public static function start()
// return true;

// DEBUG: Ver un nombre con alguna llave random al momentode instalar.
$session_name = 'Bludit-KEY';
$session_name = 'BLUDIT-KEY';

// Try to set the session timeout on server side, 1 hour of timeout
ini_set('session.gc_maxlifetime', SESSION_GC_MAXLIFETIME);

// If TRUE cookie will only be sent over secure connections.
$secure = false;

// If set to TRUE then PHP will attempt to send the httponly flag when setting the session cookie.
$httponly = true;

// This specifies the lifetime of the cookie in seconds which is sent to the browser.
// The value 0 means until the browser is closed.
$cookieLifetime = 0;

// Gets current cookies params.
$cookieParams = session_get_cookie_params();

session_set_cookie_params(
$cookieLifetime,
SESSION_COOKIE_LIFE_TIME,
$cookieParams["path"],
$cookieParams["domain"],
$secure,
Expand All @@ -42,7 +41,7 @@ public static function start()
// Regenerated the session, delete the old one. There are problems with AJAX.
//session_regenerate_id(true);

if(!self::$started) {
if (!self::$started) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to start the session.');
}
}
Expand Down Expand Up @@ -72,7 +71,7 @@ public static function get($key)
{
$key = 's_'.$key;

if( isset($_SESSION[$key]) ) {
if ( isset($_SESSION[$key]) ) {
return $_SESSION[$key];
}

Expand Down
2 changes: 1 addition & 1 deletion bl-kernel/helpers/tcp.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static function http($url, $method='GET', $verifySSL=true, $timeOut=1, $f

public static function download($url, $destination)
{
$data = self::http($url, $method='GET', $verifySSL=true, $timeOut=3, $followRedirections=true, $binary=true, $headers=false);
$data = self::http($url, $method='GET', $verifySSL=true, $timeOut=30, $followRedirections=true, $binary=true, $headers=false);
return file_put_contents($destination, $data);
}

Expand Down
4 changes: 1 addition & 3 deletions bl-kernel/helpers/theme.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ public static function siteUrl()

public static function adminUrl()
{
global $Site;
$siteUrl = $Site->url();
return $siteUrl.ADMIN_URI_FILTER;
return DOMAIN_ADMIN;
}

// Return the metatag <title> with a predefine structure
Expand Down
1 change: 1 addition & 0 deletions bl-themes/clean-blog/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
11 changes: 11 additions & 0 deletions bl-themes/clean-blog/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sudo: false
language: node_js
node_js:
- "node"
install: npm install
script:
- npm test
- gulp
cache:
directories:
- node_modules
21 changes: 21 additions & 0 deletions bl-themes/clean-blog/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2013-2017 Blackrock Digital LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
62 changes: 62 additions & 0 deletions bl-themes/clean-blog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# [Start Bootstrap - Clean Blog](https://startbootstrap.com/template-overviews/clean-blog/)

[Clean Blog](http://startbootstrap.com/template-overviews/clean-blog/) is a stylish, responsive blog theme for [Bootstrap](http://getbootstrap.com/) created by [Start Bootstrap](http://startbootstrap.com/). This theme features a blog homepage, about page, contact page, and an example post page along with a working PHP contact form.

## Preview

[![Clean Blog Preview](https://startbootstrap.com/assets/img/templates/clean-blog.jpg)](https://blackrockdigital.github.io/startbootstrap-clean-blog/)

**[View Live Preview](https://blackrockdigital.github.io/startbootstrap-clean-blog/)**

## Status

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/BlackrockDigital/startbootstrap-clean-blog/master/LICENSE)
[![npm version](https://img.shields.io/npm/v/startbootstrap-clean-blog.svg)](https://www.npmjs.com/package/startbootstrap-clean-blog)
[![Build Status](https://travis-ci.org/BlackrockDigital/startbootstrap-clean-blog.svg?branch=master)](https://travis-ci.org/BlackrockDigital/startbootstrap-clean-blog)
[![dependencies Status](https://david-dm.org/BlackrockDigital/startbootstrap-clean-blog/status.svg)](https://david-dm.org/BlackrockDigital/startbootstrap-clean-blog)
[![devDependencies Status](https://david-dm.org/BlackrockDigital/startbootstrap-clean-blog/dev-status.svg)](https://david-dm.org/BlackrockDigital/startbootstrap-clean-blog?type=dev)

## Download and Installation

To begin using this template, choose one of the following options to get started:
* [Download the latest release on Start Bootstrap](https://startbootstrap.com/template-overviews/clean-blog/)
* Install via npm: `npm i startbootstrap-clean-blog`
* Clone the repo: `git clone https://github.com/BlackrockDigital/startbootstrap-clean-blog.git`
* [Fork, Clone, or Download on GitHub](https://github.com/BlackrockDigital/startbootstrap-clean-blog)

## Usage

### Basic Usage

After downloading, simply edit the HTML and CSS files included with the template in your favorite text editor to make changes. These are the only files you need to worry about, you can ignore everything else! To preview the changes you make to the code, you can open the `index.html` file in your web browser.

### Advanced Usage

After installation, run `npm install` and then run `gulp dev` which will open up a preview of the template in your default browser, watch for changes to core template files, and live reload the browser when changes are saved. You can view the `gulpfile.js` to see which tasks are included with the dev environment.

## Bugs and Issues

Have a bug or an issue with this template? [Open a new issue](https://github.com/BlackrockDigital/startbootstrap-clean-blog/issues) here on GitHub or leave a comment on the [template overview page at Start Bootstrap](http://startbootstrap.com/template-overviews/clean-blog/).

## Custom Builds

You can hire Start Bootstrap to create a custom build of any template, or create something from scratch using Bootstrap. For more information, visit the **[custom design services page](https://startbootstrap.com/bootstrap-design-services/)**.

## About

Start Bootstrap is an open source library of free Bootstrap templates and themes. All of the free templates and themes on Start Bootstrap are released under the MIT license, which means you can use them for any purpose, even for commercial projects.

* https://startbootstrap.com
* https://twitter.com/SBootstrap

Start Bootstrap was created by and is maintained by **[David Miller](http://davidmiller.io/)**, Owner of [Blackrock Digital](http://blackrockdigital.io/).

* http://davidmiller.io
* https://twitter.com/davidmillerskt
* https://github.com/davidtmiller

Start Bootstrap is based on the [Bootstrap](http://getbootstrap.com/) framework created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thorton](https://twitter.com/fat).

## Copyright and License

Copyright 2013-2017 Blackrock Digital LLC. Code released under the [MIT](https://github.com/BlackrockDigital/startbootstrap-clean-blog/blob/gh-pages/LICENSE) license.
129 changes: 129 additions & 0 deletions bl-themes/clean-blog/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>Clean Blog - Start Bootstrap Theme</title>

<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

<!-- Custom fonts for this template -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>

<!-- Custom styles for this template -->
<link href="css/clean-blog.min.css" rel="stylesheet">

</head>

<body>

<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container">
<a class="navbar-brand" href="index.html">Start Bootstrap</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Menu
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.html">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="post.html">Sample Post</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact</a>
</li>
</ul>
</div>
</div>
</nav>

<!-- Page Header -->
<header class="masthead" style="background-image: url('img/about-bg.jpg')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<div class="page-heading">
<h1>About Me</h1>
<span class="subheading">This is what I do.</span>
</div>
</div>
</div>
</div>
</header>

<!-- Main Content -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe nostrum ullam eveniet pariatur voluptates odit, fuga atque ea nobis sit soluta odio, adipisci quas excepturi maxime quae totam ducimus consectetur?</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius praesentium recusandae illo eaque architecto error, repellendus iusto reprehenderit, doloribus, minus sunt. Numquam at quae voluptatum in officia voluptas voluptatibus, minus!</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum molestiae debitis nobis, quod sapiente qui voluptatum, placeat magni repudiandae accusantium fugit quas labore non rerum possimus, corrupti enim modi! Et.</p>
</div>
</div>
</div>

<hr>

<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<ul class="list-inline text-center">
<li class="list-inline-item">
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li class="list-inline-item">
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li class="list-inline-item">
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
</ul>
<p class="copyright text-muted">Copyright &copy; Your Website 2017</p>
</div>
</div>
</div>
</footer>

<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/popper/popper.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>

<!-- Custom scripts for this template -->
<script src="js/clean-blog.min.js"></script>

</body>

</html>

0 comments on commit 7e4f880

Please sign in to comment.