1 | <?php |
||
2 | |||
3 | /** |
||
4 | * Implementation of hook_input_formats(). |
||
5 | */ |
||
6 | function boinc_standard_input_formats() { |
||
7 | $input_formats = array(); |
||
8 | |||
9 | $input_format = new stdClass; |
||
10 | $input_format->api_version = 1; |
||
11 | $input_format->name = 'Rich text'; |
||
12 | $input_format->roles = array( |
||
13 | 1 => 'anonymous user', |
||
14 | 2 => 'authenticated user', |
||
15 | 3519698132 => 'administrator', |
||
16 | 1110965548 => 'community member', |
||
17 | 2938987599 => 'content editor', |
||
18 | 268174006 => 'forum control (system use only)', |
||
19 | 1271379760 => 'moderator', |
||
20 | 933038561 => 'verified contributor', |
||
21 | ); |
||
22 | $input_format->cache = FALSE; |
||
23 | $input_format->settings = array( |
||
24 | // Settings for: boinctranslate module |
||
25 | 'boinctranslate' => array( |
||
26 | // Print debugging info |
||
27 | 'boinctranslate_filter_debug' => '0', |
||
28 | ), |
||
29 | // Settings for: pathologic module |
||
30 | 'pathologic' => array( |
||
31 | // Also considered local |
||
32 | 'filter_pathologic_local_paths' => '/ |
||
33 | ', |
||
34 | // Output full absolute URLs |
||
35 | 'filter_pathologic_absolute' => 1, |
||
36 | ), |
||
37 | // Settings for: bbcode module |
||
38 | 'bbcode' => array( |
||
39 | // Convert addresses to links |
||
40 | 'bbcode_make_links' => '1', |
||
41 | // Spam link deterrent |
||
42 | 'bbcode_filter_nofollow' => '0', |
||
43 | // Email address encoding |
||
44 | 'bbcode_encode_mailto' => '0', |
||
45 | // Email address rewrite |
||
46 | 'bbcode_rewrite_email' => '1', |
||
47 | // Smart paragraph and line breaks |
||
48 | 'bbcode_paragraph_breaks' => '2', |
||
49 | // Print debugging info |
||
50 | 'bbcode_debug' => '0', |
||
51 | ), |
||
52 | // Settings for: htmlpurifier module |
||
53 | 'htmlpurifier' => array( |
||
54 | 'htmlpurifier_clear_cac' => array( |
||
55 | '#description' => NULL, |
||
56 | '#value' => 'Clear cache (Warning: Can result in performance degradation)', |
||
57 | ), |
||
58 | // Display help text |
||
59 | 'htmlpurifier_help' => 1, |
||
60 | 'htmlpurifier_config' => array( |
||
61 | '#description' => NULL, |
||
62 | '#value' => array( |
||
63 | 'Attr.EnableID' => '0', |
||
64 | 'AutoFormat.AutoParagraph' => '1', |
||
65 | 'AutoFormat.Linkify' => '1', |
||
66 | 'AutoFormat.RemoveEmpty' => '0', |
||
67 | 'Null_HTML.Allowed' => '1', |
||
68 | 'HTML.ForbiddenAttributes' => '', |
||
69 | 'HTML.ForbiddenElements' => '', |
||
70 | 'HTML.SafeObject' => '0', |
||
71 | 'Output.FlashCompat' => '0', |
||
72 | 'URI.DisableExternalResources' => '0', |
||
73 | 'URI.DisableResources' => '0', |
||
74 | 'Null_URI.Munge' => '1', |
||
75 | ), |
||
76 | ), |
||
77 | ), |
||
78 | // Settings for: tableofcontents module |
||
79 | 'tableofcontents' => array( |
||
80 | // Hide the table of contents tags |
||
81 | 'tableofcontents_hide_table' => 0, |
||
82 | // Whether an automatic table of content should be added |
||
83 | 'tableofcontents_automatic' => '0', |
||
84 | // Number of headers before an automatic table of content is added |
||
85 | 'tableofcontents_min_limit' => '5', |
||
86 | // Remove Table of Contents tags from teasers |
||
87 | 'tableofcontents_remove_teaser' => 1, |
||
88 | // Allow users to override the settings within the table of contents tag itself |
||
89 | 'tableofcontents_allow_override' => 1, |
||
90 | // Ensure title is safe (i.e. use check_plain() to avoid XSS attacks.) |
||
91 | 'tableofcontents_safe_title' => 1, |
||
92 | // Table of Contents Title |
||
93 | 'tableofcontents_title' => 'Table of Contents', |
||
94 | // Minimum heading level |
||
95 | 'tableofcontents_minlevel' => '2', |
||
96 | // Maximum heading level |
||
97 | 'tableofcontents_maxlevel' => '3', |
||
98 | // Include link to hide/show table of contents |
||
99 | 'tableofcontents_hide_show' => 1, |
||
100 | // Start with the table of content collapsed |
||
101 | 'tableofcontents_collapsed' => 0, |
||
102 | // Select what is stripped from the header titles |
||
103 | 'tableofcontents_id_stripping' => array( |
||
104 | 'digits' => 0, |
||
105 | 'dashes' => 0, |
||
106 | 'periods' => 0, |
||
107 | 'underscores' => 0, |
||
108 | 'colons' => 0, |
||
109 | ), |
||
110 | // Identifier introducer |
||
111 | 'tableofcontents_identifier_introducer' => 'header', |
||
112 | // Identifier and number separator |
||
113 | 'tableofcontents_id_separator' => '-', |
||
114 | // How to generate missing header identifiers |
||
115 | 'tableofcontents_id_generator' => 'title', |
||
116 | // List of tags allowed in table headers |
||
117 | 'tableofcontents_allowed_tags' => '<em> <i> <strong> <b> <u> <del> <ins> <sub> <sup> <cite> <strike> <s> <tt> <span> <font> <abbr> <acronym> <dfn> <q> <bdo> <big> <small>', |
||
118 | // Show attachments in the table of contents |
||
119 | 'tableofcontents_attachments' => 0, |
||
120 | // Add the comments to the table of contents |
||
121 | 'tableofcontents_comments' => 0, |
||
122 | // Select header level at which comments start |
||
123 | 'tableofcontents_comments_level' => '3', |
||
124 | // Back to top label |
||
125 | 'tableofcontents_back_to_top' => '', |
||
126 | // Back to top location |
||
127 | 'tableofcontents_back_to_top_location' => 'bottom', |
||
128 | // Minimum level where Back to Top appears |
||
129 | 'tableofcontents_back_to_top_minlevel' => '2', |
||
130 | // Maximum level where Back to Top appears |
||
131 | 'tableofcontents_back_to_top_maxlevel' => '4', |
||
132 | // Back to top anchor |
||
133 | 'tableofcontents_back_to_top_anchor' => 'toc', |
||
134 | // Scroll back to the table of contents |
||
135 | 'tableofcontents_scroll_back_to_top' => 0, |
||
136 | // Numbering method |
||
137 | 'tableofcontents_numbering' => '0', |
||
138 | // Add the number to the headers |
||
139 | 'tableofcontents_number_headers' => 0, |
||
140 | // Numbering mode |
||
141 | 'tableofcontents_number_mode' => '0', |
||
142 | // Numbering prefix |
||
143 | 'tableofcontents_number_start_letter' => '', |
||
144 | // Numbering separator |
||
145 | 'tableofcontents_number_separator' => '.', |
||
146 | // Numbering suffix |
||
147 | 'tableofcontents_number_end_letter' => '.', |
||
148 | ), |
||
149 | ); |
||
150 | $input_format->filters = array( |
||
151 | 'boinctranslate' => array( |
||
152 | // Delta => Weight for: BOINC translation filter to help split content into chunks for translations. |
||
153 | '0' => '-10', |
||
154 | ), |
||
155 | 'pathologic' => array( |
||
156 | // Delta => Weight for: Pathologic |
||
157 | '0' => '-9', |
||
158 | ), |
||
159 | 'bbcode' => array( |
||
160 | // Delta => Weight for: BBCode |
||
161 | '0' => '-8', |
||
162 | ), |
||
163 | 'htmlpurifier' => array( |
||
164 | // Delta => Weight for: HTML Purifier |
||
165 | '0' => '-7', |
||
166 | ), |
||
167 | 'tableofcontents' => array( |
||
168 | // Delta => Weight for: Table of contents |
||
169 | '0' => '-6', |
||
170 | ), |
||
171 | 'image_caption_filter' => array( |
||
172 | // Delta => Weight for: Image caption filter |
||
173 | '0' => '-5', |
||
174 | ), |
||
175 | ); |
||
176 | $input_format->machine = 'rich_text'; |
||
177 | $input_formats['rich_text'] = $input_format; |
||
178 | |||
179 | $input_format = new stdClass; |
||
180 | $input_format->api_version = 1; |
||
181 | $input_format->name = 'Plain text'; |
||
182 | $input_format->roles = array( |
||
183 | 3519698132 => 'administrator', |
||
184 | ); |
||
185 | $input_format->cache = FALSE; |
||
186 | $input_format->settings = array( |
||
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
187 | ); |
||
188 | $input_format->filters = array( |
||
189 | 'boinctranslate' => array( |
||
190 | '0' => '10', |
||
191 | ), |
||
192 | 'filter' => array( |
||
193 | '0' => '10', |
||
194 | ), |
||
195 | ); |
||
196 | $input_format->machine = 'plain_text'; |
||
197 | $input_formats['plain_text'] = $input_format; |
||
198 | |||
199 | $input_format = new stdClass; |
||
200 | $input_format->api_version = 1; |
||
201 | $input_format->name = 'PHP code'; |
||
202 | $input_format->roles = array(); |
||
203 | $input_format->cache = FALSE; |
||
204 | $input_format->settings = array( |
||
0 ignored issues
–
show
|
|||
205 | ); |
||
206 | $input_format->filters = array( |
||
207 | 'php' => array( |
||
208 | '0' => '0', |
||
209 | ), |
||
210 | ); |
||
211 | $input_format->machine = 'php_code'; |
||
212 | $input_formats['php_code'] = $input_format; |
||
213 | |||
214 | return $input_formats; |
||
215 | |||
216 | } |
||
217 |