php-mpos/public/include/pages/news.inc.php
Sebastian Grewe bb55001db7 [ADDED] ACL to hide news post author
This will allow admins to hide the actual username/author from their newsposts.
Useful if you don't wish to give your admin account away or in case you
have no admin-only account.
2013-12-07 22:30:27 +01:00

23 lines
582 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
// Include markdown library
use \Michelf\Markdown;
// Fetch active news to display
$aNews = $news->getAllActive();
if (is_array($aNews)) {
foreach ($aNews as $key => $aData) {
// Transform Markdown content to HTML
$aNews[$key]['content'] = Markdown::defaultTransform($aData['content']);
}
}
// Tempalte specifics
$smarty->assign("HIDEAUTHOR", $settings->getValue('acl_hide_news_author'));
$smarty->assign("NEWS", $aNews);
$smarty->assign("CONTENT", "default.tpl");
?>