/[drupal]/contributions/modules/broken_anchor/broken_anchor.admin.inc
ViewVC logotype

Contents of /contributions/modules/broken_anchor/broken_anchor.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Tue Feb 3 16:48:08 2009 UTC (9 months, 3 weeks ago) by ulhume
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-RC3, HEAD
Changes since 1.2: +7 -7 lines
File MIME type: text/x-php
*** empty log message ***
1 <?php
2
3 /* This file is part of "Broken Anchor for Node comments Module".
4 * Copyright 2009, arNuméral
5 * Author : Yoran Brault
6 * eMail : yoran.brault@bad_arnumeral.fr (remove bad_ before sending an email)
7 * Site : http://www.arnumeral.fr/node/2
8 *
9 * "Broken Anchor for Node comments Module" is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
13 *
14 * "Broken Anchor for Node comments Module" is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with "Broken Anchor for Node comments Module"; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
23 */
24
25
26 /**
27 * configuration form.
28 *
29 * @return form
30 */
31 function broken_anchor_admin_settings() {
32 $form=array();
33 $form['main'] = array (
34 '#type' => 'fieldset',
35 '#title' => t('Main settings'),
36 '#collapsible' => TRUE,
37 '#collapsed' => FALSE
38 );
39 foreach (module_implements('broken_anchor_info') as $module) {
40 $info=module_invoke($module, 'broken_anchor_info');
41 $form['main']['broken_anchor_'.$module.'_job_size'] = array (
42 '#type' => 'textfield',
43 '#title' => t("Job size for @type", array('@type'=>$info['description'])),
44 '#size' => 5,
45 '#default_value' => broken_anchor_job_size($module),
46 '#description' => t("Number of rows to process each time when checking @type (0 means disabled).", array('@type'=>$info['description']))
47 );
48 }
49
50 $form['emails'] = array (
51 '#type' => 'fieldset',
52 '#title' => t('Emails settings'),
53 '#collapsible' => TRUE,
54 '#collapsed' => FALSE
55 );
56 $form['emails']['broken_anchor_check_emails'] = array (
57 '#type' => 'checkbox',
58 '#title' => t("Check Emails"),
59 '#default_value' => broken_anchor_check_emails(),
60 '#description' => t("Also check clear emails addresses in content.")
61 );
62
63 $form['main']['broken_anchor_report_page_size'] = array (
64 '#type' => 'textfield',
65 '#size'=>5,
66 '#title' => t("Report page size"),
67 '#default_value' => broken_anchor_report_page_size(),
68 '#description' => t("Number of rows to display in the report.")
69 );
70 $form['advanced'] = array (
71 '#type' => 'fieldset',
72 '#title' => t('Advanced settings'),
73 '#collapsible' => TRUE,
74 '#collapsed' => FALSE
75 );
76 foreach (module_implements('broken_anchor_info') as $module) {
77 $info=module_invoke($module, 'broken_anchor_info');
78 $form['advanced']['broken_anchor_last_check_id_'.$module] = array (
79 '#type' => 'textfield',
80 '#title' => t("Starting ID for @type", array("@type"=>$info['description'])),
81 '#size' => 5,
82 '#default_value' => broken_anchor_last_check_id($module),
83 '#description' => t("ID from which to start next time for @type", array("@type"=>$info['description']))
84 );
85 }
86 $form['advanced']['broken_anchor_user_agent'] = array (
87 '#type' => 'textarea',
88 '#title' => t("User Agent"),
89 '#default_value' => broken_anchor_user_agent(),
90 '#description' => t("User Agent to use when checking a link")
91 );
92 $form['advanced']['broken_anchor_timeout'] = array (
93 '#type' => 'textfield',
94 '#title' => t("Timeout"),
95 '#size' => 5,
96 '#default_value' => broken_anchor_timeout(),
97 '#description' => t("Number of seconds to wait before declaring timeout error.")
98 );
99 $form['broken_anchor_debugging'] = array (
100 '#type' => 'fieldset',
101 '#title' => t('Debugging'),
102 '#collapsible' => TRUE,
103 '#collapsed' => FALSE
104 );
105
106 $form['broken_anchor_debugging']['broken_anchor_debug_level'] = array (
107 '#title' => t("Debug level"),
108 '#description' => t("Set the debugging output level. Every logging will use php error_log function. On UNIX system, this will end up in apache error logs."),
109 '#type' => 'select',
110 '#default_value' => broken_anchor_debug_level(),
111 '#options' => array (
112 0 => t('Disabled'),
113 1 => t('Enabled'),
114 2 => t('Verbose'),
115 3 => t('Full'),
116 )
117 );
118 return system_settings_form($form);
119 }
120
121

  ViewVC Help
Powered by ViewVC 1.1.2