Permalink
Browse files

fixes

  • Loading branch information...
1 parent 3c8d99e commit db81b7c9e9e14189069b31ba5ada3441fe7b87b6 @pudge pudge committed Dec 14, 2006
Showing with 29 additions and 11 deletions.
  1. +7 −3 plugins/Journal/templates/journaledit;journal;default
  2. +1 −1 plugins/Search/Search.pm
  3. +21 −7 plugins/Search/search.pl
@@ -53,9 +53,13 @@ __template__
submit_note = submit_note _ "<li>Anyone will be allowed to post comments</li>";
submit_note = submit_note _ "</ul>";
%]
- [% sel_promotetype = form.promotetype || article.promotetype || "publish" %]
- <input type="radio" name="promotetype" value="publicize" [% IF sel_promotetype == "publicize"; constants.markup_checked_attribute; END; %]> <b>Publicize</b>: Submit this as a story for [% constants.sitename %]<br>
- [% IF article.promotetype != "publicize" %]
+ [% IF constants.plugin.FireHose;
+ sel_promotetype = form.promotetype || article.promotetype || "publish";
+ ELSE;
+ sel_promotetype = form.promotetype || article.promotetype || "publicize";
+ END %]
+ <input type="radio" name="promotetype" value="publicize" [% IF sel_promotetype == "publicize"; constants.markup_checked_attribute; END; %]> <b>Publicize</b>: Submit this story to be posted to the [% constants.sitename %] front page<br>
+ [% IF constants.plugin.FireHose && article.promotetype != "publicize" %]
<input type="radio" name="promotetype" value="publish" [% IF sel_promotetype == "publish"; constants.markup_checked_attribute; END; %]> <b>Publish</b>: Share this with other [% constants.sitename %] users<br>
[% END %]
[% IF article.promotetype != "publish" && article.promotetype != "publicize" %]
View
@@ -299,7 +299,7 @@ sub findJournalEntry {
my $query = $self->sqlQuote($form->{query});
my $columns;
$columns .= "users.nickname as nickname, journals.description as description, ";
- $columns .= "journals.id as id, date, users.uid as uid, article";
+ $columns .= "journals.id as id, date, users.uid as uid, article, posttype, tid";
$columns .= ", TRUNCATE((( " . $self->_score('description', $form->{query}, $constants->{search_method}) . " + " . $self->_score('article', $form->{query}, $constants->{search_method}) .") / 2), 1) as score "
if $form->{query};
my $tables = "journals, journals_text, users";
View
@@ -569,21 +569,35 @@ sub journalSearch {
sub journalSearchRSS {
my($form, $constants, $slashdb, $searchDB, $gSkin) = @_;
+ my $user = getCurrentUser();
my $start = $form->{start} || 0;
my $entries = $searchDB->findJournalEntry($form, $start, 15, $form->{sort});
my @items;
for my $entry (@$entries) {
my $time = timeCalc($entry->{date});
push @items, {
- title => "$entry->{description} ($time)",
- time => $entry->{date},
- creator => $entry->{nickname},
- 'link' => ($gSkin->{absolutedir} . '/~' . fixparam($entry->{nickname}) . '/journal/' . $entry->{id}),
- description => $constants->{article},
+ story => {
+ 'time' => $entry->{date},
+ uid => $entry->{uid},
+ tid => $entry->{tid},
+ },
+ title => "$entry->{description} ($time)",
+ 'link' => ($gSkin->{absolutedir} . '/~' . fixparam($entry->{nickname}) . '/journal/' . $entry->{id}),
+ description => balanceTags(strip_mode($entry->{article}, $entry->{posttype}), { deep_nesting => 1 }),
};
}
+ my $rss_html = $constants->{journal_rdfitemdesc_html} && (
+ $user->{is_admin}
+ ||
+ ($constants->{journal_rdfitemdesc_html} == 1)
+ ||
+ ($constants->{journal_rdfitemdesc_html} > 1 && ($user->{is_subscriber}))
+ ||
+ ($constants->{journal_rdfitemdesc_html} > 2 && !$user->{is_anon})
+ );
+
xmlDisplay($form->{content_type} => {
channel => {
title => "$constants->{sitename} Journal Search",
@@ -592,8 +606,8 @@ sub journalSearchRSS {
},
image => 1,
items => \@items,
- rdfitemdesc => $constants->{search_rdfitemdesc},
- rdfitemdesc_html => $constants->{search_rdfitemdesc_html},
+ rdfitemdesc => $constants->{journal_rdfitemdesc},
+ rdfitemdesc_html => $rss_html,
});
}

0 comments on commit db81b7c

Please sign in to comment.