| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/business/pms/modules/views/modules/comment/ |
Upload File : |
<?php
/**
* @file
* Contains the comment RSS row style plugin.
*/
/**
* Plugin which formats the comments as RSS items.
*/
class views_plugin_row_comment_rss extends views_plugin_row {
function render($row) {
global $base_url;
// Load the specified comment:
$comment = _comment_load($row->cid);
$item = new stdClass();
$item->title = $comment->subject;
$item->link = url('node/' . $comment->nid, array('absolute' => TRUE, 'fragment' => 'comment-' . $comment->cid));
$item->description = check_markup($comment->comment, $comment->format, FALSE);
$item->elements = array(
array('key' => 'pubDate', 'value' => gmdate('r', $comment->timestamp)),
array('key' => 'dc:creator', 'value' => $comment->name),
array(
'key' => 'guid',
'value' => 'comment ' . $row->cid . ' at ' . $base_url,
'attributes' => array('isPermaLink' => 'false'),
'namespace' => array('xmlns:dc' => 'http://purl.org/dc/elements/1.1/'),
),
);
foreach ($item->elements as $element) {
if (isset($element['namespace'])) {
$this->view->style_plugin->namespaces = array_merge($this->view->style_plugin->namespaces, $element['namespace']);
}
}
return theme($this->theme_functions(), $this->view, $this->options, $item);
}
}