2015-04-25 19:25:03 +00:00
|
|
|
<?php
|
2021-09-11 09:56:57 +00:00
|
|
|
/**
|
|
|
|
* @brief zoneclearFeedServer, a plugin for Dotclear 2
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2021-09-11 09:56:57 +00:00
|
|
|
* @package Dotclear
|
|
|
|
* @subpackage Plugin
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2021-09-11 09:56:57 +00:00
|
|
|
* @author Jean-Christian Denis, BG, Pierre Van Glabeke
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2021-09-11 09:56:57 +00:00
|
|
|
* @copyright Jean-Christian Denis
|
|
|
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
*/
|
2015-04-25 19:25:03 +00:00
|
|
|
if (!defined('DC_RC_PATH')) {
|
2018-02-15 01:37:19 +00:00
|
|
|
return null;
|
2015-04-25 19:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Namespace for settings
|
2022-11-15 20:05:21 +00:00
|
|
|
dcCore::app()->blog->settings->addNamespace('zoneclearFeedServer');
|
|
|
|
$s = dcCore::app()->blog->settings->zoneclearFeedServer;
|
2015-04-25 19:25:03 +00:00
|
|
|
|
|
|
|
# Widgets
|
2022-11-15 20:05:21 +00:00
|
|
|
require_once __DIR__ . '/_widgets.php';
|
2015-04-25 19:25:03 +00:00
|
|
|
|
2022-11-15 20:05:21 +00:00
|
|
|
dcCore::app()->addBehavior('coreBlogGetPosts', ['zcfsPublicBehaviors', 'coreBlogGetPosts']);
|
2015-04-25 19:25:03 +00:00
|
|
|
|
|
|
|
if (!$s->zoneclearFeedServer_active) {
|
2021-09-11 09:56:57 +00:00
|
|
|
return null;
|
2015-04-25 19:25:03 +00:00
|
|
|
}
|
|
|
|
if (1 == $s->zoneclearFeedServer_bhv_pub_upd) {
|
2022-12-01 23:55:43 +00:00
|
|
|
dcCore::app()->addBehavior('publicBeforeDocumentV2', ['zcfsPublicBehaviors', 'publicDocumentV2']);
|
2021-09-12 20:35:57 +00:00
|
|
|
} elseif (2 == $s->zoneclearFeedServer_bhv_pub_upd) {
|
2022-12-01 23:55:43 +00:00
|
|
|
dcCore::app()->addBehavior('publicAfterDocumentV2', ['zcfsPublicBehaviors', 'publicAfterDocumentV2']);
|
2021-09-12 20:35:57 +00:00
|
|
|
} elseif (3 == $s->zoneclearFeedServer_bhv_pub_upd) {
|
2022-11-15 20:05:21 +00:00
|
|
|
dcCore::app()->addBehavior('publicHeadContent', ['zcfsPublicBehaviors', 'publicHeadContent']);
|
2015-04-25 19:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Take care about tweakurls (thanks Mathieu M.)
|
2022-11-15 20:05:21 +00:00
|
|
|
if (version_compare(dcCore::app()->plugins->moduleInfo('tweakurls', 'version'), '0.8', '>=')) {
|
|
|
|
dcCore::app()->addbehavior('zoneclearFeedServerAfterPostCreate', ['zoneclearFeedServer', 'tweakurlsAfterPostCreate']);
|
2015-04-25 19:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Register tempalte blocks
|
2021-09-12 20:35:57 +00:00
|
|
|
$tpl_blocks = [
|
2021-09-11 09:56:57 +00:00
|
|
|
'Feeds',
|
|
|
|
'FeedsFooter',
|
|
|
|
'FeedsHeader',
|
2022-11-15 20:05:21 +00:00
|
|
|
'FeedIf',
|
2021-09-12 20:35:57 +00:00
|
|
|
];
|
2021-11-06 15:30:19 +00:00
|
|
|
foreach ($tpl_blocks as $v) {
|
2022-11-15 20:05:21 +00:00
|
|
|
dcCore::app()->tpl->addBlock('zc' . $v, ['zcfsTemplate', $v]);
|
2015-04-25 19:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Register tempalte values
|
2021-09-12 20:35:57 +00:00
|
|
|
$tpl_values = [
|
2021-09-11 09:56:57 +00:00
|
|
|
'FeedsCount',
|
|
|
|
'FeedsEntriesCount',
|
|
|
|
'FeedEntriesCount',
|
|
|
|
'FeedCategory',
|
|
|
|
'FeedCategoryID',
|
|
|
|
'FeedCategoryURL',
|
|
|
|
'FeedCategoryShortURL',
|
|
|
|
'FeedID',
|
|
|
|
'FeedIfFirst',
|
|
|
|
'FeedIfOdd',
|
|
|
|
'FeedLang',
|
|
|
|
'FeedName',
|
|
|
|
'FeedOwner',
|
|
|
|
'FeedDesc',
|
|
|
|
'FeedSiteURL',
|
2022-11-15 20:05:21 +00:00
|
|
|
'FeedFeedURL',
|
2021-09-12 20:35:57 +00:00
|
|
|
];
|
2021-11-06 15:30:19 +00:00
|
|
|
foreach ($tpl_values as $v) {
|
2022-11-15 20:05:21 +00:00
|
|
|
dcCore::app()->tpl->addValue('zc' . $v, ['zcfsTemplate', $v]);
|
2015-04-25 19:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup DC_PLUGIN_ZONECLEARFEEDSERVER
|
|
|
|
* @brief Mix your blog with a feeds planet - public methods.
|
|
|
|
* @since 2.6
|
|
|
|
*/
|
|
|
|
class zcfsPublicBehaviors
|
|
|
|
{
|
2021-09-11 09:56:57 +00:00
|
|
|
/**
|
|
|
|
* Remember others post extension.
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2022-11-15 20:05:21 +00:00
|
|
|
* @param dcRecord $rs record instance
|
2021-09-11 09:56:57 +00:00
|
|
|
*/
|
2022-11-15 20:05:21 +00:00
|
|
|
public static function coreBlogGetPosts(dcRecord $rs)
|
2021-09-11 09:56:57 +00:00
|
|
|
{
|
|
|
|
$GLOBALS['beforeZcFeedRsExt'] = $rs->extensions();
|
|
|
|
$rs->extend('zcfsRsExtPosts');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update feeds after contents.
|
|
|
|
*/
|
2022-12-01 23:55:43 +00:00
|
|
|
public static function publicAfterDocumentV2()
|
2021-09-11 09:56:57 +00:00
|
|
|
{
|
|
|
|
# Limit feeds update to home page et feed page
|
|
|
|
# Like publishScheduledEntries
|
2022-11-15 20:05:21 +00:00
|
|
|
if (!in_array(dcCore::app()->url->type, ['default', 'feed'])) {
|
2021-09-11 09:56:57 +00:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2022-11-15 20:05:21 +00:00
|
|
|
self::publicDocument();
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Generic behavior for before and after public content.
|
|
|
|
*/
|
2022-12-01 23:55:43 +00:00
|
|
|
public static function publicDocumentV2()
|
2021-09-11 09:56:57 +00:00
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
$zc = new zoneclearFeedServer();
|
2021-09-11 09:56:57 +00:00
|
|
|
$zc->checkFeedsUpdate();
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update feeds by an Ajax request (background).
|
|
|
|
*/
|
2022-11-15 20:05:21 +00:00
|
|
|
public static function publicHeadContent()
|
2021-09-11 09:56:57 +00:00
|
|
|
{
|
|
|
|
# Limit update to home page
|
2022-11-15 20:05:21 +00:00
|
|
|
if (dcCore::app()->url->type != 'default') {
|
2021-09-11 09:56:57 +00:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
$blog_url = html::escapeJS(
|
2022-11-15 20:05:21 +00:00
|
|
|
dcCore::app()->blog->url .
|
|
|
|
dcCore::app()->url->getBase('zoneclearFeedsPage') .
|
2021-09-11 09:56:57 +00:00
|
|
|
'/zcfsupd'
|
|
|
|
);
|
2022-11-15 20:05:21 +00:00
|
|
|
$blog_id = html::escapeJS(dcCore::app()->blog->id);
|
2021-09-11 09:56:57 +00:00
|
|
|
|
|
|
|
echo
|
2021-09-12 20:35:57 +00:00
|
|
|
"\n<!-- JS for zoneclearFeedServer --> \n" .
|
2022-11-15 20:05:21 +00:00
|
|
|
dcUtils::jsLoad(dcCore::app()->blog->url . dcCore::app()->url->getBase('zoneclearFeedsPage') . '/zcfsupd.js') .
|
2021-09-12 20:35:57 +00:00
|
|
|
"<script type=\"text/javascript\"> \n//<![CDATA[\n" .
|
2021-11-06 15:30:19 +00:00
|
|
|
' $(function(){if(!document.getElementById){return;} ' .
|
2021-09-12 20:35:57 +00:00
|
|
|
" $('body').zoneclearFeedServer({blog_url:'" .
|
|
|
|
$blog_url . "',blog_id:'" . $blog_id . "'}); " .
|
|
|
|
" })\n" .
|
|
|
|
"//]]>\n</script>\n";
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
2015-04-25 19:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup DC_PLUGIN_ZONECLEARFEEDSERVER
|
|
|
|
* @brief Mix your blog with a feeds planet - rs methods.
|
|
|
|
* @since 2.6
|
|
|
|
*/
|
|
|
|
class zcfsRsExtPosts extends rsExtPost
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
public static function zc()
|
|
|
|
{
|
2022-11-30 20:53:04 +00:00
|
|
|
return new zoneclearFeedServer();
|
2022-11-15 20:05:21 +00:00
|
|
|
}
|
|
|
|
|
2021-09-11 09:56:57 +00:00
|
|
|
/**
|
|
|
|
* Get feed meta.
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2022-11-15 20:05:21 +00:00
|
|
|
* @param dcRecord $rs record instance
|
2021-09-11 09:56:57 +00:00
|
|
|
* @param string $info Feed info key
|
|
|
|
* @return string Feed info value
|
|
|
|
*/
|
|
|
|
public static function zcFeed($rs, $info)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
$meta = dcCore::app()->meta->getMetadata([
|
2021-09-12 20:35:57 +00:00
|
|
|
'post_id' => $rs->post_id,
|
|
|
|
'meta_type' => 'zoneclearfeed_' . $info,
|
2022-11-15 20:05:21 +00:00
|
|
|
'limit' => 1,
|
2021-09-12 20:35:57 +00:00
|
|
|
]);
|
2021-09-11 09:56:57 +00:00
|
|
|
|
|
|
|
return $meta->isEmpty() ? null : $meta->meta_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Call other rs extension.
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2021-09-11 09:56:57 +00:00
|
|
|
* @param string $type Type of extension
|
|
|
|
* @param array $args Arguments
|
|
|
|
* @return mixed record extension ressource
|
|
|
|
*/
|
|
|
|
public static function zcFeedBrother($type, $args)
|
|
|
|
{
|
|
|
|
if (!empty($GLOBALS['beforeZcFeedRsExt'][$type])) {
|
|
|
|
$func = $GLOBALS['beforeZcFeedRsExt'][$type];
|
2021-09-12 20:35:57 +00:00
|
|
|
} elseif (is_callable('rsExtPostPublic', $type)) {
|
|
|
|
$func = ['rsExtPostPublic', $type];
|
|
|
|
} else {
|
|
|
|
$func = ['rsExtPost', $type];
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return call_user_func_array($func, $args);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get author link from post to feed.
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2022-11-15 20:05:21 +00:00
|
|
|
* @param dcRecord $rs record instance
|
2021-09-11 09:56:57 +00:00
|
|
|
* @return string Author link
|
|
|
|
*/
|
2022-11-15 20:05:21 +00:00
|
|
|
public static function getAuthorLink(dcRecord $rs): string
|
2021-09-11 09:56:57 +00:00
|
|
|
{
|
2021-09-12 20:35:57 +00:00
|
|
|
$author = $rs->zcFeed('author');
|
|
|
|
$site = $rs->zcFeed('site');
|
2021-09-11 09:56:57 +00:00
|
|
|
$sitename = $rs->zcFeed('sitename');
|
|
|
|
|
2021-11-06 15:30:19 +00:00
|
|
|
return $author && $sitename ?
|
2021-09-12 20:35:57 +00:00
|
|
|
sprintf('%s (<a href="%s">%s</a>)', $author, $site, $sitename) :
|
|
|
|
self::zcFeedBrother('getAuthorLink', [&$rs]);
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get author CN from post to feed.
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2022-11-15 20:05:21 +00:00
|
|
|
* @param dcRecord $rs record instance
|
2021-09-11 09:56:57 +00:00
|
|
|
* @return string Author CN
|
|
|
|
*/
|
2022-11-15 20:05:21 +00:00
|
|
|
public static function getAuthorCN(dcRecord $rs): string
|
2021-09-11 09:56:57 +00:00
|
|
|
{
|
|
|
|
$author = $rs->zcFeed('author');
|
2021-11-06 15:30:19 +00:00
|
|
|
|
|
|
|
return $author ?
|
|
|
|
$author :
|
2021-09-12 20:35:57 +00:00
|
|
|
self::zcFeedBrother('getAuthorCN', [&$rs]);
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get post link from post to feed.
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2022-11-15 20:05:21 +00:00
|
|
|
* @param dcRecord $rs record instance
|
2021-09-11 09:56:57 +00:00
|
|
|
* @return string Post link
|
|
|
|
*/
|
2022-11-15 20:05:21 +00:00
|
|
|
public static function getURL(dcRecord $rs): string
|
2021-09-11 09:56:57 +00:00
|
|
|
{
|
2021-11-06 15:30:19 +00:00
|
|
|
$url = $rs->zcFeed('url');
|
2022-11-15 20:05:21 +00:00
|
|
|
$types = @unserialize(dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_post_title_redir);
|
|
|
|
$full = is_array($types) && in_array(dcCore::app()->url->type, $types);
|
2021-09-11 09:56:57 +00:00
|
|
|
|
2021-11-06 15:30:19 +00:00
|
|
|
return $url && $full ?
|
|
|
|
zoneclearFeedServer::absoluteURL($rs->zcFeed('site'), $url) :
|
2021-09-12 20:35:57 +00:00
|
|
|
self::zcFeedBrother('getURL', [&$rs]);
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get post content from post to feed.
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2021-09-11 09:56:57 +00:00
|
|
|
* @param record $rs record instance
|
|
|
|
* @return string Post content
|
|
|
|
*/
|
2022-11-15 20:05:21 +00:00
|
|
|
public static function getContent(dcRecord $rs, bool $absolute_urls = false): string
|
2021-09-11 09:56:57 +00:00
|
|
|
{
|
2021-11-06 15:30:19 +00:00
|
|
|
$url = $rs->zcFeed('url');
|
2021-09-11 09:56:57 +00:00
|
|
|
$sitename = $rs->zcFeed('sitename');
|
2021-11-06 15:30:19 +00:00
|
|
|
$content = self::zcFeedBrother('getContent', [&$rs, $absolute_urls]);
|
2021-09-11 09:56:57 +00:00
|
|
|
|
|
|
|
if ($url && $sitename && $rs->post_type == 'post') {
|
2022-11-15 20:05:21 +00:00
|
|
|
$types = @unserialize(dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_post_full_tpl);
|
2021-09-11 09:56:57 +00:00
|
|
|
|
2022-11-15 20:05:21 +00:00
|
|
|
if (is_array($types) && in_array(dcCore::app()->url->type, $types)) {
|
2021-11-06 15:30:19 +00:00
|
|
|
return $content . sprintf(
|
2021-09-12 20:35:57 +00:00
|
|
|
'<p class="zoneclear-original"><em>%s</em></p>',
|
|
|
|
sprintf(__('Original post on <a href="%s">%s</a>'), $url, $sitename)
|
|
|
|
);
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
2021-11-06 15:30:19 +00:00
|
|
|
$content = context::remove_html($content);
|
|
|
|
$content = context::cut_string($content, 350);
|
|
|
|
$content = html::escapeHTML($content);
|
|
|
|
|
|
|
|
return sprintf(
|
|
|
|
'<p>%s... <em><a href="%s" title="%s">%s</a></em></p>',
|
|
|
|
$content,
|
|
|
|
self::getURL($rs),
|
|
|
|
__('Read more details about this feed'),
|
|
|
|
__('Continue reading')
|
|
|
|
);
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
2021-11-06 15:30:19 +00:00
|
|
|
|
|
|
|
return $content;
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
2015-04-25 19:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup DC_PLUGIN_ZONECLEARFEEDSERVER
|
|
|
|
* @brief Mix your blog with a feeds planet - url handler methods.
|
|
|
|
* @since 2.6
|
|
|
|
*/
|
|
|
|
class zcfsUrlHandler extends dcUrlHandlers
|
|
|
|
{
|
2021-09-11 09:56:57 +00:00
|
|
|
/**
|
|
|
|
* Feeds source page and update methods.
|
2021-11-06 15:30:19 +00:00
|
|
|
*
|
2021-09-11 09:56:57 +00:00
|
|
|
* @param array $args Page arguments
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public static function zcFeedsPage($args)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
$s = dcCore::app()->blog->settings->zoneclearFeedServer;
|
2021-09-11 09:56:57 +00:00
|
|
|
|
|
|
|
# Not active
|
|
|
|
if (!$s->zoneclearFeedServer_active) {
|
|
|
|
self::p404();
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Update feeds (from ajax or other post resquest)
|
2021-09-12 20:35:57 +00:00
|
|
|
if ($args == '/zcfsupd' && 3 == $s->zoneclearFeedServer_bhv_pub_upd) {
|
2021-09-11 09:56:57 +00:00
|
|
|
$msg = '';
|
2022-11-15 20:05:21 +00:00
|
|
|
if (!empty($_POST['blogId']) && html::escapeJS(dcCore::app()->blog->id) == $_POST['blogId']) {
|
2021-09-11 09:56:57 +00:00
|
|
|
try {
|
2022-11-15 20:05:21 +00:00
|
|
|
$zc = new zoneclearFeedServer();
|
2021-09-11 09:56:57 +00:00
|
|
|
if ($zc->checkFeedsUpdate()) {
|
2021-09-12 20:35:57 +00:00
|
|
|
$msg = sprintf(
|
2021-11-06 15:30:19 +00:00
|
|
|
'<status>%s</status><message>s%</message>',
|
|
|
|
'ok',
|
2021-09-12 20:35:57 +00:00
|
|
|
'Feeds updated successfully'
|
|
|
|
);
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
2021-11-06 15:30:19 +00:00
|
|
|
} catch (Exception $e) {
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (empty($msg)) {
|
2021-09-12 20:35:57 +00:00
|
|
|
$msg = sprintf(
|
2021-11-06 15:30:19 +00:00
|
|
|
'<status>%s</status><message>s%</message>',
|
|
|
|
'failed',
|
2021-09-12 20:35:57 +00:00
|
|
|
'Failed to update feeds'
|
|
|
|
);
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
header('Content-Type: application/xml; charset=UTF-8');
|
2021-11-06 15:30:19 +00:00
|
|
|
echo
|
|
|
|
'<?xml version="1.0" encoding="utf-8"?> ' . "\n" .
|
2021-09-12 20:35:57 +00:00
|
|
|
'<response><rsp>' . "\n" .
|
|
|
|
$msg . "\n" .
|
2021-09-11 09:56:57 +00:00
|
|
|
'</rsp></response>';
|
|
|
|
|
|
|
|
exit(1);
|
2021-09-12 20:35:57 +00:00
|
|
|
|
2021-09-11 09:56:57 +00:00
|
|
|
# Server js
|
2021-09-12 20:35:57 +00:00
|
|
|
} elseif ($args == '/zcfsupd.js' && 3 == $s->zoneclearFeedServer_bhv_pub_upd) {
|
2022-11-15 20:05:21 +00:00
|
|
|
dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), __DIR__ . '/default-templates');
|
2021-09-11 09:56:57 +00:00
|
|
|
self::serveDocument(
|
|
|
|
'zcfsupd.js',
|
|
|
|
'text/javascript',
|
|
|
|
false,
|
|
|
|
false
|
|
|
|
);
|
2021-09-12 20:35:57 +00:00
|
|
|
|
2021-09-11 09:56:57 +00:00
|
|
|
# Server feeds description page
|
2021-09-12 20:35:57 +00:00
|
|
|
} elseif (in_array($args, ['', '/']) && $s->zoneclearFeedServer_pub_active) {
|
2022-11-15 20:05:21 +00:00
|
|
|
$tplset = dcCore::app()->themes->moduleInfo(dcCore::app()->blog->settings->system->theme, 'tplset');
|
|
|
|
$path = __DIR__ . '/default-templates/';
|
2021-09-12 20:35:57 +00:00
|
|
|
if (!empty($tplset) && is_dir($path . $tplset)) {
|
2022-11-15 20:05:21 +00:00
|
|
|
dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), $path . $tplset);
|
2021-09-12 20:35:57 +00:00
|
|
|
} else {
|
2022-11-15 20:05:21 +00:00
|
|
|
dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), $path . DC_DEFAULT_TPLSET);
|
2021-09-12 20:35:57 +00:00
|
|
|
}
|
2021-09-11 09:56:57 +00:00
|
|
|
self::serveDocument('zcfeeds.html');
|
|
|
|
}
|
|
|
|
# Unknow
|
|
|
|
else {
|
|
|
|
self::p404();
|
|
|
|
}
|
2015-04-25 19:25:03 +00:00
|
|
|
|
2021-09-11 09:56:57 +00:00
|
|
|
return null;
|
|
|
|
}
|
2015-04-25 19:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup DC_PLUGIN_ZONECLEARFEEDSERVER
|
|
|
|
* @brief Mix your blog with a feeds planet - template methods.
|
|
|
|
* @since 2.6
|
|
|
|
*/
|
|
|
|
class zcfsTemplate
|
|
|
|
{
|
2021-09-11 09:56:57 +00:00
|
|
|
public static function Feeds($a, $c)
|
|
|
|
{
|
|
|
|
$lastn = -1;
|
2021-11-06 15:30:19 +00:00
|
|
|
$p = '';
|
2021-09-11 09:56:57 +00:00
|
|
|
if (isset($a['lastn'])) {
|
2021-11-06 15:30:19 +00:00
|
|
|
$lastn = abs((int) $a['lastn']) + 0;
|
2021-09-12 20:35:57 +00:00
|
|
|
$p .= "\$zcfs_params['limit'] = " . $lastn . ";\n";
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
if (isset($a['cat_id'])) {
|
2021-09-12 20:35:57 +00:00
|
|
|
$p .= "@\$zcfs_params['sql'] .= 'AND Z.cat_id = " . addslashes($a['cat_id']) . " ';\n";
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
if (isset($a['no_category'])) {
|
|
|
|
$p .= "@\$zcfs_params['sql'] .= 'AND Z.cat_id IS NULL ';\n";
|
|
|
|
}
|
|
|
|
if (!empty($a['site_url'])) {
|
2021-09-12 20:35:57 +00:00
|
|
|
$p .= "\$zcfs_params['feed_url'] = '" . addslashes($a['site_url']) . "';\n";
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
if (isset($a['feed_status'])) {
|
2021-11-06 15:30:19 +00:00
|
|
|
$p .= "\$zcfs_params['feed_status'] = " . ((int) $a['feed_status']) . ";\n";
|
2021-09-12 20:35:57 +00:00
|
|
|
} else {
|
2021-09-11 09:56:57 +00:00
|
|
|
$p .= "\$zcfs_params['feed_status'] = 1;\n";
|
|
|
|
}
|
|
|
|
if (!empty($a['feed_url'])) {
|
2021-09-12 20:35:57 +00:00
|
|
|
$p .= "\$zcfs_params['feed_feed'] = '" . addslashes($a['feed_url']) . "';\n";
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
if (isset($a['feed_owner'])) {
|
2021-09-12 20:35:57 +00:00
|
|
|
$p .= "@\$zcfs_params['sql'] .= \"AND Z.feed_owner = '" . addslashes($a['author']) . "' \";\n";
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$sortby = 'feed_creadt';
|
2021-11-06 15:30:19 +00:00
|
|
|
$order = 'desc';
|
2021-09-11 09:56:57 +00:00
|
|
|
if (isset($a['sortby'])) {
|
|
|
|
switch ($a['sortby']) {
|
2021-11-06 15:30:19 +00:00
|
|
|
case 'name': $sortby = 'lowername';
|
|
|
|
|
2022-11-15 20:05:21 +00:00
|
|
|
break;
|
2021-11-06 15:30:19 +00:00
|
|
|
case 'owner': $sortby = 'feed_owner';
|
|
|
|
|
2022-11-15 20:05:21 +00:00
|
|
|
break;
|
2021-11-06 15:30:19 +00:00
|
|
|
case 'date': $sortby = 'feed_dt';
|
|
|
|
|
2022-11-15 20:05:21 +00:00
|
|
|
break;
|
2021-11-06 15:30:19 +00:00
|
|
|
case 'update': $sortby = 'feed_upddt';
|
|
|
|
|
2022-11-15 20:05:21 +00:00
|
|
|
break;
|
2021-11-06 15:30:19 +00:00
|
|
|
case 'id': $sortby = 'feed_id';
|
|
|
|
|
2022-11-15 20:05:21 +00:00
|
|
|
break;
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
}
|
2021-09-12 20:35:57 +00:00
|
|
|
if (isset($a['order']) && preg_match('/^(desc|asc)$/i', $a['order'])) {
|
2021-09-11 09:56:57 +00:00
|
|
|
$order = $a['order'];
|
|
|
|
}
|
2021-11-06 15:30:19 +00:00
|
|
|
$p .= "\$zcfs_params['order'] = '" . $sortby . ' ' . $order . "';\n";
|
2021-09-11 09:56:57 +00:00
|
|
|
|
2021-11-06 15:30:19 +00:00
|
|
|
return
|
2021-09-12 20:35:57 +00:00
|
|
|
'<?php ' . $p .
|
2022-11-15 20:05:21 +00:00
|
|
|
'dcCore::app()->ctx->feeds_params = $zcfs_params;' . "\n" .
|
|
|
|
'$zcfs = new zoneclearFeedServer();' . "\n" .
|
|
|
|
'dcCore::app()->ctx->feeds = $zcfs->getFeeds($zcfs_params); unset($zcfs_params,$zcfs);' . "\n" .
|
2021-09-12 20:35:57 +00:00
|
|
|
"?>\n" .
|
2022-11-15 20:05:21 +00:00
|
|
|
'<?php while (dcCore::app()->ctx->feeds->fetch()) : ?>' . $c . '<?php endwhile; ' .
|
|
|
|
'dcCore::app()->ctx->feeds = null; dcCore::app()->ctx->feeds_params = null; ?>';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
2021-09-12 20:35:57 +00:00
|
|
|
public static function FeedIf($a, $c)
|
2021-09-11 09:56:57 +00:00
|
|
|
{
|
2021-09-12 20:35:57 +00:00
|
|
|
$if = [];
|
2021-09-11 09:56:57 +00:00
|
|
|
|
|
|
|
$operator = isset($a['operator']) ? self::getOperator($a['operator']) : '&&';
|
|
|
|
|
|
|
|
if (isset($a['type'])) {
|
|
|
|
$type = trim($a['type']);
|
|
|
|
$type = !empty($type) ? $type : 'feed';
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = 'dcCore::app()->ctx->feeds->feed_type == "' . addslashes($type) . '"';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
if (isset($a['site_url'])) {
|
|
|
|
$url = trim($a['feed_url']);
|
|
|
|
if (substr($url, 0, 1) == '!') {
|
2021-11-06 15:30:19 +00:00
|
|
|
$url = substr($url, 1);
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = 'dcCore::app()->ctx->feeds->feed_url != "' . addslashes($url) . '"';
|
2021-09-12 20:35:57 +00:00
|
|
|
} else {
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = 'dcCore::app()->ctx->feeds->feed_url == "' . addslashes($url) . '"';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isset($a['feed_url'])) {
|
|
|
|
$url = trim($a['feed_feed']);
|
|
|
|
if (substr($url, 0, 1) == '!') {
|
2021-11-06 15:30:19 +00:00
|
|
|
$url = substr($url, 1);
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = 'dcCore::app()->ctx->feeds->feed_feed != "' . addslashes($url) . '"';
|
2021-09-12 20:35:57 +00:00
|
|
|
} else {
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = 'dcCore::app()->ctx->feeds->feed_feed == "' . addslashes($url) . '"';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isset($a['category'])) {
|
|
|
|
$category = addslashes(trim($a['category']));
|
|
|
|
if (substr($category, 0, 1) == '!') {
|
|
|
|
$category = substr($category, 1);
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = '(dcCore::app()->ctx->feeds->cat_url != "' . $category . '")';
|
2021-09-12 20:35:57 +00:00
|
|
|
} else {
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = '(dcCore::app()->ctx->feeds->cat_url == "' . $category . '")';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isset($a['first'])) {
|
2021-11-06 15:30:19 +00:00
|
|
|
$sign = (bool) $a['first'] ? '=' : '!';
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = 'dcCore::app()->ctx->feeds->index() ' . $sign . '= 0';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
if (isset($a['odd'])) {
|
2021-11-06 15:30:19 +00:00
|
|
|
$sign = (bool) $a['odd'] ? '=' : '!';
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = '(dcCore::app()->ctx->feeds->index()+1)%2 ' . $sign . ' = 1';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
if (isset($a['has_category'])) {
|
2021-11-06 15:30:19 +00:00
|
|
|
$sign = (bool) $a['has_category'] ? '' : '!';
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = $sign . 'dcCore::app()->ctx->feeds->cat_id';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
if (isset($a['has_description'])) {
|
2021-11-06 15:30:19 +00:00
|
|
|
$sign = (bool) $a['has_description'] ? '' : '!';
|
2022-11-15 20:05:21 +00:00
|
|
|
$if[] = $sign . 'dcCore::app()->ctx->feeds->feed_desc';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return empty($if) ?
|
2021-11-06 15:30:19 +00:00
|
|
|
$c :
|
2021-09-12 20:35:57 +00:00
|
|
|
'<?php if(' . implode(' ' . $operator . ' ', $if) . ') : ?>' . $c . '<?php endif; ?>';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedIfFirst($a)
|
|
|
|
{
|
2021-11-06 15:30:19 +00:00
|
|
|
$ret = $a['return'] ?? 'first';
|
2021-09-11 09:56:57 +00:00
|
|
|
$ret = html::escapeHTML($ret);
|
|
|
|
|
|
|
|
return
|
2022-11-15 20:05:21 +00:00
|
|
|
'<?php if (dcCore::app()->ctx->feeds->index() == 0) { ' .
|
2021-09-12 20:35:57 +00:00
|
|
|
"echo '" . addslashes($ret) . "'; } ?>";
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedIfOdd($a)
|
|
|
|
{
|
2021-11-06 15:30:19 +00:00
|
|
|
$ret = $a['return'] ?? 'odd';
|
2021-09-11 09:56:57 +00:00
|
|
|
$ret = html::escapeHTML($ret);
|
|
|
|
|
|
|
|
return
|
2022-11-15 20:05:21 +00:00
|
|
|
'<?php if ((dcCore::app()->ctx->feeds->index()+1)%2 == 1) { ' .
|
2021-09-12 20:35:57 +00:00
|
|
|
"echo '" . addslashes($ret) . "'; } ?>";
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedDesc($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return self::getValue($a, 'dcCore::app()->ctx->feeds->feed_desc');
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedOwner($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return self::getValue($a, 'dcCore::app()->ctx->feeds->feed_owner');
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedCategory($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return self::getValue($a, 'dcCore::app()->ctx->feeds->cat_title');
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedCategoryID($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return self::getValue($a, 'dcCore::app()->ctx->feeds->cat_id');
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedCategoryURL($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return self::getValue($a, 'dcCore::app()->blog->url.dcCore::app()->url->getBase(\'category\').\'/\'.html::sanitizeURL(dcCore::app()->ctx->feeds->cat_url)');
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedCategoryShortURL($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return self::getValue($a, 'dcCore::app()->ctx->feeds->cat_url');
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedID($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return self::getValue($a, 'dcCore::app()->ctx->feeds->feed_id');
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedLang($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
$f = dcCore::app()->tpl->getFilters($a);
|
2021-09-11 09:56:57 +00:00
|
|
|
|
|
|
|
return empty($a['full']) ?
|
2022-11-15 20:05:21 +00:00
|
|
|
'<?php echo ' . sprintf($f, 'dcCore::app()->ctx->feeds->feed_lang') . '; ?>' :
|
|
|
|
'<?php $langs = l10n::getISOcodes(); if (isset($langs[dcCore::app()->ctx->feeds->feed_lang])) { echo ' .
|
|
|
|
sprintf($f, '$langs[dcCore::app()->ctx->feeds->feed_lang]') . '; } else { echo ' .
|
|
|
|
sprintf($f, 'dcCore::app()->ctx->feeds->feed_lang') . '; } unset($langs); ?>';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedName($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return self::getValue($a, 'dcCore::app()->ctx->feeds->feed_name');
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedSiteURL($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return self::getValue($a, 'dcCore::app()->ctx->feeds->feed_url');
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedFeedURL($a)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return self::getValue($a, 'dcCore::app()->ctx->feeds->feed_feed');
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedsHeader($a, $c)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return '<?php if (dcCore::app()->ctx->feeds->isStart()) : ?>' . $c . '<?php endif; ?>';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedsFooter($a, $c)
|
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return '<?php if (dcCore::app()->ctx->feeds->isEnd()) : ?>' . $c . '<?php endif; ?>';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedsCount($a)
|
|
|
|
{
|
|
|
|
$none = 'no sources';
|
2021-11-06 15:30:19 +00:00
|
|
|
$one = 'one source';
|
2021-09-11 09:56:57 +00:00
|
|
|
$more = '%d sources';
|
|
|
|
|
|
|
|
if (isset($a['none'])) {
|
|
|
|
$none = addslashes($a['none']);
|
|
|
|
}
|
|
|
|
if (isset($a['one'])) {
|
|
|
|
$one = addslashes($a['one']);
|
|
|
|
}
|
|
|
|
if (isset($a['more'])) {
|
|
|
|
$more = addslashes($a['more']);
|
|
|
|
}
|
|
|
|
|
|
|
|
return
|
2022-11-15 20:05:21 +00:00
|
|
|
"<?php \$fcount = dcCore::app()->ctx->feeds->count(); \n" .
|
2021-09-12 20:35:57 +00:00
|
|
|
"if (\$fcount == 0) {\n" .
|
|
|
|
" printf(__('" . $none . "'),\$fcount);\n" .
|
|
|
|
"} elseif (\$fcount == 1) {\n" .
|
|
|
|
" printf(__('" . $one . "'),\$fcount);\n" .
|
|
|
|
"} else {\n" .
|
|
|
|
" printf(__('" . $more . "'),\$fcount);\n" .
|
2021-11-06 15:30:19 +00:00
|
|
|
'} unset($fcount); ?>';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedsEntriesCount($a)
|
|
|
|
{
|
|
|
|
$none = __('no entries');
|
2021-11-06 15:30:19 +00:00
|
|
|
$one = __('one entry');
|
2021-09-11 09:56:57 +00:00
|
|
|
$more = __('%d entries');
|
|
|
|
|
|
|
|
if (isset($a['none'])) {
|
|
|
|
$none = addslashes($a['none']);
|
|
|
|
}
|
|
|
|
if (isset($a['one'])) {
|
|
|
|
$one = addslashes($a['one']);
|
|
|
|
}
|
|
|
|
if (isset($a['more'])) {
|
|
|
|
$more = addslashes($a['more']);
|
|
|
|
}
|
|
|
|
|
|
|
|
return
|
2022-11-15 20:05:21 +00:00
|
|
|
"<?php \$fcount = 0; \n" .
|
|
|
|
'$zc = new zoneclearFeedServer();' . "\n" .
|
|
|
|
"\$allfeeds = \$zc->getFeeds(); \n" .
|
2021-09-12 20:35:57 +00:00
|
|
|
"if (!\$allfeeds->isEmpty()) { \n" .
|
2021-11-06 15:30:19 +00:00
|
|
|
' while ($allfeeds->fetch()) { ' .
|
2022-11-15 20:05:21 +00:00
|
|
|
" \$fcount += (integer) \$zc->getPostsByFeed(array('feed_id'=>\$allfeeds->feed_id),true)->f(0); " .
|
2021-09-12 20:35:57 +00:00
|
|
|
" } \n" .
|
|
|
|
"} \n" .
|
|
|
|
"if (\$fcount == 0) {\n" .
|
|
|
|
" printf(__('" . $none . "'),\$fcount);\n" .
|
|
|
|
"} elseif (\$fcount == 1) {\n" .
|
|
|
|
" printf(__('" . $one . "'),\$fcount);\n" .
|
|
|
|
"} else {\n" .
|
|
|
|
" printf(__('" . $more . "'),\$fcount);\n" .
|
2021-11-06 15:30:19 +00:00
|
|
|
'} unset($allfeeds,$fcount); ?>';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function FeedEntriesCount($a)
|
|
|
|
{
|
|
|
|
$none = 'no entries';
|
2021-11-06 15:30:19 +00:00
|
|
|
$one = 'one entry';
|
2021-09-11 09:56:57 +00:00
|
|
|
$more = '%d entries';
|
|
|
|
|
|
|
|
if (isset($a['none'])) {
|
|
|
|
$none = addslashes($a['none']);
|
|
|
|
}
|
|
|
|
if (isset($a['one'])) {
|
|
|
|
$one = addslashes($a['one']);
|
|
|
|
}
|
|
|
|
if (isset($a['more'])) {
|
|
|
|
$more = addslashes($a['more']);
|
|
|
|
}
|
|
|
|
|
|
|
|
return
|
2022-11-15 20:05:21 +00:00
|
|
|
"<?php \$zcfs = new zoneclearFeedServer(); \n" .
|
|
|
|
"\$fcount = \$zc->getPostsByFeed(array('feed_id'=>dcCore::app()->ctx->feeds->feed_id),true)->f(0); \n" .
|
2021-09-12 20:35:57 +00:00
|
|
|
"if (\$fcount == 0) {\n" .
|
|
|
|
" printf(__('" . $none . "'),\$fcount);\n" .
|
|
|
|
"} elseif (\$fcount == 1) {\n" .
|
|
|
|
" printf(__('" . $one . "'),\$fcount);\n" .
|
|
|
|
"} else {\n" .
|
|
|
|
" printf(__('" . $more . "'),\$fcount);\n" .
|
2021-11-06 15:30:19 +00:00
|
|
|
'} unset($fcount); ?>';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
2021-09-12 20:35:57 +00:00
|
|
|
protected static function getValue($a, $v)
|
2021-09-11 09:56:57 +00:00
|
|
|
{
|
2022-11-15 20:05:21 +00:00
|
|
|
return '<?php echo ' . sprintf(dcCore::app()->tpl->getFilters($a), $v) . '; ?>';
|
2021-09-11 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected static function getOperator($op)
|
|
|
|
{
|
2021-11-06 15:30:19 +00:00
|
|
|
switch (strtolower($op)) {
|
2021-09-11 09:56:57 +00:00
|
|
|
case 'or':
|
|
|
|
case '||':
|
|
|
|
return '||';
|
|
|
|
case 'and':
|
|
|
|
case '&&':
|
|
|
|
default:
|
|
|
|
return '&&';
|
|
|
|
}
|
|
|
|
}
|
2015-07-19 23:17:56 +00:00
|
|
|
}
|
|
|
|
|
2022-11-15 20:05:21 +00:00
|
|
|
dcCore::app()->addBehavior('publicBreadcrumb', ['extZcfeeds', 'publicBreadcrumb']);
|
2015-07-19 23:17:56 +00:00
|
|
|
|
|
|
|
class extZcfeeds
|
|
|
|
{
|
2021-09-12 20:35:57 +00:00
|
|
|
public static function publicBreadcrumb($context, $separator)
|
2015-07-19 23:17:56 +00:00
|
|
|
{
|
|
|
|
if ($context == 'zoneclearFeedsPage') {
|
|
|
|
return __('List of feeds');
|
|
|
|
}
|
|
|
|
}
|
2021-11-06 15:30:19 +00:00
|
|
|
}
|