mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 03:50:22 +02:00
build
git-tools
phpBB
adm
assets
bin
cache
config
develop
docs
download
ext
files
images
includes
install
language
phpbb
auth
avatar
cache
config
console
controller
cron
db
di
event
extension
feed
attachments_base.php
base.php
factory.php
forum.php
forums.php
helper.php
news.php
overall.php
post_base.php
topic.php
topic_base.php
topics.php
topics_active.php
groupposition
hook
lock
log
message
mimetype
notification
passwords
php
plupload
profilefields
request
search
template
tree
class_loader.php
content_visibility.php
datetime.php
error_collector.php
filesystem.php
finder.php
json_response.php
pagination.php
path_helper.php
permissions.php
recursive_dot_prefix_filter_iterator.php
session.php
symfony_request.php
user.php
user_loader.php
version_helper.php
store
styles
.htaccess
app.php
common.php
composer.json
composer.lock
cron.php
faq.php
feed.php
index.php
mcp.php
memberlist.php
posting.php
report.php
search.php
ucp.php
viewforum.php
viewonline.php
viewtopic.php
web.config
tests
travis
.gitignore
.travis.yml
README.md
composer.phar
phpunit.xml.dist
71 lines
2.3 KiB
PHP
71 lines
2.3 KiB
PHP
<?php
|
|
/**
|
|
*
|
|
* This file is part of the phpBB Forum Software package.
|
|
*
|
|
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
|
* @license GNU General Public License, version 2 (GPL-2.0)
|
|
*
|
|
* For full copyright and license information, please see
|
|
* the docs/CREDITS.txt file.
|
|
*
|
|
*/
|
|
|
|
namespace phpbb\feed;
|
|
|
|
/**
|
|
* Abstract class for topic based feeds
|
|
*/
|
|
abstract class topic_base extends \phpbb\feed\attachments_base
|
|
{
|
|
var $num_items = 'feed_limit_topic';
|
|
|
|
function set_keys()
|
|
{
|
|
$this->set('title', 'topic_title');
|
|
$this->set('title2', 'forum_name');
|
|
|
|
$this->set('author_id', 'topic_poster');
|
|
$this->set('creator', 'topic_first_poster_name');
|
|
$this->set('published', 'post_time');
|
|
$this->set('updated', 'post_edit_time');
|
|
$this->set('text', 'post_text');
|
|
|
|
$this->set('bitfield', 'bbcode_bitfield');
|
|
$this->set('bbcode_uid','bbcode_uid');
|
|
|
|
$this->set('enable_bbcode', 'enable_bbcode');
|
|
$this->set('enable_smilies', 'enable_smilies');
|
|
$this->set('enable_magic_url', 'enable_magic_url');
|
|
}
|
|
|
|
function adjust_item(&$item_row, &$row)
|
|
{
|
|
$item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, 't=' . $row['topic_id'] . '&p=' . $row['post_id'] . '#p' . $row['post_id']);
|
|
|
|
if ($this->config['feed_item_statistics'])
|
|
{
|
|
$item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
|
|
. ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
|
|
. ' ' . $this->separator_stats . ' ' . $this->user->lang['REPLIES'] . ' ' . ($this->content_visibility->get_count('topic_posts', $row, $row['forum_id']) - 1)
|
|
. ' ' . $this->separator_stats . ' ' . $this->user->lang['VIEWS'] . ' ' . $row['topic_views'];
|
|
|
|
if ($this->is_moderator_approve_forum($row['forum_id']))
|
|
{
|
|
if ((int) $row['topic_visibility'] === ITEM_DELETED)
|
|
{
|
|
$item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_DELETED'];
|
|
}
|
|
else if ((int) $row['topic_visibility'] === ITEM_UNAPPROVED)
|
|
{
|
|
$item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_UNAPPROVED'];
|
|
}
|
|
else if ($row['topic_posts_unapproved'])
|
|
{
|
|
$item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['POSTS_UNAPPROVED'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|