Editing a thread
Create site26 by copying site25.
- /cms
- ...
- site25
- site26
In this chapter, we are going to create the thread editor.
To test the result online, enter http://www.frasq.org/cms/site26 in the address bar of your navigator.
Identify yourself with the name foobar
and the password f00bar
.
Edit the page Legal information.
Click on the name of the thread in the top right corner of the page.
NOTE: In this demonstration version, the content of the site can not be modified.
Start by creating the action threadedit
by adding the file threadedit.php in the folder actions with the following content:
- /cms/site26
- actions
- threadedit.php
- actions
- require_once 'userhasrole.php';
- function threadedit($lang, $arglist=false) {
- global $supported_languages;
- if (!user_has_role('writer')) {
- return run('error/unauthorized', $lang);
- }
- $thread=$node=false;
- if (is_array($arglist)) {
- if (isset($arglist[0])) {
- $thread=$arglist[0];
- }
- if (isset($arglist[1])) {
- $node=$arglist[1];
- }
- }
- $clang=false;
- foreach ($supported_languages as $slang) {
- if (isset($_POST[$slang . '_x'])) {
- $clang=$slang;
- break;
- }
- }
- if (!$clang) {
- if (isset($_POST['clang'])) {
- $clang = $_POST['clang'];
- }
- else if (isset($_GET['clang'])) {
- $clang = $_GET['clang'];
- }
- else {
- $clang=$lang;
- }
- if (!in_array($clang, $supported_languages)) {
- return run('error/notfound', $lang);
- }
- }
- if (!$thread) {
- return run('error/notfound', $lang);
- }
- if (!$node) {
- require_once 'actions/threadeditsummary.php';
- return threadeditsummary($lang, $clang, $thread);
- }
- require_once 'actions/threadeditnode.php';
- return threadeditnode($lang, $clang, $thread, $node);
- }
To grant access to the threadedit
action, add an alias for each language in the file includes/aliases.inc:
- 'edit/thread' => 'threadedit',
- 'edition/fil' => 'threadedit',
Modify the URL call to edit the content of a page in the file actions/page.php:
- $edit=user_has_role('writer') ? url('threadedit', $_SESSION['user']['locale']) . '/'. $thread_id . '/'. $page_id . '?' . 'clang=' . $lang : false;
- require_once 'models/thread.inc';
- require_once 'userhasrole.php';
- require_once 'readarg.php';
- require_once 'strtofname.php';
- function threadeditnode($lang, $clang, $thread, $node) {
- if (!user_has_role('writer')) {
- return run('error/unauthorized', $lang);
- }
- $thread_id = thread_id($thread);
- if (!$thread_id) {
- return run('error/notfound', $lang);
- }
- $node_id = thread_node_id($thread_id, $node);
- if (!$node_id) {
- return run('error/notfound', $lang);
- }
- $thread_name=$thread_title=$thread_abstract=$thread_cloud=false;
- $r = thread_get($clang, $thread_id);
- if (!$r) {
- return run('error/notfound', $lang);
- }
- extract($r); /* thread_name thread_title thread_abstract thread_cloud */
- $node_editor = build('threadnodeeditor', $lang, $clang, $thread_id, $node_id);
- $node_title=false;
- $r = thread_get_node($clang, $thread_id, $node_id, false);
- $node_title = $r ? $r['node_title'] : $node_id;
- head('title', $thread_title);
- head('description', false);
- head('keywords', false);
- head('robots', 'noindex, nofollow');
- $headline_text=$thread_title;
- $headline_url=url('threadedit', $lang) . '/'. $thread_id . '?' . 'clang=' . $clang;
- $headline = compact('headline_text', 'headline_url');
- $view=url($thread_type, $clang) . '/'. $thread_id . '/'. $node_id;
- $validate=url($thread_type, $clang) . '/'. $thread_name . '/'. $node_id;
- $banner = build('banner', $lang, compact('headline', 'view', 'validate'));
- $prev_node_label=$prev_node_url=false;
- $r=thread_node_prev($clang, $thread_id, $node_id, false);
- if ($r) {
- extract($r);
- $prev_node_label = $prev_node_title ? $prev_node_title : $prev_node_number;
- $prev_node_url=url('threadedit', $lang) . '/'. $thread_id . '/'. $prev_node_id . '?' . 'clang=' . $clang;
- }
- $next_node_label=$next_node_url=false;
- $r=thread_node_next($clang, $thread_id, $node_id, false);
- if ($r) {
- extract($r);
- $next_node_label = $next_node_title ? $next_node_title : $next_node_number;
- $next_node_url=url('threadedit', $lang) . '/'. $thread_id . '/'. $next_node_id . '?' . 'clang=' . $clang;
- }
- $content = view('editing/threadeditnode', $lang, compact('node_editor', 'node_title', 'prev_node_url', 'prev_node_label', 'next_node_url', 'next_node_label'));
- $output = layout('editing', compact('banner', 'content'));
- return $output;
- }
- require_once 'models/node.inc';
- function threadnodeeditor($lang, $clang, $thread_id, $node_id) {
- $output = build('nodeeditor', $lang, $clang, $node_id);
- return $output;
- }
- <h3><?php echo htmlspecialchars($node_title, ENT_COMPAT, 'UTF-8'); ?></h3>
- <p id="threadnodenav" class="menubar">
- <?php if ($prev_node_url): ?>
- <a href="<?php echo $prev_node_url; ?>" title="Previous"><?php echo htmlspecialchars($prev_node_label, ENT_COMPAT, 'UTF-8'); ?></a>
- <?php endif; ?>
- <?php if ($next_node_url and $prev_node_url): ?>
- |
- <?php endif; ?>
- <?php if ($next_node_url): ?>
- <a href="<?php echo $next_node_url; ?>" title="Next"><?php echo htmlspecialchars($next_node_label, ENT_COMPAT, 'UTF-8'); ?></a>
- <?php endif; ?>
- </p>
- <?php echo $node_editor; ?>
- <h3><?php echo htmlspecialchars($node_title, ENT_COMPAT, 'UTF-8'); ?></h3>
- <p id="threadnodenav" class="menubar">
- <?php if ($prev_node_url): ?>
- <a href="<?php echo $prev_node_url; ?>" title="Précédent"><?php echo htmlspecialchars($prev_node_label, ENT_COMPAT, 'UTF-8'); ?></a>
- <?php endif; ?>
- <?php if ($next_node_url and $prev_node_url): ?>
- |
- <?php endif; ?>
- <?php if ($next_node_url): ?>
- <a href="<?php echo $next_node_url; ?>" title="Suivant"><?php echo htmlspecialchars($next_node_label, ENT_COMPAT, 'UTF-8'); ?></a>
- <?php endif; ?>
- </p>
- <?php echo $node_editor; ?>
- $menu=$languages=$headline=false;
- case 'headline':
- if ($param) {
- $headline = view('headline', false, $param);
- }
- break;
- $output = view('banner', false, compact('logo', 'menu', 'languages', 'headline'));
- <h4 id="headline"><?php if ($headline_url): ?><a href="<?php echo $headline_url; ?>"><?php endif; ?><?php echo htmlspecialchars($headline_text, ENT_NOQUOTES, 'UTF-8', false); ?><?php if ($headline_url): ?></a><?php endif; ?></h4>
- <?php if (isset($headline)): ?>
- <?php echo $headline; ?>
- <?php endif; ?>
- function thread_node_prev($lang, $thread_id, $node_id, $strict=true) {
- $sqllang=db_sql_arg($lang, false);
- $join = $strict ? 'JOIN' : 'LEFT JOIN';
- $tabthreadnode=db_prefix_table('thread_node');
- $tabnodelocale=db_prefix_table('node_locale');
- $sql="SELECT tn.node_id AS prev_node_id, nl.name AS prev_node_name, nl.title AS prev_node_title, tn.number AS prev_node_number FROM $tabthreadnode tn $join $tabnodelocale nl ON nl.node_id=tn.node_id AND nl.locale=$sqllang WHERE tn.thread_id=$thread_id AND tn.number < (SELECT number FROM $tabthreadnode WHERE thread_id=$thread_id AND node_id=$node_id) ORDER BY tn.number DESC LIMIT 1";
- $r = db_query($sql);
- return $r ? $r[0] : false;
- }
- function thread_node_next($lang, $thread_id, $node_id, $strict=true) {
- $sqllang=db_sql_arg($lang, false);
- $join = $strict ? 'JOIN' : 'LEFT JOIN';
- $tabthreadnode=db_prefix_table('thread_node');
- $tabnodelocale=db_prefix_table('node_locale');
- $sql="SELECT tn.node_id AS next_node_id, nl.name AS next_node_name, nl.title AS next_node_title, tn.number AS next_node_number FROM $tabthreadnode tn $join $tabnodelocale nl ON nl.node_id=tn.node_id AND nl.locale=$sqllang WHERE tn.thread_id=$thread_id AND tn.number > (SELECT number FROM $tabthreadnode WHERE thread_id=$thread_id AND node_id=$node_id) ORDER BY tn.number ASC LIMIT 1";
- $r = db_query($sql);
- return $r ? $r[0] : false;
- }
- function thread($lang, $arglist=false) {
- $thread=$node=false;
- if (is_array($arglist)) {
- if (isset($arglist[0])) {
- $thread=$arglist[0];
- }
- if (isset($arglist[1])) {
- $node=$arglist[1];
- }
- }
- if (!$thread) {
- return run('error/notfound', $lang);
- }
- if (!$node) {
- require_once 'actions/threadsummary.php';
- return threadsummary($lang, $thread);
- }
- require_once 'actions/threadnode.php';
- return threadnode($lang, $thread, $node);
- }
- require_once 'userhasrole.php';
- require_once 'models/thread.inc';
- function threadnode($lang, $thread, $node) {
- $thread_id = thread_id($thread);
- if (!$thread_id) {
- return run('error/notfound', $lang);
- }
- $r = thread_get($lang, $thread_id);
- if (!$r) {
- return run('error/notfound', $lang);
- }
- extract($r); /* thread_name thread_title thread_type thread_abstract thread_cloud thread_created thread_modified */
- $node_id = thread_node_id($thread_id, $node);
- if (!$node_id) {
- return run('error/notfound', $lang);
- }
- $r = node_get($lang, $node_id);
- if (!$r) {
- return run('error/notfound', $lang);
- }
- extract($r); /* node_name node_title node_abstract node_cloud node_created node_modified */
- $node_contents = build('nodecontent', $lang, $node_id);
- $prev_node_label=$prev_node_url=false;
- $r=thread_node_prev($lang, $thread_id, $node_id, false);
- if ($r) {
- extract($r);
- $prev_node_label = $prev_node_title ? $prev_node_title : $prev_node_number;
- $prev_node_url=url('thread', $lang) . '/'. $thread_name . '/'. $prev_node_name;
- }
- $next_node_label=$next_node_url=false;
- $r=thread_node_next($lang, $thread_id, $node_id, false);
- if ($r) {
- extract($r);
- $next_node_label = $next_node_title ? $next_node_title : $next_node_number;
- $next_node_url=url('thread', $lang) . '/'. $thread_name . '/'. $next_node_name;
- }
- head('title', $thread_title);
- head('description', $node_abstract);
- head('keywords', $node_cloud);
- head('robots', 'noindex, nofollow');
- $headline_text=$thread_title;
- $headline_url=url('thread', $lang) . '/' . $thread_name;
- $headline = compact('headline_text', 'headline_url');
- $edit=user_has_role('writer') ? url('threadedit', $_SESSION['user']['locale']) . '/' . $thread_id . '/' . $node_id . '?' . 'clang=' . $lang : false;
- $validate=url('thread', $lang) . '/'. $thread_id . '/'. $node_id;
- $banner = build('banner', $lang, compact('headline', 'edit', 'validate'));
- $content = view('threadnode', $lang, compact('node_name', 'node_title', 'node_abstract', 'node_cloud', 'node_created', 'node_modified', 'node_contents', 'prev_node_url', 'prev_node_label', 'next_node_url', 'next_node_label'));
- $output = layout('standard', compact('banner', 'content'));
- return $output;
- }
- <h3><?php echo $node_title; ?></h3>
- <p id="threadnodenav" class="menubar">
- <?php if ($prev_node_url): ?>
- <a href="<?php echo $prev_node_url; ?>" title="Previous"><?php echo htmlspecialchars($prev_node_label, ENT_COMPAT, 'UTF-8'); ?></a>
- <?php endif; ?>
- <?php if ($next_node_url and $prev_node_url): ?>
- |
- <?php endif; ?>
- <?php if ($next_node_url): ?>
- <a href="<?php echo $next_node_url; ?>" title="Next"><?php echo htmlspecialchars($next_node_label, ENT_COMPAT, 'UTF-8'); ?></a>
- <?php endif; ?>
- </p>
- <?php if ($node_abstract): ?>
- <h5>Abstract</h5>
- <p><?php echo $node_abstract; ?></p>
- <?php endif; ?>
- <?php if ($node_cloud): ?>
- <h6>Cloud</h6>
- <p class="smaller"><?php echo htmlspecialchars($node_cloud, ENT_COMPAT, 'UTF-8'); ?></p>
- <?php endif; ?>
- <?php if ($node_contents): ?>
- <h4>Content</h4>
- <?php echo $node_contents; ?>
- <?php endif; ?>
- <h3><?php echo $node_title; ?></h3>
- <p id="threadnodenav" class="menubar">
- <?php if ($prev_node_url): ?>
- <a href="<?php echo $prev_node_url; ?>" title="Précédent"><?php echo htmlspecialchars($prev_node_label, ENT_COMPAT, 'UTF-8'); ?></a>
- <?php endif; ?>
- <?php if ($next_node_url and $prev_node_url): ?>
- |
- <?php endif; ?>
- <?php if ($next_node_url): ?>
- <a href="<?php echo $next_node_url; ?>" title="Suivant"><?php echo htmlspecialchars($next_node_label, ENT_COMPAT, 'UTF-8'); ?></a>
- <?php endif; ?>
- </p>
- <?php if ($node_abstract): ?>
- <h5>Extrait</h5>
- <p><?php echo $node_abstract; ?></p>
- <?php endif; ?>
- <?php if ($node_cloud): ?>
- <h6>Nuage</h6>
- <p class="smaller"><?php echo htmlspecialchars($node_cloud, ENT_COMPAT, 'UTF-8'); ?></p>
- <?php endif; ?>
- <?php if ($node_contents): ?>
- <h4>Contenu</h4>
- <?php echo $node_contents; ?>
- <?php endif; ?>
- require_once 'userhasrole.php';
- require_once 'models/thread.inc';
- function threadsummary($lang, $thread) {
- $thread_id = thread_id($thread);
- if (!$thread_id) {
- return run('error/notfound', $lang);
- }
- $r = thread_get($lang, $thread_id);
- if (!$r) {
- return run('error/notfound', $lang);
- }
- extract($r); /* thread_name thread_title thread_abstract thread_cloud */
- $thread_contents = array();
- $r = thread_get_contents($lang, $thread_id);
- if ($r) {
- $thread_url = url('thread', $lang) . '/'. $thread_name;
- foreach ($r as $c) {
- extract($c); /* node_id node_name node_title node_number */
- $node_url = $thread_url . '/' . $node_name;
- $thread_contents[] = compact('node_title' , 'node_url');
- }
- }
- head('title', $thread_title);
- head('description', $thread_abstract);
- head('keywords', $thread_cloud);
- $edit=user_has_role('writer') ? url('threadedit', $_SESSION['user']['locale']) . '/'. $thread_id . '?' . 'clang=' . $lang : false;
- $validate=url('thread', $lang) . '/'. $thread_name;
- $banner = build('banner', $lang, compact('edit', 'validate'));
- $content = view('threadsummary', $lang, compact('thread_title', 'thread_abstract', 'thread_cloud', 'thread_contents'));
- $output = layout('standard', compact('banner', 'content'));
- return $output;
- }
- require_once 'models/thread.inc';
- require_once 'userhasrole.php';
- require_once 'readarg.php';
- require_once 'strtofname.php';
- function threadeditsummary($lang, $clang, $thread) {
- global $supported_threads;
- if (!user_has_role('writer')) {
- return run('error/unauthorized', $lang);
- }
- $thread_id = thread_id($thread);
- if (!$thread_id) {
- return run('error/notfound', $lang);
- }
- $action='init';
- if (isset($_POST['thread_edit'])) {
- $action='edit';
- }
- $thread_type=$thread_name=$thread_title=$thread_abstract=$thread_cloud=false;
- switch($action) {
- case 'init':
- case 'reset':
- $r = thread_get($clang, $thread_id, false);
- if ($r) {
- extract($r); /* thread_type thread_name thread_title thread_abstract thread_cloud */
- }
- break;
- case 'edit':
- if (isset($_POST['thread_type'])) {
- $thread_type=readarg($_POST['thread_type']);
- }
- if (isset($_POST['thread_title'])) {
- $thread_title=readarg($_POST['thread_title']);
- }
- if (isset($_POST['thread_name'])) {
- $thread_name=strtofname(readarg($_POST['thread_name']));
- }
- if (empty($thread_name) and !empty($thread_title)) {
- $thread_name = strtofname($thread_title);
- }
- if (isset($_POST['thread_abstract'])) {
- $thread_abstract=readarg($_POST['thread_abstract']);
- }
- if (isset($_POST['thread_cloud'])) {
- $thread_cloud=readarg($_POST['thread_cloud'], true, false); // trim but DON'T strip!
- preg_match_all('/(\S+)/', $thread_cloud, $r);
- $thread_cloud=implode(' ', array_unique($r[0]));
- }
- break;
- default:
- break;
- }
- $missing_thread_title=false;
- $missing_thread_name=false;
- $bad_thread_name=false;
- $missing_thread_type=false;
- $bad_thread_type=false;
- switch($action) {
- case 'edit':
- if (empty($thread_title)) {
- $missing_thread_title = true;
- }
- if (empty($thread_name)) {
- $missing_thread_name = true;
- }
- else if (!preg_match('#^[\w-]{3,}$#', $thread_name)) {
- $bad_thread_name = true;
- }
- if (empty($thread_type)) {
- $missing_thread_type = true;
- }
- else if (!in_array($thread_type, $supported_threads)) {
- $bad_thread_type = true;
- }
- break;
- default:
- break;
- }
- switch($action) {
- case 'edit':
- if ($missing_thread_name or $bad_thread_name or $missing_thread_title or $missing_thread_type or $bad_thread_type) {
- break;
- }
- $r = thread_set($clang, $thread_id, $thread_name, $thread_title, $thread_type, $thread_abstract, $thread_cloud);
- if (!$r) {
- break;
- }
- break;
- default:
- break;
- }
- head('title', $thread_title);
- head('description', false);
- head('keywords', false);
- head('robots', 'noindex, nofollow');
- $view=url($thread_type, $clang) . '/'. $thread_id;
- $validate=url($thread_type, $clang) . '/'. $thread_id;
- $banner = build('banner', $lang, compact('view', 'validate'));
- $errors = compact('missing_thread_name', 'bad_thread_name', 'missing_thread_title', 'missing_thread_type', 'bad_thread_type');
- $content = view('editing/threadeditsummary', $lang, compact('clang', 'thread_type', 'thread_name', 'thread_title', 'thread_abstract', 'thread_cloud', 'errors'));
- $output = layout('editing', compact('banner', 'content'));
- return $output;
- }
- function thread_set($lang, $thread_id, $thread_name, $thread_title, $thread_type, $thread_abstract, $thread_cloud) {
- $sqltype=db_sql_arg($thread_type, false);
- $tabthread=db_prefix_table('thread');
- $sql="UPDATE $tabthread SET thread_type=$sqltype, modified=NOW() WHERE thread_id=$thread_id LIMIT 1";
- $r = db_update($sql);
- if (!$r) {
- return false;
- }
- $sqllang=db_sql_arg($lang, false);
- $sqlname=db_sql_arg($thread_name, true);
- $sqltitle=db_sql_arg($thread_title, true);
- $sqlabstract=db_sql_arg($thread_abstract, true, true);
- $sqlcloud=db_sql_arg($thread_cloud, true, true);
- $tabthreadlocale=db_prefix_table('thread_locale');
- $sql="INSERT $tabthreadlocale (thread_id, locale, name, title, abstract, cloud) VALUES ($thread_id, $sqllang, $sqlname, $sqltitle, $sqlabstract, $sqlcloud) ON DUPLICATE KEY UPDATE thread_id=LAST_INSERT_ID(thread_id), locale=VALUES(locale), name=VALUES(name), title=VALUES(title), abstract=VALUES(abstract), cloud=VALUES(cloud)";
- $r = db_insert($sql);
- return $r;
- }
- <?php extract($errors); ?>
- <form class="compact" action="" method="post">
- <input name="clang" type="hidden" value="<?php echo $clang; ?>" />
- <p>
- <?php if (in_array('fr', $supported_languages)): ?>
- <input name="fr" type="image" src="<?php echo $base_path; ?>/images/theme/flags/fr.png" alt="fr" title="Français"/>
- <?php endif; ?>
- <?php if (in_array('en', $supported_languages)): ?>
- <input name="en" type="image" src="<?php echo $base_path; ?>/images/theme/flags/en.png" alt="en" title="English"/>
- <?php endif; ?>
- </p>
- <p>
- <input name="thread_title" type="text" size="40" maxlength="100" value="<?php echo htmlspecialchars($thread_title, ENT_COMPAT, 'UTF-8'); ?>" title="Title" onkeypress="return submitonenter(event, 'thread_edit')"/>
- <label>URL:</label>
- <input name="thread_name" type="text" size="40" maxlength="100" value="<?php echo $thread_name; ?>" onkeypress="return submitonenter(event, 'thread_edit')"/>
- </p>
- <p><label>Abstract:</label></p>
- <p>
- <textarea name="thread_abstract" cols="80" rows="5"><?php echo htmlspecialchars($thread_abstract, ENT_COMPAT, 'UTF-8'); ?></textarea>
- </p>
- <p><label>Cloud:</label></p>
- <p>
- <textarea name="thread_cloud" cols="80" rows="5"><?php echo htmlspecialchars($thread_cloud, ENT_COMPAT, 'UTF-8'); ?></textarea>
- </p>
- <p>
- <label>Type:</label>
- <select name="thread_type" size="1">
- <option value="thread" <?php echo $thread_type == 'thread' ? 'selected="selected"' : ''; ?>>Thread</option>
- </select>
- </p>
- <input id="thread_edit" name="thread_edit" type="submit" value="Edit" />
- </p>
- <?php if ($missing_thread_title or $missing_thread_name or $bad_thread_name or $missing_thread_type or $bad_thread_type): ?>
- <div class="alert">
- <?php if ($missing_thread_title): ?>
- <p>You didn't input the title of the thread.</p>
- <?php endif; ?>
- <?php if ($missing_thread_name): ?>
- <p>Specify a name for the link to the thread.</p>
- <?php elseif ($bad_thread_name): ?>
- <p>The name of the link to the thread is invalid.</p>
- <?php endif; ?>
- <?php if ($missing_thread_type): ?>
- <p>Specify the type of the thread.</p>
- <?php elseif ($bad_thread_type): ?>
- <p>The type of the thread is invalid.</p>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- </form>
- <?php extract($errors); ?>
- <form class="compact" action="" method="post">
- <input name="clang" type="hidden" value="<?php echo $clang; ?>" />
- <p>
- <?php if (in_array('fr', $supported_languages)): ?>
- <input name="fr" type="image" src="<?php echo $base_path; ?>/images/theme/flags/fr.png" alt="fr" title="Français"/>
- <?php endif; ?>
- <?php if (in_array('en', $supported_languages)): ?>
- <input name="en" type="image" src="<?php echo $base_path; ?>/images/theme/flags/en.png" alt="en" title="English"/>
- <?php endif; ?>
- </p>
- <p>
- <input name="thread_title" type="text" size="40" maxlength="100" value="<?php echo htmlspecialchars($thread_title, ENT_COMPAT, 'UTF-8'); ?>" title="Titre" onkeypress="return submitonenter(event, 'thread_edit')"/>
- <label>URL :</label>
- <input name="thread_name" type="text" size="40" maxlength="100" value="<?php echo $thread_name; ?>" onkeypress="return submitonenter(event, 'thread_edit')"/>
- </p>
- <p><label>Extrait :</label></p>
- <p>
- <textarea name="thread_abstract" cols="80" rows="5"><?php echo htmlspecialchars($thread_abstract, ENT_COMPAT, 'UTF-8'); ?></textarea>
- </p>
- <p><label>Nuage :</label></p>
- <p>
- <textarea name="thread_cloud" cols="80" rows="5"><?php echo htmlspecialchars($thread_cloud, ENT_COMPAT, 'UTF-8'); ?></textarea>
- </p>
- <p>
- <label>Type :</label>
- <select name="thread_type" size="1">
- <option value="thread" <?php echo $thread_type == 'thread' ? 'selected="selected"' : ''; ?>>Fil</option>
- </select>
- </p>
- <input id="thread_edit" name="thread_edit" type="submit" value="Éditer" />
- </p>
- <?php if ($missing_thread_title or $missing_thread_name or $bad_thread_name or $missing_thread_type or $bad_thread_type): ?>
- <div class="alert">
- <?php if ($missing_thread_title): ?>
- <p>Vous n'avez pas saisi le titre du fil.</p>
- <?php endif; ?>
- <?php if ($missing_thread_name): ?>
- <p>Spécifiez un nom pour le lien sur le fil.</p>
- <?php elseif ($bad_thread_name): ?>
- <p>Le nom du lien sur le fil est invalide.</p>
- <?php endif; ?>
- <?php if ($missing_thread_type): ?>
- <p>Spécifiez le type du fil.</p>
- <?php elseif ($bad_thread_type): ?>
- <p>Le type de fil est invalide.</p>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- </form>
- global $supported_threads;
- $supported_threads=array('thread'); // 'thread'
- #banner #headline {float:right;margin-top:13px;margin-bottom:0;}
- #threadnodenav, #bookpagenav {font-size:smaller;margin-bottom:1em;}
Comments