Skip to content

Commit

Permalink
Revert "Push dev 3.7.0 to master" (#249)
Browse files Browse the repository at this point in the history
* Revert "fix for #244 (#245)"

This reverts commit 0b27707.

* Revert "update README"

This reverts commit 5fcf813.

* Revert "Push dev 3.7.0 to master (#242)"

This reverts commit f5cc5af.
  • Loading branch information
remrem committed Apr 15, 2017
1 parent 15fdff1 commit 36ecdbb
Show file tree
Hide file tree
Showing 99 changed files with 14,023 additions and 18,850 deletions.
12 changes: 7 additions & 5 deletions .gitignore
@@ -1,12 +1,14 @@
bt_backup/
.cache/
cache/
config/
databases/
files/
img/
error.log
.htaccess
themes/default/avatars/*.png
TODO
MAJ.log
DEMO.sqlite
themes/default/gravatars/*.png
admin/cache/favicons/*.png
admin/cache/avatars/*.png
*.phar
var/
admin/cache/gravatar/*.png
Empty file removed .gitmodules
Empty file.
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

45 changes: 0 additions & 45 deletions CHANGELOG.txt

This file was deleted.

26 changes: 0 additions & 26 deletions CONTRIBUTORS

This file was deleted.

13 changes: 6 additions & 7 deletions LICENSE.txt
@@ -1,16 +1,15 @@
+-=======================================================================-+
| B L O G O T E X T |
+-=======================================================================-+
| BlogoText is a lightweight PHP-only Blog engine. |
| Blogotext is a lightweight PHP-only Blog engine. |
| |
| (c) 2006 Frederic Nassar. |
| (c) 2010-2016 Timo van Neerden, AKA Le Hollandais Volant |
| (c) 2016-.... Mickaël 'Tiger-222' Schoentgen and the community |
| (c) 2010-* Timo van Neerden, AKA Le Hollandais Volant |
| |
| BlogoText is redistributed under the terms of the X11 / MIT Licence |
| Blogotext is redistributed under the terms of the X11 / MIT Licence |
| http://opensource.org/licenses/MIT |
| |
| BlogoText is based upon others ressources, that are listed below. |
| Blogotext is based upon others ressources, that are listed below. |
| |
+-------------------------------------------------------------------------+
| LINX |
Expand Down Expand Up @@ -44,7 +43,7 @@
| (c) 2014 Google Inc |
| |
| These fonts are licensed under a Apache License and included in |
| BlogoText accordingly. |
| Blogotext accordingly. |
| |
+-------------------------------------------------------------------------+
|   FAENZA ICONS |
Expand All @@ -57,7 +56,7 @@
| |
| These icons are licensed under a Creative Commons |
| Attribution 3.0 License. |
| http://creativecommons.org/licenses/by/3.0/ |
| http://creativecommons.org/licenses/by/3.0/ |
| |
+-------------------------------------------------------------------------+
| ~ |
Expand Down
23 changes: 12 additions & 11 deletions README.md
@@ -1,38 +1,39 @@
# BlogoText
# BLOGOTEXT

[![Build status](https://travis-ci.org/BlogoText/blogotext.svg?branch=dev)](https://travis-ci.org/BlogoText/blogotext)
---

This is [Blogotext](http://lehollandaisvolant.net/blogotext/), the lightweight SQLite Blog-Engine.

This is BlogoText, the lightweight SQLite Blog-Engine.
(by Timo van Neerden, since 2010)

---

## Features

* Blog with comments and RSS feeds
* Links sharing
* RSS Reader
* Images/Files uploading and sharing
* JSON/ZIP/HTML import-export; WordPress import
* Support [Addons](https://github.com/BlogoText/blogotext-addons)
* JSON/ZIP/HTML import-export; Wordpress import

![BlogoText screenshot](https://raw.githubusercontent.com/BlogoText/blogotext/dev/preview.png)
![alt tag](http://lehollandaisvolant.net/blogotext/blogotext-screen.png?3)

---

## Requirements
* PHP >5.5
* SQLite with PDO support (or MySQL with PDO Support)
* A CSS3 / HTML5 compatible Browser (Firefox, Chrome…)
* min 2 Mo disk space (more data = more space needed)
* min 1 Mo disk space (more data = more space needed)

## Recommended PHP libraries
## Recommended PHP-libraries
* GD (for comments icons / favicons);
* cURL (for RSS reader, links sharing, comments icons)
* LibXML (for RSS reader)
* GZip (for zip exporting function)
* Intl

## Installation
* Download [the lastest release](https://github.com/BlogoText/blogotext/releases)
* Upload folder to your site (eg: to `https://example.com/blog`)
* Unzip the downloaded archive file
* Upload folder to your site (eg: to `http://example.com/blog`)
* Use your browser to go to your site
* Follow the few steps
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

14 changes: 0 additions & 14 deletions addons/README.md

This file was deleted.

127 changes: 127 additions & 0 deletions addons/calendrier.php
@@ -0,0 +1,127 @@
<?php
# *** LICENSE ***
# This file is a addon for BlogoText.
# http://lehollandaisvolant.net/blogotext/
#
# 2016 Timo Van Neerden <timo@neerden.eu>
#
# You can redistribute it under the terms of the MIT / X11 Licence.
#
# *** LICENSE ***

# This plugin replaces the {calendrier} tag in the public template with
# a navigable HTML calendar.

// include this addon
$GLOBALS['addons'][] = array('tag' => '{calendrier}', 'callback_function' => 'addon_calendrier');

// returns HTML <table> calender
function addon_calendrier() {
// article
if ( isset($_GET['d']) and preg_match('#^\d{4}(/\d{2}){5}#', $_GET['d'])) {
$id = substr(str_replace('/', '', $_GET['d']), 0, 14);
$date = substr(get_entry($GLOBALS['db_handle'], 'articles', 'bt_date', $id, 'return'), 0, 8);
$date = ($date <= date('Ymd')) ? $date : date('Ym');
} elseif ( isset($_GET['d']) and preg_match('#^\d{4}/\d{2}(/\d{2})?#', $_GET['d']) ) {
$date = str_replace('/', '', $_GET['d']);
$date = (preg_match('#^\d{6}\d{2}#', $date)) ? substr($date, 0, 8) : substr($date, 0, 6); // avec jour ?
} elseif (isset($_GET['id']) and preg_match('#^\d{14}#', $_GET['id']) ) {
$date = substr($_GET['id'], 0, 8);
} else {
$date = date('Ym');
}

$annee = substr($date, 0, 4);
$ce_mois = substr($date, 4, 2);
$ce_jour = (strlen(substr($date, 6, 2)) == 2) ? substr($date, 6, 2) : '';

$qstring = (isset($_GET['mode']) and !empty($_GET['mode'])) ? 'mode='.htmlspecialchars($_GET['mode']).'&amp;' : '';

$jours_semaine = array(
$GLOBALS['lang']['lu'],
$GLOBALS['lang']['ma'],
$GLOBALS['lang']['me'],
$GLOBALS['lang']['je'],
$GLOBALS['lang']['ve'],
$GLOBALS['lang']['sa'],
$GLOBALS['lang']['di']
);
$premier_jour = mktime('0', '0', '0', $ce_mois, '1', $annee);
$jours_dans_mois = date('t', $premier_jour);
$decalage_jour = date('w', $premier_jour-'1');
$prev_mois = '?'.$qstring.'d='.$annee.'/'.str2($ce_mois-1);
if ($prev_mois == '?'.$qstring.'d='.$annee.'/'.'00') {
$prev_mois = '?'.$qstring.'d='.($annee-'1').'/'.'12';
}
$next_mois = '?'.$qstring.'d='.$annee.'/'.str2($ce_mois+1);
if ($next_mois == '?'.$qstring.'d='.$annee.'/'.'13') {
$next_mois = '?'.$qstring.'d='.($annee+'1').'/'.'01';
}

// On verifie si il y a un ou des articles/liens/commentaire du jour dans le mois courant
$tableau = array();
$mode = ( !empty($_GET['mode']) ) ? $_GET['mode'] : 'blog';
switch($mode) {
case 'comments':
$where = 'commentaires'; break;
case 'links':
$where = 'links'; break;
case 'blog':
default:
$where = 'articles'; break;
}

$tableau = table_list_date($annee.$ce_mois, 1, $where);

$html = '<table id="calendrier">'."\n";
$html .= '<caption>';
if ( $annee.$ce_mois > DATE_PREMIER_MESSAGE_BLOG) {
$html .= '<a href="'.$prev_mois.'">&#171;</a>&nbsp;';
}

// Si on affiche un jour on ajoute le lien sur le mois
$html .= '<a href="?'.$qstring.'d='.$annee.'/'.$ce_mois.'">'.mois_en_lettres($ce_mois).' '.$annee.'</a>';
// On ne peut pas aller dans le futur
if ( ($ce_mois != date('m')) || ($annee != date('Y')) ) {
$html .= '&nbsp;<a href="'.$next_mois.'">&#187;</a>';
}
$html .= '</caption>'."\n".'<tr>'."\n";
if ($decalage_jour > 0) {
for ($i = 0; $i < $decalage_jour; $i++) {
$html .= '<td></td>';
}
}
// Indique le jour consulte
for ($jour = 1; $jour <= $jours_dans_mois; $jour++) {
if ($jour == $ce_jour) {
$class = ' class="active"';
} else {
$class = '';
}
if ( in_array($jour, $tableau) ) {
$lien = '<a href="?'.$qstring.'d='.$annee.'/'.$ce_mois.'/'.str2($jour).'">'.$jour.'</a>';
} else {
$lien = $jour;
}
$html .= '<td'.$class.'>';
$html .= $lien;
$html .= '</td>';
$decalage_jour++;
if ($decalage_jour == 7) {
$decalage_jour = 0;
$html .= '</tr>';
if ($jour < $jours_dans_mois) {
$html .= '<tr>';
}
}
}
if ($decalage_jour > 0) {
for ($i = $decalage_jour; $i < 7; $i++) {
$html .= '<td> </td>';
}
$html .= '</tr>'."\n";
}
$html .= '</table>'."\n";
return $html;

}

0 comments on commit 36ecdbb

Please sign in to comment.