Revision ecd1141f
Added by Andreas Kohlbecker almost 3 years ago
modules/cdm_dataportal/ext_links/ext_links.module | ||
---|---|---|
29 | 29 |
* Help text for the path. |
30 | 30 |
*/ |
31 | 31 |
function ext_links_help($path, $arg) { |
32 |
$output = ''; |
|
33 | 32 |
switch ($path) { |
34 | 33 |
case 'admin/help#ext_links': |
35 |
// TODO. |
|
36 | 34 |
$output = '<p>' . t("Link to external sources like ## for taxa.") . '</p>'; |
37 |
break; |
|
35 |
return $output; |
|
36 |
case 'admin/config/cdm_dataportal/ext_links': |
|
37 |
$output = '<p>' . t('The external links module allows to configure URL templates for links to external data sources.'); |
|
38 |
return $output; |
|
39 |
case 'admin/config/cdm_dataportal/ext_links/%': |
|
40 |
$output = '<p>' . t('An external link template.'); |
|
41 |
return $output; |
|
38 | 42 |
} |
39 |
return $output; |
|
40 |
} // function ext_links_help |
|
41 |
|
|
42 |
/** |
|
43 |
* Generate the HTML text for the ext_link login block. |
|
44 |
*/ |
|
45 |
function ext_links_admin($form, &$form_state) { |
|
46 |
// Default values for the external links. |
|
47 |
$ext_links_default = ext_links_get_default(); |
|
48 |
|
|
49 |
$ext_links[0] = array( |
|
50 |
'form' => 'gbif', |
|
51 |
'form_title' => 'GBIF', |
|
52 |
'check_title' => 'GBIF', |
|
53 |
'link_title' => 'GBIF link', |
|
54 |
'link_description' => 'The link to GBIF without the taxon name.', |
|
55 |
'concat_default_value' => ' ', |
|
56 |
'text_title' => 'GBIF text', |
|
57 |
'text_description' => 'The text of the link that is displayed..', |
|
58 |
'category' => 'Category', |
|
59 |
); |
|
60 |
$ext_links[1] = array( |
|
61 |
'form' => 'biocase', |
|
62 |
'form_title' => 'BioCASE', |
|
63 |
'check_title' => 'Display BioCASE link?', |
|
64 |
'link_title' => 'BioCASE link', |
|
65 |
'link_description' => 'The link to BioCASE without the taxon name.', |
|
66 |
'concat_default_value' => ' ', |
|
67 |
'text_title' => 'BioCASE text', |
|
68 |
'text_description' => 'The text of the link that is displayed..', |
|
69 |
'category' => 'Category', |
|
70 |
); |
|
71 |
$ext_links[2] = array( |
|
72 |
'form' => 'nybg', |
|
73 |
'form_title' => 'The New York Botanical Garden', |
|
74 |
'check_title' => 'Display NYBG link?', |
|
75 |
'link_title' => 'NYBG link', |
|
76 |
'link_description' => 'The link to NCBI without the taxon name.', |
|
77 |
'concat_default_value' => '+AND+', |
|
78 |
'text_title' => 'NYBG text', |
|
79 |
'text_description' => 'The text of the link that is displayed..', |
|
80 |
'category' => 'Category', |
|
81 |
); |
|
82 |
$ext_links[3] = array( |
|
83 |
'form' => 'tropicos', |
|
84 |
'form_title' => 'Tropicos', |
|
85 |
'check_title' => 'Display Tropicos link?', |
|
86 |
'link_title' => 'Tropicos link', |
|
87 |
'link_description' => 'The link to Tropicos without the taxon name.', |
|
88 |
'concat_default_value' => '+', |
|
89 |
'text_title' => 'Tropicos text', |
|
90 |
'text_description' => 'The text of the link that is displayed..', |
|
91 |
'category' => 'Category', |
|
92 |
); |
|
93 |
$ext_links[4] = array( |
|
94 |
'form' => 'ncbi', |
|
95 |
'form_title' => 'NCBI', |
|
96 |
'check_title' => 'Display NCBI link?', |
|
97 |
'link_title' => 'NCBI link', |
|
98 |
'link_description' => 'The link to NCBI without the taxon name.', |
|
99 |
'concat_default_value' => '+AND+', |
|
100 |
'text_title' => 'NCBI text', |
|
101 |
'text_description' => 'The text of the link that is displayed..', |
|
102 |
'category' => 'Category', |
|
103 |
); |
|
104 |
$ext_links[5] = array( |
|
105 |
'form' => 'google', |
|
106 |
'form_title' => 'Google Images', |
|
107 |
'check_title' => 'Display Google Images link?', |
|
108 |
'link_title' => 'Google Images link', |
|
109 |
'link_description' => 'The link to Google Images without the taxon name.', |
|
110 |
'concat_default_value' => '+', |
|
111 |
'text_title' => 'Google Images text', |
|
112 |
'text_description' => 'The text of the link that is displayed..', |
|
113 |
'category' => 'Category', |
|
114 |
); |
|
115 |
$ext_links[6] = array( |
|
116 |
'form' => 'flickr', |
|
117 |
'form_title' => 'flickr', |
|
118 |
'check_title' => 'Display flickr link?', |
|
119 |
'link_title' => 'flickr link', |
|
120 |
'link_description' => 'The link to flickr without the taxon name.', |
|
121 |
'concat_default_value' => '+', |
|
122 |
'text_title' => 'flickr text', |
|
123 |
'text_description' => 'The text of the link that is displayed..', |
|
124 |
'category' => 'Category', |
|
125 |
); |
|
126 |
$ext_links[7] = array( |
|
127 |
'form' => 'scholar', |
|
128 |
'form_title' => 'Google scholar', |
|
129 |
'check_title' => 'Display Google scholar link?', |
|
130 |
'link_title' => 'Google scholar link', |
|
131 |
'link_description' => 'The link to Google scholar without the taxon name.', |
|
132 |
'concat_default_value' => '+', |
|
133 |
'text_title' => 'Google scholar text', |
|
134 |
'text_description' => 'The text of the link that is displayed..', |
|
135 |
'category' => 'Category', |
|
136 |
); |
|
137 |
$ext_links[8] = array( |
|
138 |
'form' => 'bhl', |
|
139 |
'form_title' => 'Biodiversity Heritage Library (BHL)', |
|
140 |
'check_title' => 'Display BHL link?', |
|
141 |
'link_title' => 'BHL link', |
|
142 |
'link_description' => 'The link to BHL without the taxon name.', |
|
143 |
'concat_default_value' => ' ', |
|
144 |
'text_title' => 'BHL text', |
|
145 |
'text_description' => 'The text of the link that is displayed..', |
|
146 |
'category' => 'Category', |
|
147 |
); |
|
148 |
$ext_links[9] = array( |
|
149 |
'form' => 'arkive', |
|
150 |
'form_title' => 'ARKive', |
|
151 |
'check_title' => 'Display ARKive link?', |
|
152 |
'link_title' => 'ARKive link', |
|
153 |
'link_description' => 'The link to ARKive without the taxon name.', |
|
154 |
'concat_default_value' => '+', |
|
155 |
'text_title' => 'ARKive text', |
|
156 |
'text_description' => 'The text of the link that is displayed..', |
|
157 |
'category' => 'Category', |
|
158 |
); |
|
159 |
$ext_links[10] = array( |
|
160 |
'form' => 'herbcat', |
|
161 |
'form_title' => 'Kew Herbarium Catalogue', |
|
162 |
'check_title' => 'Display Kew Herbarium Catalogue link?', |
|
163 |
'link_title' => 'Kew Herbarium Catalogue link', |
|
164 |
'link_description' => 'The link to Kew Herbarium Catalogue without the taxon name.', |
|
165 |
'concat_default_value' => '+', |
|
166 |
'text_title' => 'Kew Herbarium Catalogue text', |
|
167 |
'text_description' => 'The text of the link that is displayed..', |
|
168 |
'category' => 'Category', |
|
169 |
); |
|
170 |
$ext_links[11] = array( |
|
171 |
'form' => 'iucn', |
|
172 |
'form_title' => 'IUCN Red List', |
|
173 |
'check_title' => 'Display IUCN Red List link?', |
|
174 |
'link_title' => 'IUCN Red List link', |
|
175 |
'link_description' => 'The link to IUCN Red List without the taxon name.', |
|
176 |
'concat_default_value' => ' ', |
|
177 |
'text_title' => 'IUCN Red List text', |
|
178 |
'text_description' => 'The text of the link that is displayed..', |
|
179 |
'category' => 'Category', |
|
180 |
); |
|
181 |
$ext_links[12] = array( |
|
182 |
'form' => 'ipni', |
|
183 |
'form_title' => 'IPNI', |
|
184 |
'check_title' => 'Display IPNI link?', |
|
185 |
'link_title' => 'IPNI link', |
|
186 |
'link_description' => 'The link to IPNI without the taxon name.', |
|
187 |
'concat_default_value' => '&', |
|
188 |
'text_title' => 'IPNI text', |
|
189 |
'text_description' => 'The text of the link that is displayed..', |
|
190 |
'category' => 'Category', |
|
191 |
); |
|
192 |
$ext_links[13] = array( |
|
193 |
'form' => 'wcsp', |
|
194 |
'form_title' => 'World Checklist of Monocots', |
|
195 |
'check_title' => 'Display World Checklist of Monocots link?', |
|
196 |
'link_title' => 'World Checklist of Monocots link', |
|
197 |
'link_description' => 'The link to World Checklist of Monocots without the taxon name.', |
|
198 |
'concat_default_value' => ' ', |
|
199 |
'text_title' => 'World Checklist of Monocots text', |
|
200 |
'text_description' => 'The text of the link that is displayed..', |
|
201 |
'category' => 'Category', |
|
202 |
); |
|
203 |
$ext_links[14] = array( |
|
204 |
'form' => 'tpl', |
|
205 |
'form_title' => 'The Plant List', |
|
206 |
'check_title' => 'Display The Plant List link?', |
|
207 |
'link_title' => 'The Plant List link', |
|
208 |
'link_description' => 'The link to The Plant List without the taxon name.', |
|
209 |
'concat_default_value' => '+', |
|
210 |
'text_title' => 'The Plant List text', |
|
211 |
'text_description' => 'The text of the link that is displayed..', |
|
212 |
'category' => 'Category', |
|
213 |
); |
|
214 |
$ext_links[15] = array( |
|
215 |
'form' => 'eol', |
|
216 |
'form_title' => 'Encyclopaedia of Life', |
|
217 |
'check_title' => 'Display Encyclopaedia of Life link?', |
|
218 |
'link_title' => 'Encyclopaedia of Life link', |
|
219 |
'link_description' => 'The link to Encyclopaedia of Life without the taxon name.', |
|
220 |
'concat_default_value' => '+', |
|
221 |
'text_title' => 'Encyclopaedia of Life text', |
|
222 |
'text_description' => 'The text of the link that is displayed..', |
|
223 |
'category' => 'Category', |
|
224 |
); |
|
225 |
$ext_links[16] = array( |
|
226 |
'form' => 'jstor', |
|
227 |
'form_title' => 'JSTOR Plant Science', |
|
228 |
'check_title' => 'Display JSTOR Plant Science link?', |
|
229 |
'link_title' => 'JSTOR Plant Science link', |
|
230 |
'link_description' => 'The link to JSTOR Plant Science without the taxon name.', |
|
231 |
'concat_default_value' => ' ', |
|
232 |
'text_title' => 'JSTOR Plant Science text', |
|
233 |
'text_description' => 'The text of the link that is displayed..', |
|
234 |
'category' => 'Category', |
|
235 |
); |
|
236 |
$ext_links[17] = array( |
|
237 |
'form' => 'epic', |
|
238 |
'form_title' => 'ePIC', |
|
239 |
'check_title' => 'Display ePIC link?', |
|
240 |
'link_title' => 'ePIC link', |
|
241 |
'link_description' => 'The link to ePIC without the taxon name.', |
|
242 |
'concat_default_value' => '+', |
|
243 |
'text_title' => 'ePIC text', |
|
244 |
'text_description' => 'The text of the link that is displayed..', |
|
245 |
'category' => 'Category', |
|
246 |
); |
|
247 |
|
|
248 |
$ext_links[18] = array( |
|
249 |
'form' => 'fairchild', |
|
250 |
'form_title' => 'Fairchild Guide To Palms', |
|
251 |
'check_title' => 'Display Fairchild Guide To Palms link?', |
|
252 |
'link_title' => 'Fairchild Guide To Palms link', |
|
253 |
'link_description' => 'The link to Fairchild Guide To Palms without the taxon name.', |
|
254 |
'concat_default_value' => '+', |
|
255 |
'text_title' => 'Fairchild Guide To Palms text', |
|
256 |
'text_description' => 'The text of the link that is displayed..', |
|
257 |
'category' => 'Category', |
|
258 |
'disabled' => true // programatically disabled since this link does no longer exist. |
|
259 |
); |
|
260 |
|
|
261 |
$ext_links[19] = array( |
|
262 |
'form' => 'ggbn', |
|
263 |
'form_title' => 'Global Genome Biodiversity Network', |
|
264 |
'check_title' => 'Display Global Genome Biodiversity Network Link?', |
|
265 |
'link_title' => 'Global Genome Biodiversity Network link', |
|
266 |
'link_description' => 'The link to GGBN search without the taxon name.', |
|
267 |
'concat_default_value' => '+', |
|
268 |
'text_title' => 'Global Genome Biodiversity Network text', |
|
269 |
'text_description' => 'The text of the link that is displayed..', |
|
270 |
'category' => 'Category', |
|
271 |
); |
|
272 |
|
|
273 |
|
|
274 |
foreach (array_keys($ext_links) as $i) { |
|
275 |
if(isset($ext_links[$i]['disabled'])){ |
|
276 |
continue; |
|
277 |
} |
|
278 |
$form[$ext_links[$i]['form']] = array( |
|
279 |
'#type' => 'fieldset', |
|
280 |
'#title' => t('@title', array('@title' => $ext_links[$i]['form_title'])), |
|
281 |
'#collapsible' => TRUE, |
|
282 |
'#collapsed' => TRUE, |
|
283 |
); |
|
284 |
$form[$ext_links[$i]['form']]['ext_links_' . $ext_links[$i]['form'] . '_check'] = array( |
|
285 |
'#type' => 'checkbox', |
|
286 |
'#title' => t('@title', array('@title' => $ext_links[$i]['check_title'])), |
|
287 |
'#default_value' => variable_get('ext_links_' . $ext_links[$i]['form'] . '_check', 1), |
|
288 |
); |
|
289 |
$form[$ext_links[$i]['form']]['ext_links_' . $ext_links[$i]['form'] . '_link'] = array( |
|
290 |
'#type' => 'textfield', |
|
291 |
'#title' => t('@title :', array('@title' => $ext_links[$i]['link_title'])), |
|
292 |
'#default_value' => variable_get('ext_links_' . $ext_links[$i]['form'] . '_link', $ext_links_default[$ext_links[$i]['form']]['link_default_value']), |
|
293 |
'#size' => 70, |
|
294 |
'#maxlength' => 255, |
|
295 |
'#description' => t('@description', array('@description' => $ext_links[$i]['link_description'])), |
|
296 |
); |
|
297 |
$form[$ext_links[$i]['form']]['ext_links_' . $ext_links[$i]['form'] . '_concat'] = array( |
|
298 |
'#type' => 'textfield', |
|
299 |
'#title' => t('Concatenate string') . ':', |
|
300 |
'#default_value' => variable_get('ext_links_' . $ext_links[$i]['form'] . '_concat', $ext_links[$i]['concat_default_value']), |
|
301 |
'#size' => 70, |
|
302 |
'#maxlength' => 255, |
|
303 |
'#description' => t('Concatenate string between genus and species'), |
|
304 |
); |
|
305 |
$form[$ext_links[$i]['form']]['ext_links_' . $ext_links[$i]['form'] . '_text'] = array( |
|
306 |
'#type' => 'textfield', |
|
307 |
'#title' => t('@title :', array('@title' => $ext_links[$i]['text_title'])), |
|
308 |
'#default_value' => variable_get('ext_links_' . $ext_links[$i]['form'] . '_text', $ext_links_default[$ext_links[$i]['form']]['text_default_value']), |
|
309 |
'#size' => 70, |
|
310 |
'#maxlength' => 255, |
|
311 |
'#description' => t('@description', array('@description' => $ext_links[$i]['text_description'])), |
|
312 |
); |
|
313 |
$form[$ext_links[$i]['form']]['ext_links_' . $ext_links[$i]['form'] . '_category'] = array( |
|
314 |
'#type' => 'textfield', |
|
315 |
'#title' => t('@title :', array('@title' => $ext_links[$i]['category'])), |
|
316 |
'#default_value' => variable_get('ext_links_' . $ext_links[$i]['form'] . '_category', $ext_links_default[$ext_links[$i]['form']]['category_default_value']), |
|
317 |
'#size' => 70, |
|
318 |
'#maxlength' => 255, |
|
319 |
'#description' => t('@description', array('@description' => $ext_links[$i]['category'])), |
|
320 |
); |
|
321 |
} |
|
322 |
$form['ext_links_options'] = array( |
|
323 |
'#type' => 'checkbox', |
|
324 |
'#title' => t('Enable sorted list with headings'), |
|
325 |
'#default_value' => variable_get('ext_links_options', 0), |
|
326 |
'#prefix' => "<div class = \"sorted_list_option\"", |
|
327 |
'#suffix' => "</div>", |
|
328 |
); |
|
329 |
// @WA: D7 form api does not support reset buttons, |
|
330 |
// so to mimic the D5 reset button we add one like this. |
|
331 |
$form['actions']['reset'] = array( |
|
332 |
'#markup' => '<input id="reset" type="reset" class="form-submit" value="' . t('Reset to defaults') . '" />', |
|
333 |
'#weight' => 1000, |
|
334 |
); |
|
335 |
|
|
336 |
return system_settings_form($form); |
|
337 |
} // function ext_links_admin() |
|
338 |
|
|
43 |
} |
|
339 | 44 |
|
340 | 45 |
/** |
341 | 46 |
* Implements hook_menu(). |
342 | 47 |
*/ |
343 | 48 |
function ext_links_menu() { |
344 |
$items = array();
|
|
49 |
$items = [];
|
|
345 | 50 |
|
346 |
$items['admin/config/cdm_dataportal/extlinks'] = array(
|
|
51 |
$items['admin/config/cdm_dataportal/ext_links'] = [
|
|
347 | 52 |
'title' => 'External links', |
348 |
'description' => 'Description of your External links.',
|
|
53 |
'description' => 'Configure external links templates.',
|
|
349 | 54 |
'page callback' => 'drupal_get_form', |
350 |
'page arguments' => array('ext_links_admin'), |
|
351 |
'access arguments' => array('access administration pages'), |
|
352 |
'type' => MENU_NORMAL_ITEM, |
|
353 |
'weight' =>30, |
|
354 |
); |
|
355 |
|
|
55 |
'page arguments' => ['ext_links_admin_overview'], |
|
56 |
'access arguments' => ['access administration pages'], |
|
57 |
'file' => 'ext_links.admin.inc' |
|
58 |
]; |
|
59 |
$items['admin/config/cdm_dataportal/ext_links/list'] = [ |
|
60 |
'title' => 'List', |
|
61 |
'type' => MENU_DEFAULT_LOCAL_TASK, |
|
62 |
]; |
|
63 |
$items['admin/config/cdm_dataportal/ext_links/add'] = [ |
|
64 |
'title' => 'Add external link', |
|
65 |
'page callback' => 'ext_links_admin_link_template_page', |
|
66 |
'access arguments' => ['access administration pages'], |
|
67 |
'type' => MENU_LOCAL_ACTION, |
|
68 |
'weight' => 1, |
|
69 |
'file' => 'ext_links.admin.inc', |
|
70 |
]; |
|
71 |
$items['admin/config/cdm_dataportal/ext_links/%link_template'] = [ |
|
72 |
'title callback' => 'ext_links_admin_extlink_title', |
|
73 |
'title arguments' => [4], |
|
74 |
'page callback' => 'ext_links_admin_link_template_page', |
|
75 |
'page arguments' => [4], |
|
76 |
'access arguments' => ['access administration pages'], |
|
77 |
'file' => 'ext_links.admin.inc', |
|
78 |
]; |
|
79 |
$items['admin/config/cdm_dataportal/ext_links/%link_template/disable'] = [ |
|
80 |
'title' => 'Disable external link', |
|
81 |
'page callback' => 'drupal_get_form', |
|
82 |
'page arguments' => ['ext_links_admin_disable', 4], |
|
83 |
'access arguments' => ['access administration pages'], |
|
84 |
'file' => 'ext_links.admin.inc', |
|
85 |
]; |
|
356 | 86 |
return $items; |
357 |
} /* function ext_links_menu() */ |
|
87 |
} |
|
88 |
|
|
358 | 89 |
|
359 | 90 |
/** |
360 | 91 |
* Returns the genus and the first epithet from the object taxon. |
... | ... | |
376 | 107 |
return $speciesName; |
377 | 108 |
} |
378 | 109 |
|
110 |
/** |
|
111 |
* Retrieves a list of External Link templates, ordered by weight. |
|
112 |
* |
|
113 |
* @return |
|
114 |
* An array of external link template objects, keyed by the format ID and ordered by |
|
115 |
* weight. |
|
116 |
* |
|
117 |
*/ |
|
118 |
function ext_links_templates() { |
|
119 |
global $language; |
|
120 |
$link_templates = &drupal_static(__FUNCTION__, array()); |
|
121 |
|
|
122 |
// cache_clear_all("ext_links_templates:{$language->language}"); |
|
123 |
// All available link_templates are cached for performance. |
|
124 |
if (!is_array($link_templates) || !count($link_templates)) { |
|
125 |
if ($cache = cache_get("ext_links_templates:{$language->language}")) { |
|
126 |
$link_templates = $cache->data; |
|
127 |
} |
|
128 |
else { |
|
129 |
$test = true; |
|
130 |
if($test){ |
|
131 |
$link_templates = []; |
|
132 |
$link_templates_arrays = ext_links_template_defaults(); |
|
133 |
foreach($link_templates_arrays as $a){ |
|
134 |
$link_templates[] = (object)$a; |
|
135 |
} |
|
136 |
} else { |
|
137 |
$link_templates = db_select('ext_links_templates', 'ff') |
|
138 |
->addTag('translatable') |
|
139 |
->fields('ff') |
|
140 |
// ->condition('status', 1) |
|
141 |
->orderBy('weight') |
|
142 |
->execute(); |
|
143 |
} |
|
144 |
// cache_set("ext_links_templates:{$language->language}", $link_templates); |
|
145 |
} |
|
146 |
} |
|
147 |
return $link_templates; |
|
148 |
} |
|
149 |
|
|
379 | 150 |
/** |
380 | 151 |
* Implements hook_block_info(). |
381 | 152 |
*/ |
... | ... | |
770 | 541 |
'genus' => NULL, |
771 | 542 |
'species' => NULL, |
772 | 543 |
)), |
544 |
// theme_ext_links_admin_overview |
|
545 |
'ext_links_admin_overview' => array( |
|
546 |
'render element' => 'form', |
|
547 |
'file' => 'ext_links.admin.inc', |
|
548 |
), |
|
549 |
// 'ext_links_link_template_filter_order' => array( |
|
550 |
// 'render element' => 'element', |
|
551 |
// 'file' => 'ext_links.admin.inc', |
|
552 |
// ), |
|
773 | 553 |
); |
774 | 554 |
} |
775 | 555 |
|
... | ... | |
779 | 559 |
* @return array |
780 | 560 |
* Returns an array with default external links values. |
781 | 561 |
*/ |
782 |
function ext_links_get_default() {
|
|
562 |
function ext_links_template_defaults() {
|
|
783 | 563 |
$ext_links_default["gbif"] = array( |
784 |
'link_default_value' => 'http://www.gbif.org/species/search?q=', |
|
785 |
'text_default_value' => 'Search GBIF...', |
|
786 |
'category_default_value' => 'Specimens/Occurrences', |
|
564 |
'link' => 'http://www.gbif.org/species/search?q=', |
|
565 |
'title' => 'Search GBIF...', |
|
566 |
'glue' => ' ', |
|
567 |
'weight' => 0, |
|
568 |
'status' => 1, |
|
569 |
'category' => 'Specimens/Occurrences', |
|
787 | 570 |
); |
788 | 571 |
$ext_links_default["biocase"] = array( |
789 |
'link_default_value' => 'http://search.biocase.org/edit/search/units/simpleSearch/query1?unitName=', |
|
790 |
'text_default_value' => 'Search BioCASE...', |
|
791 |
'category_default_value' => 'Specimens/Occurrences', |
|
572 |
'link' => 'http://search.biocase.org/edit/search/units/simpleSearch/query1?unitName=', |
|
573 |
'title' => 'Search BioCASE...', |
|
574 |
'glue' => ' ', |
|
575 |
'weight' => 0, |
|
576 |
'status' => 1, |
|
577 |
'category' => 'Specimens/Occurrences', |
|
792 | 578 |
); |
793 | 579 |
$ext_links_default["nybg"] = array( |
794 |
'link_default_value' => 'http://sweetgum.nybg.org/science/vh/specimen_list.php?SummaryData=', |
|
795 |
'text_default_value' => 'Search NYBG...', |
|
796 |
'category_default_value' => 'Specimens/Occurrences', |
|
580 |
'link' => 'http://sweetgum.nybg.org/science/vh/specimen_list.php?SummaryData=', |
|
581 |
'title' => 'Search NYBG...', |
|
582 |
'glue' => '+AND+', |
|
583 |
'weight' => 0, |
|
584 |
'status' => 1, |
|
585 |
'category' => 'Specimens/Occurrences', |
|
797 | 586 |
); |
798 | 587 |
$ext_links_default["tropicos"] = array( |
799 |
'link_default_value' => 'http://www.tropicos.org/NameSearch.aspx?name=', |
|
800 |
'text_default_value' => 'Search Tropicos...', |
|
801 |
'category_default_value' => 'Specimens/Occurrences', |
|
588 |
'link' => 'http://www.tropicos.org/NameSearch.aspx?name=', |
|
589 |
'title' => 'Search Tropicos...', |
|
590 |
'glue' => '+', |
|
591 |
'weight' => 0, |
|
592 |
'status' => 1, |
|
593 |
'category' => 'Specimens/Occurrences', |
|
802 | 594 |
); |
803 | 595 |
$ext_links_default["ncbi"] = array( |
804 |
'link_default_value' => 'http://www.ncbi.nlm.nih.gov/gquery/gquery.fcgi?term=', |
|
805 |
'text_default_value' => 'Search NCBI...', |
|
806 |
'category_default_value' => 'Molecular Resources', |
|
596 |
'link' => 'http://www.ncbi.nlm.nih.gov/gquery/gquery.fcgi?term=', |
|
597 |
'title' => 'Search NCBI...', |
|
598 |
'glue' => '+AND+', |
|
599 |
'weight' => 0, |
|
600 |
'status' => 1, |
|
601 |
'category' => 'Molecular Resources', |
|
807 | 602 |
); |
808 | 603 |
$ext_links_default["google"] = array( |
809 |
'link_default_value' => 'http://images.google.com/images?q=', |
|
810 |
'text_default_value' => 'Search Google Images...', |
|
811 |
'category_default_value' => 'Images', |
|
604 |
'link' => 'http://images.google.com/images?q=', |
|
605 |
'title' => 'Search Google Images...', |
|
606 |
'glue' => '+', |
|
607 |
'weight' => 0, |
|
608 |
'status' => 1, |
|
609 |
'category' => 'Images', |
|
812 | 610 |
); |
813 | 611 |
$ext_links_default["flickr"] = array( |
814 |
'link_default_value' => 'http://www.flickr.com/search/?w=all&q=', |
|
815 |
'text_default_value' => 'Search flickr...', |
|
816 |
'category_default_value' => 'Images', |
|
612 |
'link' => 'http://www.flickr.com/search/?w=all&q=', |
|
613 |
'title' => 'Search flickr...', |
|
614 |
'glue' => '+', |
|
615 |
'weight' => 0, |
|
616 |
'status' => 1, |
|
617 |
'category' => 'Images', |
|
817 | 618 |
); |
818 | 619 |
$ext_links_default["scholar"] = array( |
819 |
'link_default_value' => 'http://scholar.google.de/scholar?hl=de&btnG=Suche&lr=&as_ylo=&as_vis=0&q=', |
|
820 |
'text_default_value' => 'Search Google scholar...', |
|
821 |
'category_default_value' => 'Literature', |
|
620 |
'link' => 'http://scholar.google.de/scholar?hl=de&btnG=Suche&lr=&as_ylo=&as_vis=0&q=', |
|
621 |
'title' => 'Search Google scholar...', |
|
622 |
'glue' => '+', |
|
623 |
'weight' => 0, |
|
624 |
'status' => 1, |
|
625 |
'category' => 'Literature', |
|
822 | 626 |
); |
823 | 627 |
$ext_links_default["bhl"] = array( |
824 |
'link_default_value' => 'http://www.biodiversitylibrary.org/Search.aspx?searchCat=&searchTerm=', |
|
825 |
'text_default_value' => 'Search BHL...', |
|
826 |
'category_default_value' => 'Literature', |
|
628 |
'link' => 'http://www.biodiversitylibrary.org/Search.aspx?searchCat=&searchTerm=', |
|
629 |
'title' => 'Search BHL...', |
|
630 |
'glue' => ' ', |
|
631 |
'weight' => 0, |
|
632 |
'status' => 1, |
|
633 |
'category' => 'Literature', |
|
827 | 634 |
); |
828 | 635 |
$ext_links_default["arkive"] = array( |
829 |
'link_default_value' => 'http://www.arkive.org/search.html?q=', |
|
830 |
'text_default_value' => 'Search ARKive...', |
|
831 |
'category_default_value' => 'Images', |
|
636 |
'link' => 'http://www.arkive.org/search.html?q=', |
|
637 |
'title' => 'Search ARKive...', |
|
638 |
'glue' => '+', |
|
639 |
'weight' => 0, |
|
640 |
'status' => 1, |
|
641 |
'category' => 'Images', |
|
832 | 642 |
); |
833 | 643 |
$ext_links_default["herbcat"] = array( |
834 |
'link_default_value' => 'http://apps.kew.org/herbcat/getHomePageResults.do?homePageSearchText=', |
|
835 |
'text_default_value' => 'Search Kew Herbarium Catalogue...', |
|
836 |
'category_default_value' => 'Specimens/Occurrences', |
|
644 |
'link' => 'http://apps.kew.org/herbcat/getHomePageResults.do?homePageSearchText=', |
|
645 |
'title' => 'Search Kew Herbarium Catalogue...', |
|
646 |
'glue' => '+', |
|
647 |
'weight' => 0, |
|
648 |
'status' => 1, |
|
649 |
'category' => 'Specimens/Occurrences', |
|
837 | 650 |
); |
838 | 651 |
$ext_links_default["iucn"] = array( |
839 |
'link_default_value' => 'http://www.iucnredlist.org/', |
|
840 |
'text_default_value' => 'Go to IUCN Red List...', |
|
841 |
'category_default_value' => 'Conservation', |
|
652 |
'link' => 'http://www.iucnredlist.org/', |
|
653 |
'title' => 'Go to IUCN Red List...', |
|
654 |
'glue' => ' ', |
|
655 |
'weight' => 0, |
|
656 |
'status' => 1, |
|
657 |
'category' => 'Conservation', |
|
842 | 658 |
); |
843 | 659 |
$ext_links_default["ipni"] = array( |
844 |
'link_default_value' => 'http://www.ipni.org/ipni/advPlantNameSearch.do?', |
|
845 |
'text_default_value' => 'Search IPNI...', |
|
846 |
'category_default_value' => 'Classification', |
|
660 |
'link' => 'http://www.ipni.org/ipni/advPlantNameSearch.do?', |
|
661 |
'title' => 'Search IPNI...', |
|
662 |
'glue' => '&', |
|
663 |
'weight' => 0, |
|
664 |
'status' => 1, |
|
665 |
'category' => 'Classification', |
|
847 | 666 |
); |
848 | 667 |
$ext_links_default["wcsp"] = array( |
849 |
'link_default_value' => 'http://wcsp.science.kew.org/qsearch.do?plantName=', |
|
850 |
'text_default_value' => 'Search World Checklist Monocots...', |
|
851 |
'category_default_value' => 'Classification', |
|
668 |
'link' => 'http://wcsp.science.kew.org/qsearch.do?plantName=', |
|
669 |
'title' => 'Search World Checklist Monocots...', |
|
670 |
'glue' => ' ', |
|
671 |
'weight' => 0, |
|
672 |
'status' => 1, |
|
673 |
'category' => 'Classification', |
|
852 | 674 |
); |
853 | 675 |
$ext_links_default["tpl"] = array( |
854 |
'link_default_value' => 'http://www.theplantlist.org/tpl/search?q=', |
|
855 |
'text_default_value' => 'Search The Plant List...', |
|
856 |
'category_default_value' => 'Classification', |
|
676 |
'link' => 'http://www.theplantlist.org/tpl/search?q=', |
|
677 |
'title' => 'Search The Plant List...', |
|
678 |
'glue' => '+', |
|
679 |
'weight' => 0, |
|
680 |
'status' => 1, |
|
681 |
'category' => 'Classification', |
|
857 | 682 |
); |
858 | 683 |
$ext_links_default["eol"] = array( |
859 |
'link_default_value' => 'http://eol.org/search/?q=', |
|
860 |
'text_default_value' => 'Search Encyclopaedia of Life...', |
|
861 |
'category_default_value' => 'General', |
|
684 |
'link' => 'http://eol.org/search/?q=', |
|
685 |
'title' => 'Search Encyclopaedia of Life...', |
|
686 |
'glue' => '+', |
|
687 |
'weight' => 0, |
|
688 |
'status' => 1, |
|
689 |
'category' => 'General', |
|
862 | 690 |
); |
863 | 691 |
$ext_links_default["jstor"] = array( |
864 |
'link_default_value' => 'https://plants.jstor.org/search?filter=name&so=ps_group_by_genus_species+asc&Query=', |
|
865 |
'text_default_value' => 'Search JSTOR Plant Science...', |
|
866 |
'category_default_value' => 'General', |
|
692 |
'link' => 'https://plants.jstor.org/search?filter=name&so=ps_group_by_genus_species+asc&Query=', |
|
693 |
'title' => 'Search JSTOR Plant Science...', |
|
694 |
'glue' => ' ', |
|
695 |
'weight' => 0, |
|
696 |
'status' => 1, |
|
697 |
'category' => 'General', |
|
867 | 698 |
); |
868 | 699 |
$ext_links_default["epic"] = array( |
869 |
'link_default_value' => 'http://epic.kew.org/searchepic/summaryquery.do?scientificName=', |
|
870 |
'text_default_value' => 'Search ePIC...', |
|
871 |
'category_default_value' => 'General', |
|
700 |
'link' => 'http://epic.kew.org/searchepic/summaryquery.do?scientificName=', |
|
701 |
'title' => 'Search ePIC...', |
|
702 |
'glue' => '+', |
|
703 |
'weight' => 0, |
|
704 |
'status' => 1, |
|
705 |
'category' => 'General', |
|
872 | 706 |
); |
873 | 707 |
/* |
874 | 708 |
* hidden since Fairchild Guide To Palms seems to be down |
875 | 709 |
$ext_links_default["fairchild"] = array( |
876 |
'link_default_value' => 'http://palmguide.org/palmsearch.php?query=', |
|
877 |
'text_default_value' => 'Search Fairchild Guide To Palms...', |
|
878 |
'category_default_value' => 'Specimens/Occurrences', |
|
710 |
'link' => 'http://palmguide.org/palmsearch.php?query=', |
|
711 |
'title' => 'Search Fairchild Guide To Palms...', |
|
712 |
'glue' => '+', |
|
713 |
'weight' => 0, |
|
714 |
'status' => 1, |
|
715 |
'category' => 'Specimens/Occurrences', |
|
879 | 716 |
); |
880 | 717 |
*/ |
881 | 718 |
$ext_links_default["ggbn"] = array( |
882 |
'link_default_value' => 'http://www.ggbn.org/ggbn_portal/search/result?fullScientificName=', |
|
883 |
'text_default_value' => 'Search GGBN...', |
|
884 |
'category_default_value' => 'Molecular Resources', |
|
719 |
'link' => 'http://www.ggbn.org/ggbn_portal/search/result?fullScientificName=', |
|
720 |
'title' => 'Search GGBN...', |
|
721 |
'glue' => '+', |
|
722 |
'weight' => 0, |
|
723 |
'status' => 1, |
|
724 |
'category' => 'Molecular Resources', |
|
885 | 725 |
); |
886 |
// |
|
887 | 726 |
return $ext_links_default; |
888 | 727 |
} |
Also available in: Unified diff
ref #9659 admin overview on ext_links working