diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | lib/account/new.php | 24 | ||||
-rw-r--r-- | lib/blog/drafts.php | 1 | ||||
-rw-r--r-- | lib/conf/apps.php | 15 | ||||
-rw-r--r-- | lib/conf/blog.php | 4 | ||||
-rw-r--r-- | lib/conf/file.php | 4 | ||||
-rw-r--r-- | lib/conf/login.php | 2 | ||||
-rw-r--r-- | lib/conf/static.php | 5 | ||||
-rw-r--r-- | lib/static/home.md | 47 | ||||
-rw-r--r-- | lib/static/view.php | 13 | ||||
-rw-r--r-- | tpl/account/login.php | 10 | ||||
-rw-r--r-- | tpl/blog/drafts.php | 24 | ||||
-rw-r--r-- | tpl/blog/index.php | 17 | ||||
-rw-r--r-- | tpl/blog/view.php | 26 | ||||
-rw-r--r-- | tpl/general/static.php | 4 | ||||
-rw-r--r-- | tpl/general/top.php | 16 | ||||
-rw-r--r-- | tpl/notes/edit.php | 6 | ||||
-rw-r--r-- | tpl/notes/inc_relativestree.php | 93 | ||||
-rw-r--r-- | tpl/notes/move.php | 4 | ||||
-rw-r--r-- | tpl/notes/user.php | 6 | ||||
-rw-r--r-- | tpl/notes/view.php | 8 |
21 files changed, 156 insertions, 174 deletions
@@ -4,3 +4,4 @@ lib/conf/sql.php nohup.out _old files/* +design/cgit* 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"); +} diff --git a/tpl/account/login.php b/tpl/account/login.php index 7853186..d76f315 100644 --- a/tpl/account/login.php +++ b/tpl/account/login.php @@ -1,10 +1,10 @@ <?php -$title = "Login"; +$title = "Connextion"; -$form_message = "Please log in with your account :"; +$form_message = "Connectez-vous avec votre compte :"; $fields = array( - array ("label" => "Username : ", "name" => "login", "value" => (isset($login) ? $login : '')), - array ("label" => "Password : ", "name" => "pw", "type" => "password")); -$validate = "Log in"; + array ("label" => "Nom d'utilisateur : ", "name" => "login", "value" => (isset($login) ? $login : '')), + array ("label" => "Mot de passe : ", "name" => "pw", "type" => "password")); +$validate = "Connexion"; require("tpl/general/form.php"); diff --git a/tpl/blog/drafts.php b/tpl/blog/drafts.php index 510f428..6e18a6c 100644 --- a/tpl/blog/drafts.php +++ b/tpl/blog/drafts.php @@ -1,11 +1,13 @@ <?php +$title = "Mes articles"; + require("tpl/general/top.php"); echo '<div class="small_right">'; -echo '<a href="post-blog">post a message</a></div>'; +echo '<a href="post-blog">écrire un article</a></div>'; -echo '<h2>My drafts</h2>'; +echo '<h2>Mes brouillons</h2>'; if (count($drafts) > 0) { echo '<table><tr><th>Title</th><th>Actions</th></tr>'; @@ -20,27 +22,27 @@ if (count($drafts) > 0) { echo $post['text_html']; echo '</div>';*/ echo '<tr><td><a href="view-blog-' . $post['id'] . '">' . $post['title'] . '</a></td>'; - echo '<td><a href="edit-blog-' . $post['id'] . '">edit</a>'; - echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a>'; - echo ' | <a href="publish-blog-' . $post['id'] . '">publish</a></td></tr>'; + echo '<td><a href="edit-blog-' . $post['id'] . '">modifier</a>'; + echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a>'; + echo ' | <a href="publish-blog-' . $post['id'] . '">publier</a></td></tr>'; } echo '</table>'; } else { - echo '<p>No drafts</p>'; + echo '<p>Aucun brouillon</p>'; } -echo '<h2>My published posts</h2>'; +echo '<h2>Mes articles publiés</h2>'; if (count($pub) > 0) { - echo '<table><tr><th>Title</th><th>Actions</th></tr>'; + echo '<table><tr><th>Titre</th><th>Actions</th></tr>'; foreach ($pub as $post) { echo '<tr><td><a href="view-blog-' . $post['id'] . '">' . $post['title'] . '</a></td>'; - echo '<td><a href="edit-blog-' . $post['id'] . '">edit</a>'; - echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a></td></tr>'; + echo '<td><a href="edit-blog-' . $post['id'] . '">modifier</a>'; + echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a></td></tr>'; } echo '</table>'; } else { - echo '<p>No published posts</p>'; + echo '<p>Aucun article publié</p>'; } diff --git a/tpl/blog/index.php b/tpl/blog/index.php index cd458c1..712b205 100644 --- a/tpl/blog/index.php +++ b/tpl/blog/index.php @@ -3,8 +3,8 @@ require("tpl/general/top.php"); if ($can_post) { echo '<div class="small_right">'; - echo '<a href="post-blog">post a message</a>'; - echo ' | <a href="drafts-blog">my drafts</a>'; + echo '<a href="post-blog">écrire un article</a>'; + echo ' | <a href="drafts-blog">brouillons</a>'; echo '</div>'; } @@ -12,12 +12,12 @@ echo '<div class="ordering_links">' . filters_html_full() . '</div>'; foreach ($posts as $post) { echo '<div class="blog_post">'; - echo '<div class="small_right">by ' . $post['owner']; + echo '<div class="small_right">écrit par ' . $post['owner']; if ($can_edit && $post['owner_id'] == $user['id']) - echo ' | <a href="edit-blog-' . $post['id'] . '">edit</a>'; + echo ' | <a href="edit-blog-' . $post['id'] . '">modifier</a>'; if ($can_delete && $post['owner_id'] == $user['id']) - echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a>'; - echo ' | <a href="view-blog-' . $post['id'] . '">read & comment (' . $post['comments'] . ')</a>'; + echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a>'; + echo ' | <a href="view-blog-' . $post['id'] . '">lire & commenter (' . $post['comments'] . ')</a>'; echo '</div>'; echo '<div class="small_right">published ' . $post['date'] . '</div>'; if ($post['tags'] != '') { @@ -31,7 +31,8 @@ foreach ($posts as $post) { echo '</div><div class="contents-left">'; foreach ($fa as $kname => $kdata) { - echo '<h1>Filter by ' . $kname . '</h1>'; + if ($kname == "author") continue; + echo '<h1>Filtrer par ' . $kname . '</h1>'; if (isset($fvalues[$kname])) { echo '<p>Filtering ' . $kname . ' : ' . $kdata[$fvalues[$kname]]['name'] . '.<br />'; $n = array(); @@ -61,7 +62,7 @@ if (count($fvalues) > 0) { echo '<li><a href="index.php?p=index-blog-' . $zd . '">Atom feed for this selection</a></li>'; echo '<li><a href="index.php?p=index-blog-feed-atom">Homepage Atom feed</a></li>'; } else { - echo '<li><a href="index.php?p=index-blog-feed-atom">Atom feed</a></li>'; + echo '<li><a href="index.php?p=index-blog-feed-atom">Flux Atom</a></li>'; } echo '</ul>'; diff --git a/tpl/blog/view.php b/tpl/blog/view.php index 32f1073..83c49c0 100644 --- a/tpl/blog/view.php +++ b/tpl/blog/view.php @@ -7,15 +7,15 @@ require("tpl/general/top.php"); echo '<div class="small_right">'; echo 'Written by ' . $post['owner']; if ($can_edit && $post['owner_id'] == $user['id']) - echo ' | <a href="edit-blog-' . $post['id'] . '">edit</a>'; + echo ' | <a href="edit-blog-' . $post['id'] . '">modifier</a>'; if ($can_delete && $post['owner_id'] == $user['id']) - echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a>'; + echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a>'; if ($can_comment && !$is_draft) - echo ' | <a href="comment-blog-' . $post['id'] . '">post comment</a>'; + echo ' | <a href="comment-blog-' . $post['id'] . '">commenter</a>'; if ($is_draft) - echo ' | <a href="publish-blog-' . $post['id'] . '">publish</a>'; + echo ' | <a href="publish-blog-' . $post['id'] . '">publier</a>'; echo '</div>'; -echo '<div class="small_right">published ' . $post['date'] . '</div>'; +echo '<div class="small_right">publié le ' . $post['date'] . '</div>'; if ($post['tags'] != '') { echo '<div class="small_right">tags: ' . $post['tags'] . '</div>'; } @@ -23,31 +23,31 @@ echo $post['text_html']; if (!$is_draft) { - echo '<h2>Comments</h2>'; + echo '<h2>Commentaires</h2>'; if (count($comments) == 0) { - echo 'No comments at the moment.'; + echo 'Pas de commentaires pour l\'instant.'; } else { foreach ($comments as $comment) { echo '<div class="blog_post">'; $a = array(); - if ($can_delcom) $a[] = '<a href="delcom-blog-' . $comment['id'] . '">delete</a>'; + if ($can_delcom) $a[] = '<a href="delcom-blog-' . $comment['id'] . '">supprimer</a>'; if ($can_comment && $comment['author_id'] == $user['id']) - $a[] = '<a href="edcom-blog-' . $comment['id'] . '">edit</a>'; + $a[] = '<a href="edcom-blog-' . $comment['id'] . '">modifier</a>'; if (count($a) > 0) echo '<div class="small_right">' . implode(" | ", $a) . '</div>'; - echo '<h3>' . $comment['date'] . ' by ' . $comment['author'] . '</h3>'; + echo '<h3>' . $comment['date'] . ' par ' . $comment['author'] . '</h3>'; echo '<div class="inside">' . $comment['text_html'] . '</div>'; echo '</div>'; } } - echo '<h3>Post a comment</h3>'; + echo '<h3>Écrire un commentaire</h3>'; if ($can_comment) { - echo '<form class="blog_post" method="POST" action="index.php?p=comment-blog-' . $post['id'] . '"><textarea name="comment" style="height: 200px"></textarea><br /><div class="empty_label"> </div><input type="submit" value="Comment" /></form>'; + echo '<form class="blog_post" method="POST" action="index.php?p=comment-blog-' . $post['id'] . '"><textarea name="comment" style="height: 200px"></textarea><br /><div class="empty_label"> </div><input type="submit" value="Enregistrer" /></form>'; } else { - echo 'Please log in or register to post a comment.'; + echo 'Veuillez vous identifier pour poster un commentaire.'; } } diff --git a/tpl/general/static.php b/tpl/general/static.php new file mode 100644 index 0000000..0ae27fe --- /dev/null +++ b/tpl/general/static.php @@ -0,0 +1,4 @@ +<?php +require("top.php"); +echo $text; +require("bottom.php"); diff --git a/tpl/general/top.php b/tpl/general/top.php index 01f7e59..f060b42 100644 --- a/tpl/general/top.php +++ b/tpl/general/top.php @@ -23,23 +23,19 @@ global $user, $apps; //These might be hidden because this page is called from sq <div class="right"> <?php if ($user['id'] == 0) { - echo '<a href="new-account">Register</a><a href="?login">Login</a>'; + echo '<a href="new-account">Inscription</a><a href="/?login">Connexion</a>'; } else { - echo '<a href="?logout">Logout (' . $user['name'] . ')</a>'; + echo '<a href="/?logout">Déconnexion (' . $user['name'] . ')</a>'; } ?> </div> <div class="left"> - <a href="blog">Home</a> - <a href="list-account">People</a> + <a href="/">Accueil</a> + <a href="/blog">Blog</a> <?php if ($user['id'] != 0) { - echo '<a href="user-notes-' . $user['id'] . '">notes</a>'; - echo '<a href="file">files</a>'; -} else { - if ($user['priv'] >= $apps['file']['upload']) { - echo '<a href="upload-file">upload file</a>'; - } + echo '<a href="user-notes-' . $user['id'] . '">bloc-notes</a>'; + echo '<a href="file">fichiers</a>'; } ?> </div> diff --git a/tpl/notes/edit.php b/tpl/notes/edit.php index 7e4d88f..54f5157 100644 --- a/tpl/notes/edit.php +++ b/tpl/notes/edit.php @@ -2,13 +2,13 @@ require("tpl/general/top.php"); -echo '<div class="small_right"><a href="view-notes-' . $note['id'] . '">return to note</a></div>'; +echo '<div class="small_right"><a href="view-notes-' . $note['id'] . '">revenir à la note</a></div>'; require("tpl/general/inc_form.php"); if (isset($preview)) { - echo '<hr /><h1>Preview</h1>'; - echo' <div class="error">Warning : this is only a preview. Click the "Edit note" button above to save changes.</div>'; + echo '<hr /><h1>Aperçu</h1>'; + echo '<div class="error">Attention : ceci n\'est qu\'un aperçu ! Pensez à enregistrer vos changements lorsque vous serez satisfait.</div>'; echo $preview; } diff --git a/tpl/notes/inc_relativestree.php b/tpl/notes/inc_relativestree.php index be0e224..fd47ab4 100644 --- a/tpl/notes/inc_relativestree.php +++ b/tpl/notes/inc_relativestree.php @@ -1,92 +1,5 @@ <?php -/* OLD WAY - -// ******* FETCH DATA - -if ($note['parent_id'] != 0) { - $brothers = array(); - $n = sql("SELECT id, title, owner FROM notes WHERE parent = " . $note['parent_id'] . " ". - ($note['owner'] == $user['id'] ? "" : " AND public != 0 "). - "ORDER BY title ASC"); - while ($nn = mysql_fetch_assoc($n)) $brothers[] = $nn; -} -$children = array(); -$n = sql("SELECT id, title, owner FROM notes WHERE parent = " . $note['id'] . " " . - ($note['owner'] == $user['id'] ? "" : " AND public != 0 ") . - "ORDER BY title ASC"); -while ($nn = mysql_fetch_assoc($n)) $children[] = $nn; - -$user_root_notes = array(); -$n = sql("SELECT id, title, owner FROM notes WHERE parent = 0 AND owner = " . $note['owner'] . " " . - ($note['owner'] == $user['id'] ? "" : " AND public != 0 ") . - "ORDER BY title ASC"); -while ($nn = mysql_fetch_assoc($n)) $user_root_notes[] = $nn; - -// ****** DISPLAY TREE - -echo '</div><div class="contents-left">'; -echo '<h1>' . $note['ownername'] . '</h1><br />'; -echo '<div class="small_right"><a href="user-notes-' . $note['owner'] . '">complete tree</a></div>'; - -function list_brothers_and_children() { - global $brothers, $children, $note, $user, $can_new; - echo '<div class="tree_branch">'; - foreach($brothers as $b) { - if ($b['id'] == $note['id']) { - echo '<p>' . $b['title'] . '</p><div class="tree_branch">'; - foreach($children as $nn) { - echo '<p><a href="view-notes-' . $nn['id'] . '">' . $nn['title'] . '</a></p>'; - } - if ($can_new) { - echo '<p><a class="tool_link" href="new-notes-' . $b['id'] . '">+ new note</a></p>'; - } - echo '</div>'; - } else { - echo '<p><a href="view-notes-' . $b['id'] .'">' . $b['title'] . '</a></p>'; - } - } - if ($can_new) { - echo '<p><a class="tool_link" href="new-notes-' . $note['parent_id'] . '">+ new note</a></p>'; - } - echo '</div>'; -} - -echo '<div class="tree_branch">'; -$did_show_up = false; -foreach($user_root_notes as $n) { - if ($n['id'] == $note['id']) { - $did_show_up = true; - echo '<p>' . $n['title'] . '</p><div class="tree_branch">'; - foreach($children as $nn) { - echo '<p><a href="view-notes-' . $nn['id'] . '">' . $nn['title'] . '</a></p>'; - } - if ($can_new) { - echo '<p><a class="tool_link" href="new-notes-' . $note['id'] . '">+ new note</a></p>'; - } - echo '</div>'; - } else { - echo '<p><a href="view-notes-' . $n['id'] . '">' . $n['title'] . '</a></p>'; - if ($n['id'] == $note['parent_id']) { - $did_show_up = true; - list_brothers_and_children(); - } - } -} -if ($can_new) { - echo '<p><a class="tool_link" href="new-notes-0">+ new note</a></p>'; -} -echo '</div>'; - -if (!$did_show_up) { - echo '<br /><br />'; - echo '<a href="view-notes-' . $note['parent_id'] . '">' . $note['parent_title'] . '</a>'; - list_brothers_and_children(); -} - -*/ - -// *** NEW WAY $notes_tree = array(); $notes_parents = array(); @@ -110,7 +23,7 @@ for($id = $note['id']; $id != 0; $id = $notes_parents[$id]) { echo '</div><div class="contents-left">'; echo '<h1>' . $note['ownername'] . '</h1><br />'; -echo '<div class="small_right"><a href="user-notes-' . $note['owner'] . '">complete tree</a></div>'; +echo '<div class="small_right"><a href="user-notes-' . $note['owner'] . '">voir tout</a></div>'; function n_tree_branch($id) { global $notest, $note, $can_new; @@ -126,11 +39,11 @@ function n_tree_branch($id) { echo '</div>'; } else if ($can_new && $branch['id'] == $note['id']) { echo '<div class="tree_branch">'; - if ($can_new) echo '<p><a class="tool_link" href="new-notes-' . $branch['id'] . '">+ new note</a></p>'; + if ($can_new) echo '<p><a class="tool_link" href="new-notes-' . $branch['id'] . '">+ nouvelle note</a></p>'; echo '</div>'; } } - if ($can_new) echo '<p><a class="tool_link" href="new-notes-' . $id . '">+ new note</a></p>'; + if ($can_new) echo '<p><a class="tool_link" href="new-notes-' . $id . '">+ nouvelle note</a></p>'; } echo '<div class="tree_root">'; diff --git a/tpl/notes/move.php b/tpl/notes/move.php index d94e745..985b89a 100644 --- a/tpl/notes/move.php +++ b/tpl/notes/move.php @@ -4,12 +4,12 @@ require("tpl/general/top.php"); function f($n) { global $note; - return $n['title'] . ' - <a class="tool_link" href="move-notes-' . $note['id'] . '-' . $n['id'] . '">move here</a>'; + return $n['title'] . ' - <a class="tool_link" href="move-notes-' . $note['id'] . '-' . $n['id'] . '">déplacer ici</a>'; } require("tpl/general/inc_tree.php"); tree($notes_tree, @f); -echo '<a class="tool_link" href="move-notes-'.$note['id'].'-0">move to root</a>'; +echo '<a class="tool_link" href="move-notes-'.$note['id'].'-0">déplacer à la racine</a>'; $can_new = false; require("tpl/notes/inc_relativestree.php"); diff --git a/tpl/notes/user.php b/tpl/notes/user.php index 4da34e9..06099ac 100644 --- a/tpl/notes/user.php +++ b/tpl/notes/user.php @@ -1,5 +1,5 @@ <?php -$title = $note_owner['name'] . "'s notebook"; +$title = "Bloc-notes de " . $note_owner['name'] ; require("tpl/general/top.php"); function f($n) { @@ -9,11 +9,11 @@ function f($n) { require("tpl/general/inc_tree.php"); tree($notes_tree, @f); if ($note_owner['id'] == $user['id']) { - echo '<a class="tool_link" href="new-notes-0">create new note</a>'; + echo '<a class="tool_link" href="new-notes-0">nouvelle note</a>'; } echo '</div><div class="contents-left">'; -echo '<h1>Other users</h1>'; +echo '<h1>Autres bloc-notes</h1>'; echo "<ul>"; foreach($users as $u) { if ($u['id'] == $userid) { diff --git a/tpl/notes/view.php b/tpl/notes/view.php index c33e836..7615fe3 100644 --- a/tpl/notes/view.php +++ b/tpl/notes/view.php @@ -6,10 +6,10 @@ $t = array(); if ($note['parent_id'] != 0) { $t[] = 'parent : <a href="view-notes-'. $note['parent_id'] . '">' . $note['parent_title'] . '</a>'; } -if ($can_edit) $t[] = '<a href="edit-notes-' . $note['id'] . '">edit</a>'; -$t[] = '<a href="source-notes-' . $note['id'] . '">view source</a>'; -if ($can_move) $t[] = '<a href="move-notes-' . $note['id'] . '">move</a>'; -if ($can_delete) $t[] = '<a href="delete-notes-' . $note['id'] . '">delete</a>'; +if ($can_edit) $t[] = '<a href="edit-notes-' . $note['id'] . '">modifier</a>'; +$t[] = '<a href="source-notes-' . $note['id'] . '">code source</a>'; +if ($can_move) $t[] = '<a href="move-notes-' . $note['id'] . '">déplacer</a>'; +if ($can_delete) $t[] = '<a href="delete-notes-' . $note['id'] . '">supprimer</a>'; echo '<div class="small_right">' . implode(' | ', $t) . '</div>'; echo $note['html']; |