summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorroot <root@adnab.me>2014-01-31 17:30:35 +0100
committerroot <root@adnab.me>2014-01-31 17:30:35 +0100
commit1ed8a37bea8882cd3a1aa0f421dbc15493a781a0 (patch)
treed014616096b7f8b94b707626cae46cff0e0608ce /lib
parentb0c23ea84327d48e3a4383fac3e795c2dc0a1215 (diff)
downloadBits-1ed8a37bea8882cd3a1aa0f421dbc15493a781a0.tar.gz
Bits-1ed8a37bea8882cd3a1aa0f421dbc15493a781a0.zip
Traduction into french of some parts of the site.
Diffstat (limited to 'lib')
-rw-r--r--lib/account/new.php24
-rw-r--r--lib/blog/drafts.php1
-rw-r--r--lib/conf/apps.php15
-rw-r--r--lib/conf/blog.php4
-rw-r--r--lib/conf/file.php4
-rw-r--r--lib/conf/login.php2
-rw-r--r--lib/conf/static.php5
-rw-r--r--lib/static/home.md47
-rw-r--r--lib/static/view.php13
9 files changed, 90 insertions, 25 deletions
diff --git a/lib/account/new.php b/lib/account/new.php
index 2366fbb..63ec85e 100644
--- a/lib/account/new.php
+++ b/lib/account/new.php
@@ -1,6 +1,6 @@
<?php
-$title = "Register";
+$title = "Création d'un compte";
$login = "";
$email = "";
@@ -10,29 +10,29 @@ if (isset($_POST['login']) && isset($_POST['pw1']) && isset($_POST['pw2'])) {
$pw1 = esc($_POST["pw1"]);
$pw2 = esc($_POST["pw2"]);
if ($login == "") {
- $error = "You must enter a username.";
+ $error = "Vous devez entrer un nom d'utilisateur.";
} else if (!preg_match('#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#', $email)) {
- $error = "You must enter a valid email address.";
+ $error = "Vous devez entrer une adresse e-mail correcte.";
} else if ($pw1 != $pw2) {
- $error = "You must enter twice the same password.";
+ $error = "Vous devez entrer deux fois le même mot de passe.";
} else if ($pw1 == "") {
- $error = "You must enter a password";
+ $error = "Vous devez entrer un mot de passe.";
} else {
sql("INSERT INTO account(login, password, email, reg_date) ".
"VALUES('" . escs($login) . "', PASSWORD('$pw1'), '" . escs($email) . "', NOW())");
- $message = "Your account has been created. Please log in now.";
+ $message = "Votre compte a été créé, merci de vous identifier.";
$url = $homepage;
require("tpl/account/login.php");
}
}
-$form_message = "Please fill in the following form to create an account :";
+$form_message = "Merci de remplire le formulaire suivant afin de créer un compte :";
$fields = array(
- array("label" => "Username : ", "name" => "login", "value" => $login),
- array("label" => "Password : ", "name" => "pw1", "type" => "password"),
- array("label" => "Confirm password : ", "name" => "pw2", "type" => "password"),
- array("label" => "Email address : ", "name" => "email", "value" => $email)
+ array("label" => "Nom d'utilisateur : ", "name" => "login", "value" => $login),
+ array("label" => "Mot de passe : ", "name" => "pw1", "type" => "password"),
+ array("label" => "Confirmation : ", "name" => "pw2", "type" => "password"),
+ array("label" => "Adresse e-mail : ", "name" => "email", "value" => $email)
);
-$validate = "Create an account";
+$validate = "Envoyer";
require("tpl/general/form.php");
diff --git a/lib/blog/drafts.php b/lib/blog/drafts.php
index 735b039..7016660 100644
--- a/lib/blog/drafts.php
+++ b/lib/blog/drafts.php
@@ -1,6 +1,5 @@
<?php
-$title = "My posts";
$drafts = array();
$pub = array();
diff --git a/lib/conf/apps.php b/lib/conf/apps.php
index c3efea4..524da45 100644
--- a/lib/conf/apps.php
+++ b/lib/conf/apps.php
@@ -1,8 +1,11 @@
<?php
-$homepage = "blog";
+$homepage = "view-static-home";
$apps = array(
+ "static" => array(
+ "view" => 0,
+ ),
// File upload application
"file" => array(
@@ -38,11 +41,11 @@ $apps = array(
"blog" => array(
"index" => 0,
"view" => 0,
- "drafts" => 1,
- "publish" => 1,
- "post" => 1,
- "edit" => 1,
- "delete" => 1,
+ "drafts" => 2,
+ "publish" => 2,
+ "post" => 2,
+ "edit" => 2,
+ "delete" => 2,
"comment" => 1,
"edcom" => 1,
"delcom" => 2,
diff --git a/lib/conf/blog.php b/lib/conf/blog.php
index bb2ef09..70c6d13 100644
--- a/lib/conf/blog.php
+++ b/lib/conf/blog.php
@@ -1,8 +1,8 @@
<?php
-$blog_title = "What people write";
+$blog_title = "Articles";
// Used for the ATOM feed generation.
-$blog_base_url = "http://localhost/alex.auvolat/";
+$blog_base_url = "http://adnab.me/";
diff --git a/lib/conf/file.php b/lib/conf/file.php
index 4a8830e..2e8cd18 100644
--- a/lib/conf/file.php
+++ b/lib/conf/file.php
@@ -1,6 +1,6 @@
<?php
-$baseurl = "http://localhost/alex.auvolat/files/";
+$baseurl = "http://adnab.me/files/";
$savedir = getcwd() . "/files/";
$img_mini_width = 127;
@@ -9,5 +9,3 @@ function has_mini($ext) {
return $ext == "jpg" || $ext == "jpeg" || $ext == "png" || $ext == "gif";
}
-//$quota = 128;; //ceil((time() - 1220000000) / (3600 * 24 * 20));
-//$min_priv_for_no_quota = 2;
diff --git a/lib/conf/login.php b/lib/conf/login.php
index 423fbd3..e2aef8a 100644
--- a/lib/conf/login.php
+++ b/lib/conf/login.php
@@ -1,6 +1,6 @@
<?php
-$session_name = "AA.free.fr";
+$session_name = "adnab.me";
//Default privilege required for accessing any page
if (!isset($priv_required)) $priv_required = 0;
diff --git a/lib/conf/static.php b/lib/conf/static.php
new file mode 100644
index 0000000..ec19b56
--- /dev/null
+++ b/lib/conf/static.php
@@ -0,0 +1,5 @@
+<?php
+
+$static_pages = array(
+ "home" => "Page perso de Alex Auvolat",
+);
diff --git a/lib/static/home.md b/lib/static/home.md
new file mode 100644
index 0000000..ef6f589
--- /dev/null
+++ b/lib/static/home.md
@@ -0,0 +1,47 @@
+Page destinée à être peuplée (plus ou moins intensément) dans un futur proche.
+
+### Fiche d'identité
+
+Patronyme
+: Alex AUVOLAT--BERNSTEIN
+
+Occupation
+: Étudiant au Département d'Informatique de l'ENS
+
+Cursus
+: Élève normalien (2013-)
+: Prépa MPSI/MP au lycée Masséna (2011-2013)
+: Lycée Albert Calmette (2008-2011)
+: École Montessori Les Pouces Verts (1997-2008)
+: Conservatoire (dans ma jeunesse)
+
+Contact
+: `alex [chez] adnab.me`, `alex.auvolat [chez] ens.fr`
+
+Intérêts en informatique
+: Systèmes d'exploitations originaux
+: Langages de programmations originaux
+: Idées nouvelles en tous genres
+
+Intérêts en dehors de l'informatique
+: Musique
+: Japonais
+: Cuisine
+: Philosophie, philosophie des sciences, philosophie politique
+
+Compétences remarquables
+: Programmation
+: Administration Linux
+: Anglais (bilingue)
+
+
+### Le serveur `adnab.me`
+
+Localisation
+: <http://adnab.me>
+
+Services
+: [Dépôts Git](http://adnab.me/cgi-bin/cgit.cgi/)
+
+
+
diff --git a/lib/static/view.php b/lib/static/view.php
new file mode 100644
index 0000000..e3f8752
--- /dev/null
+++ b/lib/static/view.php
@@ -0,0 +1,13 @@
+<?php
+
+require ("lib/conf/static.php");
+require("lib/markdown.php");
+
+if (isset($static_pages[$args[2]])) {
+
+ $title = $static_pages[$args[2]];
+ $text = file_get_contents("lib/static/" . $args[2] . ".md");
+ $text = Markdown($text);
+
+ require("tpl/general/static.php");
+}