aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
Diffstat (limited to 'cgi')
-rw-r--r--cgi/manage.py21
-rw-r--r--cgi/templates/board.html24
-rw-r--r--cgi/templates/board.jp.html10
-rw-r--r--cgi/templates/txt_board.en.html23
-rw-r--r--cgi/templates/txt_board.html19
-rw-r--r--cgi/templates/txt_thread.html10
-rw-r--r--cgi/templates/txt_threadlist.html35
7 files changed, 87 insertions, 55 deletions
diff --git a/cgi/manage.py b/cgi/manage.py
index 690c807..5fb38d7 100644
--- a/cgi/manage.py
+++ b/cgi/manage.py
@@ -381,13 +381,13 @@ def manage(self, path_split):
# Nos vamos al board y ubicamos el post
board = setBoard(path_split[3])
- postid = int(path_split[4])
- post = FetchOne('SELECT `parentid`, `locked` FROM `posts` WHERE `boardid` = %s AND `id` = %s LIMIT 1', (board['id'], pid) )
+ pid = int(path_split[4])
+ post = FetchOne('SELECT id, parentid, locked FROM posts WHERE boardid = %s AND id = %s LIMIT 1', (board['id'], pid) )
if not post:
message = _('Unable to locate a post with that ID.')
template_filename = "message.html"
else:
- if not post['parentid']:
+ if post['parentid'] != 0:
message = _('Post is not a thread opener.')
template_filename = "message.html"
else:
@@ -401,13 +401,14 @@ def manage(self, path_split):
UpdateDb("UPDATE `posts` SET `locked` = %s WHERE `boardid` = %s AND `id` = %s LIMIT 1",
(setLocked, board["id"], post["id"]))
threadUpdated(pid)
- if setLocked == 1:
- message = _('Thread successfully closed.')
- logAction(staff_account['username'], _('Closed thread %s') % ('/' + board['dir'] + '/' + pid) )
- else:
- message = _('Thread successfully opened.')
- logAction(staff_account['username'], _('Opened thread %s') % ('/' + board['dir'] + '/' + pid) )
- template_filename = "message.html"
+
+ if setLocked == 1:
+ message = _('Thread successfully closed.')
+ logAction(staff_account['username'], _('Closed thread %s') % ('/' + board['dir'] + '/' + str(pid)) )
+ else:
+ message = _('Thread successfully opened.')
+ logAction(staff_account['username'], _('Opened thread %s') % ('/' + board['dir'] + '/' + str(pid)) )
+ template_filename = "message.html"
elif path_split[2] == 'permasage':
setPermasaged = 0
diff --git a/cgi/templates/board.html b/cgi/templates/board.html
index 486c380..2f02408 100644
--- a/cgi/templates/board.html
+++ b/cgi/templates/board.html
@@ -35,10 +35,10 @@
</center>
<?py #endif ?>
<?py if oek_finish: ?>
-<center style="margin:0.5em 0;">
+<center style="margin:0.5em 0">
<table><tr><td>
<?py if oek_finish == "no": ?>
- <div style="font-size:xx-large;margin:0.25em;">No hay dibujo</div>
+ <div style="font-size:xx-large;margin:0.25em">No hay dibujo</div>
<?py else: ?>
<img src="#{images_url}#{board}/temp/#{oek_finish}.png?ts=#{ts}" />
<?py #endif ?>
@@ -51,7 +51,7 @@
<input type="hidden" name="parent" value="#{replythread}" />
<input type="hidden" name="default_subject" value="#{default_subject}" />
<?py #endif ?>
- <div style="display:none;">Trampa: <input type="text" name="name" size="25" /> <input type="text" name="email" size="25" /></div>
+ <div style="display:none">No tocar: <input type="text" name="name" size="25" /> <input type="text" name="email" size="25" /></div>
<table class="postform">
<?py if not disable_name: ?>
<tr>
@@ -87,7 +87,7 @@
<td class="postblock">Archivo</td>
<td>
<input type="file" name="file" id="file" accesskey="f" />
- <span id="filepreview" style="display:none;"></span>
+ <span id="filepreview" style="display:none"></span>
<?py if allow_spoilers: ?>
<label>[<input type="checkbox" name="spoil" id="spoil" />Spoiler]</label>
<?py #endif ?>
@@ -116,7 +116,7 @@
<li>Los hilos son automáticamente eliminados a los <b>#{maxage}</b> días de edad.</li>
<?py #endif ?>
<li>¿Eres nuevo? <a href="/guia.html">Leer antes de postear</a> · <a href="/faq.html">Preguntas frecuentes</a> · <a href="/bai/">Contacto</a></li>
- <li id="search"><form method="get" action="/tools/search.py" style="display:inline-block;"><input type="hidden" name="board" value="${board}"><label for="searchin">Buscar: </label><input type="text" name="q" id="searchin" value="" size="10"> <input type="submit" value="Ir"></form>
+ <li id="search"><form method="get" action="/tools/search.py" style="display:inline-block"><input type="hidden" name="board" value="${board}"><label for="searchin">Buscar: </label><input type="text" name="q" id="searchin" value="" size="10"> <input type="submit" value="Ir"></form>
<?py if not force_css: ?>
· <span>Estilo: <select id="styles">
<?py for title in styles: ?><option value="#{title}">#{title}</option><?py #endfor ?>
@@ -140,7 +140,7 @@
<?py for thread in threads: ?>
<div id="t#{thread['id']}" class="thread" data-length="#{thread['length']}">
<?py if not replythread: ?>
- <span class="unhide" style="display:none;">Hilo <a href="#{boards_url}#{board}/res/#{thread['id']}.html">#{thread['id']}</a> oculto. <a class="tt" href="#">Ver hilo</a></span>
+ <span class="unhide" style="display:none">Hilo <a href="#{boards_url}#{board}/res/#{thread['id']}.html">#{thread['id']}</a> oculto. <a class="tt" href="#">Ver hilo</a></span>
<?py #endif ?>
<?py for post in thread['posts']: ?>
<?py if not post['IS_DELETED']: ?>
@@ -184,9 +184,15 @@
<?py #endif ?>
</label>
<?py if post['email']: ?>
- <a href="mailto:#{post['email']}"><span class="name"><b>#{post['name']}</b> #{post['tripcode'] if post['tripcode'] else ''}</span></a>
+ <a href="mailto:#{post['email']}"><span class="name">
+ <b>#{post['name']}</b>
+ #{post['tripcode'] if post['tripcode'] else ''}
+ </span></a>
<?py else: ?>
- <span class="name"><b>#{post['name']}</b> #{post['tripcode'] if post['tripcode'] else ''}</span>
+ <span class="name">
+ <b>#{post['name']}</b>
+ #{post['tripcode'] if post['tripcode'] else ''}
+ </span>
<?py #endif ?>
<span class="date" data-unix="#{post['timestamp']}">#{post['timestamp_formatted']}</span>
<?py if replythread: ?>
@@ -231,7 +237,7 @@
</a>
<?py #endif ?>
<?py if post['thumb_width'] and post['parentid']: ?>
- <blockquote style="margin-left:#{post['thumb_width']+40}px;">#{post['message']}</blockquote>
+ <blockquote style="margin-left:#{post['thumb_width']+40}px">#{post['message']}</blockquote>
<?py else: ?>
<blockquote>#{post['message']}</blockquote>
<?py #endif ?>
diff --git a/cgi/templates/board.jp.html b/cgi/templates/board.jp.html
index ffb9d67..b33e42c 100644
--- a/cgi/templates/board.jp.html
+++ b/cgi/templates/board.jp.html
@@ -186,9 +186,15 @@
<?py #endif ?>
</label>
<?py if post['email']: ?>
- Name <a href="mailto:#{post['email']}"><span class="name"><b>#{post['name']}</b> #{post['tripcode'] if post['tripcode'] else ''}</span></a>
+ Name <a href="mailto:#{post['email']}"><span class="name">
+ <b>#{post['name']}</b>
+ #{post['tripcode'] if post['tripcode'] else ''}
+ </span></a>
<?py else: ?>
- Name <span class="name"><b>#{post['name']}</b> #{post['tripcode'] if post['tripcode'] else ''}</span>
+ Name <span class="name">
+ <b>#{post['name']}</b>
+ #{post['tripcode'] if post['tripcode'] else ''}
+ </span>
<?py #endif ?>
<span class="date" data-unix="#{post['timestamp']}">#{post['timestamp_formatted']}</span>
<?py if replythread: ?>
diff --git a/cgi/templates/txt_board.en.html b/cgi/templates/txt_board.en.html
index 7f280b4..9327c77 100644
--- a/cgi/templates/txt_board.en.html
+++ b/cgi/templates/txt_board.en.html
@@ -85,13 +85,14 @@
<?py if not thread['locked']: ?>
<form id="postform#{thread['id']}" class="postform" action="#{cgi_url}post" method="post" enctype="multipart/form-data">
<input type="hidden" name="board" value="#{board}" /><input type="hidden" name="parent" value="#{thread['id']}" /><input type="hidden" name="password" value="" />
- <div style="display:none;"><input type="text" name="name" size="15" /> <input type="text" name="email" size="15" /></div>
- <input type="submit" value="Responder" /> <span><span>Name: </span><input type="text" name="fielda" size="15" /> <span>E-mail: </span><input type="text" name="fieldb" size="15" /></span>
+ <div style="display:none"><input type="text" name="name" size="13" /><input type="text" name="email" size="13" /></div>
+ <input type="submit" value="Reply" /> <input type="button" name="preview" data-thread="#{thread['id']}" value="Preview"> <span><span>Name: </span><input type="text" name="fielda" size="13" /> <span>E-mail: </span><input type="text" name="fieldb" size="13" /></span>
<div class="formpad">
- <textarea name="message" cols="70" rows="5"></textarea>
+ <div id="preview#{thread['id']}" class="msg" style="display:none"></div>
+ <textarea name="message" cols="90" rows="5"></textarea>
<?py if allow_image_replies: ?><br /><input type="file" name="file" /><?py #endif ?>
<?py else: ?>
-<form class="postform"><div class="locked">Thread has been closed. You cannot reply anymore.</div><div class="formpad">
+<form class="postform"><div class="locked"><b>Thread has been closed. You cannot reply anymore.</b></div><div class="formpad">
<?py #endif ?>
<div class="threadlinks">
<a href="#{boards_url}#{board}/read/#{thread['timestamp']}/"><b>Entire thread</b></a>
@@ -119,26 +120,26 @@
<h5>New thread form</h5>
<form id="postform0" action="#{cgi_url}post" method="post" enctype="multipart/form-data">
<input type="hidden" name="board" value="#{board}" /><input type="hidden" name="password" value="" />
- <table style="max-width:600px">
+ <table style="max-width:700px">
<tr>
<td class="pblock">Subject:</td>
<td colspan="3" style="width:100%"><input type="text" name="subject" size="50" maxlength="100" /></td>
- <td><input type="submit" value="Crear nuevo hilo" /></td>
+ <td><input type="submit" value="Create new thread" /></td>
</tr>
<tr>
<td class="pblock">Name:</td>
<td><input type="text" name="fielda" /></td>
<td class="pblock">E-mail:</td>
<td><input type="text" name="fieldb" /></td>
- <td><input type="button" name="preview" value="Previsualizar" /></td>
+ <td><input type="button" name="preview" data-thread="0" value="Previsualizar" /></td>
</tr>
- <tr id="options" style="display:none;">
+ <tr id="tr_preview" style="display:none">
<td></td>
- <td colspan="4"><div id="preview0" class="msg"></div></td>
+ <td colspan="4"><div id="preview#{thread['id']}" class="msg"></div></td>
</tr>
<tr>
<td class="pblock">Body:</td>
- <td colspan="4"><textarea name="message" cols="70" rows="10"></textarea></td>
+ <td colspan="4"><textarea name="message" cols="90" rows="12" data-h-limit="512"></textarea></td>
</tr>
<?py if allow_images: ?>
<tr>
@@ -147,7 +148,7 @@
</tr>
<?py #endif ?>
</table>
- <div style="display:none;">Trampa: <input type="text" name="name" maxlength="50" /> <input type="text" name="email" maxlength="50" /></div>
+ <div style="display:none">No tocar: <input type="text" name="name" /><input type="text" name="email" /></div>
</form>
</div>
</div>
diff --git a/cgi/templates/txt_board.html b/cgi/templates/txt_board.html
index 3e279fc..a6899bf 100644
--- a/cgi/templates/txt_board.html
+++ b/cgi/templates/txt_board.html
@@ -25,7 +25,7 @@
<a name="menu"></a>
<?py if threads: ?>
<div id="threadbox" class="outerbox"><div class="innerbox">
- <div id="threadlinks"><a href="#{cgi_url}threadlist/#{board}"><b>Ver todos los hilos</b></a> <a href="kako/"><b>Ver hilos archivados</b></a> <a href="#newthread"><b>Crear nuevo hilo</b></a></div>
+ <div id="threadlinks"><a href="#{cgi_url}threadlist/#{board}"><b>Ver lista de hilos</b></a> <a href="kako/"><b>Hilos archivados</b></a> <a href="#newthread"><b>Crear nuevo hilo</b></a></div>
<div id="threadlist">
<?py iter = 1 ?>
<?py for thread in threads: ?>
@@ -85,13 +85,14 @@
<?py if thread['locked'] != 1: ?>
<form id="postform#{thread['id']}" class="postform" action="#{cgi_url}post" method="post" enctype="multipart/form-data">
<input type="hidden" name="board" value="#{board}" /><input type="hidden" name="parent" value="#{thread['id']}" /><input type="hidden" name="password" value="" />
- <div style="display:none;"><input type="text" name="name" size="15" /> <input type="text" name="email" size="15" /></div>
- <input type="submit" value="Responder" /> <span><span>Nombre: </span><input type="text" name="fielda" size="15" /> <span>E-mail: </span><input type="text" name="fieldb" size="15" /></span>
+ <div style="display:none">No tocar: <input type="text" name="name" /><input type="text" name="email" /></div>
+ <input type="submit" value="Responder" /> <input type="button" name="preview" data-thread="#{thread['id']}" value="Previsualizar" /> <span><span>Nombre:&nbsp;</span><input type="text" name="fielda" size="13" /><span>&nbsp;E-mail:&nbsp;</span><input type="text" name="fieldb" size="13" /></span>
<div class="formpad">
- <textarea name="message" cols="70" rows="5"></textarea>
+ <div id="preview#{thread['id']}" class="msg" style="display:none"></div>
+ <textarea name="message" cols="90" rows="5"></textarea>
<?py if allow_image_replies: ?><br /><input type="file" name="file" /><?py #endif ?>
<?py else: ?>
-<form class="postform"><div class="locked">El hilo ha sido cerrado. Ya no se puede postear en él.</div><div class="formpad">
+<form class="postform"><div class="locked"><b>El hilo ha sido cerrado. Ya no se puede postear en él.</b></div><div class="formpad">
<?py #endif ?>
<div class="threadlinks">
<a href="#{boards_url}#{board}/read/#{thread['timestamp']}/"><b>Hilo completo</b></a>
@@ -119,7 +120,7 @@
<h5>Formulario de nuevo hilo</h5>
<form id="postform0" action="#{cgi_url}post" method="post" enctype="multipart/form-data">
<input type="hidden" name="board" value="#{board}" /><input type="hidden" name="password" value="" />
- <table style="max-width:600px">
+ <table style="max-width:700px">
<tr>
<td class="pblock">Asunto:</td>
<td colspan="3" style="width:100%"><input type="text" name="subject" size="50" maxlength="100" /></td>
@@ -132,13 +133,13 @@
<td><input type="text" name="fieldb" /></td>
<td><input type="button" name="preview" value="Previsualizar" /></td>
</tr>
- <tr id="options" style="display:none;">
+ <tr id="tr_preview" style="display:none">
<td></td>
<td colspan="4"><div id="preview0" class="msg"></div></td>
</tr>
<tr>
<td class="pblock">Mensaje:</td>
- <td colspan="4"><textarea name="message" cols="70" rows="10"></textarea></td>
+ <td colspan="4"><textarea name="message" cols="90" rows="12" data-h-limit="512"></textarea></td>
</tr>
<?py if allow_images: ?>
<tr>
@@ -147,7 +148,7 @@
</tr>
<?py #endif ?>
</table>
- <div style="display:none;">Trampa: <input type="text" name="name" maxlength="50" /> <input type="text" name="email" maxlength="50" /></div>
+ <div style="display:none">No tocar: <input type="text" name="name" /><input type="text" name="email" /></div>
</form>
</div>
</div>
diff --git a/cgi/templates/txt_thread.html b/cgi/templates/txt_thread.html
index 907d660..77237ab 100644
--- a/cgi/templates/txt_thread.html
+++ b/cgi/templates/txt_thread.html
@@ -89,15 +89,17 @@
</div>
<input type="hidden" name="board" value="#{board}" /><input type="hidden" name="parent" value="#{thread['id']}" /><input type="hidden" name="password" value="" />
<?py if thread['locked'] != 1: ?>
- <div style="display:none;"><input type="text" name="name" size="13" /> <input type="text" name="email" size="13" /></div>
- <input type="submit" value="Responder" accesskey="z" /> <input type="button" name="preview" value="Previsualizar" /> <span><span>Nombre: </span><input type="text" name="fielda" size="13" accesskey="n" /> <span>E-mail: </span><input type="text" name="fieldb" size="13" accesskey="e" /></span><br />
- <textarea name="message" cols="80" rows="7" accesskey="m"></textarea><br />
+ <div style="display:none">No tocar: <input type="text" name="name" /><input type="text" name="email" /></div>
+ <input type="submit" value="Responder" /> <input type="button" name="preview" data-thread="#{thread['id']}" value="Previsualizar" /> <span><span>Nombre:&nbsp;</span><input type="text" name="fielda" size="13" /><span>&nbsp;E-mail:&nbsp;</span><input type="text" name="fieldb" size="13" /></span>
+ <br />
<div id="preview#{thread['id']}" class="msg" style="display:none"></div>
+ <textarea name="message" cols="100" rows="7" data-h-limit="512"></textarea>
<?py if allow_image_replies: ?>
+ <br />
<input type="file" name="file" />
<?py #endif ?>
<?py else: ?>
- <div class="locked">El hilo ha sido cerrado. Ya no se puede postear en él.</div>
+ <div class="locked"><b>El hilo ha sido cerrado. Ya no se puede postear en él.</b></div>
<?py #endif ?>
</form>
<?py #endfor ?>
diff --git a/cgi/templates/txt_threadlist.html b/cgi/templates/txt_threadlist.html
index 9d366ee..315b34f 100644
--- a/cgi/templates/txt_threadlist.html
+++ b/cgi/templates/txt_threadlist.html
@@ -25,7 +25,7 @@
<a name="menu"></a>
<div id="threadbox" class="outerbox"><div class="innerbox">
<div id="threadlinks"><a href="#{boards_url}#{board}/"><b>Volver al BBS</b></a> <a href="/#{board}/kako/"><b>Ver hilos archivados</b></a> <a href="#newthread"><b>Crear nuevo hilo</b></a></div>
- <div id="listmenu">Orden: <a class="l_s" href="#">Normal</a> <a class="l_s" href="#">Edad</a> <a class="l_s" href="#">Largo</a> <a class="l_s" href="#">Rapidez</a> <a class="l_s" href="#">Aleatorio</a> / Filtrar: <input id="l_sr" style="padding:0px;width:100px;" type="text"></div>
+ <div id="listmenu">Orden: <a class="l_s" href="#">Normal</a> <a class="l_s" href="#">Edad</a> <a class="l_s" href="#">Largo</a> <a class="l_s" href="#">Rapidez</a> <a class="l_s" href="#">Aleatorio</a></div>
</div></div>
<div class="thread">
<div class="innerbox">
@@ -57,27 +57,42 @@
<h5>Formulario de nuevo hilo</h5>
<form id="postform0" action="#{cgi_url}post" method="post" enctype="multipart/form-data">
<input type="hidden" name="board" value="#{board}" /><input type="hidden" name="password" value="" />
- <table style="max-width:600px">
+ <table style="max-width:700px">
<tr>
<td class="pblock">Asunto:</td>
<td colspan="3" style="width:100%"><input type="text" name="subject" size="50" maxlength="100" /></td>
<td><input type="submit" value="Crear nuevo hilo" /></td>
</tr>
<tr>
- <td class="pblock">Nombre:</td><td><input type="text" name="fielda" /></td>
- <td class="pblock">E-mail:</td><td><input type="text" name="fieldb" /></td>
+ <td class="pblock">Nombre:</td>
+ <td><input type="text" name="fielda" /></td>
+ <td class="pblock">E-mail:</td>
+ <td><input type="text" name="fieldb" /></td>
<td><input type="button" name="preview" value="Previsualizar" /></td>
</tr>
- <tr id="options" style="display:none"><td></td><td colspan="4"><div id="preview0" class="msg"></div></td></tr>
- <tr><td class="pblock">Mensaje:</td><td colspan="4"><textarea name="message" cols="70" rows="10"></textarea></td></tr>
+ <tr id="tr_preview" style="display:none">
+ <td></td>
+ <td colspan="4"><div id="preview0" class="msg"></div></td>
+ </tr>
+ <tr>
+ <td class="pblock">Mensaje:</td>
+ <td colspan="4"><textarea name="message" cols="90" rows="12" data-h-limit="512"></textarea></td>
+ </tr>
<?py if allow_images: ?>
- <tr><td class="pblock">Archivo:</td><td colspan="4"><input type="file" name="file" /></td></tr>
+ <tr>
+ <td class="pblock">Archivo:</td>
+ <td colspan="4"><input type="file" name="file" /></td>
+ </tr>
<?py #endif ?>
</table>
- <div style="display:none">Trampa: <input type="text" name="name" maxlength="50" /> <input type="text" name="email" maxlength="50" /></div>
+ <div style="display:none">No tocar: <input type="text" name="name" /><input type="text" name="email" /></div>
</form>
</div>
</div>
-<center id="footer"><a href="/" target="_top">Bienvenido a Internet BBS/IB</a> weabot.py <?py include('templates/revision.html') ?> + FastCGI + tenjin<br />No se ponga sensible, baisano...</center>
+<center id="footer">
+ <a href="/" target="_top">Bienvenido a Internet BBS/IB</a> weabot.py3 <?py include('templates/revision.html') ?> + bjoern + tenjin
+ <br />
+ No se ponga sensible, baisano...
+</center>
</body>
-</html> \ No newline at end of file
+</html>