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


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

		);
	}
			

}


?>