public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
Added additional site settings and UI for managing comment spam settings

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@1240 
567b1171-46fb-0310-a4c9-b4bef9110e78
Caged (author)
Wed Jun 14 02:12:20 -0700 2006
commit  4cbd7d597248d3ed6ced4bf3209556ae45c3ce7e
tree    18fc4a29c1bde0b8d02f6a728acbe9905678cb54
parent  daa01ce01e988695617f7498362a80abeca61ba3
...
1
2
 
3
4
5
...
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
31
...
1
2
3
4
5
6
...
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
0
@@ -1,5 +1,6 @@
0
 <% content_for :action_nav do %>
0
 <!-- begin action nav -->
0
+<!-- FIXME: Remove view-style links and replace with select box. Action links should be write only -->
0
 <div id="page-nav">
0
   <ul id="act-nav" class="clear">
0
     <li><%= link_to 'All', :filter => nil %></li>
0
@@ -13,19 +14,30 @@
0
 <!-- /end action nav -->
0
 <% end %>
0
 
0
-<% @comments.each do |comment| -%>
0
-<div id="comment-<%= comment.id %>">
0
- <p><%= truncate strip_tags(comment.body), 255 %></p>
0
- <p>By <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %></p>
0
- <p>
0
- <% if comment.approved? -%>
0
- <%= link_to_remote 'Unapprove!', :url => { :action => 'unapprove', :id => @article, :comment => comment } %>
0
- <% else -%>
0
- <%= link_to_remote 'Approve!', :url => { :action => 'approve', :id => @article, :comment => comment } %>
0
- <% end -%>
0
- <%= link_to_remote 'Delete!', :url => { :action => 'destroy_comment', :id => @article, :comment => comment } %>
0
- </p>
0
-</div>
0
-<% end -%>
0
+ <h3 class="withcontrol">
0
+ Show comments:
0
+ <select id="comments-view">
0
+ <%= options_for_select ['All', 'Unapproved', 'Approved'] %>
0
+ </select>
0
+ </h3>
0
+ <ul class="pagelist">
0
+ <% @comments.each_with_index do |comment, i| -%>
0
+ <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
0
+ <blockquote><p>"<%= truncate strip_tags(comment.body), 255 %>"</p></blockquote>
0
+ <span class="meta">
0
+ <cite>&mdash; <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %></cite>
0
+
0
+ <% if comment.approved? -%>
0
+ <%= link_to_remote 'Unapprove', :url => { :action => 'unapprove', :id => @article, :comment => comment } %> |
0
+ <% else -%>
0
+ <%= link_to_remote 'Approve', :url => { :action => 'approve', :id => @article, :comment => comment } %> |
0
+ <% end -%>
0
+ <%= link_to_remote 'Delete', :url => { :action => 'destroy_comment', :id => @article, :comment => comment } %>
0
+ </span>
0
+ </li>
0
+ <% end -%>
0
+ </ul>
0
+
0
+
0
 
0
 
...
45
46
47
 
 
 
 
 
 
 
 
48
49
50
...
45
46
47
48
49
50
51
52
53
54
55
56
57
58
0
@@ -45,6 +45,14 @@
0
     <dd><%= text_field_tag :api_key, Akismet.api_key %></dd>
0
     <dt><label>Blog url</label></dt>
0
     <dd><%= text_field_tag :blog, Akismet.blog %></dd>
0
+ <dt><label>Allow comments?</label></dt>
0
+ <dd><%= check_box_tag 'allow_comments' %> Yes, I would like to accept comments.</dd>
0
+ <dt><label for="comment_lifetime">Close comments</label></dt>
0
+ <dd>
0
+ <select name="comment_lifetime">
0
+ <%= options_for_select ['Never', '24 hours after publishing', '1 week after publishing', '2 weeks after publishing', '1 month after publishing', '3 months after publishing', '6 months after publishing', '1 year after publishing'] %>
0
+ </select>
0
+ </dd>
0
   </dl>
0
 </div>
0
 
...
2
3
4
5
 
6
7
8
...
130
131
132
133
 
134
 
 
 
 
135
136
137
...
2
3
4
 
5
6
7
8
...
130
131
132
 
133
134
135
136
137
138
139
140
141
0
@@ -2,7 +2,7 @@
0
 # migrations feature of ActiveRecord to incrementally modify your database, and
0
 # then regenerate this schema definition.
0
 
0
-ActiveRecord::Schema.define(:version => 27) do
0
+ActiveRecord::Schema.define(:version => 28) do
0
 
0
   create_table "assigned_sections", :force => true do |t|
0
     t.column "article_id", :integer
0
@@ -130,8 +130,12 @@ ActiveRecord::Schema.define(:version => 27) do
0
     t.column "email", :string
0
     t.column "ping_urls", :text
0
     t.column "filters", :text
0
- t.column "articles_per_page", :integer, :default => 15
0
+ t.column "articles_per_page", :integer, :default => 15
0
     t.column "host", :string
0
+ t.column "comment_lifetime", :integer
0
+ t.column "comment_link_max", :integer
0
+ t.column "akismet_key", :string, :limit => 100
0
+ t.column "akismet_url", :string
0
   end
0
 
0
   create_table "users", :force => true do |t|
...
263
264
265
266
 
267
268
269
270
271
272
273
 
274
275
276
...
765
766
767
768
 
769
770
771
772
773
774
775
776
 
777
778
779
780
781
 
782
783
 
784
785
786
...
827
828
829
830
 
831
832
833
834
 
835
836
837
...
877
878
879
 
 
 
 
 
 
 
 
880
881
 
 
 
 
 
 
 
882
883
884
...
943
944
945
 
 
 
 
 
 
 
946
947
948
...
263
264
265
 
266
267
268
269
270
271
272
 
273
274
275
276
...
765
766
767
 
768
769
770
771
772
 
773
774
 
775
776
777
778
779
 
780
781
 
782
783
784
785
...
826
827
828
 
829
830
831
832
833
834
835
836
837
...
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
...
958
959
960
961
962
963
964
965
966
967
968
969
970
0
@@ -263,14 +263,14 @@ input[type='text']:focus, textarea:focus {
0
 #act-nav {
0
   list-style: none;
0
   margin: 0 20px;
0
- border-left: 1px solid #6fb4b6;
0
+ border-left: 1px solid #98CED0;
0
 }
0
 
0
 #act-nav li a {
0
   color: #005d60;
0
   padding: 11px 8px;
0
   border: 0;
0
- border-right: 1px solid #6fb4b6;
0
+ border-right: 1px solid #98CED0;
0
   border-left: 1px solid #fff;
0
   display: block;
0
   float: left;
0
@@ -765,22 +765,21 @@ img.avatar {
0
   font-size: 100%;
0
 }
0
 
0
-.events {
0
+.events, .pagelist {
0
   margin: 0 0 30px 0;
0
   padding: 0;
0
   list-style: none;
0
   width: 100%;
0
-
0
 }
0
 
0
-.events li {
0
+.events li, .pagelist li {
0
   padding: 5px 10px 10px 50px;
0
   line-height: 160%;
0
 }
0
 
0
-.events li a { border: 0; }
0
+.events li a, .pagelist li a { border: 0; }
0
 
0
-.events li a:hover {
0
+.events li a:hover, .pagelist li a:hover {
0
   color: #d30;
0
   background: #f7f7f7;
0
 }
0
@@ -827,11 +826,12 @@ li.event-none { background-image: url(../images/icons/minusb.gif); }
0
   width: 100%;
0
 }
0
 
0
-.events .meta {
0
+.events .meta, .pagelist .meta {
0
   display: block;
0
   font-size: 90%;
0
 }
0
 
0
+
0
 .events .event-time {
0
   float: right;
0
   font-size: 90%;
0
@@ -877,8 +877,23 @@ li.event-none { background-image: url(../images/icons/minusb.gif); }
0
  *=MISC
0
  */
0
 
0
+cite {
0
+ font-style: normal;
0
+}
0
+
0
+cite a {
0
+ color: #277 !important;
0
+}
0
+
0
 a.adds { color: #017CA2;}
0
 
0
+h3.withcontrol {
0
+ border-bottom: 2px solid #999;
0
+ margin-bottom: 10px;
0
+ padding: 5px 0;
0
+ text-align: right;
0
+}
0
+
0
 .feed {
0
   background: url(../images/icons/feed-icon-12x12.gif) 0 50% no-repeat;
0
   padding-left: 16px;
0
@@ -943,6 +958,13 @@ ul.nobull li label {
0
   text-indent: -99999px;
0
 }
0
 
0
+blockquote p {
0
+ margin: 0 !important;
0
+ padding: 0 !important;
0
+ color: #000;
0
+ font: italic 110% "Times New Roman", serif;
0
+}
0
+
0
 .clear:after {
0
     content: ".";
0
     display: block;

Comments

    No one has commented yet.