Révision 13c3c9b4
Ajouté par Assos Assos il y a environ 9 ans
drupal7/sites/all/modules/advanced_forum/includes/settings.inc | ||
---|---|---|
17 | 17 |
'#collapsed' => FALSE, |
18 | 18 |
); |
19 | 19 |
|
20 |
// Choose style |
|
20 |
// Choose style.
|
|
21 | 21 |
$options = array(); |
22 | 22 |
$available_styles = advanced_forum_get_all_styles(); |
23 | 23 |
foreach ($available_styles as $style_machine_name => $style) { |
... | ... | |
65 | 65 |
'#description' => t('If checked, selected node types will be only styled if they are associated with a forum term.'), |
66 | 66 |
); |
67 | 67 |
|
68 |
// Style all site comments as forums |
|
68 |
// Style all site comments as forums.
|
|
69 | 69 |
$form['advanced_forum_general']['advanced_forum_style_all_comments'] = array( |
70 | 70 |
'#type' => 'checkbox', |
71 | 71 |
'#title' => t('Style all comments like forum replies.'), |
... | ... | |
87 | 87 |
'#description' => t('If checked, this will add a local task tab for "Active topics," "New posts," "My posts," and "Unanswered topics." If you don\'t know what this means, leave it unchecked. You must clear the cache before this will take effect.'), |
88 | 88 |
); |
89 | 89 |
|
90 |
$form['advanced_forum_general']['advanced_forum_keep_classes'] = array( |
|
91 |
'#type' => 'checkbox', |
|
92 |
'#title' => t('Keep default CSS classes (For experts only).'), |
|
93 |
'#default_value' => variable_get('advanced_forum_keep_classes', FALSE), |
|
94 |
'#description' => t('If checked, all CSS classes generated by Drupal core and other modules/themes will be kept'), |
|
95 |
); |
|
96 |
|
|
90 | 97 |
/* Forum / topic list settings */ |
91 | 98 |
$form['advanced_forum_lists'] = array( |
92 | 99 |
'#type' => 'fieldset', |
... | ... | |
95 | 102 |
'#collapsed' => FALSE, |
96 | 103 |
); |
97 | 104 |
|
98 |
// Disable breadcrumbs |
|
105 |
// Disable breadcrumbs.
|
|
99 | 106 |
$form['advanced_forum_lists']['advanced_forum_disable_breadcrumbs'] = array( |
100 | 107 |
'#type' => 'checkbox', |
101 | 108 |
'#title' => t('Disable breadcrumbs'), |
... | ... | |
116 | 123 |
'#default_value' => variable_get('advanced_forum_collapsible_containers', 'toggle'), |
117 | 124 |
); |
118 | 125 |
|
119 |
// For default collapsed state configuration |
|
126 |
// For default collapsed state configuration.
|
|
120 | 127 |
$collapsed_list_name = variable_get('forum_containers', array()); |
121 | 128 |
$collapsed_list_description = array(); |
122 | 129 |
foreach ($collapsed_list_name as $id) { |
... | ... | |
173 | 180 |
else { |
174 | 181 |
variable_set('advanced_forum_forum_image_field', ''); |
175 | 182 |
} |
176 |
// Picture preset |
|
183 |
// Picture preset.
|
|
177 | 184 |
if (module_exists('image') && module_exists('author_pane')) { |
178 | 185 |
$options = array('' => ''); |
179 | 186 |
$styles = image_styles(); |
180 |
foreach ($styles AS $style) {
|
|
187 |
foreach ($styles as $style) {
|
|
181 | 188 |
$options[$style['name']] = $style['name']; |
182 | 189 |
} |
183 | 190 |
|
... | ... | |
208 | 215 |
); |
209 | 216 |
} |
210 | 217 |
|
211 |
// Retrieve new comments on forum listing |
|
218 |
// Retrieve new comments on forum listing.
|
|
212 | 219 |
$form['advanced_forum_lists']['advanced_forum_get_new_comments'] = array( |
213 | 220 |
'#type' => 'checkbox', |
214 | 221 |
'#title' => t('Get the number of new comments per forum on the forum list'), |
... | ... | |
216 | 223 |
'#description' => t('Core forum shows the number of new topics. If checked, Advanced Forum will get the number of new comments as well and show it under "posts" on the forum overview. Slow query not recommended on large forums.'), |
217 | 224 |
); |
218 | 225 |
|
219 |
// Title length max |
|
226 |
// Title length max.
|
|
220 | 227 |
$form['advanced_forum_lists']['advanced_forum_topic_title_length'] = array( |
221 | 228 |
'#type' => 'textfield', |
222 | 229 |
'#title' => t('Number of characters to display for the topic title'), |
... | ... | |
225 | 232 |
'#default_value' => variable_get('advanced_forum_topic_title_length', 20), |
226 | 233 |
); |
227 | 234 |
|
228 |
// Send our form to Drupal to make a settings page |
|
235 |
// Send our form to Drupal to make a settings page.
|
|
229 | 236 |
return system_settings_form($form); |
230 | 237 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules