1
|
<?php
|
2
|
/**
|
3
|
* @file
|
4
|
* Provides external links for sources to taxa information.
|
5
|
*
|
6
|
* @copyright
|
7
|
* (C) 2007-2012 EDIT
|
8
|
* European Distributed Institute of Taxonomy
|
9
|
* http://www.e-taxonomy.eu
|
10
|
*
|
11
|
* The contents of this module are subject to the Mozilla
|
12
|
* Public License Version 1.1.
|
13
|
* @see http://www.mozilla.org/MPL/MPL-1.1.html
|
14
|
*
|
15
|
* @author
|
16
|
* - Andreas Kohlbecker <a.kohlbecker@BGBM.org>
|
17
|
* - Wouter Addink <w.addink@eti.uva.nl> (migration from Drupal 5 to Drupal7)
|
18
|
*/
|
19
|
|
20
|
/**
|
21
|
* Display help and module information.
|
22
|
*
|
23
|
* @param string $path
|
24
|
* For which path of the site we're displaying help.
|
25
|
* @param array $arg
|
26
|
* Array that holds the current path as would be returned from arg() function.
|
27
|
*
|
28
|
* @return string
|
29
|
* Help text for the path.
|
30
|
*/
|
31
|
function ext_links_help($path, $arg) {
|
32
|
switch ($path) {
|
33
|
case 'admin/help#ext_links':
|
34
|
$output = '<p>' . t("Link to external sources like ## for taxa.") . '</p>';
|
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;
|
42
|
}
|
43
|
}
|
44
|
|
45
|
/**
|
46
|
* Implements hook_menu().
|
47
|
*/
|
48
|
function ext_links_menu() {
|
49
|
$items = [];
|
50
|
|
51
|
$items['admin/config/cdm_dataportal/ext_links'] = [
|
52
|
'title' => 'External links',
|
53
|
'description' => 'Configure external links templates.',
|
54
|
'page callback' => 'drupal_get_form',
|
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
|
];
|
86
|
return $items;
|
87
|
}
|
88
|
|
89
|
|
90
|
/**
|
91
|
* Returns the genus and the first epithet from the object taxon.
|
92
|
*/
|
93
|
function getSpeciesName($taxon) {
|
94
|
$speciesName = array();
|
95
|
$i = 0;
|
96
|
while (isset($taxon->name->taggedName[$i]) && !isset($speciesName['species'])) {
|
97
|
if ($taxon->name->taggedName[$i]->type == "name") {
|
98
|
if (!isset($speciesName['genus'])) {
|
99
|
$speciesName['genus'] = $taxon->name->taggedName[$i]->text;
|
100
|
}
|
101
|
else {
|
102
|
$speciesName['species'] = $taxon->name->taggedName[$i]->text;
|
103
|
}
|
104
|
}
|
105
|
$i++;
|
106
|
}
|
107
|
return $speciesName;
|
108
|
}
|
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
|
|
150
|
/**
|
151
|
* Implements hook_block_info().
|
152
|
*/
|
153
|
function ext_links_block_info() {
|
154
|
if (TRUE) {
|
155
|
$block[0]["info"] = t("External Taxon Links");
|
156
|
return $block;
|
157
|
}
|
158
|
}
|
159
|
|
160
|
/**
|
161
|
* Implements hook_block_view().
|
162
|
*/
|
163
|
function ext_links_block_view($delta) {
|
164
|
// TODO Rename block deltas (e.g. '0') to readable strings.
|
165
|
switch ($delta) {
|
166
|
case '0':
|
167
|
$block['subject'] = 'External links';
|
168
|
|
169
|
$uuid = get_current_taxon_uuid();
|
170
|
if ($uuid) {
|
171
|
$taxon = cdm_ws_get(CDM_WS_PORTAL_TAXON, $uuid);
|
172
|
|
173
|
// $taxon->titleCache;
|
174
|
// var_export()
|
175
|
if (!empty($taxon)) {
|
176
|
drupal_add_js(drupal_get_path('module', 'ext_links') . '/ext_links.js');
|
177
|
$speciesName = getSpeciesName($taxon);
|
178
|
|
179
|
$genus = $taxon->name->taggedName[0]->text;
|
180
|
$species = null;
|
181
|
if(isset($taxon->name->taggedName[1])){
|
182
|
$species = $taxon->name->taggedName[1]->text;
|
183
|
}
|
184
|
$block_content = '';
|
185
|
$listOption = variable_get("ext_links_options", 0);
|
186
|
if (isset($listOption)) {
|
187
|
$block['content'] = theme('ext_links_list_grouped', array('speciesName' => $speciesName, 'genus' => $genus, 'species' => $species));
|
188
|
}
|
189
|
else {
|
190
|
$block['content'] = theme('ext_links_list_plain', array('speciesName' => $speciesName, 'genus' => $genus, 'species' => $species ));
|
191
|
}
|
192
|
|
193
|
// if(variable_get('ext_links_gbif_check', TRUE)) {
|
194
|
// $block_content .= '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_gbif_link', $ext_links_default[gbif][link_default_value]).str_replace('"','%22',$speciesName[genus]).variable_get('ext_links_gbif_concat', ' ').str_replace('"','%22',$speciesName[species]).'\')">'.variable_get('ext_links_gbif_text', $ext_links_default[gbif][text_default_value]).'</a><br />';
|
195
|
/*
|
196
|
$block_content .=
|
197
|
/* TODO
|
198
|
Please manually fix the parameters on the l() or url() function on the next line.
|
199
|
Typically, this was not changed because of a function call inside an array call like
|
200
|
array('title' => t('View user profile.')).
|
201
|
l(variable_get('ext_links_gbif_text', $ext_links_default[gbif][text_default_value]),
|
202
|
'JavaScript:popupExternalLinks('.variable_get('ext_links_gbif_link', $ext_links_default[gbif][link_default_value]).$speciesName[genus].variable_get('ext_links_gbif_concat', ' ').$speciesName[species],
|
203
|
array(), null, null, true);
|
204
|
*/
|
205
|
/*}
|
206
|
if(variable_get('ext_links_biocase_check', 1)) {
|
207
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_biocase_link', $ext_links_default[biocase][link_default_value]).str_replace('"','%22',$speciesName[genus]).variable_get('ext_links_biocase_concat', ' ').str_replace('"','%22',$speciesName[species]).'\')">'.variable_get('ext_links_biocase_text', $ext_links_default[biocase][text_default_value]).'</a><br />';
|
208
|
}
|
209
|
if(variable_get('ext_links_nybg_check', 1)) {
|
210
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_nybg_link', $ext_links_default[nybg][link_default_value]).str_replace('"','%22',$speciesName[genus]).variable_get('ext_links_nybg_concat', ' ').str_replace('"','%22',$speciesName[species]).'\')">'.variable_get('ext_links_nybg_text', $ext_links_default[nybg][text_default_value]).'</a><br />';
|
211
|
}
|
212
|
if(variable_get('ext_links_tropicos_check', 1)) {
|
213
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_tropicos_link', $ext_links_default[tropicos][link_default_value]).str_replace('"','%22',$speciesName[genus]).variable_get('ext_links_tropicos_concat', ' ').str_replace('"','%22',$speciesName[species]).'\')">'.variable_get('ext_links_tropicos_text', $ext_links_default[tropicos][text_default_value]).'</a><br />';
|
214
|
}
|
215
|
if(variable_get('ext_links_ncbi_check', 1)) {
|
216
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_ncbi_link', $ext_links_default[ncbi][link_default_value]).str_replace('"','%22',$speciesName[genus]).variable_get('ext_links_ncbi_concat', ' ').str_replace('"','%22',$speciesName[species]).'\')">'.variable_get('ext_links_ncbi_text', $ext_links_default[ncbi][text_default_value]).'</a><br />';
|
217
|
}
|
218
|
if(variable_get('ext_links_google_check', 1)) {
|
219
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_google_link', $ext_links_default[google][link_default_value]).str_replace('"','%22',$speciesName[genus]).variable_get('ext_links_google_concat', ' ').str_replace('"','%22',$speciesName[species]).'\')">'.variable_get('ext_links_google_text', $ext_links_default[google][text_default_value]).'</a><br />';
|
220
|
}
|
221
|
if(variable_get('ext_links_flickr_check', 1)) {
|
222
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_flickr_link', $ext_links_default[flickr][link_default_value]).str_replace('"','%22',$speciesName[genus]).variable_get('ext_links_flickr_concat', ' ').str_replace('"','%22',$speciesName[species]).'\')">'.variable_get('ext_links_flickr_text', $ext_links_default[flickr][text_default_value]).'</a><br />';
|
223
|
}
|
224
|
if(variable_get('ext_links_scholar_check', 1)) {
|
225
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_scholar_link', $ext_links_default[scholar][link_default_value]).str_replace('"','%22',$speciesName[genus]).variable_get('ext_links_scholar_concat', ' ').str_replace('"','%22',$speciesName[species]).'\')">'.variable_get('ext_links_scholar_text', $ext_links_default[scholar][text_default_value]).'</a><br />';
|
226
|
}
|
227
|
if(variable_get('ext_links_bhl_check', 1)) {
|
228
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_bhl_link', $ext_links_default[bhl][link_default_value]).str_replace('"','%22',$speciesName[genus]).variable_get('ext_links_bhl_concat', ' ').str_replace('"','%22',$speciesName[species]).'\')">'.variable_get('ext_links_bhl_text', $ext_links_default[bhl][text_default_value]).'</a><br />';
|
229
|
}
|
230
|
|
231
|
$block['content'] = $block_content;
|
232
|
$block['content'] = theme('ext_links_list_plain');
|
233
|
|
234
|
}
|
235
|
|
236
|
}*/
|
237
|
// if taxon
|
238
|
}
|
239
|
}
|
240
|
// If path.
|
241
|
return $block;
|
242
|
} /* switch */
|
243
|
|
244
|
}
|
245
|
|
246
|
/**
|
247
|
* @todo Please document this function.
|
248
|
* @see http://drupal.org/node/1354
|
249
|
*/
|
250
|
function theme_ext_links_list_grouped($variables) {
|
251
|
// comment @WA: perhaps this function could be merged with ext_list_plain
|
252
|
// into one function?
|
253
|
$speciesName = $variables['speciesName'];
|
254
|
if(!isset($speciesName['genus'])) {
|
255
|
$speciesName['genus'] = '';
|
256
|
}
|
257
|
if(!isset($speciesName['species'])) {
|
258
|
$speciesName['species'] = '';
|
259
|
}
|
260
|
$genus = $variables['genus'];
|
261
|
$species = $variables['species'];
|
262
|
$block_content = '';
|
263
|
$categories = NULL;
|
264
|
$ext_links_default = ext_links_get_default();
|
265
|
|
266
|
|
267
|
/*
|
268
|
foreach ($ext_links_default as $ext_link) {
|
269
|
|
270
|
//$block_content .= $ext_link['ext_links_bhl_category'];
|
271
|
$category[] = variable_get('ext_links_bhl_category', $ext_links_default[][text_default_value]);
|
272
|
$block_content .= variable_get('ext_links_bhl_category', $ext_links_default[][text_default_value]);
|
273
|
}
|
274
|
*/
|
275
|
|
276
|
// Images section.
|
277
|
if (variable_get('ext_links_google_check', 1)) {
|
278
|
$categoryTitles[] = variable_get('ext_links_google_category', $ext_links_default['google']['category_default_value']);
|
279
|
$categories['google']['title'] = variable_get('ext_links_google_category', $ext_links_default['google']['category_default_value']);
|
280
|
$categories['google']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_google_link', $ext_links_default['google']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_google_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_google_text', $ext_links_default['google']['text_default_value']) . '</a><br />';
|
281
|
|
282
|
}
|
283
|
if (variable_get('ext_links_flickr_check', 1)) {
|
284
|
$categoryTitles[] = variable_get('ext_links_flickr_category', $ext_links_default['flickr']['category_default_value']);
|
285
|
$categories['flickr']['title'] = variable_get('ext_links_flickr_category', $ext_links_default['flickr']['category_default_value']);
|
286
|
$categories['flickr']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_flickr_link', $ext_links_default['flickr']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_flickr_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_flickr_text', $ext_links_default['flickr']['text_default_value']) . '</a><br />';
|
287
|
}
|
288
|
|
289
|
// Specimen/occurences section.
|
290
|
if (variable_get('ext_links_gbif_check', TRUE)) {
|
291
|
$categoryTitles[] = variable_get('ext_links_gbif_category', $ext_links_default['gbif']['category_default_value']);
|
292
|
$categories['gbif']['title'] = variable_get('ext_links_gbif_category', $ext_links_default['gbif']['category_default_value']);
|
293
|
$categories['gbif']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_gbif_link', $ext_links_default['gbif']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_gbif_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_gbif_text', $ext_links_default['gbif']['text_default_value']) . '</a><br />';
|
294
|
}
|
295
|
if (variable_get('ext_links_biocase_check', 1)) {
|
296
|
$categoryTitles[] = variable_get('ext_links_biocase_category', $ext_links_default['biocase']['category_default_value']);
|
297
|
$categories['biocase']['title'] = variable_get('ext_links_biocase_category', $ext_links_default['biocase']['category_default_value']);
|
298
|
$categories['biocase']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_biocase_link', $ext_links_default['biocase']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_biocase_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_biocase_text', $ext_links_default['biocase']['text_default_value']) . '</a><br />';
|
299
|
}
|
300
|
if (variable_get('ext_links_nybg_check', 1)) {
|
301
|
$query = '';
|
302
|
$genusQuery = '';
|
303
|
$speciesQuery = '';
|
304
|
if ($speciesName['genus'] != NULL) {
|
305
|
$query .= 'DetFiledAsGenusLocal+%3D+\%27'. $speciesName['genus']. '\%27';
|
306
|
}
|
307
|
if ($speciesName['species'] != NULL) {
|
308
|
$query .= variable_get('ext_links_nybg_concat', '+AND+'). 'DetFiledAsSpeciesLocal+%3D+\%27'. $speciesName['species'] . '\%27';
|
309
|
}
|
310
|
$categoryTitles[] = variable_get('ext_links_nybg_category', $ext_links_default['nybg']['category_default_value']);
|
311
|
$categories['nybg']['title'] = variable_get('ext_links_nybg_category', $ext_links_default['nybg']['category_default_value']);
|
312
|
$categories['nybg']['content'] = '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_nybg_link', $ext_links_default['nybg']['link_default_value']).$query.'\')">'.variable_get('ext_links_nybg_text', $ext_links_default['nybg']['text_default_value']).'</a><br />';
|
313
|
}
|
314
|
if (variable_get('ext_links_tropicos_check', 1)) {
|
315
|
$categoryTitles[] = variable_get('ext_links_tropicos_category', $ext_links_default['tropicos']['category_default_value']);
|
316
|
$categories['tropicos']['title'] = variable_get('ext_links_tropicos_category', $ext_links_default['tropicos']['category_default_value']);
|
317
|
$categories['tropicos']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_tropicos_link', $ext_links_default['tropicos']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_tropicos_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_tropicos_text', $ext_links_default['tropicos']['text_default_value']) . '</a><br />';
|
318
|
}
|
319
|
|
320
|
// Literature.
|
321
|
if (variable_get('ext_links_scholar_check', 1)) {
|
322
|
$categoryTitles[] = variable_get('ext_links_scholar_category', $ext_links_default['scholar']['category_default_value']);
|
323
|
$categories['scholar']['title'] = variable_get('ext_links_scholar_category', $ext_links_default['scholar']['category_default_value']);
|
324
|
$categories['scholar']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_scholar_link', $ext_links_default['scholar']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_scholar_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_scholar_text', $ext_links_default['scholar']['text_default_value']) . '</a><br />';
|
325
|
}
|
326
|
if (variable_get('ext_links_bhl_check', 1)) {
|
327
|
$categoryTitles[] = variable_get('ext_links_bhl_category', $ext_links_default['bhl']['category_default_value']);
|
328
|
$categories['bhl']['title'] = variable_get('ext_links_bhl_category', $ext_links_default['bhl']['category_default_value']);
|
329
|
$categories['bhl']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_bhl_link', $ext_links_default['bhl']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_bhl_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_bhl_text', $ext_links_default['bhl']['text_default_value']) . '</a><br />';
|
330
|
}
|
331
|
|
332
|
// Molecular resources.
|
333
|
if (variable_get('ext_links_ncbi_check', 1)) {
|
334
|
$categoryTitles[] = variable_get('ext_links_ncbi_category', $ext_links_default['ncbi']['category_default_value']);
|
335
|
$categories['ncbi']['title'] = variable_get('ext_links_ncbi_category', $ext_links_default['ncbi']['category_default_value']);
|
336
|
$categories['ncbi']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_ncbi_link', $ext_links_default['ncbi']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_ncbi_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_ncbi_text', $ext_links_default['ncbi']['text_default_value']) . '</a><br />';
|
337
|
}
|
338
|
if (variable_get('ext_links_arkive_check', 1)) {
|
339
|
$postURL = '&output=xml_no_dtd&client=arkive-images&site=arkive-images&ie=utf8&oe=utf8&num=20&proxystylesheet=tng-search&filter=0&getfields=*';
|
340
|
$categoryTitles[] = variable_get('ext_links_arkive_category', $ext_links_default['arkive']['category_default_value']);
|
341
|
$categories['arkive']['title'] = variable_get('ext_links_arkive_category', $ext_links_default['arkive']['category_default_value']);
|
342
|
$categories['arkive']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_arkive_link', $ext_links_default['arkive']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_arkive_concat', '+') . str_replace('"', '%22', $speciesName['species']) . $postURL . '\')">' . variable_get('ext_links_arkive_text', $ext_links_default['arkive']['text_default_value']) . '</a><br />';
|
343
|
}
|
344
|
if (variable_get('ext_links_herbcat_check', 1)) {
|
345
|
$postURL = '&x=11&y=13&homePageSearchOption=scientific_name&nameOfSearchPage=home_page';
|
346
|
$categoryTitles[] = variable_get('ext_links_herbcat_category', $ext_links_default['herbcat']['category_default_value']);
|
347
|
$categories['herbcat']['title'] = variable_get('ext_links_herbcat_category', $ext_links_default['herbcat']['category_default_value']);
|
348
|
$categories['herbcat']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_herbcat_link', $ext_links_default['herbcat']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_herbcat_concat', '+') . str_replace('"', '%22', $speciesName['species']) . $postURL . '\')">' . variable_get('ext_links_herbcat_text', $ext_links_default['herbcat']['text_default_value']) . '</a><br />';
|
349
|
}
|
350
|
if (variable_get('ext_links_iucn_check', 1)) {
|
351
|
$categoryTitles[] = variable_get('ext_links_iucn_category', $ext_links_default['iucn']['category_default_value']);
|
352
|
$categories['iucn']['title'] = variable_get('ext_links_iucn_category', $ext_links_default['iucn']['category_default_value']);
|
353
|
$categories['iucn']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_iucn_link', $ext_links_default['iucn']['link_default_value']) . '\')">' . variable_get('ext_links_iucn_text', $ext_links_default['iucn']['text_default_value']) . '</a><br />';
|
354
|
}
|
355
|
if (variable_get('ext_links_ipni_check', 1)) {
|
356
|
$genusQuery = 'find_genus=' . $speciesName['genus'];
|
357
|
$speciesQuery = 'find_species=' . $speciesName['species'];
|
358
|
$categoryTitles[] = variable_get('ext_links_ipni_category', $ext_links_default['ipni']['category_default_value']);
|
359
|
$categories['ipni']['title'] = variable_get('ext_links_ipni_category', $ext_links_default['ipni']['category_default_value']);
|
360
|
$categories['ipni']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_ipni_link', $ext_links_default['ipni']['link_default_value']) . $genusQuery . variable_get('ext_links_ipni_concat', '&') . $speciesQuery . '\')">' . variable_get('ext_links_ipni_text', $ext_links_default['ipni']['text_default_value']) . '</a><br />';
|
361
|
}
|
362
|
if (variable_get('ext_links_wcsp_check', 1)) {
|
363
|
$categoryTitles[] = variable_get('ext_links_wcsp_category', $ext_links_default['wcsp']['category_default_value']);
|
364
|
$categories['wcsp']['title'] = variable_get('ext_links_wcsp_category', $ext_links_default['wcsp']['category_default_value']);
|
365
|
$categories['wcsp']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_wcsp_link', $ext_links_default['wcsp']['link_default_value']) . '\')">' . variable_get('ext_links_wcsp_text', $ext_links_default['wcsp']['text_default_value']) . '</a><br />';
|
366
|
}
|
367
|
if (variable_get('ext_links_tpl_check', 1)) {
|
368
|
$categoryTitles[] = variable_get('ext_links_tpl_category', $ext_links_default['tpl']['category_default_value']);
|
369
|
$categories['tpl']['title'] = variable_get('ext_links_tpl_category', $ext_links_default['tpl']['category_default_value']);
|
370
|
$categories['tpl']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_tpl_link', $ext_links_default['tpl']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_tpl_concat', '+') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_tpl_text', $ext_links_default['tpl']['text_default_value']) . '</a><br />';
|
371
|
}
|
372
|
if (variable_get('ext_links_eol_check', 1)) {
|
373
|
$categoryTitles[] = variable_get('ext_links_eol_category', $ext_links_default['eol']['category_default_value']);
|
374
|
$categories['eol']['title'] = variable_get('ext_links_eol_category', $ext_links_default['eol']['category_default_value']);
|
375
|
$categories['eol']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_eol_link', $ext_links_default['eol']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_eol_concat', '+') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_eol_text', $ext_links_default['eol']['text_default_value']) . '</a><br />';
|
376
|
}
|
377
|
if (variable_get('ext_links_jstor_check', 1)) {
|
378
|
$categoryTitles[] = variable_get('ext_links_jstor_category', $ext_links_default['jstor']['category_default_value']);
|
379
|
$categories['jstor']['title'] = variable_get('ext_links_jstor_category', $ext_links_default['jstor']['category_default_value']);
|
380
|
$categories['jstor']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_jstor_link', $ext_links_default['jstor']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_jstor_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_jstor_text', $ext_links_default['jstor']['text_default_value']) . '</a><br />';
|
381
|
}
|
382
|
if (variable_get('ext_links_epic_check', 1)) {
|
383
|
$postURL = '&searchAll=true&categories=names&categories=bibl&categories=colln&categories=taxon&categories=flora&Submit.x=0&Submit.y=0';
|
384
|
$categoryTitles[] = variable_get('ext_links_epic_category', $ext_links_default['epic']['category_default_value']);
|
385
|
$categories['epic']['title'] = variable_get('ext_links_epic_category', $ext_links_default['epic']['category_default_value']);
|
386
|
$categories['epic']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_epic_link', $ext_links_default['epic']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_epic_concat', '+') . str_replace('"', '%22', $speciesName['species']) . $postURL . '\')">' . variable_get('ext_links_epic_text', $ext_links_default['epic']['text_default_value']) . '</a><br />';
|
387
|
}
|
388
|
// if (variable_get('ext_links_fairchild_check', 1)) {
|
389
|
// $categoryTitles[] = variable_get('ext_links_fairchild_category', $ext_links_default['fairchild']['category_default_value']);
|
390
|
// $categories['fairchild']['title'] = variable_get('ext_links_fairchild_category', $ext_links_default['fairchild']['category_default_value']);
|
391
|
// $categories['fairchild']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_fairchild_link', $ext_links_default['fairchild']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_fairchild_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_fairchild_text', $ext_links_default['fairchild']['text_default_value']) . '</a><br />';
|
392
|
// }
|
393
|
if (variable_get('ext_links_ggbn_check', 1)) {
|
394
|
$categoryTitles[] = variable_get('ext_links_ggbn_category', $ext_links_default['ggbn']['category_default_value']);
|
395
|
$categories['ggbn']['title'] = variable_get('ext_links_ggnb_category', $ext_links_default['ggbn']['category_default_value']);
|
396
|
$categories['ggbn']['content'] = '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_ggbn_link', $ext_links_default['ggbn']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_ggbn_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_ggbn_text', $ext_links_default['ggbn']['text_default_value']) . '</a><br />';
|
397
|
}
|
398
|
|
399
|
$categoryTitles = array_unique($categoryTitles);
|
400
|
foreach ($categoryTitles as $categoryTitle) {
|
401
|
// $block_content .= "specName" . $speciesName;
|
402
|
$block_content .= "<div class=\"category\"><h5>" . $categoryTitle . "</h5>";
|
403
|
foreach ($categories as $category) {
|
404
|
if ($category['title'] == $categoryTitle) {
|
405
|
$block_content .= $category['content'];
|
406
|
}
|
407
|
}
|
408
|
$block_content .= "</div>";
|
409
|
}
|
410
|
|
411
|
|
412
|
return $block_content;
|
413
|
}
|
414
|
|
415
|
/**
|
416
|
* @todo Please document this function.
|
417
|
* @see http://drupal.org/node/1354
|
418
|
*/
|
419
|
function theme_ext_links_list_plain($variables) {
|
420
|
$speciesName = $variables['speciesName'];
|
421
|
if (!isset($speciesName['genus'])) {
|
422
|
$speciesName['genus'] = '';
|
423
|
}
|
424
|
if (!isset($speciesName['species'])) {
|
425
|
$speciesName['species'] = '';
|
426
|
}
|
427
|
$genus = $variables['genus'];
|
428
|
$species = $variables['species'];
|
429
|
$ext_links_default = ext_links_get_default();
|
430
|
$block_content = '';
|
431
|
if (variable_get('ext_links_gbif_check', TRUE)) {
|
432
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_gbif_link', $ext_links_default['gbif']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_gbif_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_gbif_text', $ext_links_default['gbif']['text_default_value']) . '</a><br />';
|
433
|
/*
|
434
|
$block_content .= /* TODO
|
435
|
Please manually fix the parameters on the l() or url() function on the next line.
|
436
|
Typically, this was not changed because of a function call inside an array call like
|
437
|
array('title' => t('View user profile.')).*/
|
438
|
/*
|
439
|
l(variable_get('ext_links_gbif_text', $ext_links_default[gbif][text_default_value]),
|
440
|
'JavaScript:popupExternalLinks('.variable_get('ext_links_gbif_link', $ext_links_default[gbif][link_default_value]).$speciesName[genus].variable_get('ext_links_gbif_concat', ' ').$speciesName[species],
|
441
|
array(), null, null, true);
|
442
|
*/
|
443
|
}
|
444
|
if (variable_get('ext_links_biocase_check', 1)) {
|
445
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_biocase_link', $ext_links_default['biocase']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_biocase_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_biocase_text', $ext_links_default['biocase']['text_default_value']) . '</a><br />';
|
446
|
}
|
447
|
if (variable_get('ext_links_nybg_check', 1)) {
|
448
|
// $block_content .= '<a href="JavaScript:popupExternalLinks(\''.variable_get('ext_links_nybg_link', $ext_links_default[nybg][link_default_value]).str_replace('"','%22',$speciesName[genus]).variable_get('ext_links_nybg_concat', ' ').str_replace('"','%22',$speciesName[species]).'\')">'.variable_get('ext_links_nybg_text', $ext_links_default[nybg][text_default_value]).'</a><br />';
|
449
|
$genusQuery = '';
|
450
|
$speciesQuery = '';
|
451
|
if ($speciesName['genus'] != NULL) {
|
452
|
$genusQuery = 'DetFiledAsGenusLocal+%3D+\%27' . $speciesName['genus'] . '\%27';
|
453
|
}
|
454
|
if ($speciesName['species'] != NULL) {
|
455
|
$speciesQuery = 'DetFiledAsSpeciesLocal+%3D+\%27' . $speciesName['species'] . '\%27';
|
456
|
}
|
457
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_nybg_link', $ext_links_default['nybg']['link_default_value']) . $genusQuery . variable_get('ext_links_nybg_concat', '+AND+') . $speciesQuery . '\')">' . variable_get('ext_links_nybg_text', $ext_links_default['nybg']['text_default_value']) . '</a><br />';
|
458
|
}
|
459
|
if (variable_get('ext_links_tropicos_check', 1)) {
|
460
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_tropicos_link', $ext_links_default['tropicos']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_tropicos_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_tropicos_text', $ext_links_default['tropicos']['text_default_value']) . '</a><br />';
|
461
|
}
|
462
|
if (variable_get('ext_links_ncbi_check', 1)) {
|
463
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_ncbi_link', $ext_links_default['ncbi']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_ncbi_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_ncbi_text', $ext_links_default['ncbi']['text_default_value']) . '</a><br />';
|
464
|
}
|
465
|
if (variable_get('ext_links_google_check', 1)) {
|
466
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_google_link', $ext_links_default['google']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_google_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_google_text', $ext_links_default['google']['text_default_value']) . '</a><br />';
|
467
|
}
|
468
|
if (variable_get('ext_links_flickr_check', 1)) {
|
469
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_flickr_link', $ext_links_default['flickr']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_flickr_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_flickr_text', $ext_links_default['flickr']['text_default_value']) . '</a><br />';
|
470
|
}
|
471
|
if (variable_get('ext_links_scholar_check', 1)) {
|
472
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_scholar_link', $ext_links_default['scholar']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_scholar_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_scholar_text', $ext_links_default['scholar']['text_default_value']) . '</a><br />';
|
473
|
}
|
474
|
if (variable_get('ext_links_bhl_check', 1)) {
|
475
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_bhl_link', $ext_links_default['bhl']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_bhl_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_bhl_text', $ext_links_default['bhl']['text_default_value']) . '</a><br />';
|
476
|
}
|
477
|
// if (variable_get('ext_links_fairchild_check', 1)) {
|
478
|
// $block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_fairchild_link', $ext_links_default['fairchild']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_fairchild_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_fairchild_text', $ext_links_default['fairchild']['text_default_value']) . '</a><br />';
|
479
|
// }
|
480
|
if (variable_get('ext_links_ggbn_check', 1)) {
|
481
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_ggbn_link', $ext_links_default['ggbn']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_ggbn_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_ggbn_text', $ext_links_default['ggbn']['text_default_value']) . '</a><br />';
|
482
|
}
|
483
|
if (variable_get('ext_links_arkive_check', 1)) {
|
484
|
$postURL = '&output=xml_no_dtd&client=arkive-images&site=arkive-images&ie=utf8&oe=utf8&num=20&proxystylesheet=tng-search&filter=0&getfields=*';
|
485
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_arkive_link', $ext_links_default['arkive']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_arkive_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . $postURL . '\')">' . variable_get('ext_links_arkive_text', $ext_links_default['arkive']['text_default_value']) . '</a><br />';
|
486
|
}
|
487
|
if (variable_get('ext_links_herbcat_check', 1)) {
|
488
|
$postURL = '&x=11&y=13&homePageSearchOption=scientific_name&nameOfSearchPage=home_page';
|
489
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_herbcat_link', $ext_links_default['herbcat']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_herbcat_concat', '+') . str_replace('"', '%22', $speciesName['species']) . $postURL . '\')">' . variable_get('ext_links_herbcat_text', $ext_links_default['herbcat']['text_default_value']) . '</a><br />';
|
490
|
}
|
491
|
if (variable_get('ext_links_iucn_check', 1)) {
|
492
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_iucn_link', $ext_links_default['iucn']['link_default_value']) . '\')">' . variable_get('ext_links_iucn_text', $ext_links_default['iucn']['text_default_value']) . '</a><br />';
|
493
|
|
494
|
}
|
495
|
if (variable_get('ext_links_ipni_check', 1)) {
|
496
|
$genusQuery = 'find_genus=' . $speciesName['genus'];
|
497
|
$speciesQuery = 'find_species=' . $speciesName['species'];
|
498
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_ipni_link', $ext_links_default['ipni']['link_default_value']) . $genusQuery . variable_get('ext_links_ipni_concat', '&') . $speciesQuery . '\')">' . variable_get('ext_links_ipni_text', $ext_links_default['ipni']['text_default_value']) . '</a><br />';
|
499
|
}
|
500
|
if (variable_get('ext_links_wcsp_check', 1)) {
|
501
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_wcsp_link', $ext_links_default['wcsp']['link_default_value']) . '\')">' . variable_get('ext_links_wcsp_text', $ext_links_default['wcsp']['text_default_value']) . '</a><br />';
|
502
|
|
503
|
}
|
504
|
if (variable_get('ext_links_tpl_check', 1)) {
|
505
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_tpl_link', $ext_links_default['tpl']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_tpl_concat', '+') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_tpl_text', $ext_links_default['tpl']['text_default_value']) . '</a><br />';
|
506
|
}
|
507
|
if (variable_get('ext_links_eol_check', 1)) {
|
508
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_eol_link', $ext_links_default['eol']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_eol_concat', '+') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_eol_text', $ext_links_default['eol']['text_default_value']) . '</a><br />';
|
509
|
}
|
510
|
if (variable_get('ext_links_jstor_check', 1)) {
|
511
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_jstor_link', $ext_links_default['jstor']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_jstor_concat', ' ') . str_replace('"', '%22', $speciesName['species']) . '\')">' . variable_get('ext_links_jstor_text', $ext_links_default['jstor']['text_default_value']) . '</a><br />';
|
512
|
}
|
513
|
if (variable_get('ext_links_epic_check', 1)) {
|
514
|
$postURL = '&searchAll=true&categories=names&categories=bibl&categories=colln&categories=taxon&categories=flora&Submit.x=0&Submit.y=0';
|
515
|
$block_content .= '<a href="JavaScript:popupExternalLinks(\'' . variable_get('ext_links_epic_link', $ext_links_default['epic']['link_default_value']) . str_replace('"', '%22', $speciesName['genus']) . variable_get('ext_links_epic_concat', '+') . str_replace('"', '%22', $speciesName['species']) . $postURL . '\')">' . variable_get('ext_links_epic_text', $ext_links_default['epic']['text_default_value']) . '</a><br />';
|
516
|
}
|
517
|
|
518
|
return $block_content;
|
519
|
}
|
520
|
|
521
|
// Include the admin form if we really want it to use.
|
522
|
/*
|
523
|
if (arg(0) === 'admin' AND arg(1) === 'user' AND arg(2) === 'ext_link') {
|
524
|
module_load_include('inc', 'ext_links', 'xt_link_admin');
|
525
|
}
|
526
|
*/
|
527
|
|
528
|
/**
|
529
|
* @todo Please document this function.
|
530
|
* @see http://drupal.org/node/1354
|
531
|
*/
|
532
|
function ext_links_theme() {
|
533
|
return array(
|
534
|
'ext_links_list_grouped' => array('variables' => array(
|
535
|
'speciesName' => NULL,
|
536
|
'genus' => NULL,
|
537
|
'species' => NULL,
|
538
|
)),
|
539
|
'ext_links_list_plain' => array('variables' => array(
|
540
|
'speciesName' => NULL,
|
541
|
'genus' => NULL,
|
542
|
'species' => NULL,
|
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
|
// ),
|
553
|
);
|
554
|
}
|
555
|
|
556
|
/**
|
557
|
* Get the default external links.
|
558
|
*
|
559
|
* @return array
|
560
|
* Returns an array with default external links values.
|
561
|
*/
|
562
|
function ext_links_template_defaults() {
|
563
|
$ext_links_default["gbif"] = array(
|
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',
|
570
|
);
|
571
|
$ext_links_default["biocase"] = array(
|
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',
|
578
|
);
|
579
|
$ext_links_default["nybg"] = array(
|
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',
|
586
|
);
|
587
|
$ext_links_default["tropicos"] = array(
|
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',
|
594
|
);
|
595
|
$ext_links_default["ncbi"] = array(
|
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',
|
602
|
);
|
603
|
$ext_links_default["google"] = array(
|
604
|
'link' => 'http://images.google.com/images?q=',
|
605
|
'title' => 'Search Google Images...',
|
606
|
'glue' => '+',
|
607
|
'weight' => 0,
|
608
|
'status' => 1,
|
609
|
'category' => 'Images',
|
610
|
);
|
611
|
$ext_links_default["flickr"] = array(
|
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',
|
618
|
);
|
619
|
$ext_links_default["scholar"] = array(
|
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',
|
626
|
);
|
627
|
$ext_links_default["bhl"] = array(
|
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',
|
634
|
);
|
635
|
$ext_links_default["arkive"] = array(
|
636
|
'link' => 'http://www.arkive.org/search.html?q=',
|
637
|
'title' => 'Search ARKive...',
|
638
|
'glue' => '+',
|
639
|
'weight' => 0,
|
640
|
'status' => 1,
|
641
|
'category' => 'Images',
|
642
|
);
|
643
|
$ext_links_default["herbcat"] = array(
|
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',
|
650
|
);
|
651
|
$ext_links_default["iucn"] = array(
|
652
|
'link' => 'http://www.iucnredlist.org/',
|
653
|
'title' => 'Go to IUCN Red List...',
|
654
|
'glue' => ' ',
|
655
|
'weight' => 0,
|
656
|
'status' => 1,
|
657
|
'category' => 'Conservation',
|
658
|
);
|
659
|
$ext_links_default["ipni"] = array(
|
660
|
'link' => 'http://www.ipni.org/ipni/advPlantNameSearch.do?',
|
661
|
'title' => 'Search IPNI...',
|
662
|
'glue' => '&',
|
663
|
'weight' => 0,
|
664
|
'status' => 1,
|
665
|
'category' => 'Classification',
|
666
|
);
|
667
|
$ext_links_default["wcsp"] = array(
|
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',
|
674
|
);
|
675
|
$ext_links_default["tpl"] = array(
|
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',
|
682
|
);
|
683
|
$ext_links_default["eol"] = array(
|
684
|
'link' => 'http://eol.org/search/?q=',
|
685
|
'title' => 'Search Encyclopaedia of Life...',
|
686
|
'glue' => '+',
|
687
|
'weight' => 0,
|
688
|
'status' => 1,
|
689
|
'category' => 'General',
|
690
|
);
|
691
|
$ext_links_default["jstor"] = array(
|
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',
|
698
|
);
|
699
|
$ext_links_default["epic"] = array(
|
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',
|
706
|
);
|
707
|
/*
|
708
|
* hidden since Fairchild Guide To Palms seems to be down
|
709
|
$ext_links_default["fairchild"] = array(
|
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',
|
716
|
);
|
717
|
*/
|
718
|
$ext_links_default["ggbn"] = array(
|
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',
|
725
|
);
|
726
|
return $ext_links_default;
|
727
|
}
|