本文整理汇总了PHP中EB::feeds方法的典型用法代码示例。如果您正苦于以下问题:PHP EB::feeds方法的具体用法?PHP EB::feeds怎么用?PHP EB::feeds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EB
的用法示例。
在下文中一共展示了EB::feeds方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Default display method for featured listings
*
* @since 4.0
* @access public
* @param string
* @return
*/
public function display($tmpl = null)
{
// Set the meta tags for this page
EB::setMeta(META_ID_FEATURED, META_TYPE_VIEW);
// Add the RSS headers on the page
EB::feeds()->addHeaders('index.php?option=com_easyblog&view=featured');
// Add breadcrumbs on the site menu.
$this->setPathway('COM_EASYBLOG_FEATURED_BREADCRUMB');
// Get the model
$model = EB::model('Featured');
// Get a list of featured posts
$posts = $model->getPosts();
// Get the pagination
$pagination = $model->getPagination();
// Format the posts
$posts = EB::formatter('list', $posts);
// Set the page title
$title = EB::getPageTitle(JText::_('COM_EASYBLOG_FEATURED_PAGE_TITLE'));
$this->setPageTitle($title, $pagination, $this->config->get('main_pagetitle_autoappend'));
// Get the current url
$return = EBR::_('index.php?option=com_easyblog', false);
$this->set('return', $return);
$this->set('posts', $posts);
$this->set('pagination', $pagination);
parent::display('blogs/featured/default');
}
示例2: download
/**
* Allows caller to import feeds
*
* @since 4.0
* @access public
*/
public function download()
{
// Get the id's from the request.
$id = $this->input->get('id', 0, 'int');
// Load the feed data
$feed = EB::table('Feed');
$feed->load($id);
if (!$id || !$feed->id) {
return $this->ajax->reject(JText::_('COM_EASYBLOG_FEEDS_INVALID_FEED_ID_PROVIDED'));
}
// Set this into processing mode first.
$feed->flag = true;
// $feed->store();
// Import the feed
$result = EB::feeds()->import($feed);
// Set the last import date
$feed->last_import = EB::date()->toSql();
// Reset the flag
$feed->flag = false;
// Store the feed item now
$feed->store();
return $this->ajax->resolve($result);
}
示例3: getRssLink
/**
* Retrieves rss link for the category
*
* @since 4.0
* @access public
* @param string
* @return
*/
public function getRssLink()
{
return EB::feeds()->getFeedURL('index.php?option=com_easyblog&view=categories&id=' . $this->id, false, 'category');
}
示例4:
<?php
}
?>
<?php
}
?>
<?php
if ($params->get('showrss', true)) {
?>
<div class="mod-small">
<a class="eb-brand-rss" title="<?php
echo JText::_('MOD_EASYBLOGCATEGORIES_SUBSCRIBE_FEEDS');
?>
" href="<?php
echo EB::feeds()->getFeedURL('index.php?option=com_easyblog&view=categories&id=' . $category->id, false, 'category');
?>
">
<i class="fa fa-rss-square"></i>
<?php
echo JText::_('MOD_EASYBLOGCATEGORIES_SUBSCRIBE_FEEDS');
?>
</a>
</div>
<?php
}
?>
</div>
</div>
</div>
示例5: header
// // Process scheduled posts
$result['scheduler_publish'] = EB::scheduler()->publish();
// // Process scheduled unpublish posts
$result['scheduler_unpublish'] = EB::scheduler()->unpublish();
// Process the garbage collector. Remove the records from #__easyblog_uploader_tmp which exceed 120 minutes.
$result['scheduler_remove_tmp_files'] = EB::scheduler()->removeTmpFiles();
// Process the garbage collector. Remove BLANK post from from #__easyblog_post which exceed 3 days.
$result['scheduler_remove_blank_posts'] = EB::scheduler()->removeBlankPosts();
// var_dump($result);exit;
header('Content-type: text/x-json; UTF-8');
echo json_encode(cronOutPut($result));
exit;
}
// If there's a task to execute cron feeds, execute it here
if ($task == 'cronfeed') {
$result['feeds'] = EB::feeds()->cron();
header('Content-type: text/x-json; UTF-8');
echo json_encode(cronOutPut($result));
exit;
}
function cronOutPut($results)
{
$output = array();
foreach ($results as $key => $data) {
$newdata = new stdClass();
$newdata->status = '';
$newdata->type = '';
$newdata->message = '';
if ($data instanceof EasyBlogException) {
$item = $data->toArray();
$newdata->status = $item['code'];
示例6:
<span class="eb-text"><?php
echo JText::_('COM_EASYBLOG_SUBSCRIPTION_UNSUBSCRIBE_TO_SITE');
?>
</span>
</a>
</li>
<?php
}
?>
<?php
if ($this->config->get('main_rss') && $this->acl->get('allow_subscription_rss')) {
?>
<li>
<a class="eb-brand-rss" href="<?php
echo EB::feeds()->getFeedURL('index.php?option=com_easyblog');
?>
"
data-original-title="<?php
echo JText::_('COM_EASYBLOG_SUBSCRIBE_FEEDS');
?>
"
data-placement="bottom"
data-eb-provide="tooltip"
>
<i class="fa fa-rss-square"></i>
<span class="eb-text"><?php
echo JText::_('COM_EASYBLOG_SUBSCRIBE_FEEDS');
?>
</span>
</a>
示例7: foreach
?>
<?php
if ($tags) {
?>
<div class="eb-tags-list clearfix">
<?php
foreach ($tags as $tag) {
?>
<div class="eb-tags-grid">
<div class="eb-tags-item">
<?php
if ($this->config->get('main_rss') && $this->params->get('tag_rss', true)) {
?>
<a href="<?php
echo EB::feeds()->getFeedURL('index.php?option=com_easyblog&view=tags&layout=tag&id=' . $tag->getAlias(), false, 'tag');
?>
">
<i class="fa fa-rss-square"></i>
</a>
<?php
}
?>
<a href="<?php
echo $tag->getPermalink();
?>
" title="<?php
echo $this->html('string.escape', $tag->title);
?>
">
示例8:
?>
</a>
</span>
<?php
}
?>
<?php
}
?>
<?php
if (($team->access != EBLOG_TEAMBLOG_ACCESS_MEMBER || $team->isMember || EB::isSiteAdmin()) && $this->config->get('main_rss')) {
?>
<span>
<a class="link-rss" href="<?php
echo EB::feeds()->getFeedURL('index.php?option=com_easyblog&view=teamblog&id=' . $team->id);
?>
" title="<?php
echo JText::_('COM_EASYBLOG_SUBSCRIBE_FEEDS');
?>
">
<?php
echo JText::_('COM_EASYBLOG_SUBSCRIBE_FEEDS');
?>
</a>
</span>
<?php
}
?>
示例9: getRssLink
/**
* Retrieves rss link for the category
*
* @since 4.0
* @access public
* @param string
* @return
*/
public function getRssLink()
{
$config = EB::config();
if ($config->get('main_feedburnerblogger')) {
$feedburner = EB::table('Feedburner');
$feedburner->load($this->id);
if (!empty($feedburner->url)) {
$rssLink = $feedburner->url;
return $rssLink;
}
}
return EB::feeds()->getFeedURL('index.php?option=com_easyblog&view=blogger&id=' . $this->id, false, true);
}
示例10:
<div class="joms-tab__content">
<div class="app-box" id="community-group-blogs">
<div class="app-box-content">
<div id="ezblog-body">
<ul class="blog-items reset-ul">
<?php
}
?>
<?php
if ($showRss) {
?>
<div class="blog-group-blog-rss">
<a href="<?php
echo EB::feeds()->getFeedURL('index.php?option=com_easyblog&view=latest');
?>
&group=<?php
echo $id;
?>
" class="subscribe-rss" target="_blank">
<?php
echo JText::_('GROUP_EASYBLOG_SUBSCRIBE_TO_RSS');
?>
</a>
</div>
<?php
}
?>