1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00
php-e107/e107_handlers/search/comments_page.php

39 lines
1.1 KiB
PHP
Raw Normal View History

2006-12-02 04:36:16 +00:00
<?php
/*
2009-11-12 15:11:17 +00:00
* e107 website system
*
2009-11-18 01:06:08 +00:00
* Copyright (C) 2008-2009 e107 Inc (e107.org)
2009-11-12 15:11:17 +00:00
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/search/comments_page.php,v $
2010-02-10 18:18:01 +00:00
* $Revision$
* $Date$
* $Author$
2009-11-12 15:11:17 +00:00
*/
2006-12-02 04:36:16 +00:00
if (!defined('e107_INIT')) { exit; }
$comments_title = LAN_418;
$comments_type_id = 'page';
$comments_return['page'] = "cp.page_id, cp.page_title";
$comments_table['page'] = "LEFT JOIN #page AS cp ON c.comment_type='page' AND cp.page_id = c.comment_item_id";
/**
* @param $row
* @return array
*/
function com_search_page($row) {
2006-12-02 04:36:16 +00:00
global $con;
$datestamp = $con -> convert_date($row['comment_datestamp'], "long");
$res['link'] = "page.php?".$row['page_id'];
$res['pre_title'] = LAN_SEARCH_76.": ";
$res['title'] = $row['page_title'];
$res['summary'] = $row['comment_comment'];
preg_match("/([0-9]+)\.(.*)/", $row['comment_author'], $user);
$res['detail'] = LAN_SEARCH_7."<a href='user.php?id.".$user[1]."'>".$user[2]."</a>".LAN_SEARCH_8.$datestamp;
return $res;
}