Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

147 lines (131 sloc) 4.926 kb
__section__
default
__description__
the_user = user hash for author
url = url for associated url if applicable
item = firehose item
options = options
__title__
Useless title to template
__page__
misc
__lang__
en_US
__name__
formatHoseTitle
__template__
[%
adminmode = adminmode || "0";
the_skin_title = "";
rnf = "";
IF nofollow;
rnf= " rel=\"nofollow\"";
END;
fh_page = fh_page || "firehose.pl";
title = item.title;
IF item.type == "bookmark" && options.view == "userbookmark";
fh = Slash.getObject("Slash::FireHose");
ub = fh.getUserBookmarkForUrl(options.user_view_uid, item.url_id);
IF ub && ub.title;
title = ub.title;
END;
END;
IF item.primaryskid && item.primaryskid != form.primaryskid && item.primaryskid != constants.mainpage_skid && item.type == "story";
the_skin = Slash.db.getSkin(item.primaryskid);
IF user.is_anon;
index_add = "";
IF form.index;
index_add = "index_";
END;
the_skin_title = '<a href="' _ the_skin.rootdir _ '" title="Filter to '_ the_skin.title _'" class="skin">' _ the_skin.title _ ":</a> ";
ELSE;
the_skin_title = '<a href="' _ gSkin.rootdir _ "/" _ fh_page _ '?fhfilter=' _ the_skin.name _ '" title="Filter to '_ the_skin.title _'" class="skin">' _ the_skin.title _ ":</a> ";
END;
ELSIF item.type == "feed" && item.srcname && form.fhfilter != '"user:' _ the_user.nickname _ '"';
srcname_filter = '"user:' _ the_user.nickname _ '"';
srcname_filter = Slash.strip_paramattr(srcname_filter);
the_skin_title = '<a href="' _ gSkin.rootdir _ "/" _ fh_page _ '?fhfilter=' _ srcname_filter _ '" title="Filter to '_ item.srcname _'" class="skin">' _ item.srcname _ ":</a> ";
ELSIF item.type == "comment";
com = Slash.db.getComment(item.srcid);
score = com.points + com.tweak;
score = Slash.constrain_score(score);
reason = "";
IF com.reason;
reason = ", " _ constants.reasons.${com.reason}.name;
END;
the_skin_title = '<a href="' _ gSkin.rootdir _ "/" _ fh_page _ '?fhfilter=comment" title="Filter to comment" class="skin">Comment:</a> ';
title = title _ " <span class='reason'>(Score " _ score _ reason _ ")</span>";
ELSIF item.type == "journal";
the_skin_title = '<a href="' _ gSkin.rootdir _ "/" _ fh_page _ '?fhfilter=journal" title="Filter to journal" class="skin">Journal:</a> ';
END;
onclick = "onclick=\"toggle_firehose_body('$item.id', $adminmode); return false\"";
IF !link_url;
link_url = firehose.linkFireHose(item);
END;
title_href=link_url;
IF form.index || featured || view_mode;
onclick="";
IF item.type == "story";
story = Slash.db.getStory(item.srcid);
link = Slash.linkStory({
sid => story.sid,
tid => story.tid,
skin => story.primaryskid
}, 0);
title_href = link.0;
END;
END;
title = "<a $onclick $rnf href=\"$title_href\" class=\"datitle\">$title</a>";
title = the_skin_title _ title;
IF item.url_id;
title = title _ "<span class=\"external\"><a href=\"" _ url.url _ "\" $rnf title=\"External link - " _ url.url _ "\" target=\"_blank\">[-&gt;]</a></span>";
END;
title = title _ " " _ '<span class="date';
IF options.nodates;
title = title _ " hide";
END;
title = title _ '">' _ item.atstorytime _ "</span> <span class=\"nickname";
IF options.nobylines;
title = title _ " hide";
END;
title = title _ "\">" _ item.name _ "</span>";
firehose = Slash.getObject("Slash::FireHose");
pop_val = firehose.getPopLevelForPopularity(item.userpop);
pop_val_offset = pop_val - 1;
pop_disp = item.userpop.int;
colors = firehose.getFireHoseColors(1);
color = colors.$pop_val_offset;
pop_str = "";
IF adminmode;
reject_checkbox = "";
IF !form.skippop && !options.nocolors;
editorpop_disp = item.editorpop.int;
IF editorpop_disp == pop_disp;
editorpop_disp = '';
ELSE;
editorpop_disp = '(' _ editorpop_disp _ ')';
END;
pop_str = '<span class="soda pop' _ pop_val _ '" title="Filter Firehose to entries rated ' _ color _ ' or better" onclick="firehose_slider_set_color(\'' _ color _ '\')"><span>' _ pop_disp _ editorpop_disp _ '</span></span> ';
END;
IF item.type != "story"; reject_checkbox = PROCESS reject_firehose id = item.id; END;
title = reject_checkbox _ pop_str _ title;
ELSE;
IF !form.skippop && !options.nocolors;
pop_str = '<span class="soda pop' _ pop_val _ '"';
pop_str = pop_str _ ' title="Filter Firehose to entries rated ' _ color _ ' or better" onclick="firehose_slider_set_color(\'' _ color _ '\')"';
pop_str = pop_str _ '><span>&nbsp;</span></span> ';
END;
title = pop_str _ title;
END;
IF item.type == "journal";
IF options.user_view_uid == user.uid;
title = title _ '<span class="journal_edit"><a href="' _ gSkin.rootdir _ '/journal.pl?op=edit&amp;id=' _ item.srcid _ '">Edit</a></span> ';
title = title _ '<span class="journal_delete"><a href="' _ gSkin.rootdir _ '/journal.pl?op=removemeta&amp;id=' _ item.srcid _ '">Delete</a></span>';
END;
END;
%]
[% IF showtitle; title; END; %]
__seclev__
10000
__version__
$Id$
Jump to Line
Something went wrong with that request. Please try again.