| Conditions | 26 |
| Paths | > 20000 |
| Total Lines | 414 |
| Code Lines | 328 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 522 | private function getXoopsVersionConfig($module, $tables, $language) |
||
| 523 | { |
||
| 524 | $moduleDirname = $module->getVar('mod_dirname'); |
||
| 525 | $ret = $this->getDashComment('Config'); |
||
| 526 | |||
| 527 | $table_editors = 0; |
||
| 528 | $table_permissions = 0; |
||
| 529 | $table_admin = 0; |
||
| 530 | $table_user = 0; |
||
| 531 | $table_tag = 0; |
||
| 532 | $table_uploadimage = 0; |
||
| 533 | $table_uploadfile = 0; |
||
| 534 | $table_rate = 0; |
||
| 535 | foreach ($tables as $table) { |
||
| 536 | $fields = $this->getTableFields($table->getVar('table_mid'), $table->getVar('table_id')); |
||
| 537 | foreach (array_keys($fields) as $f) { |
||
| 538 | $fieldElement = (int)$fields[$f]->getVar('field_element'); |
||
| 539 | switch ($fieldElement) { |
||
| 540 | case 3: |
||
| 541 | $table_editors = 1; |
||
| 542 | break; |
||
| 543 | case 4: |
||
| 544 | $table_editors = 1; |
||
| 545 | break; |
||
| 546 | case 10: |
||
| 547 | case 11: |
||
| 548 | case 12: |
||
| 549 | case 13: |
||
| 550 | $table_uploadimage = 1; |
||
| 551 | break; |
||
| 552 | case 14: |
||
| 553 | $table_uploadfile = 1; |
||
| 554 | break; |
||
| 555 | case 'else': |
||
| 556 | default: |
||
| 557 | break; |
||
| 558 | } |
||
| 559 | } |
||
| 560 | if (1 == $table->getVar('table_permissions')) { |
||
| 561 | $table_permissions = 1; |
||
| 562 | } |
||
| 563 | if (1 == $table->getVar('table_admin')) { |
||
| 564 | $table_admin = 1; |
||
| 565 | } |
||
| 566 | if (1 == $table->getVar('table_user')) { |
||
| 567 | $table_user = 1; |
||
| 568 | } |
||
| 569 | if (1 == $table->getVar('table_tag')) { |
||
| 570 | $table_tag = 1; |
||
| 571 | } |
||
| 572 | if (1 == $table->getVar('table_rate')) { |
||
| 573 | $table_rate = 1; |
||
| 574 | } |
||
| 575 | } |
||
| 576 | if (1 === $table_editors) { |
||
| 577 | $ret .= $this->pc->getPhpCodeCommentLine('Editor Admin', ''); |
||
| 578 | $ret .= $this->xc->getXcXoopsLoad('xoopseditorhandler'); |
||
| 579 | $ret .= $this->xc->getXcEqualsOperator('$editorHandler', 'XoopsEditorHandler::getInstance()'); |
||
| 580 | $editor = [ |
||
| 581 | 'name' => "'editor_admin'", |
||
| 582 | 'title' => "'{$language}EDITOR_ADMIN'", |
||
| 583 | 'description' => "'{$language}EDITOR_ADMIN_DESC'", |
||
| 584 | 'formtype' => "'select'", |
||
| 585 | 'valuetype' => "'text'", |
||
| 586 | 'default' => "'dhtml'", |
||
| 587 | 'options' => 'array_flip($editorHandler->getList())', |
||
| 588 | ]; |
||
| 589 | $ret .= $this->uxc->getUserModVersionArray(2, $editor, 'config'); |
||
| 590 | $ret .= $this->pc->getPhpCodeCommentLine('Editor User', ''); |
||
| 591 | $ret .= $this->xc->getXcXoopsLoad('xoopseditorhandler'); |
||
| 592 | $ret .= $this->xc->getXcEqualsOperator('$editorHandler', 'XoopsEditorHandler::getInstance()'); |
||
| 593 | $editor = [ |
||
| 594 | 'name' => "'editor_user'", |
||
| 595 | 'title' => "'{$language}EDITOR_USER'", |
||
| 596 | 'description' => "'{$language}EDITOR_USER_DESC'", |
||
| 597 | 'formtype' => "'select'", |
||
| 598 | 'valuetype' => "'text'", |
||
| 599 | 'default' => "'dhtml'", |
||
| 600 | 'options' => 'array_flip($editorHandler->getList())', |
||
| 601 | ]; |
||
| 602 | $ret .= $this->uxc->getUserModVersionArray(2, $editor, 'config'); |
||
| 603 | $ret .= $this->pc->getPhpCodeCommentLine('Editor : max characters admin area'); |
||
| 604 | $maxsize_image = [ |
||
| 605 | 'name' => "'editor_maxchar'", |
||
| 606 | 'title' => "'{$language}EDITOR_MAXCHAR'", |
||
| 607 | 'description' => "'{$language}EDITOR_MAXCHAR_DESC'", |
||
| 608 | 'formtype' => "'textbox'", |
||
| 609 | 'valuetype' => "'int'", |
||
| 610 | 'default' => '50', |
||
| 611 | ]; |
||
| 612 | $ret .= $this->uxc->getUserModVersionArray(2, $maxsize_image, 'config'); |
||
| 613 | } |
||
| 614 | if (1 === $table_permissions) { |
||
| 615 | $ret .= $this->pc->getPhpCodeCommentLine('Get groups'); |
||
| 616 | $ret .= $this->xc->getXcXoopsHandler('member'); |
||
| 617 | $ret .= $this->xc->getXcEqualsOperator('$xoopsGroups ', '$memberHandler->getGroupList()'); |
||
| 618 | $ret .= $this->xc->getXcEqualsOperator('$groups', '[]'); |
||
| 619 | $group = $this->xc->getXcEqualsOperator('$groups[$group] ', '$key', null, "\t"); |
||
| 620 | $ret .= $this->pc->getPhpCodeForeach('xoopsGroups', false, 'key', 'group', $group); |
||
| 621 | $ret .= $this->pc->getPhpCodeCommentLine('General access groups'); |
||
| 622 | $groups = [ |
||
| 623 | 'name' => "'groups'", |
||
| 624 | 'title' => "'{$language}GROUPS'", |
||
| 625 | 'description' => "'{$language}GROUPS_DESC'", |
||
| 626 | 'formtype' => "'select_multi'", |
||
| 627 | 'valuetype' => "'array'", |
||
| 628 | 'default' => '$groups', |
||
| 629 | 'options' => '$groups', |
||
| 630 | ]; |
||
| 631 | $ret .= $this->uxc->getUserModVersionArray(2, $groups, 'config'); |
||
| 632 | $ret .= $this->pc->getPhpCodeCommentLine('Upload groups'); |
||
| 633 | $uplgroups = [ |
||
| 634 | 'name' => "'upload_groups'", |
||
| 635 | 'title' => "'{$language}UPLOAD_GROUPS'", |
||
| 636 | 'description' => "'{$language}UPLOAD_GROUPS_DESC'", |
||
| 637 | 'formtype' => "'select_multi'", |
||
| 638 | 'valuetype' => "'array'", |
||
| 639 | 'default' => '$groups', |
||
| 640 | 'options' => '$groups', |
||
| 641 | ]; |
||
| 642 | $ret .= $this->uxc->getUserModVersionArray(2, $uplgroups, 'config'); |
||
| 643 | |||
| 644 | $ret .= $this->pc->getPhpCodeCommentLine('Get Admin groups'); |
||
| 645 | $ret .= $this->xc->getXcCriteriaCompo('crGroups'); |
||
| 646 | $crit = $this->xc->getXcCriteria('', "'group_type'", "'Admin'", '', true); |
||
| 647 | $ret .= $this->xc->getXcCriteriaAdd('crGroups', $crit, '', "\n"); |
||
| 648 | $ret .= $this->xc->getXcXoopsHandler('member'); |
||
| 649 | $ret .= $this->xc->getXcEqualsOperator('$adminXoopsGroups ', '$memberHandler->getGroupList($crGroups)'); |
||
| 650 | $ret .= $this->xc->getXcEqualsOperator('$adminGroups', '[]'); |
||
| 651 | $adminGroup = $this->xc->getXcEqualsOperator('$adminGroups[$adminGroup] ', '$key', null, "\t"); |
||
| 652 | $ret .= $this->pc->getPhpCodeForeach('adminXoopsGroups', false, 'key', 'adminGroup', $adminGroup); |
||
| 653 | $adminGroups = [ |
||
| 654 | 'name' => "'admin_groups'", |
||
| 655 | 'title' => "'{$language}ADMIN_GROUPS'", |
||
| 656 | 'description' => "'{$language}ADMIN_GROUPS_DESC'", |
||
| 657 | 'formtype' => "'select_multi'", |
||
| 658 | 'valuetype' => "'array'", |
||
| 659 | 'default' => '$adminGroups', |
||
| 660 | 'options' => '$adminGroups', |
||
| 661 | ]; |
||
| 662 | $ret .= $this->uxc->getUserModVersionArray(2, $adminGroups, 'config'); |
||
| 663 | $ret .= $this->pc->getPhpCodeUnset('crGroups'); |
||
| 664 | } |
||
| 665 | |||
| 666 | if (1 === $table_rate) { |
||
| 667 | $ret .= $this->pc->getPhpCodeCommentLine('Get groups'); |
||
| 668 | $ret .= $this->xc->getXcXoopsHandler('member'); |
||
| 669 | $ret .= $this->xc->getXcEqualsOperator('$xoopsGroups ', '$memberHandler->getGroupList()'); |
||
| 670 | $ret .= $this->xc->getXcEqualsOperator('$ratingbar_groups', '[]'); |
||
| 671 | $group = $this->xc->getXcEqualsOperator('$ratingbar_groups[$group] ', '$key', null, "\t"); |
||
| 672 | $ret .= $this->pc->getPhpCodeForeach('xoopsGroups', false, 'key', 'group', $group); |
||
| 673 | $ret .= $this->pc->getPhpCodeCommentLine('Rating: Groups with rating permissions'); |
||
| 674 | $groups = [ |
||
| 675 | 'name' => "'ratingbar_groups'", |
||
| 676 | 'title' => "'{$language}RATINGBAR_GROUPS'", |
||
| 677 | 'description' => "'{$language}RATINGBAR_GROUPS_DESC'", |
||
| 678 | 'formtype' => "'select_multi'", |
||
| 679 | 'valuetype' => "'array'", |
||
| 680 | 'default' => '[1]', |
||
| 681 | 'options' => '$ratingbar_groups', |
||
| 682 | ]; |
||
| 683 | $ret .= $this->uxc->getUserModVersionArray(2, $groups, 'config'); |
||
| 684 | |||
| 685 | $ret .= $this->pc->getPhpCodeCommentLine('Rating : used ratingbar'); |
||
| 686 | $mimetypes_image = [ |
||
| 687 | 'name' => "'ratingbars'", |
||
| 688 | 'title' => "'{$language}RATINGBARS'", |
||
| 689 | 'description' => "'{$language}RATINGBARS_DESC'", |
||
| 690 | 'formtype' => "'select'", |
||
| 691 | 'valuetype' => "'int'", |
||
| 692 | 'default' => "0", |
||
| 693 | 'options' => "['{$language}RATING_NONE' => 0, '{$language}RATING_5STARS' => 1, '{$language}RATING_10STARS' => 2, '{$language}RATING_LIKES' => 3, '{$language}RATING_10NUM' => 4]", |
||
| 694 | ]; |
||
| 695 | $ret .= $this->uxc->getUserModVersionArray(2, $mimetypes_image, 'config'); |
||
| 696 | } |
||
| 697 | |||
| 698 | $keyword = implode(', ', $this->getKeywords()); |
||
| 699 | $ret .= $this->pc->getPhpCodeCommentLine('Keywords'); |
||
| 700 | $arrayKeyword = [ |
||
| 701 | 'name' => "'keywords'", |
||
| 702 | 'title' => "'{$language}KEYWORDS'", |
||
| 703 | 'description' => "'{$language}KEYWORDS_DESC'", |
||
| 704 | 'formtype' => "'textbox'", |
||
| 705 | 'valuetype' => "'text'", |
||
| 706 | 'default' => "'{$moduleDirname}, {$keyword}'", |
||
| 707 | ]; |
||
| 708 | $ret .= $this->uxc->getUserModVersionArray(2, $arrayKeyword, 'config'); |
||
| 709 | unset($this->keywords); |
||
| 710 | |||
| 711 | if (1 === $table_uploadimage || 1 === $table_uploadfile) { |
||
| 712 | $ret .= $this->getXoopsVersionSelectSizeMB($moduleDirname); |
||
| 713 | } |
||
| 714 | if (1 === $table_uploadimage) { |
||
| 715 | $ret .= $this->pc->getPhpCodeCommentLine('Uploads : maxsize of image'); |
||
| 716 | $maxsize_image = [ |
||
| 717 | 'name' => "'maxsize_image'", |
||
| 718 | 'title' => "'{$language}MAXSIZE_IMAGE'", |
||
| 719 | 'description' => "'{$language}MAXSIZE_IMAGE_DESC'", |
||
| 720 | 'formtype' => "'select'", |
||
| 721 | 'valuetype' => "'int'", |
||
| 722 | 'default' => '3145728', |
||
| 723 | 'options' => '$optionMaxsize', |
||
| 724 | ]; |
||
| 725 | $ret .= $this->uxc->getUserModVersionArray(2, $maxsize_image, 'config'); |
||
| 726 | $ret .= $this->pc->getPhpCodeCommentLine('Uploads : mimetypes of image'); |
||
| 727 | $mimetypes_image = [ |
||
| 728 | 'name' => "'mimetypes_image'", |
||
| 729 | 'title' => "'{$language}MIMETYPES_IMAGE'", |
||
| 730 | 'description' => "'{$language}MIMETYPES_IMAGE_DESC'", |
||
| 731 | 'formtype' => "'select_multi'", |
||
| 732 | 'valuetype' => "'array'", |
||
| 733 | 'default' => "['image/gif', 'image/jpeg', 'image/png']", |
||
| 734 | 'options' => "['bmp' => 'image/bmp','gif' => 'image/gif','pjpeg' => 'image/pjpeg', 'jpeg' => 'image/jpeg','jpg' => 'image/jpg','jpe' => 'image/jpe', 'png' => 'image/png']", |
||
| 735 | ]; |
||
| 736 | $ret .= $this->uxc->getUserModVersionArray(2, $mimetypes_image, 'config'); |
||
| 737 | $maxwidth_image = [ |
||
| 738 | 'name' => "'maxwidth_image'", |
||
| 739 | 'title' => "'{$language}MAXWIDTH_IMAGE'", |
||
| 740 | 'description' => "'{$language}MAXWIDTH_IMAGE_DESC'", |
||
| 741 | 'formtype' => "'textbox'", |
||
| 742 | 'valuetype' => "'int'", |
||
| 743 | 'default' => '8000', |
||
| 744 | ]; |
||
| 745 | $ret .= $this->uxc->getUserModVersionArray(2, $maxwidth_image, 'config'); |
||
| 746 | $maxheight_image = [ |
||
| 747 | 'name' => "'maxheight_image'", |
||
| 748 | 'title' => "'{$language}MAXHEIGHT_IMAGE'", |
||
| 749 | 'description' => "'{$language}MAXHEIGHT_IMAGE_DESC'", |
||
| 750 | 'formtype' => "'textbox'", |
||
| 751 | 'valuetype' => "'int'", |
||
| 752 | 'default' => '8000', |
||
| 753 | ]; |
||
| 754 | $ret .= $this->uxc->getUserModVersionArray(2, $maxheight_image, 'config'); |
||
| 755 | } |
||
| 756 | if (1 === $table_uploadfile) { |
||
| 757 | $ret .= $this->pc->getPhpCodeCommentLine('Uploads : maxsize of file'); |
||
| 758 | $maxsize_file = [ |
||
| 759 | 'name' => "'maxsize_file'", |
||
| 760 | 'title' => "'{$language}MAXSIZE_FILE'", |
||
| 761 | 'description' => "'{$language}MAXSIZE_FILE_DESC'", |
||
| 762 | 'formtype' => "'select'", |
||
| 763 | 'valuetype' => "'int'", |
||
| 764 | 'default' => '3145728', |
||
| 765 | 'options' => '$optionMaxsize', |
||
| 766 | ]; |
||
| 767 | $ret .= $this->uxc->getUserModVersionArray(2, $maxsize_file, 'config'); |
||
| 768 | $ret .= $this->pc->getPhpCodeCommentLine('Uploads : mimetypes of file'); |
||
| 769 | $mimetypes_file = [ |
||
| 770 | 'name' => "'mimetypes_file'", |
||
| 771 | 'title' => "'{$language}MIMETYPES_FILE'", |
||
| 772 | 'description' => "'{$language}MIMETYPES_FILE_DESC'", |
||
| 773 | 'formtype' => "'select_multi'", |
||
| 774 | 'valuetype' => "'array'", |
||
| 775 | 'default' => "['application/pdf', 'application/zip', 'text/comma-separated-values', 'text/plain', 'image/gif', 'image/jpeg', 'image/png']", |
||
| 776 | 'options' => "['gif' => 'image/gif','pjpeg' => 'image/pjpeg', 'jpeg' => 'image/jpeg','jpg' => 'image/jpg','jpe' => 'image/jpe', 'png' => 'image/png', 'pdf' => 'application/pdf','zip' => 'application/zip','csv' => 'text/comma-separated-values', 'txt' => 'text/plain', 'xml' => 'application/xml', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document']", |
||
| 777 | ]; |
||
| 778 | $ret .= $this->uxc->getUserModVersionArray(2, $mimetypes_file, 'config'); |
||
| 779 | } |
||
| 780 | if (1 === $table_admin) { |
||
| 781 | $ret .= $this->pc->getPhpCodeCommentLine('Admin pager'); |
||
| 782 | $adminPager = [ |
||
| 783 | 'name' => "'adminpager'", |
||
| 784 | 'title' => "'{$language}ADMIN_PAGER'", |
||
| 785 | 'description' => "'{$language}ADMIN_PAGER_DESC'", |
||
| 786 | 'formtype' => "'textbox'", |
||
| 787 | 'valuetype' => "'int'", |
||
| 788 | 'default' => '10', |
||
| 789 | ]; |
||
| 790 | $ret .= $this->uxc->getUserModVersionArray(2, $adminPager, 'config'); |
||
| 791 | } |
||
| 792 | if (1 === $table_user) { |
||
| 793 | $ret .= $this->pc->getPhpCodeCommentLine('User pager'); |
||
| 794 | $userPager = [ |
||
| 795 | 'name' => "'userpager'", |
||
| 796 | 'title' => "'{$language}USER_PAGER'", |
||
| 797 | 'description' => "'{$language}USER_PAGER_DESC'", |
||
| 798 | 'formtype' => "'textbox'", |
||
| 799 | 'valuetype' => "'int'", |
||
| 800 | 'default' => '10', |
||
| 801 | ]; |
||
| 802 | $ret .= $this->uxc->getUserModVersionArray(2, $userPager, 'config'); |
||
| 803 | } |
||
| 804 | if (1 === $table_tag) { |
||
| 805 | $ret .= $this->pc->getPhpCodeCommentLine('Use tag'); |
||
| 806 | $useTag = [ |
||
| 807 | 'name' => "'usetag'", |
||
| 808 | 'title' => "'{$language}USE_TAG'", |
||
| 809 | 'description' => "'{$language}USE_TAG_DESC'", |
||
| 810 | 'formtype' => "'yesno'", |
||
| 811 | 'valuetype' => "'int'", |
||
| 812 | 'default' => '0', |
||
| 813 | ]; |
||
| 814 | $ret .= $this->uxc->getUserModVersionArray(2, $useTag, 'config'); |
||
| 815 | } |
||
| 816 | $ret .= $this->pc->getPhpCodeCommentLine('Number column'); |
||
| 817 | $numbCol = [ |
||
| 818 | 'name' => "'numb_col'", |
||
| 819 | 'title' => "'{$language}NUMB_COL'", |
||
| 820 | 'description' => "'{$language}NUMB_COL_DESC'", |
||
| 821 | 'formtype' => "'select'", |
||
| 822 | 'valuetype' => "'int'", |
||
| 823 | 'default' => '1', |
||
| 824 | 'options' => "[1 => '1', 2 => '2', 3 => '3', 4 => '4']", |
||
| 825 | ]; |
||
| 826 | $ret .= $this->uxc->getUserModVersionArray(2, $numbCol, 'config'); |
||
| 827 | |||
| 828 | $ret .= $this->pc->getPhpCodeCommentLine('Divide by'); |
||
| 829 | $divideby = [ |
||
| 830 | 'name' => "'divideby'", |
||
| 831 | 'title' => "'{$language}DIVIDEBY'", |
||
| 832 | 'description' => "'{$language}DIVIDEBY_DESC'", |
||
| 833 | 'formtype' => "'select'", |
||
| 834 | 'valuetype' => "'int'", |
||
| 835 | 'default' => '1', |
||
| 836 | 'options' => "[1 => '1', 2 => '2', 3 => '3', 4 => '4']", |
||
| 837 | ]; |
||
| 838 | $ret .= $this->uxc->getUserModVersionArray(2, $divideby, 'config'); |
||
| 839 | |||
| 840 | $ret .= $this->pc->getPhpCodeCommentLine('Table type'); |
||
| 841 | $tableType = [ |
||
| 842 | 'name' => "'table_type'", |
||
| 843 | 'title' => "'{$language}TABLE_TYPE'", |
||
| 844 | 'description' => "'{$language}DIVIDEBY_DESC'", |
||
| 845 | 'formtype' => "'select'", |
||
| 846 | 'valuetype' => "'int'", |
||
| 847 | 'default' => "'bordered'", |
||
| 848 | 'options' => "['bordered' => 'bordered', 'striped' => 'striped', 'hover' => 'hover', 'condensed' => 'condensed']", |
||
| 849 | ]; |
||
| 850 | $ret .= $this->uxc->getUserModVersionArray(2, $tableType, 'config'); |
||
| 851 | |||
| 852 | $ret .= $this->pc->getPhpCodeCommentLine('Panel by'); |
||
| 853 | $panelType = [ |
||
| 854 | 'name' => "'panel_type'", |
||
| 855 | 'title' => "'{$language}PANEL_TYPE'", |
||
| 856 | 'description' => "'{$language}PANEL_TYPE_DESC'", |
||
| 857 | 'formtype' => "'select'", |
||
| 858 | 'valuetype' => "'text'", |
||
| 859 | 'default' => "'default'", |
||
| 860 | 'options' => "['default' => 'default', 'primary' => 'primary', 'success' => 'success', 'info' => 'info', 'warning' => 'warning', 'danger' => 'danger']", |
||
| 861 | ]; |
||
| 862 | $ret .= $this->uxc->getUserModVersionArray(2, $panelType, 'config'); |
||
| 863 | |||
| 864 | $ret .= $this->pc->getPhpCodeCommentLine('Advertise'); |
||
| 865 | $advertise = [ |
||
| 866 | 'name' => "'advertise'", |
||
| 867 | 'title' => "'{$language}ADVERTISE'", |
||
| 868 | 'description' => "'{$language}ADVERTISE_DESC'", |
||
| 869 | 'formtype' => "'textarea'", |
||
| 870 | 'valuetype' => "'text'", |
||
| 871 | 'default' => "''", |
||
| 872 | ]; |
||
| 873 | $ret .= $this->uxc->getUserModVersionArray(2, $advertise, 'config'); |
||
| 874 | |||
| 875 | $ret .= $this->pc->getPhpCodeCommentLine('Bookmarks'); |
||
| 876 | $bookmarks = [ |
||
| 877 | 'name' => "'bookmarks'", |
||
| 878 | 'title' => "'{$language}BOOKMARKS'", |
||
| 879 | 'description' => "'{$language}BOOKMARKS_DESC'", |
||
| 880 | 'formtype' => "'yesno'", |
||
| 881 | 'valuetype' => "'int'", |
||
| 882 | 'default' => '0', |
||
| 883 | ]; |
||
| 884 | $ret .= $this->uxc->getUserModVersionArray(2, $bookmarks, 'config'); |
||
| 885 | |||
| 886 | /* |
||
| 887 | * removed, as there are no system templates in xoops core for fb or disqus comments |
||
| 888 | * modulebuilder currently is also not creatings tpl files for this |
||
| 889 | $ret .= $this->pc->getPhpCodeCommentLine('Facebook Comments'); |
||
| 890 | $facebookComments = [ |
||
| 891 | 'name' => "'facebook_comments'", |
||
| 892 | 'title' => "'{$language}FACEBOOK_COMMENTS'", |
||
| 893 | 'description' => "'{$language}FACEBOOK_COMMENTS_DESC'", |
||
| 894 | 'formtype' => "'yesno'", |
||
| 895 | 'valuetype' => "'int'", |
||
| 896 | 'default' => '0', |
||
| 897 | ]; |
||
| 898 | $ret .= $this->uxc->getUserModVersion(3, $facebookComments, 'config', '$c'); |
||
| 899 | $ret .= $this->getSimpleString('++$c;'); |
||
| 900 | $ret .= $this->pc->getPhpCodeCommentLine('Disqus Comments'); |
||
| 901 | $disqusComments = [ |
||
| 902 | 'name' => "'disqus_comments'", |
||
| 903 | 'title' => "'{$language}DISQUS_COMMENTS'", |
||
| 904 | 'description' => "'{$language}DISQUS_COMMENTS_DESC'", |
||
| 905 | 'formtype' => "'yesno'", |
||
| 906 | 'valuetype' => "'int'", |
||
| 907 | 'default' => '0', |
||
| 908 | ]; |
||
| 909 | $ret .= $this->uxc->getUserModVersion(3, $disqusComments, 'config', '$c'); |
||
| 910 | $ret .= $this->getSimpleString('++$c;'); |
||
| 911 | */ |
||
| 912 | |||
| 913 | $ret .= $this->pc->getPhpCodeCommentLine('Make Sample button visible?'); |
||
| 914 | $maintainedby = [ |
||
| 915 | 'name' => "'displaySampleButton'", |
||
| 916 | 'title' => "'CO_' . \$moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON'", |
||
| 917 | 'description' => "'CO_' . \$moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC'", |
||
| 918 | 'formtype' => "'yesno'", |
||
| 919 | 'valuetype' => "'int'", |
||
| 920 | 'default' => '1', |
||
| 921 | ]; |
||
| 922 | $ret .= $this->uxc->getUserModVersionArray(2, $maintainedby, 'config'); |
||
| 923 | |||
| 924 | $ret .= $this->pc->getPhpCodeCommentLine('Maintained by'); |
||
| 925 | $maintainedby = [ |
||
| 926 | 'name' => "'maintainedby'", |
||
| 927 | 'title' => "'{$language}MAINTAINEDBY'", |
||
| 928 | 'description' => "'{$language}MAINTAINEDBY_DESC'", |
||
| 929 | 'formtype' => "'textbox'", |
||
| 930 | 'valuetype' => "'text'", |
||
| 931 | 'default' => "'{$module->getVar('mod_support_url')}'", |
||
| 932 | ]; |
||
| 933 | $ret .= $this->uxc->getUserModVersionArray(2, $maintainedby, 'config'); |
||
| 934 | |||
| 935 | return $ret; |
||
| 936 | } |
||
| 1203 |