質問 > フロント機能 > 全てのレビューを表示させる方法について |
フロント機能
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
sakurai07 |
投稿日時: 2011/1/31 19:54
対応状況: −−−
|
長老 登録日: 2008/2/29 居住地: 投稿: 179 |
Re: トップページに新規レビューを表示させたい ご返信ありがとうございます。
設定してみましたが、新着情報が表示されてしまってしまいました。 管理画面のソースは下記になります。 <div id="newsarea"> <h2><img src="<!--{$smarty.const.URL_DIR}-->img01/news.jpg" width="700" height="43" alt="新着情報" /></h2> <p>☆★☆ 新着情報は<a href="<!--{$smarty.const.URL_DIR}-->rss/index.php" target="_blank">RSS</a>で配信しています。★☆★</p> <!--{section name=data loop=$arrNews}--><dl> <dt><!--{$arrNews[data].review_date_disp|date_format:"%Y年%m月%d日"}--></dt> <dd> <!--{if $arrNews[data].news_url}--> <!--{if $arrNews[data].link_method eq "2"}--> target="_blank" <!--{/if}-->> <!--{/if}--> <!--{$arrNews[data].title|escape|nl2br}--> <!--{$arrNews[data].title |escape|nl2br}--> href="<!--{$arrNews[data].news_url}-->" <!--{if $arrNews[data].link_method eq "2"}--> target="_blank" <!--{/if}-->> <!--{/if}--> <!--{$arrNews[data].title|escape|nl2br}--> <!--{if $arrNews[data].news_url}--> </a> <!--{/if}--><br /> <!--{$arrNews[data].comment|escape|nl2br}--> </dd> </dl> <!--{/section}--> </div> ■LC_Page_FrontParts_Bloc_view.php /httpdocs/data/class/pages/frontparts/bloc <?php /* * This file is part of EC-CUBE * * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. * * http://www.lockon.co.jp/ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // {{{ requires require_once(CLASS_PATH . "pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php"); /** * 新着情報 のページクラス. * * @package Page * @author LOCKON CO.,LTD. * @version $Id:LC_Page_FrontParts_Bloc_News.php 15532 2007-08-31 14:39:46Z nanasess $ */ class LC_Page_FrontParts_Bloc_view extends LC_Page_FrontParts_Bloc { // }}} // {{{ functions /** * Page を初期化する. * * @return void */ function init() { parent::init(); $bloc_file = 'view.tpl'; $this->setTplMainpage($bloc_file); } /** * Page のプロセス. * * @return void */ function process() { if (defined("MOBILE_SITE") && MOBILE_SITE) { $objSubView = new SC_SiteView(); } else { $objSubView = new SC_MobileView(); } //新着レビュー取得 $this->arrNews = $this->lfGetReview(); $objSubView->assignobj($this); $objSubView->display($this->tpl_mainpage); } /** * モバイルページを初期化する. * * @return void */ function mobileInit() { $this->tpl_mainpage = MOBILE_TEMPLATE_DIR . "frontparts/" . BLOC_DIR . 'news.tpl'; } /** * Page のプロセス(モバイル). * * @return void */ function mobileProcess() { $this->process(); } /** * デストラクタ. * * @return void */ function destroy() { parent::destroy(); } function lfGetReview(){ $conn = new SC_DBConn(); $sql = "SELECT *, cast(substring(create_date,1,10) as date) as review_date_disp FROM dtb_review WHERE del_flg = '0' AND status = '1' ORDER BY create_date DESC"; $list_data = $conn->getAll($sql); return $list_data; } } ?> ■LC_Page_FrontParts_Bloc_view_Ex.php /httpdocs/data/class_extends/page_extends/frontparts/bloc <?php /* * This file is part of EC-CUBE * * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. * * http://www.lockon.co.jp/ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // {{{ requires require_once(CLASS_PATH . "pages/frontparts/bloc/LC_Page_FrontParts_Bloc_view.php"); /** * 新着情報 のページクラス(拡張). * * LC_Page_FrontParts_Bloc_News をカスタマイズする場合はこのクラスを編集する. * * @package Page * @author LOCKON CO.,LTD. * @version $Id: LC_Page_FrontParts_Bloc_News_Ex.php 16741 2007-11-08 00:43:24Z adachi $ */ class LC_Page_FrontParts_Bloc_view_Ex extends LC_Page_FrontParts_Bloc_view { // }}} // {{{ functions /** * Page を初期化する. * * @return void */ function init() { parent::init(); } /** * Page のプロセス. * * @return void */ function process() { parent::process(); } /** * デストラクタ. * * @return void */ function destroy() { parent::destroy(); } } ?> ■view.php /httpdocs/frontparts/bloc <?php /* * This file is part of EC-CUBE * * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. * * http://www.lockon.co.jp/ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // {{{ requires require_once(CLASS_EX_PATH . "page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_view_Ex.php"); // }}} // {{{ generate page $objPage = new LC_Page_FrontParts_BLoc_view_Ex(); register_shutdown_function(array($objPage, "destroy")); $objPage->init(); $objPage->process(); ?> 間違った記述ありますでしょうか? ご指導宜しくお願いたします。 |
フラット表示 | 前のトピック | 次のトピック |