Skip to content

Commit

Permalink
New firehose.is_spam column and firehose_spam_score variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiemccarthy committed Nov 8, 2007
1 parent c21dc0b commit e699eb3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions plugins/FireHose/mysql_dump.sql
Expand Up @@ -27,6 +27,7 @@ INSERT INTO vars (name, value, description) VALUES ('firehose_adminudcclout', '0
INSERT INTO vars (name, value, description) VALUES ('firehose_story_ignore_skids', '', 'list of skids that you want to not want created or shown as firehose entries. Delimit skids with |');
INSERT INTO vars (name, value, description) VALUES ('firehose_color_slices', '30|30|0.2|0.2|0.2|0.2|0.2|0.0', 'Number or percent of remaining stories at each color level separated by | 30|0.5|0.5 would mean 30 stories at the level of highest popularity and 50% at each of remainining stories at the next 2 levels');
INSERT INTO vars (name, value, description) VALUES ('firehose_slice_points', '290,240 220,200 185,175 155,138 102,93 30,25 0,-20 -60,-999999', 'Seven pairs of numbers: the entry score and minimum score for each color slice (last min should be large negative)');
INSERT INTO vars (name, value, description) VALUES ('firehose_spam_score', '-50', 'Popularity score assigned to all firehose items with is_spam=yes');
INSERT INTO vars (name, value, description) VALUES ('firehose_color_labels', 'red|orange|yellow|green|blue|purple|violet|black', 'Firehose color labels');
INSERT INTO vars (name, value, description) VALUES ('firehose_anonval_param', '', 'String needed to be passed in anonval form param to validate requests, set to a string to enforce this validation');

Expand Down
5 changes: 2 additions & 3 deletions plugins/FireHose/mysql_schema.sql
Expand Up @@ -10,13 +10,13 @@ CREATE TABLE firehose (
type ENUM("submission","journal","bookmark","feed","story","vendor","misc") default 'submission',
createtime datetime NOT NULL default '0000-00-00 00:00:00',
popularity float NOT NULL default '0',
popularity2 float NOT NULL default '0',
editorpop float NOT NULL default '0',
activity float NOT NULL default '0',
accepted enum('no','yes') default 'no',
rejected enum('no','yes') default 'no',
public enum('no','yes') default 'no',
attention_needed enum('no','yes') default 'no',
is_spam enum('no', 'yes') default 'no',
primaryskid smallint(5) default '0',
tid smallint(6) default '0',
srcid mediumint(8) unsigned NOT NULL default '0',
Expand All @@ -40,8 +40,7 @@ CREATE TABLE firehose (
PRIMARY KEY (id),
UNIQUE globjid (globjid),
KEY createtime (createtime),
KEY popularity (popularity),
KEY popularity2 (popularity2)
KEY popularity (popularity)
) TYPE=InnoDB;

# The table giving an Object's Generally Accepted Story Publication Time
Expand Down
2 changes: 1 addition & 1 deletion plugins/FireHose/templates/fhadvprefpane;misc;default
Expand Up @@ -79,7 +79,7 @@ Page size: [% Slash.createSelect('pagesize', { 'small' => 'Small', 'large' => 'L
</tr>
<tr>
<td>
[% IF options.orderby == "popularity" || options.orderby == "editorpop" || options.orderby == "popularity2" %]
[% IF options.orderby == "popularity" || options.orderby == "editorpop" %]
<span id="advpopularity" onclick="firehose_set_options('orderby','createtime')"><a href="#">Popularity</a></span>
[% ELSE %]
<span id="advtime" onclick="firehose_set_options('orderby','popularity')"><a href="#">Time</a></span>
Expand Down
2 changes: 1 addition & 1 deletion plugins/FireHose/templates/firehose_options;misc;default
Expand Up @@ -28,7 +28,7 @@ __template__
<span id="play"[% IF !paused %] class="hide"[% END %]><a href="#" onclick="firehose_play(); return false" title="Currently paused">Play</a></span>
<span id="pause" [% IF paused %] class="hide"[% END %]><a href="#" onclick="firehose_pause(); return false" title="Currently playing">Pause</a></span>

[% IF options.orderby == "popularity" || options.orderby == "editorpop" || options.orderby == "popularity2" %]
[% IF options.orderby == "popularity" || options.orderby == "editorpop" %]
<span id="popularity"><a href="[% gSkin.rootdir %]/firehose.pl?orderby=createtime" title="Toggle sort popularity/time - Currently popularity" onclick="firehose_set_options('orderby','createtime'); return false;">Popularity</a></span>
[% ELSE %]
<span id="time"><a href="[% gSkin.rootdir %]/firehose.pl?orderby=popularity" title="Toggle sort popularity/time - Currently Time" onclick="firehose_set_options('orderby','popularity'); return false;">Time</a></span>
Expand Down

0 comments on commit e699eb3

Please sign in to comment.