<?php
/*
	DevSaver Web Framework
	Copyright (c) 2002-2018 DevSaver. 
	All rights reserved.
		web:  www.devsaver.com
		mail: support@devsaver.com
*/

if (!defined("STPBase")) {
	die("This file can't be accessed directly!");
}

class CCommentsWidgetComments extends CWidget {

	/**
	* description
	*
	* @var type
	*
	* @access type
	*/
	var $meta = array(
		"type"	=> "1",
		"name"	=> "Page Comments",
	);

	/**
	* description
	*
	* @param
	*
	* @return
	*
	* @access
	*/
	function Render($widget) {
		global $_SESS, $_TSM;

		$this->module->__init();

		if (!$this->module->connect["type"]) {
			return "";
		}
		
		
		$comments = $this->module->plugins["comments"]->Comments(
			$this->module->connect["link"],
			$this->module->connect["type"]
		);

		return $this->tpl->BlockReplace(
			"Widget" , 
			array(
				"content"	=> $comments,
			),
			$widget["settings"],
			$widget["mod_settings"],
			$widget

		);
	}
			

}


?>