public
Description: Forums For You (on Google App Engine)
Homepage: http://blog.kowalczyk.info/software/fofou/
Clone URL: git://github.com/kjk/fofou.git
fofou / manage_forums.html
100644 126 lines (124 sloc) 4.915 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Create a forum</title>
<link href="/static/default.css" rel="stylesheet" type="text/css">
<script language="javascript" src="/static/default.js" type="text/javascript"></script>
</head>
<body>
<script>
function onUrlFieldChange() {
var val = $("urlFieldId").value;
$("underUrlTxt").innerHTML = "Full url: {{ hosturl }}/" + val;
return true;
}
function onTitleFieldChange() {
$("titleId").innerHTML = $("titleFieldId").value;
return true;
}
function onTaglineFieldChange() {
$("taglineId").innerHTML = $("taglineFieldId").value;
return true;
}
function onSidebarFieldChange() {
$("sidebarId").innerHTML = $("sidebarFieldId").value;
return true;
}
</script>
<table>
<tbody>
<tr>
<td colspan="2" class="header">
<div>
<h1><a href="" class="green" id="titleId">{% firstof forum.title "Title." %}</a></h1>
<p id="taglineId">{{ forum.tagline }}</p>
</div>
</td>
</tr>
<tr>
<td class="sidebar" id="sidebarId">
{% firstof forum.sidebar "Sidebar." %}
</td>
<td class="contents">
<p>Welcome to <b><font color="blue">Fo</font></b>rums <b><font color="blue">Fo</font></b>r Yo<b><font color="blue">u</font></b>!</p>
{% if msg %}<div class="manageforumsmsg">{{ msg }}</div>{% endif %}
 
<p>
{% if not forums %}
You haven't created any forums yet.
{% else %}
Existing forums:
<ul>
{% for f in forums %}
<li> <a href="{{ f.url }}">{% firstof f.title f.url %}</a>
{% if f.no_edit_link %}
edit
{% else %}
<a href="/manageforums?forum_key={{ f.key }}">edit</a>
{% endif %}
&nbsp;<a href="{{ f.enable_disable_url }}">{{ f.enable_disable_txt }}</a></li>
{% endfor %}
</ul>
{% endif %}
</p>
<p>Create a new forum:</p>
<form action="/manageforums" method="post">
<table class="form">
<tr>
<td>Url</td>
<td><input class="{{ urlclass }}" type="edit" size="60" maxlength="60" name="url" id="urlFieldId" onchange="return onUrlFieldChange();" onkeyup="return onUrlFieldChange();" value="{{ prevurl|escape }}"></input>
<div>{{ errmsg }}</div>
<div id="underUrlTxt">Full url: {{ hosturl }}/{{ forum.url }}</div>
</td>
</tr>
<tr>
<td>Title</td>
<td><input type="edit" size="60" maxlength="128" name="title" id="titleFieldId" onchange="return onTitleFieldChange();" onkeyup="return onTitleFieldChange();" value="{{ prevtitle|escape }}"></input></td>
</tr>
<tr>
<td>Tagline</td>
<td><input type="edit" size="60" maxlength="256" name="tagline" id="taglineFieldId" onchange="return onTaglineFieldChange();" onkeyup="return onTaglineFieldChange();" value="{{ prevtagline|escape }}"></input></td>
</tr>
<tr>
<td valign="top">Analytics code</td>
<td><input type="edit" size="60" maxlength="256" name="analyticscode" value="{{ prevanalyticscode|escape }}"></input></td>
</tr>
<tr>
<td valign="top">Import secret</td>
<td><input type="edit" size="60" maxlength="256" name="importsecret" value="{{ previmportsecret|escape }}"></input></td>
</tr>
<tr>
<td valign="top">Sidebar</td>
<td><textarea name="sidebar" rows="6" cols="45" id="sidebarFieldId" onchange="return onSidebarFieldChange();" onkeyup="return onSidebarFieldChange();">{{ prevsidebar|escape }}</textarea></td>
</tr>
<tr>
<td></td>
{% if forum_key %}
<input type="hidden" value="{{ forum_key }}" name="forum_key">
<td align="right"><input type="submit" value="Update forum"></td>
{% else %}
<td align="right"><input type="submit" value="Create forum"></td>
{% endif %}
</tr>
</table>
</form>
<p><b>Url</b> is part of the forum url. Should be short and a valid url.</p>
<p><b>Title</b> is what we show at the top of the forum.</p>
<p><b>Tagline</b> is shown in smaller font, under title. HTML allowed (e.g. for links).</p>
<p><b>Analytics code</b> is Googl Analytics code. If given, key pages will include Google Analytics
JavaScript with this code</p>
<p><b>Import secret</b> protects bulk topic import interface.
See <a href="http://blog.kowalczyk.info/software/fofou">docs</a> for more information</p>
<p><b>Sidebar</b> is displayed in the left column. HTML allowed.</p>
<p>Don't stress about choosing the right values - you can change them later.</p>
</td>
</tr>
</tbody>
</table>
<hr>
<center>Powered by <a href="http://blog.kowalczyk.info/software/fofou">fofou</a>
(<b><font color="blue">Fo</font></b>rums <b><font color="blue">Fo</font></b>r Yo<b><font color="blue">u</font></b>,
created by <a href="http://blog.kowalczyk.info">Krzysztof Kowalczyk</a>)</center>
<br>
</body>
</html>