thalassa/examples/Common/cgi_base.ini
2026-03-19 06:23:52 +05:00

943 lines
27 KiB
INI

[general]
# in kilobytes
# note that per-page limits, if set, override these
post_content_limit = 200
# used for multipart/form-data format only
post_param_limit = 32
[html]
empty =
# %0% - url %1% - text %2% - command name %3% - aux param, e.g. target
buttonform =
+<form name="%2%" action="%0%" method="POST" style="margin: 1em" %3%>
+<input type="submit" value=%[q:%1%] />
+</form>
+
cookieform =
+<img alt="captcha" style="float:right;"
+ src="data:image/png;base64,%[captcha:image]" />
+<form name="captcha" action="%[req:script]%[req:path]" method="POST">
+<input type="hidden" name="captcha_ip" value=%[q:%[captcha:ip]] />
+<input type="hidden" name="captcha_time" value=%[q:%[captcha:time]] />
+<input type="hidden" name="captcha_nonce" value=%[q:%[captcha:nonce]] />
+<input type="hidden" name="captcha_token" value=%[q:%[captcha:token]] />
+<label for="captcha_input">%[html:msg_solve_captcha]</label><br/>
+<input type="text" id="captcha_input" name="captcha_response"
+ style="margin: 1em;"><br/>
+<input type="hidden" name="command" value="setcookie" />
+<input type="submit" value="%[html:msg_set_cookie]"
+ style="margin: 1em;">
+</form>
+
msgbox = <div class="messagebox_%[ifmessageok:ok:err]">%0%</div>
emailcat = <option %[collapsews:%[if:%[req:param:%0%]:
+ %[ifeq:%[req:param:%0%]:%1%:selected]:
+ %[feedback:ifcatsel:%1%:selected]]
+value=%[q:%1%]>]%[feedback:cattitle:%1%]</option>
+
loggedonly = <h2>%[html:msg_logged_only]</h2>
+
closetochange =
+%[sess|ifhasuser|<p class="form_comment">%[html:msg_to_change_uid]</p>|]
+
# %0% = gb|pg %1% = page_id %2% = comment_id
premodqitem = <li id="%0%%1%c%2%">
+(<a href="/%[switch:%0%:gb:%[html:gb_uri:%1%]:pg:%1%.html]">%0%-%1%</a>)
+<strong>%[cmtinfo:username:%0%_%1%:%2%]</strong>
+%[cmtinfo:ifanon:%0%_%1%:%2%::
+ (<a href="%[req:script]/profile/%[cmtinfo:user:%0%_%1%:%2%]"
+ >%[cmtinfo:user:%0%_%1%:%2%]</a>):]
+<a href="%[req:script]/cmta/%0%/%1%/%2%">%[cmtinfo:title:%0%_%1%:%2%]</a>
+</li>
# %0% = gb|pg %1% = page_id %2% = comment_id
cmtlistitem = <tr id="c%2%"><td>
+%[cmtinfo:ifparent:%0%_%1%:%2%:
+ <a href="#c%[cmtinfo:parent:%0%_%1%:%2%]">&#x2BB4;
+ %[cmtinfo:parent:%0%_%1%:%2%]</a>:
+ &#x261E;]
+</td><td style="padding-right:0.5em"><strong>%2%</strong></td><td>
+<strong>%[cmtinfo:username:%0%_%1%:%2%]</strong>
+%[cmtinfo:ifanon:%0%_%1%:%2%::
+ (<a href="%[req:script]/profile/%[cmtinfo:user:%0%_%1%:%2%]"
+ >%[cmtinfo:user:%0%_%1%:%2%]</a>):]
+<a href="%[req:script]/cmta/%0%/%1%/%2%">%[cmtinfo:title:%0%_%1%:%2%]</a>
+</td><td>
+%[foreach:%[cmtinfo:flags:%0%_%1%:%2%]:html:tagflag]
+</td></tr>
tagflag = <span class="tag">%0%</span>&#32;
permissions = <h2>%[html:msg_permissions]</h2>
+%[sess:ifloggedin:<p>%[html:msg_logged_as] %[sess:loggeduser]</p>]
+<p>Your role list: %[sess:roles]</p>
+%[ifperm:post:<p>%[html:msg_can_comment]</p>]
+%[ifperm:seehidden::<p>%[html:msg_can_see_hidden]</p>:
+ %[ifperm:seehidden:%[sess:loggeduser]:<p>%[html:msg_can_see_own]</p>]
+]
+%[ifperm:moderation:<p>%[html:msg_one_of_the]
+ <a href="%[req:script]/moderation">%[html:msg_moderators]</a>.</p>]
+%[ifperm:edit:::<p>%[html:msg_can_edit]</p>:
+ %[ifperm:edit:%[sess:loggeduser]::
+ <p>%[html:msg_can_edit_own]</p>:
+ %[ifperm:edit:%[sess:loggeduser]:%now%:
+ <p>%[html:msg_edit_comment_within] %[html:time_to_edit].</p>
+ ]
+ ]
+]
jumpmain = <a href="/">%[html:msg_to_main_page]</a>
form_instr_tag = <span> </span><code>&lt;%0%&gt;</code>
format_instruction = <p>%[html:msg_comment_format_tip]
+ %[foreach:%[cmtinfo:tags]:html:form_instr_tag].</p>
#######################################################################
# special pages
#
[errorpage]
template = %html:header%
+<h2 style="margin:2em;">%errcode% %errmessage%</h2>
+%[html:jumpmain]
+<hr />
+ %html:footer%
[nocookiepage]
template = %html:header% %html:text_setcookie%
+%html:cookieform% %html:text_setcookie_warning%
+%html:footer%
+
#######################################################################
# generic pages
#
[page /]
session_required = yes
embedded = no
post_allowed = no
selector = %[sess:ifloggedin:
userlogged:
%[sess:ifhasuser:
usernotlogged:
nouser
]
]
template = %[html:header] <h2>Session is active</h2>
+<p>New cookie's value: <code>thalassa_sessid = %[sess:cookie]</code></p>
+<p>Previous cookie's value (from your browser's request):
+ <code>%[req:cookie:thalassa_sessid]</code></p>
+%[page:userinfo]
+%[html:permissions]
+<p><a href="/">%[html:msg_to_main_page]</a></p>
+<hr />
+%html:footer%
+
userinfo:userlogged = <h2>You are logged in</h2>
+<p>User id (login name): %[html:userproflink]</p>
+<p>Visible user name: <strong>%[sess:username]</strong></p>
+<p>Email address: <strong>%[sess:useremail]</strong></p>
+<p>Site: <strong>%[sess:usersite]</strong></p>
userinfo:usernotlogged = <br /><br />
<p>User name: %[sess:user] (not confirmed)</p>
%[page:loginref]
userinfo:nouser = %[page:loginref]
loginref = <p><a href="%[req:script]/login">Login</a></p><br />
[page /check]
session_required = no
embedded = no
post_allowed = no
selector = %[sess:ifvalid:sess:nosess]
template = %[html:header]
+%[page:sessinfo]
+%[html:permissions]
+
+<h2>Additional info</h2>
+<p>Your address and port:
+<code>%[getenv:REMOTE_ADDR]:%[getenv:REMOTE_PORT]</code></p>
+<p>HTTP Referer: <code>%[getenv:HTTP_REFERER]</code></p>
+<p>User Agent: <code>%[getenv:HTTP_USER_AGENT]</code></p>
+%html:footer%
+
sessinfo:sess = <h2>Session is active</h2>
+ <p>New cookie value: <code>thalassa_sessid = %[sess:cookie]</code></p>
+ <p>Old cookie value:
+ <code>%[req:cookie:thalassa_sessid]</code></p>
sessinfo:nosess = <h2>No session</h2>
+ <p>Cookie named <code>thalassa_sessid</code> is not set.</p>
[page /rmsession]
session_required = no
embedded = no
post_allowed = yes
action = rmsession
template = %[html:header]
+%[sess:ifvalid:
+<p>%[html:msg_sess_active]</p>
+<a href="%[req:script]/">%[html:msg_more_info]</a>
+ :
+<p>%[html:msg_no_cookie]</p>
+<a href="%[req:script]/">%[html:msg_more_info]</a><br />
+%[html:jumpmain]
+]
+%html:footer%
[page /login]
session_required = yes
embedded = no
post_allowed = yes
action = login
selector = %[sess:ifloggedin:logged:notlogged]
template = %[html:header] %[page:body] %html:footer%
body:logged =
+<p>%[html:msg_logged_as] %[html:userproflink].</p>
+<p>%[html:msg_close_sess_to_logout]</p>
+%[html:jumpmain]
+<hr />
+
body:notlogged = %[html:text_login_invitation]
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accept_encs]" name="loginform">]
+<div class="form_item"><div>
+ <label for="input_login">User id:</label>
+ <input type="text" name="login" id="input_name" size="24" tabindex="1"
+ value=%[q:%[sess:ifhasuser:%[sess:user]:%[req:param:login]]]
+ style="display: inline" %[sess:ifhasuser:readonly:] />
+ <button %[sess:ifhasuser:disabled:]
+ form="jump_reg" tabindex="4">%[html:msg_signup]</button>
+ %[html:closetochange]
+</div></div>
+<div class="form_item"><div>
+ <label for="input_passtoken">%[html:msg_single_use_pass]:</label>
+ <input type="text" name="passtoken" id="input_passtoken" size="24"
+ value=%[q:%[req:param:passtoken]] style="display: inline" tabindex="2" />
+ <button type="submit" name="sendmorepass" value="yes"
+ tabindex="5">%[html:msg_send_more_pass]</button>
+</div></div>
+<div class="form_item"><div>
+ <input type="submit" value="Log in!" tabindex="3" />
+</div></div>
+</form>
+<form id="jump_reg" action="%[req:script]/signup" method="get"></form>
+<hr />
[page profile]
session_required = no
embedded = no
post_allowed = yes
action = profile %1%
selector =
+%[if:%1%:
+ %[profile:%1%:ifexists:show:unknown]:
+ %[sess:ifloggedin:edit:unavail]
+]
template = %[html:header] %[page:body]
+<hr class="clear_both" />
+%html:footer%
body:show = <h2>User profile <code>%[profile:%1%:id]</code></h2>
+<p>%[html:userpic_choice:%[profile:%1%:id]]
+User id (login name):
+<span style="font:monospace 120%% bold">%[profile:%1%:id]</span><br />
+Visible user name: <strong>%[profile:%1%:realname]</strong><br />
+Site: <strong>%[profile:%1%:site]</strong><br />
+%[if#%[profile#%1%#comment]#%[html:msg_comment]: %[profile#%1%#comment]<br />]
+</p>
+
body:unknown = <h2><code>%[profile:%1%:id]</code>:
+ %[html:msg_user_unknown]</h2>
+
body:edit = <h2>%[html:msg_your_profile]</h2>
+<p>%[html:msg_user_id]: <strong>%[sess:user]</strong></p>
+<hr />
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accepts_encs]">]
+<div class="form_item"><div>
+ <label for="input_username">%[html:msg_visible_name]:</label>
+ <input type="text" name="username" id="input_username" size="40"
+ value=%[q:%[sess:username]] />
+</div></div>
+<div class="form_item"><div>
+ <label for="input_usersite">%[html:msg_site_url_field]:</label>
+ <input type="text" name="usersite" id="input_usersite" size="40"
+ value=%[q:%[sess:usersite]] />
+</div></div>
+<div class="form_item"><div>
+ <input type="submit" value="%[html:msg_do_save]" />
+</div></div>
+</form>
+<hr />
+<form action="%[req:script]/changemail" method="get">
+<p>%[html:msg_email_field]: <strong>%[sess:useremail]</strong>
+ <button type="submit" style="margin-left:2em">%[html:msg_do_change]</button></p>
+</form>
+
body:unavail = %[html:loggedonly]
[page /changemail]
session_required = yes
embedded = no
post_allowed = yes
action = changemail
selector =
+%[sess:ifloggedin:
+ %[sess:ifchangemail:
+ confirm:
+ %[sess:ifcanchangemail:request:cooldown]
+ ]:
+ unavail
+]
template = %[html:header] %[page:body] <hr /> %html:footer%
body:unavail = %[html:loggedonly]
comhdr = <h2>%[html:msg_email_change]</h2>
+<p>%[html:msg_your_current_email]: <strong>%[sess:useremail]</strong></p>
+
body:request = %[page:comhdr] %[html:text_email_change]
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accept_encs]">]
+<div class="form_item"><div>
+ <label for="input_newemail">%[html:msg_new_email]:</label>
+ <input type="text" name="newemail" id="input_newemail" size="40"
+ value=%[q:%[req:param:newemail]] tabindex="1" />
+</div></div>
+<div class="form_item"><div>
+ <label for="input_passtoken">%[html:msg_single_use_pass]:</label>
+ <input type="text" name="passtoken" id="input_passtoken" size="24"
+ value=%[q:%[req:param:passtoken]] tabindex="2" />
+</div></div?
+<div class="form_item"><div>
+ <input type="submit" value="%[html:msg_send_confirmcode]" tabindex="3" />
+</div></div>
+</form>
+
body:confirm = %[page:comhdr] %[html:text_email_change_code]
+%[collapsews:<form action="%[req:script]/changemail" method="post"
+ accept-charset="%[html:accept_encs]" >]
+<div class="form_item"><div>
+ <label for="input_confirmcode">%[html:msg_confirm_code]:</label>
+ <input type="text" name="confirmcode" id="input_confirmcode" size="24"
+ style="display:inline" />
+ <input type="submit" value="Confirm" style="display:inline" />
+</div></div>
+</form>
+<hr /> %[html:text_email_change_cancel]
+<form action="%[req:script]/changemail" method="post">
+<input type="hidden" name="cancel_change" value="yes" />
+<div class="form_item"><div>
+ <label for="input_really"
+ style="display:inline">%[html:msg_confirm_really]:</label>
+ <input type="text" name="really" id="input_really" size="10"
+ style="display:inline" />
+ <input type="submit" value=%[q:%[html:msg_cancel_addr_change]]
+ style="display:inline" />
+</div></div>
+</form>
+
body:cooldown = %[page:comhdr]
+%[ifactresultok::%[html:text_email_change_cooldown]]
[page /signup]
session_required = yes
embedded = no
post_allowed = yes
action = signup
selector =
%[sess:ifloggedin:
logged:
%[ifactresultok:confirmsent:notlogged]
]
template = %[html:header] %[page:body] %html:footer%
body:logged = <h2>%[html:msg_logged_as] %[html:userproflink]</h2>
body:notlogged = %[html:text_signup_invitation]
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accept_encs]">]
+<div class="form_item"><div>
+ <label for="input_userid">User id:</label>
+ <input type="text" name="userid" id="input_userid" size="15"
+ value=%[q:%[sess:ifhasuser:%[sess:user]:%[req:param:userid]]]
+ %[sess:ifhasuser:readonly:] />
+ %[html:closetochange]
+</div></div>
+<div class="form_item"><div>
+ <label for="input_username">%[html:msg_visible_name]:</label>
+ <input type="text" name="username" id="input_username" size="40"
+ value=%[q:%[req:param:username]] />
+</div></div>
+<div class="form_item"><div>
+ <label for="input_useremail">%[html:msg_email_field]:</label>
+ <input type="text" name="useremail" id="input_useremail" size="40"
+ value=%[q:%[req:param:useremail]] />
+</div></div>
+<div class="form_item"><div>
+ <label for="input_usersite">%[html:msg_site_url_field]:</label>
+ <input type="text" name="usersite" id="input_usersite" size="40"
+ value=%[q:%[req:param:usersite]] />
+</div></div>
+<div class="form_item"><div>
+ <input type="submit" value=%[q:%[html:msg_do_signup]] />
+</div></div>
+</form>
+<hr />
+
body:confirmsent = %[html:text_confirmcode_sent]
+%[collapsews:<form action="%[req:script]/login" method="post"
+ accept-charset="%[html:accept_encs]" name="loginform">]
+<input type="hidden" name="login" value=%[q:%[sess:user]] />
+<div class="form_item"><div>
+ <label for="input_passtoken">%[html:msg_confirm_code]:</label>
+ <input type="text" name="passtoken" id="input_passtoken" size="24"
+ value=%[q:%[req:param:passtoken]] />
+</div></div>
+<div class="form_item"><div>
+ <input type="submit" value=%[q:%[html:msg_do_submit]] />
+</div></div>
+</form>
[page contact]
session_required = yes
embedded = no
post_allowed = yes
selector = %[ifactresultok:sent:form]
action = feedback %1%
path_predicate =
+%[if:%1%:
+ %[if:%2%:no:
+ %[ifbelongs:%1%:%[feedback:categories]:yes:no]
+ :no
+ ] :
+ yes
+]
template = %[html:header:feedback] %[page:body] %html:footer:feedback%
body:form = %[html:text_contact_form_intro]
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accept_encs]">]
+<div class="form_item"><div>
+ <label for="input_name">Your name:</label>
+ <input type="text" name="name" id="input_name" size="60"
+ value=%[q:%[sess:ifloggedin:%[sess:username]:%[req:param:name]]] />
+</div></div>
+<div class="form_item"><div>
+ <label for="input_mail">%[html:msg_your_email_field]:</label>
+ <input type="text" name="mail" id="input_mail" size="60"
+ value=%[q:%[sess:ifloggedin:%[sess:useremail]:%[req:param:name]]] />
+</div></div>
+<div class="form_item"><div>
+ <label for="input_subject">%[html:msg_subject_field]:</label>
+ <input type="text" name="subject" id="input_subject" size="60"
+ value=%[q:%[req:param:subject]] />
+</div></div>
+<div class="form_item"><div>
+ <label for="input_category">%[html:msg_message_category]:</label>
+ %[if:%1%:<strong>%[feedback:cattitle:%1%]</strong>
+ <input type="hidden" name="category" value=%[q:%1%] />
+ <button type="submit" name="catchange" value="yes" formmethod="post"
+ formaction="%[req:script]/contact">%[html:msg_change_category]
+ </button>
+ :<select name="category" id="input_category">
+ %[foreach:%[feedback:categories]:html:emailcat:category]
+ </select>]
+</div></div>
+<div class="form_item"><div>
+ <label for="input_msgbody">%[html:msg_message_text_field]:</label>
+ <textarea name="msgbody" id="input_msgbody" cols="60" rows="5"
+ resizable="resizable">%[ltgt:%[req:param:msgbody]]</textarea>
+</div></div>
+<div class="form_item"><div>
+ <input type="submit" value=%[q:%[html:msg_do_send_message]] />
+</div></div>
+</form>
+<hr />
+
body:sent = <h2>%[html:msg_message_sent_hdr]</h2>
<p>%[html:msg_message_sent]</p>
<p>%[html:jumpmain]</p>
[page comment]
session_required = yes
embedded = no
post_allowed = yes
check_fnsafe = '%1%' '%2%' %[if:%3%:'%3%']
action = comment_add %3%
path_predicate = %[discuss:iffound:%3%:yes:no]
reqargs = realm pgid
reqarg:realm = %[switch:%1%:gb:gb:pg:pg]
reqarg:pgid = %2%
selector =
+%[ifactresultok:
+ justposted
+:
+ %[ifperm:post:
+ %[discuss:iffound:%3%:
+ %[if:%3%:
+ %[discuss:ifhidden:%3%:
+ hidden
+ :
+ %[cmtpreview:if:preview:reptocomment]
+ ]
+ :
+ %[cmtpreview:if:preview:toplevel]
+ ]
+ :
+ notfound
+ ]
+ :
+ nopermission
+ ]
+]
template = %[html:header] %[page:body] <hr /> %html:footer%
refposted =
<a href="%[req:script]/cmta/%1%/%2%/%[justposted:comment]">
body:justposted = <h2>Comment submitted</h2>
+%[collapsews:
+%[justposted:ifhidden:
+ %[html:text_queued_for_moderation]
+ %[ifperm:seehidden:%[sess:loggeduser]:
+ <p>%[page:refposted]%[html:msg_view_your_comment_status]</a></p>
+ :
+ ]
+]
+]
+<a href="/">%[html:msg_to_main_page]</a><br /><br />
+<a href="%[discuss:orig_url:%3%]">%[html:msg_jump_to_origin]</a>
+<br /><br />
+%[justposted:ifhidden:
+ %[ifperm:seehidden:%[sess:loggeduser]:
+ %[page:refposted]%[html:msg_view_your_comment]</a>:]
+ :
+ <a href="%[discuss:orig_url:%[justposted:comment]]"
+ >%[html:msg_jump_to_new_comment]</a>
+]
body:toplevel = <h2>%[html:msg_top_level_comment_hdr]</h2>
+<blockquote>
+%[if:%[discuss:title:%3%]:<h3>%[discuss:title:%3%]</h3>]
+%[discuss:body:%3%]
+</blockquote>
+%[page:form_if_enabled]
body:reptocomment = <h2>%[html:msg_rep_to_comment_hdr]</h2>
+ %[html:showcomment:%3%]
+ %[page:form_if_enabled]
body:preview = <h2>%[html:msg_comment_preview_hdr]</h2>
+ %[html:comment_preview:%3%:%[discuss:page_url:%3%]]
+ %[page:theform]
body:hidden = <h2>%[html:msg_comment_hidden_hdr]</h2>
+<p>%[html:msg_cant_reply_hidden]</p>
+%[html:jumpmain]
+
body:notfound = <h2>%[html:msg_comment_not_found_hdr]</h2>
+%[html:text_comment_or_page_not_found]
+%[html:jumpmain]
+
body:nopermission = <h2>%[html:msg_permission_denied]</h2>
+%[html:%[sess:ifloggedin:text_you_cant_comment:text_anonymous_cant_comment]]
+%[html:jumpmain]
+
form_if_enabled = %[page:%[discuss:ifenabled:%3%:theform:disabled]]
###################################################################
theform =
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accept_encs]" id="the_form">]
+<div class="form_item"><div>
+ <label for="input_name">%[html:msg_comment_visname_field]:</label>
+ <input type="text" name="name" id="input_name" size="60"
+ value=%[q:%[sess:ifloggedin:%[sess:username]:%[or:%[req:param:name]:%[sess:username]]]]
+ %[sess:ifloggedin:readonly] />
+</div></div>
+<div class="form_item"><div>
+ <label for="input_subject">%[html:msg_comment_subject_field]:</label>
+ <input type="text" name="subject" id="input_subject" size="60"
+ value=%[q|%[or|%[req|param|subject]|%[if|%3%|Re: %[discuss|title|%3%]]]] />
+</div></div>
+<div class="form_item"><div>
+ <label for="input_cmtbody">%[html:msg_comment_text_field]:</label>
+ <textarea name="cmtbody" id="input_cmtbody" cols="60" rows="5"
+ resizable="resizable">%[ltgt:%[req:param:cmtbody]]</textarea>
+</div></div>
+<div class="form_item"><div>
+ <input type="submit" value=%[q:%[html:msg_do_submit]] style="display: inline" />
+ <button type="submit" name="preview" value="yes">%[html:msg_do_preview]</button>
+</div></div>
+</form>
+%[html:format_instruction]
+%[html:text_premod_warning]
+
disabled = <h2>%[q:%[html:msg_comments_disabled_hdr]Comments disabled</h2>
+%[html:text_comments_disabled_here]
+%[html:jumpmain]
+
[page cmta]
session_required = yes
embedded = no
post_allowed = yes
check_fnsafe = '%1%' '%2%' %[if:%3%:'%3%']
action = comment_edit %3%
reqargs = realm pgid
reqarg:realm = %[switch:%1%:gb:gb:pg:pg]
reqarg:pgid = %2%
path_predicate =
+%[ifactresultok:yes:
+ %[if:%3%:%[discuss:iffound:%3%:yes:no]:no]
+]
selector =
+%[discuss:iffound:%3%:
+ %[discuss:ifhidden:%3%:
+ %[ifperm:seehidden:%[discuss:user:%3%]:show:hidden]:
+ show]:
+ notfound
+]
template = %[html:header] %[page:body] <hr /> %html:footer%
body:hidden = <h2>%[html:msg_comment_hidden_hdr]</h2>
body:notfound = <h2>%[html:msg_comment_not_found_hdr]</h2>
%[page:%[ifperm:moderation:modernavblock:empty]]
empty =
body:show = <h2>%[html:msg_comment_view_hdr]</h2>
+%[html:showcomment:%3%]
+<p>%[foreach:%[discuss:flags:%3%]:html:tagflag]</p>
+%[page:%[ifperm:edit:%[discuss:user:%3%]:%[discuss:unixtime:%3%]:editform:empty]]
+%[page:%[ifperm:moderation:moderation:empty]]
editform = <br /><hr /><h2>%[html:msg_comment_edit_hdr]</h2>
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accept_encs]" id="the_form">]
+<div class="form_item"><div>
+ <label for="input_subject">%[html:msg_comment_subject_field]:</label>
+ <input type="text" name="subject" id="input_subject" size="60"
+ value=%[q:%[or:%[req:param:subject]:%[discuss:title:%3%]]] />
+</div></div>
+<div class="form_item"><div>
+ <label for="input_cmtbody">%[html:msg_comment_text_field]:</label>
+ <textarea name="cmtbody" id="input_cmtbody" cols="60" rows="5"
+ resizable="resizable"
+ >%[ltgt:%[or:%[req:param:cmtbody]:%[discuss:bodysrc:%3%]]]</textarea>
+</div></div>
+<div class="form_item"><div>
+ <input type="submit" value=%[q:%[html:msg_do_submit]] />
+</div></div>
+</form>
+%[html:format_instruction]
+
+<br /><hr /><h2>%[html:msg_deletion_hdr]</h2>
+<p>%[html:msg_to_delete_comment]</p>
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accept_encs]">]
+<label for="input_really">%[html:msg_confirm_really]:</label>
+<input type="text" name="really" id="input_really" size="10" />
+<input type="hidden" name="delete" value="yes" />
+<input type="submit" value=%[q:%[html:msg_do_delete]] />
+</form>
moderation = <br /><hr />
+%[html:modernavblock::%1%:%2%:%3%]
+<h2 id="moder">%[html:msg_moderation_hdr]</h2>
+%[page:%[discuss:ifhidden:%3%:moder_show:moder_hide]]
+<br />
########################################################
moder_show =
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accept_encs]">]
+<input type="hidden" name="moderation" value="unhide" />
+<label for="submit_show_btn">%[html:msg_hidden_can_show]</label>
+<input type="submit" id="submit_show_btn" value=%[q:%[html:msg_do_show]] />
+</form>
+%[ifbelongs:premod:%[discuss:flags:%3%]:
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accept_encs]">]
+<input type="hidden" name="moderation" value="dequeue" />
+<label for="submit_hide_btn">%[html:msg_can_remove_from_q]</label>
+<input type="submit" id="submit_hide_btn" value=%[q:%[html:msg_do_rm_from_q]] />
+</form>:]
moder_hide =
+%[collapsews:<form action="%[req:script]%[req:path]" method="post"
+ accept-charset="%[html:accept_encs]">]
+<input type="hidden" name="moderation" value="hide" />
+<label for="submit_hide_button">%[html:msg_comment_is_visible]</label>
+<input type="submit" id="submit_hide_button" value=%[q:%[html:msg_do_hide]] />
+</form>
[page moderation]
session_required = yes
embedded = no
post_allowed = no
check_fnsafe = %[if:%2%:'%2%']
path_predicate =
%[if:%1%:
%[if:%[switch:%1%:pg:x:gb:x]:
%[if:%2%:%[if:%3%:no:yes]:reject]
:
no
]
:
yes
]
reqargs = realm pgid
reqarg:realm = %[switch:%1%:gb:gb:pg:pg]
reqarg:pgid = %2%
selector = %[ifperm:moderation:%[if:%1%:list:moderation]:noaccess]
template = %[html:header] %[page:body] <hr /> %html:footer%
body:moderation = <h2>%[html:msg_moder_q_hdr]</h2>
<ul>%[foreach:%[sess:premodq]:splitpremodq:html:premodqitem]</ul>
<h2><a href="%[req:script]/cmtadmin">%[html:msg_existing_topics]</a></h2>
body:list =
+<h2><a href="/%[switch:%1%:gb:%[html:gb_uri:%1%]:pg:%1%.html]">%1% %2%</a>:
+ comment list</h2>
+<table>
+ %[foreach:%[cmtinfo:list:%1%_%2%]:html:cmtlistitem:%1%:%2%]
+</table>
body:noaccess = <h2>%[html:msg_noaccess]</h2>
[html]
cmtadminref = <li><a href="%[req:script]/cmtadmin/%0%">%0%</a></li>
[page cmtadmin]
session_required = yes
embedded = no
post_allowed = no
check_fnsafe = %[if:%1%:'%1%']
path_predicate = %[if:%1%:%[cmtinfo:iftopic:%1%:yes:no]:yes]
reqargs = page_id
reqarg:page_id = %1%
selector = %[ifperm:moderation:%[if:%1%:list:main]:noaccess]
template = %html:header% %[page:body] <hr /> %html:footer%
body:main =
<h2>%[html:msg_existing_topics]</h2>
<ul>
%[foreach:%[lsort:%[cmtinfo:topics]]:html:cmtadminref]
</ul>
<h2><a href="%[req:script]/moderation">%[html:msg_moder_q_hdr]</a></h2>
body:list = <h2>%[reqarg:page_id]: %[html:msg_comment_list]</h2>
<table>
%[foreach:%[cmtinfo:list:%[reqarg:page_id]]:
html:cmtlistitem:%[lhead:%1%:_]:%[ltail:%1%:_]]
</table>
body:noaccess = <h2>%[html:msg_noaccess]</h2>
[feedback]
send_command = %[collapsews: /usr/sbin/sendmail -bm -i
+ %[if:%[feedback:envfrom]:-f %[feedback:envfrom]] '%[receiver]']
send_data = From: %[req:param:mail]
+To: %[receiver]
+Subject: [%[feedback:cattitle:%[req:param:category]]] %[req:param:subject]
+MIME-Version: 1.0
+Content-Type: text/plain; charset=%[html:the_encoding]
+Content-Transfer-Encoding: 8Bit
+X-Sender-Software: Thalassa CGI script
+X-Sender-Form: %[req:host]%[req:script]%[req:path]
+X-Client: %[getenv:REMOTE_ADDR]:%[getenv:REMOTE_PORT]
+X-HTTP-Referer: %[getenv:HTTP_REFERER]
+
+= "%[req:param:name]" %[html:msg_wrote_via_form]
+
+%[req:param:msgbody]
+
[servicemail]
send_command = %[collapsews: /usr/sbin/sendmail -bm -i
+ -f %[html:email_envfrom] '%[receiver]']
header = From: %[html:email_envfrom]
+To: %[receiver]
+Subject: %[subject]
+MIME-Version: 1.0
+Content-Type: text/plain; charset=%[html:the_encoding]
+Content-Transfer-Encoding: 8Bit
+X-Sender-Software: Thalassa CGI script
+X-Client: %[getenv:REMOTE_ADDR]:%[getenv:REMOTE_PORT]
+
[html]
gb_f_name = guestbook/%[iffile:guestbook/%0%.html:%0%:index].html
gb_uri = guestbook/%[iffile:guestbook/%0%.html:%0%.html:]
[comments]
subdir = %[reqarg:realm]_%[reqarg:pgid]
page_url = /%[switch:%[reqarg:realm]:pg:%[reqarg:pgid].html:gb:%[html:gb_uri:%[reqarg:pgid]]]
# %comment_id% is substituted here
# empty %comment_id% means "top-level" comment (reply to the page itself)
#
orig_url = /%[switch:%[reqarg:realm]:pg:%[reqarg:pgid].html:gb:%[html:gb_uri:%[reqarg:pgid]]]%[if:%[comment_id]:#cmt%[comment_id]:]
page_source = %[ifeq:%[reqarg:realm]:pg:%[html:content_db_path]/pages/%[reqarg:pgid]:]
page_html_file = %[ifeq:%[reqarg:realm]:gb:%[html:gb_f_name:%[reqarg:pgid]]:]
page_html_marks = <!--THALCGI-LABEL-BEGIN-->
<!--THALCGI-LABEL-END-->
premodq_page_id = %[reqarg:realm]=%[reqarg:pgid]
#premodq_page_id = %[switch:%[reqarg:realm]:gb:list=guestbook:pg:set=pages]=%[reqarg:pgid]
access = post all;
post_visible poster, superposter, moderator, admin;
see_hidden moderator, admin;
see_own_hidden auth;
moderation moderator, admin;
edit admin;
edit_own superposter, admin;
edit_own_recent auth;