Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 981 Bytes
1 | require_dependency 'spam_protection' |
2 | |
3 | class Trackback < Feedback |
4 | belongs_to :article |
5 | content_fields :excerpt |
6 | validates_presence_of :title, :excerpt, :url |
7 | |
8 | def initialize(*args, &block) |
9 | super(*args, &block) |
10 | self.title ||= self.url |
11 | self.blog_name ||= "" |
12 | end |
13 | |
14 | before_create :process_trackback |
15 | |
16 | def make_nofollow |
17 | typo_deprecated 'Do it via postprocessing.' |
18 | end |
19 | |
20 | def process_trackback |
21 | if excerpt.length >= 251 |
22 | # this limits excerpt to 250 chars, including the trailing "..." |
23 | self.excerpt = excerpt[0..246] << "..." |
24 | end |
25 | end |
26 | |
27 | def article_allows_feedback? |
28 | return true if article.allow_pings? |
29 | errors.add(:article, 'Article is not pingable') |
30 | false |
31 | end |
32 | |
33 | def blog_allows_feedback? |
34 | return true unless blog.global_pings_disable |
35 | errors.add(:article, "Pings are disabled") |
36 | false |
37 | end |
38 | |
39 | def originator |
40 | blog_name |
41 | end |
42 | |
43 | def body |
44 | excerpt |
45 | end |
46 | |
47 | def body=(newval) |
48 | self.excerpt = newval |
49 | end |
50 | end |
51 |