From d26365cc0c2491e85a4a2d9f0dec0b6f480b5c89 Mon Sep 17 00:00:00 2001 From: kaoru nishizoe Date: Mon, 14 Apr 2014 20:18:57 +0900 Subject: [PATCH] =?UTF-8?q?RSS=E3=83=AA=E3=83=BC=E3=83=80=E3=83=BC?= =?UTF-8?q?=E3=82=AC=E3=82=B8=E3=82=A7=E3=83=83=E3=83=88=E3=81=AB=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E4=BB=B6=E6=95=B0=E8=A8=AD=E5=AE=9A=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/default/actions/components.class.php | 2 +- lib/config/config/gadget.yml | 8 ++++++++ lib/config/config/login_gadget.yml | 8 ++++++++ lib/config/config/side_banner_gadget.yml | 8 ++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) 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: