public function renderWidget($ps_widget_id, &$pa_settings)
 {
     parent::renderWidget($ps_widget_id, $pa_settings);
     global $g_ui_locale_id;
     if ($pa_settings["display_limit"] && intval($pa_settings["display_limit"]) > 0 && intval($pa_settings["display_limit"]) < 1000) {
         $vn_limit = intval($pa_settings["display_limit"]);
     } else {
         $vn_limit = 10;
     }
     $this->opo_view->setVar('limit', $vn_limit);
     $vn_show_type = intval($pa_settings["show_moderated_type"]);
     $vs_comment_type = "";
     switch ($vn_show_type) {
         case 1:
             $vs_mode = "moderated";
             $vs_comment_type = _t("moderated");
             break;
             # ---------------------------------------
         # ---------------------------------------
         case 0:
             $vs_mode = "unmoderated";
             $vs_comment_type = _t("unmoderated");
             break;
             # ---------------------------------------
         # ---------------------------------------
         default:
             $vs_mode = "";
             $vs_comment_type = "";
             break;
             # ---------------------------------------
     }
     $this->opo_view->setVar('comment_type', $vs_comment_type);
     $t_comments = new ca_item_comments();
     $va_comments = $t_comments->getComments($vs_mode, $vn_limit);
     $this->opo_view->setVar('comment_list', $va_comments);
     $this->opo_view->setVar('request', $this->getRequest());
     $this->opo_view->setVar('settings', $pa_settings);
     return $this->opo_view->render('main_html.php');
 }
示例#2
0
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
 *
 * This source code is free and modifiable under the terms of 
 * GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See
 * the "license.txt" file for details, or visit the CollectiveAccess web site at
 * http://www.CollectiveAccess.org
 *
 * @package CollectiveAccess
 * @subpackage Core
 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License version 3
 *
 * ----------------------------------------------------------------------
 */
require_once __CA_MODELS_DIR__ . "/ca_item_comments.php";
$t_item_comments = new ca_item_comments();
$va_comments = $t_item_comments->getComments("moderated", 2);
$va_access_values = $this->getVar("access_values");
?>
	<div class="row">
		<div class="col-sm-6 border-right news">
			<?php 
print caGetThemeGraphic($this->request, 'hp_news.jpg');
?>
			<H1>News</H1>
			<H2>News Heading</H2>
			<H3>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc faucibus nunc nisi, eu sollicitudin nibh pellentesque non.</H3>
		</div><!--end col-sm-6-->
		<div class="col-sm-6">
<?php 
print $this->render("Front/featured_set_slideshow_html.php");
?>