1
0
mirror of https://github.com/e107inc/e107.git synced 2025-02-13 11:04:38 +01:00

55 lines
1.2 KiB
PHP
Raw Normal View History

2009-10-08 10:53:02 +00:00
<?php
2006-12-02 04:36:16 +00:00
/*
2009-10-08 10:53:02 +00:00
* e107 website system
*
2009-11-18 01:06:08 +00:00
* Copyright (C) 2008-2009 e107 Inc (e107.org)
2009-10-08 10:53:02 +00:00
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Comment menu
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/comment_menu/comment_menu.php,v $
2010-02-10 18:18:01 +00:00
* $Revision$
* $Date$
* $Author$
2006-12-02 04:36:16 +00:00
*/
2009-10-08 10:53:02 +00:00
if (!defined('e107_INIT'))
{
exit;
}
require_once (e_PLUGIN."comment_menu/comment_menu_shortcodes.php");
2006-12-02 04:36:16 +00:00
2009-10-08 10:53:02 +00:00
$cobj = e107::getObject('comment');
//require_once (e_HANDLER."comment_class.php");
//$cobj = new comment;
2006-12-02 04:36:16 +00:00
2009-10-08 10:53:02 +00:00
if (file_exists(THEME."comment_menu_template.php"))
{
require_once (THEME."comment_menu_template.php");
}
else
{
require_once (e_PLUGIN."comment_menu/comment_menu_template.php");
2006-12-02 04:36:16 +00:00
}
$data = $cobj->getCommentData(intval($menu_pref['comment_display']));
$text = '';
// no posts yet ..
2009-10-08 10:53:02 +00:00
if (empty($data) || !is_array($data))
{
2006-12-02 04:36:16 +00:00
$text = CM_L1;
}
2009-10-08 10:53:02 +00:00
foreach ($data as $row)
{
e107::setRegistry('plugin/comment_menu/current', $row);
2006-12-02 04:36:16 +00:00
$text .= $tp->parseTemplate($COMMENT_MENU_TEMPLATE, true, $comment_menu_shortcodes);
}
2009-10-08 10:53:02 +00:00
e107::setRegistry('plugin/comment_menu/current', null);
2006-12-02 04:36:16 +00:00
2009-10-08 14:53:37 +00:00
$title = e107::getConfig('menu')->get('comment_caption');
e107::getRender()->tablerender(defset($title, $title), $text, 'comment_menu');
2006-12-02 04:36:16 +00:00
?>