forked from SoylentNews/rehash
/
tildeEd;users;default
250 lines (220 loc) · 6.79 KB
/
tildeEd;users;default
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
__section__
default
__description__
Edit all those menus and checkboxes for authors, topics,
sections (nexuses), and slashboxes.
* title = passed to top titlebar, just above the section, author,
and topic selection
* criteria_msg = a note to appear between that titlebar and the
section, author, and topic selection itself
* customize_title = title for the titlebar just above the slashboxes
* tilded_customize_msg = a note to appear between
the list of slashboxes and the User Space textbox
* tilded_box_msg = any text to display under the User Space textbox
* authorref = hashref of author information
$n = nickname for author with uid $n
* aid_order = list of the fields of authorref to display, in display order
* nexusref = hashref of nexus information
$n = name (textname) for nexus with tid $n
* nexustid_order = list of the fields of nexusref to display, in display order
* topicref = hashref of topic information
$n = name (textname) for topic with tid $n
* topictid_order = list of the fields of topicref to display, in display order
* story023_data = hashref of what the existing settings are
author = hashref for author settings
$n = existing setting for uid $n
nexus = hashref for nexus settings
$n = existing setting for tid $n
topic = hashref for topic settings
$n = existing setting for tid $n
* section_descref = hashref of slashboxes
* box_order = arrayref of slashbox order
__title__
__page__
users
__lang__
en_US
__name__
tildeEd
__template__
[% PROCESS titlebar title=title %]
<div class="generalbody">
<div class="message">
[% criteria_msg %]
</div>
[% story023_data = Slash.db.getDescriptions('story023');
checked = constants.markup_checked_attribute %]
[%- ######################
# Sections and Authors
######################
-%]
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
[%- # Sections (nexuses)
-%]
<td valign="top">
<script type="text/javascript">
<!--
function updateNexusAllTidPrefs(el) {
theForm = document.forms["edithome"];
for(i=0; i<theForm.elements.length; i++){
var regex = /^nexustid\d+$/;
if (regex.test(theForm.elements[i].name)) {
if (theForm.elements[i].type == "hidden") {
theForm.elements[i].value = el.value;
} else {
if (theForm.elements[i].value == el.value) {
theForm.elements[i].checked = true;
} else {
theForm.elements[i].checked = false;
}
}
}
}
}
-->
</script>
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td valign="top">Sections</td>
<td valign="top">
<img src="[% constants.imagedir %]/article_none.gif" alt="Never" title="Never"><br>
</td>
<td valign="top">
<img src="[% constants.imagedir %]/article_brief.gif" alt="Brief" title="Brief"><br>
</td>
<td valign="top">
<img src="[% constants.imagedir %]/article_full.gif" alt="Full" title="Full"><br>
</td>
</tr>
<tr align="center">
<td align="left">
<b>All Sections</b> <noscript>Sorry, this functionality requires Javascript enabled</noscript>
</td>
<td> </td>
[% FOREACH value = [ 1 2 ] -%]
<td><input type="radio" name="nexustid_master" value="[% value %]" onclick="updateNexusAllTidPrefs(this); return true;">
</td>
[% END %]
</tr>
<tr><td colspan="7">[% PROCESS horiz_rule %]</td></tr>
[% FOREACH nexustid = nexustid_order %]
[% IF nexustid == constants.mainpage_nexus_tid %]
<tr><td colspan="7">
<input type="hidden" name="nexustid[% nexustid %]" value="[% story023_default.nexus.$nexustid %]">
</td></tr>
[% ELSE %]
<tr align="center">
[%- # really should have nexusref have another field for the
# url of the (first) skin that uses it, and link this in
# here, but ... I'm in a hurry
-%]
<td align="left">[% nexusref.$nexustid | strip_literal %]</td>
[% FOREACH value = [ 0 1 2 ] -%]
<td><input type="radio" name="nexustid[% nexustid %]" value="[% value %]"
[%- checked IF story023_default.nexus.$nexustid == value %]></td>
[%- END %]
</tr>
[% END %]
[% END %]
</table>
</td>
[%- # Authors
-%]
<td valign="TOP">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<th>Authors</th>
</tr>
[% FOR aid = aid_order %]
<tr>
<td><input type="checkbox" name="aid[% aid %]"
[%- checked IF story023_default.author.$aid > 0 %]>
[% authorref.$aid | strip_literal %]
<input type="hidden" name="hid[% aid %]" value="1">
</td>
</tr>
[% END %]
</table>
</td>
</tr></table>
[% IF constants.story_never_topic_allow == 2
|| (user_edit.is_subscriber && constants.story_never_topic_allow == 1) %]
<br>
[%- ######################
# Topics
######################
-%]
<input type="hidden" name="topictids_present" value="1">
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<th colspan="6">Topics</th>
</tr>
<tr><td colspan="6"> </td></tr>
[% FOREACH topictid = topictid_order -%]
[%- IF loop.index % 3 == 0 -%]
<tr>
[%- END -%]
<td valign="TOP"><input type="checkbox" name="topictid[% topictid %]"
[%- checked IF story023_default.topic.$topictid > 0 %]></td>
<td valign="TOP" align="left">
[%- topicref.$topictid | strip_literal -%]
</td>
[%- IF loop.index % 3 == 2 -%]
</tr>
[% END %]
[%- END -%]
[% remaining_cells = 2 - (topictid_order.max % 3);
WHILE remaining_cells;
remaining_cells = remaining_cells - 1; -%]
<td> </td><td> </td>
[%- END -%]
</tr>
</table>
[% END %]
</div>
[%- ######################
# Slashboxes
######################
-%]
[% PROCESS titlebar title=customize_title %]
<div class="generalbody">
<input type="checkbox" name="useslashboxes"[% checked IF !user_edit.noboxes %]><strong>Use Slashboxes</strong>
<div class="uslashboxes">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
[% FOREACH bid = box_order -%]
[%- IF loop.index % 3 == 0 -%]
<tr valign="top" align="left">
[%- END -%]
<td>
[%- IF section_descref.$bid.always_on -%]
<input type="hidden" name="showbox_[% bid | strip_attribute %]" value="1">
<input type="checkbox" disabled="disabled" checked="checked">
[%- ELSE -%]
<input type="checkbox" name="showbox_[% bid | strip_attribute %]"[% section_descref.$bid.checked %]>
[%- END -%]
<a href="[% env.script_name %]?op=previewbox&bid=[% bid | strip_paramattr %]">[% section_descref.$bid.title || bid %]</a>
</td>
[%- IF loop.index % 3 == 2 -%]
</tr>
[% END -%]
[%- END -%]
[%- remaining_cells = 2 - (box_order.max % 3);
WHILE remaining_cells;
remaining_cells = remaining_cells - 1; -%]
<td> </td>
[%- END -%]
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><p>If you choose '<b>User Space</b>' above, the contents of this box will be inside:<br />
<textarea name="mylinks" rows=8 style="width:100%" wrap="VIRTUAL">[% userspace | strip_literal %]</textarea></td>
</tr>
</table>
</div>
</div>
__seclev__
500
__version__
$Id$