Project

General

Profile

« Previous | Next » 

Revision 4dbe55db

Added by Andreas Kohlbecker almost 3 years ago

ref #9659 sensibly ordering ext_links defaults and defining weight correspondingly

View differences:

modules/cdm_dataportal/ext_links/ext_links.module
419 419
 *   Returns an array with default external links values.
420 420
 */
421 421
function ext_links_template_defaults() {
422
  $ext_links_default["gbif"] = array(
423
    'id' => "gbif",
424
    'link' => 'http://www.gbif.org/species/search?q=[cdm:taxon_name]',
425
    'title' => 'GBIF',
422

  
423
  // --- General ---
424
  $ext_links_default["eol"] = array(
425
    'id' => "eol",
426
    'link' => 'http://eol.org/search/?q=[cdm:taxon_name]',
427
    'title' => 'Encyclopaedia of Life',
426 428
    'weight' => 0,
427 429
    'status' => 1,
428
    'category' => 'Specimens/Occurrences',
430
    'category' => 'General',
429 431
  );
430
  $ext_links_default["biocase"] = array(
431
    'id' => "biocase",
432
    'link' => 'http://search.biocase.org/edit/search/units/simpleSearch/query1?unitName=[cdm:taxon_name]',
433
    'title' => 'BioCASE',
432
  $ext_links_default["epic"] = array(
433
    'id' => "epic",
434
    'link' => 'http://epic.kew.org/searchepic/summaryquery.do?scientificName=[cdm:taxon_name]&searchAll=true&categories=names&categories=bibl&categories=colln&categories=taxon&categories=flora',
435
    'title' => 'ePIC',
434 436
    'weight' => 0,
435 437
    'status' => 1,
436
    'category' => 'Specimens/Occurrences',
438
    'category' => 'General',
437 439
  );
438
  $ext_links_default["nybg"] = array(
439
    'id' => "nybg",
440
    'link' => 'http://sweetgum.nybg.org/science/vh/specimen_list.php?SummaryData=[cdm:taxon_name]',
441
    'title' => 'NYBG',
440
  $ext_links_default["jstor"] = array(
441
    'id' => "jstor",
442
    'link' => 'https://plants.jstor.org/search?filter=name&so=ps_group_by_genus_species+asc&Query=[cdm:taxon_name]',
443
    'title' => 'JSTOR Plant Science',
442 444
    'weight' => 0,
443 445
    'status' => 1,
444
    'category' => 'Specimens/Occurrences',
446
    'category' => 'General',
445 447
  );
446
  $ext_links_default["tropicos"] = array(
447
    'id' => "tropicos",
448
    'link' => 'http://www.tropicos.org/NameSearch.aspx?name=[cdm:taxon_name]',
449
    'title' => 'Tropicos',
448

  
449
  // --- Classification/Nomenclature ---
450
  $ext_links_default["col"] = array(
451
    'id' => "col",
452
    'link' => 'https://www.catalogueoflife.org/data/search?facet=rank&facet=issue&facet=status&facet=nomStatus&facet=nameType&facet=field&limit=50&offset=0&q=[cdm:taxon_name]&sortBy=taxonomic&type=EXACT',
453
    'title' => 'Catalogue of Life',
450 454
    'weight' => 0,
451 455
    'status' => 1,
452
    'category' => 'Specimens/Occurrences',
456
    'category' => 'Classification/Nomenclature',
453 457
  );
454
  $ext_links_default["ncbi"] = array(
455
    'id' => "ncbi",
456
    'link' => 'http://www.ncbi.nlm.nih.gov/gquery/gquery.fcgi?term=%22[cdm:taxon_name]%22',
457
    'title' => 'NCBI',
458
  $ext_links_default["ipni"] = array(
459
    'id' => "ipni",
460
    'link' => 'https://www.ipni.org/?q=[cdm:taxon_name]',
461
    'title' => 'IPNI',
458 462
    'weight' => 0,
459 463
    'status' => 1,
460
    'category' => 'Molecular Resources',
464
    'category' => 'Classification/Nomenclature',
461 465
  );
462
  $ext_links_default["google"] = array(
463
    'id' => "google",
464
    'link' => 'http://images.google.com/images?q=%22[cdm:taxon_name]%22',
465
    'title' => 'Google Images',
466
  $ext_links_default["tpl"] = array(
467
    'id' => "tpl",
468
    'link' => 'http://www.theplantlist.org/tpl/search?q=[cdm:taxon_name]',
469
    'title' => 'The Plant List',
466 470
    'weight' => 0,
467 471
    'status' => 1,
468
    'category' => 'Images',
472
    'category' => 'Classification/Nomenclature',
469 473
  );
470
  $ext_links_default["europeana"] = array(
471
    'id' => "europeana",
472
    'link' => 'https://www.europeana.eu/en/search?query=[cdm:taxon_name]',
473
    'title' => 'Europeana',
474
  $ext_links_default["wcsp"] = array(
475
    'id' => "wcsp",
476
    'link' => 'http://wcsp.science.kew.org/qsearch.do?plantName=[cdm:taxon_name]',
477
    'title' => 'World Checklist Monocots',
474 478
    'weight' => 0,
475 479
    'status' => 1,
476
    'category' => 'Images',
480
    'category' => 'Classification/Nomenclature',
477 481
  );
478
  $ext_links_default["morphbank"] = array(
479
    'id' => "morphbank",
480
    'link' => 'https://www.morphbank.net/Browse/ByImage/index.php?keywords=&tsnKeywords=[cdm:taxon_name]',
481
    'title' => 'Morphbank',
482
  $ext_links_default["wfo"] = array(
483
    'id' => "wfo",
484
    'link' => 'http://www.worldfloraonline.org/search?query=[cdm:taxon_name]',
485
    'title' => 'World Flora Online',
482 486
    'weight' => 0,
483 487
    'status' => 1,
484
    'category' => 'Images',
488
    'category' => 'Classification/Nomenclature',
485 489
  );
486
  $ext_links_default["flickr"] = array(
487
    'id' => "flickr",
488
    'link' => 'http://www.flickr.com/search/?w=all&q=%22[cdm:taxon_name]%22',
489
    'title' => 'flickr',
490

  
491
  // --- Specimens/Occurrences ---
492
  $ext_links_default["biocase"] = array(
493
    'id' => "biocase",
494
    'link' => 'http://search.biocase.org/edit/search/units/simpleSearch/query1?unitName=[cdm:taxon_name]',
495
    'title' => 'BioCASE',
490 496
    'weight' => 0,
491 497
    'status' => 1,
492
    'category' => 'Images',
498
    'category' => 'Specimens/Occurrences',
493 499
  );
494
  $ext_links_default["scholar"] = array(
495
    'id' => "scholar",
496
    'link' => 'http://scholar.google.de/scholar?q=%22[cdm:taxon_name]%22',
497
    'title' => 'Google scholar',
500
  $ext_links_default["fairchild"] = array(
501
    //disabled since Fairchild Guide To Palms seems to be down
502
    'id' => "fairchild",
503
    'link' => 'http://palmguide.org/palmsearch.php?query=',
504
    'title' => 'Fairchild Guide To Palms',
498 505
    'weight' => 0,
499
    'status' => 1,
500
    'category' => 'Literature',
506
    'status' => 0,
507
    'category' => 'Specimens/Occurrences',
501 508
  );
502
  $ext_links_default["bhl"] = array(
503
    'id' => "bhl",
504
    // BHL does not normalize rank terms, ssp., sub., subsp. are not unified, therefore we skip that part:
505
    'link' => 'https://www.biodiversitylibrary.org/search?searchTerm=[cdm:taxon_name:genus_or_uninomial]+[cdm:taxon_name:epithet]+[cdm:taxon_name:infraspecific_epithet]&stype=F#/names',
506
    'title' => 'BHL',
509
  $ext_links_default["gbif"] = array(
510
    'id' => "gbif",
511
    'link' => 'http://www.gbif.org/species/search?q=[cdm:taxon_name]',
512
    'title' => 'GBIF',
507 513
    'weight' => 0,
508 514
    'status' => 1,
509
    'category' => 'Literature',
510
  );
511
  $ext_links_default["arkive"] = array(
512
    // domain no longer exists! Remove extlink?
513
    'id' => "arkive",
514
    'link' => 'http://www.arkive.org/search.html?q=[cdm:taxon_name]&output=xml_no_dtd&client=arkive-images&site=arkive-images&ie=utf8&oe=utf8&num=20&proxystylesheet=tng-search&filter=0&getfields=*',
515
    'title' => 'ARKive',
516
    'weight' => 0,
517
    'status' => 0,
518
    'category' => 'Images',
515
    'category' => 'Specimens/Occurrences',
519 516
  );
520 517
  $ext_links_default["herbcat"] = array(
521 518
    'id' => "herbcat",
......
525 522
    'status' => 1,
526 523
    'category' => 'Specimens/Occurrences',
527 524
  );
528
  $ext_links_default["wfo-specimens"] = array(
529
    'id' => "wfo-specimens",
530
    'link' => 'http://wfospecimens.cybertaxonomy.org/search/result?fullScientificName=[cdm:taxon_name]',
531
    'title' => 'World Flora Online - Specimens',
525
  $ext_links_default["nybg"] = array(
526
    'id' => "nybg",
527
    'link' => 'http://sweetgum.nybg.org/science/vh/specimen_list.php?SummaryData=[cdm:taxon_name]',
528
    'title' => 'NYBG',
532 529
    'weight' => 0,
533 530
    'status' => 1,
534 531
    'category' => 'Specimens/Occurrences',
535 532
  );
536
  $ext_links_default["wfo"] = array(
537
    'id' => "wfo",
538
    'link' => 'http://www.worldfloraonline.org/search?query=[cdm:taxon_name]',
539
    'title' => 'World Flora Online',
533
  $ext_links_default["tropicos"] = array(
534
    'id' => "tropicos",
535
    'link' => 'http://www.tropicos.org/NameSearch.aspx?name=[cdm:taxon_name]',
536
    'title' => 'Tropicos',
540 537
    'weight' => 0,
541 538
    'status' => 1,
542
    'category' => 'Classification/Nomenclature',
539
    'category' => 'Specimens/Occurrences',
543 540
  );
544
  $ext_links_default["iucn"] = array(
545
    'id' => "iucn",
546
    'link' => 'https://www.iucnredlist.org/search?query=[cdm:taxon_name]',
547
    'title' => 'IUCN Red List',
541
  $ext_links_default["wfo-specimens"] = array(
542
    'id' => "wfo-specimens",
543
    'link' => 'http://wfospecimens.cybertaxonomy.org/search/result?fullScientificName=[cdm:taxon_name]',
544
    'title' => 'World Flora Online - Specimens',
548 545
    'weight' => 0,
549 546
    'status' => 1,
550
    'category' => 'Conservation',
547
    'category' => 'Specimens/Occurrences',
551 548
  );
552
  $ext_links_default["ipni"] = array(
553
    'id' => "ipni",
554
    'link' => 'https://www.ipni.org/?q=[cdm:taxon_name]',
555
    'title' => 'IPNI',
549

  
550
  // --- Molecular Resources ---
551
  $ext_links_default["ggbn"] = array(
552
    'id' => "ggbn",
553
    'link' => 'http://www.ggbn.org/ggbn_portal/search/result?fullScientificName=[cdm:taxon_name]',
554
    'title' => 'GGBN',
556 555
    'weight' => 0,
557 556
    'status' => 1,
558
    'category' => 'Classification/Nomenclature',
557
    'category' => 'Molecular Resources',
559 558
  );
560
  $ext_links_default["wcsp"] = array(
561
    'id' => "wcsp",
562
    'link' => 'http://wcsp.science.kew.org/qsearch.do?plantName=[cdm:taxon_name]',
563
    'title' => 'World Checklist Monocots',
559
  $ext_links_default["ncbi"] = array(
560
    'id' => "ncbi",
561
    'link' => 'http://www.ncbi.nlm.nih.gov/gquery/gquery.fcgi?term=%22[cdm:taxon_name]%22',
562
    'title' => 'NCBI',
564 563
    'weight' => 0,
565 564
    'status' => 1,
566
    'category' => 'Classification/Nomenclature',
565
    'category' => 'Molecular Resources',
567 566
  );
568
  $ext_links_default["col"] = array(
569
    'id' => "col",
570
    'link' => 'https://www.catalogueoflife.org/data/search?facet=rank&facet=issue&facet=status&facet=nomStatus&facet=nameType&facet=field&limit=50&offset=0&q=[cdm:taxon_name]&sortBy=taxonomic&type=EXACT',
571
    'title' => 'Catalogue of Life',
567

  
568
  // --- Images ---
569
  $ext_links_default["europeana"] = array(
570
    'id' => "europeana",
571
    'link' => 'https://www.europeana.eu/en/search?query=[cdm:taxon_name]',
572
    'title' => 'Europeana',
572 573
    'weight' => 0,
573 574
    'status' => 1,
574
    'category' => 'Classification/Nomenclature',
575
    'category' => 'Images',
575 576
  );
576
  //
577
  $ext_links_default["tpl"] = array(
578
    'id' => "tpl",
579
    'link' => 'http://www.theplantlist.org/tpl/search?q=[cdm:taxon_name]',
580
    'title' => 'The Plant List',
577
  $ext_links_default["flickr"] = array(
578
    'id' => "flickr",
579
    'link' => 'http://www.flickr.com/search/?w=all&q=%22[cdm:taxon_name]%22',
580
    'title' => 'flickr',
581 581
    'weight' => 0,
582 582
    'status' => 1,
583
    'category' => 'Classification/Nomenclature',
583
    'category' => 'Images',
584 584
  );
585
  $ext_links_default["eol"] = array(
586
    'id' => "eol",
587
    'link' => 'http://eol.org/search/?q=[cdm:taxon_name]',
588
    'title' => 'Encyclopaedia of Life',
585
  $ext_links_default["google"] = array(
586
    'id' => "google",
587
    'link' => 'http://images.google.com/images?q=%22[cdm:taxon_name]%22',
588
    'title' => 'Google Images',
589 589
    'weight' => 0,
590 590
    'status' => 1,
591
    'category' => 'General',
591
    'category' => 'Images',
592 592
  );
593
  $ext_links_default["jstor"] = array(
594
    'id' => "jstor",
595
    'link' => 'https://plants.jstor.org/search?filter=name&so=ps_group_by_genus_species+asc&Query=[cdm:taxon_name]',
596
    'title' => 'JSTOR Plant Science',
593
  $ext_links_default["morphbank"] = array(
594
    'id' => "morphbank",
595
    'link' => 'https://www.morphbank.net/Browse/ByImage/index.php?keywords=&tsnKeywords=[cdm:taxon_name]',
596
    'title' => 'Morphbank',
597 597
    'weight' => 0,
598 598
    'status' => 1,
599
    'category' => 'General',
599
    'category' => 'Images',
600 600
  );
601
  $ext_links_default["epic"] = array(
602
    'id' => "epic",
603
    'link' => 'http://epic.kew.org/searchepic/summaryquery.do?scientificName=[cdm:taxon_name]&searchAll=true&categories=names&categories=bibl&categories=colln&categories=taxon&categories=flora',
604
    'title' => 'ePIC',
601
  //  $ext_links_default["arkive"] = array(
602
  //    // domain no longer exists! Remove extlink?
603
  //    'id' => "arkive",
604
  //    'link' => 'http://www.arkive.org/search.html?q=[cdm:taxon_name]&output=xml_no_dtd&client=arkive-images&site=arkive-images&ie=utf8&oe=utf8&num=20&proxystylesheet=tng-search&filter=0&getfields=*',
605
  //    'title' => 'ARKive',
606
  //    'weight' => 0,
607
  //    'status' => 0,
608
  //    'category' => 'Images',
609
  //  );
610

  
611
  // --- Conservation ---
612
  $ext_links_default["iucn"] = array(
613
    'id' => "iucn",
614
    'link' => 'https://www.iucnredlist.org/search?query=[cdm:taxon_name]',
615
    'title' => 'IUCN Red List',
605 616
    'weight' => 0,
606 617
    'status' => 1,
607
    'category' => 'General',
618
    'category' => 'Conservation',
608 619
  );
609
  $ext_links_default["fairchild"] = array(
610
    //disabled since Fairchild Guide To Palms seems to be down
611
    'id' => "fairchild",
612
    'link' => 'http://palmguide.org/palmsearch.php?query=',
613
    'title' => 'Fairchild Guide To Palms',
620

  
621
  // --- Literature ---
622
  $ext_links_default["scholar"] = array(
623
    'id' => "scholar",
624
    'link' => 'http://scholar.google.de/scholar?q=%22[cdm:taxon_name]%22',
625
    'title' => 'Google scholar',
614 626
    'weight' => 0,
615
    'status' => 0,
616
    'category' => 'Specimens/Occurrences',
627
    'status' => 1,
628
    'category' => 'Literature',
617 629
  );
618
  $ext_links_default["ggbn"] = array(
619
    'id' => "ggbn",
620
    'link' => 'http://www.ggbn.org/ggbn_portal/search/result?fullScientificName=[cdm:taxon_name]',
621
    'title' => 'GGBN',
630
  $ext_links_default["bhl"] = array(
631
    'id' => "bhl",
632
    // BHL does not normalize rank terms, ssp., sub., subsp. are not unified, therefore we skip that part:
633
    'link' => 'https://www.biodiversitylibrary.org/search?searchTerm=[cdm:taxon_name:genus_or_uninomial]+[cdm:taxon_name:epithet]+[cdm:taxon_name:infraspecific_epithet]&stype=F#/names',
634
    'title' => 'BHL',
622 635
    'weight' => 0,
623 636
    'status' => 1,
624
    'category' => 'Molecular Resources',
637
    'category' => 'Literature',
625 638
  );
639

  
640
  $weight = -10;
641
  foreach($ext_links_default as &$template){
642
    $template['weight'] = $weight++;
643
  }
644

  
626 645
  return $ext_links_default;
627 646
}

Also available in: Unified diff