diff --git a/apps/pc_frontend/modules/default/actions/components.class.php b/apps/pc_frontend/modules/default/actions/components.class.php index aedf735f5..32a4e72d4 100644 --- a/apps/pc_frontend/modules/default/actions/components.class.php +++ b/apps/pc_frontend/modules/default/actions/components.class.php @@ -119,7 +119,7 @@ public function executeRssBox() $this->result = @$fetcher->fetch($this->gadget->getConfig('url'), true); if ($this->result) { - $this->result[1] = array_slice($this->result[1], 0, 5); + $this->result[1] = array_slice($this->result[1], 0, $this->gadget->getConfig('col')); } } catch (Exception $e) diff --git a/lib/config/config/gadget.yml b/lib/config/config/gadget.yml index 1f3c7a236..d87deb25f 100644 --- a/lib/config/config/gadget.yml +++ b/lib/config/config/gadget.yml @@ -135,6 +135,14 @@ rssBox: FormType: "input" ValueType: "text" IsRequired: false + col: + Name: "col" + Caption: "表示件数" + FormType: "select" + ValueType: "int" + IsRequired: true + Default: 3 + Choices: {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10} linkListBox: caption: diff --git a/lib/config/config/login_gadget.yml b/lib/config/config/login_gadget.yml index 9a5c07144..d688070b3 100644 --- a/lib/config/config/login_gadget.yml +++ b/lib/config/config/login_gadget.yml @@ -47,6 +47,14 @@ rssBox: FormType: "input" ValueType: "text" IsRequired: false + col: + Name: "col" + Caption: "表示件数" + FormType: "select" + ValueType: "int" + IsRequired: true + Default: 3 + Choices: {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10} linkListBox: caption: diff --git a/lib/config/config/side_banner_gadget.yml b/lib/config/config/side_banner_gadget.yml index 69ab4657e..600cb2737 100644 --- a/lib/config/config/side_banner_gadget.yml +++ b/lib/config/config/side_banner_gadget.yml @@ -48,6 +48,14 @@ rssBox: FormType: "input" ValueType: "text" IsRequired: false + col: + Name: "col" + Caption: "表示件数" + FormType: "select" + ValueType: "int" + IsRequired: true + Default: 3 + Choices: {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10} linkListBox: caption: