/
dispFireHose;firehose;default
125 lines (118 loc) · 4.23 KB
/
dispFireHose;firehose;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
__section__
default
__description__
You should describe stuff here.
__title__
Useless title to template
__page__
firehose
__lang__
en_US
__name__
dispFireHose
__seclev__
10000
__template__
[%
mode = mode || "fulltitle";
full = 1;
bodywrapper = 1;
bodycontent = 1;
IF mode == "fulltitle";
bodycontent = 0;
ELSIF mode == "bodycontent";
full = 0;
bodywrapper = 0;
END;
%]
[% IF item.url_id;
url = Slash.db.getUrl(item.url_id);
END %]
[% the_user = Slash.db.getUser(item.uid) %]
[% IF full %]
<div id="firehose-[% item.id %]" class="[% IF mode == "full" %]article[% ELSE %]briefarticle[% END %]">
[% classnum = toggle ? "1" : "2";
the_skin_title = "";
IF item.primaryskid && item.primaryskid != form.primaryskid && item.primaryskid != constants.mainpage_skid;
the_skin = Slash.db.getSkin(item.primaryskid);
the_skin_title = the_skin.title _ ": ";
END;
IF item.url_id;
title = "$the_skin_title<a href=\"" _ url.url _ "\">$item.title</a> [->]";
ELSE;
title = the_skin_title _ item.title;
END;
IF item.introtext;
title = "<a href='javascript:toggle_firehose_body(\"$item.id\")'>" _ title _ "</a>";
END;
title = title _ " " _ '<span class="date">' _ item.createtime _ "</span> <span class='nickname'>" _ the_user.nickname _ "</span>";
IF user.is_admin;
reject_checkbox = PROCESS reject id = item.id;
title = reject_checkbox _ "<span class='score'> " _ item.popularity _ "</span> " _ title;
END;
PROCESS titlebar;
%]
[% END %]
[% IF bodywrapper%]
<div class="details">submitted by [% the_user.nickname | strip_literal %] at [% item.createtime %]</div>
<div class="[% IF bodycontent %]body[% ELSE %]empty[% END %]" id="fhbody-[% item.id %]">
[% END %]
[% IF item.tid %]
<div class="topic">
[% IF bodycontent %]
[% topic = Slash.db.getTopic(item.tid) %]
[% IF user.noicons || user.simpledesign || user.lowbandwidth %]
[ <a href="[% gSkin.rootdir %]/search.pl?tid=[% topic.tid %]">[% topic.textname %]</a> ]
[% ELSIF topic.image %]
<a href="[% gSkin.rootdir %]/search.pl?tid=[% topic.tid %]">
<img src="[% constants.imagedir %]/topics/[% topic.image %]" width="[% topic.width %]" height="[% topic.height %]" alt="[% topic.textname %]" title="[% topic.textname %]" >
</a>
[% END %]
[% END %]
</div>
[% END %]
<div id="text-[% item.id %]" class="intro">
[% IF bodycontent;
introtext = item.introtext;
IF item.type == "submission";
submission = Slash.db.getSubmission(item.srcid);
IF submission.storyonly || submission.journal_id;
ELSIF submission.email && submission.name;
IF constants.submissions_link_relnofollow; rnf = " rel=\"nofollow\""; ELSE; rnf = ""; END;
introtext = "<a href=\"$submission.email\"$rnf>$submission.name</a> writes <i>\"$introtext\"</i>";
ELSIF (submission.name == constants.anon_name) && constants.anon_name_alt;
introtext = "$constants.anon_name_alt writes <i>\"$introtext\"</i>";
ELSIF submission.name;
introtext = "$submission.name writes <i>\"$introtext\"</i>";
END;
END; %]
[% introtext %]
[% IF user.is_admin %]
<form id="postform-[% item.id %]" action="[% constants.real_rootdir %]/admin.pl" method="post">
<input type="hidden" name="firstpreview" value="1">
[% IF item.type == "submission" && item.srcid %]
<input type="hidden" name="subid" value="[% item.srcid %]">
[% END %]
<input type="hidden" name="fhid" value="[% item.id %]">
<input type="hidden" name="topic_source" value="submission">
<input type="hidden" name="submitter" value="[% item.uid %]">
<input type="hidden" name="title" value="[% item.title %]">
[% #extras %]
<input type="hidden" name="primaryskid" value="[% item.primaryskid %]">
<input type="hidden" name="tid" value="[% item.tid %]">
[% IF url && url.url; introtext = introtext _ "<br><a href='" _ url.url _ "'>" _ item.title _ "</a>"; END; %]
<input type="hidden" name="introtext" value="[% introtext | strip_attribute %]">
<input type="submit" name="op" value="preview"><br>
</form>
[% END %]
[% END %]
</div>
[% IF bodywrapper %]
</div>
[% END %]
[% IF full %]
[% PROCESS tagsfirehosedivtagbox id = item.id tags_top = [] %]
</div>
[% END %]
__version__
$Id$