mirror of
https://github.com/e107inc/e107.git
synced 2025-08-11 17:14:42 +02:00
new module creation
This commit is contained in:
21
e107_plugins/poll/search/search_comments.php
Normal file
21
e107_plugins/poll/search/search_comments.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$comments_title = 'Poll';
|
||||
$comments_type_id = 4;
|
||||
$comments_return['poll'] = "po.poll_id, po.poll_title";
|
||||
$comments_table['poll'] = "LEFT JOIN #polls AS po ON c.comment_type=4 AND po.poll_id = c.comment_item_id";
|
||||
function com_search_4($row) {
|
||||
global $con;
|
||||
$nick = preg_replace("/[0-9]+\./", "", $row['comment_author']);
|
||||
$datestamp = $con -> convert_date($row['comment_datestamp'], "long");
|
||||
$res['link'] = e_PLUGIN."poll/oldpolls.php?".$row['poll_id'];
|
||||
$res['pre_title'] = 'Posted in reply to poll: ';
|
||||
$res['title'] = $row['poll_title'];
|
||||
$res['summary'] = $row['comment_comment'];
|
||||
$res['detail'] = LAN_SEARCH_7.$nick.LAN_SEARCH_8.$datestamp;
|
||||
return $res;
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user