1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

New shortcode added on News view page: {NEWS_AUTHOR_REALNAME}

Tagcloud menu can now be sorted via shortcode parms. eg. {MENU: path=tagcloud&order=tag,asc&limit=20}
Animate.css library loading example added to bootstrap5/theme.xml
This commit is contained in:
Cameron
2021-06-12 16:18:51 -07:00
parent f561c5920b
commit aa6e449aee
6 changed files with 47 additions and 7 deletions

View File

@@ -1167,7 +1167,7 @@ class news_front
else
{*/
$query = "
SELECT n.*, u.user_id, u.user_name, u.user_customtitle, u.user_image, nc.category_id, nc.category_name, nc.category_sef, nc.category_icon, nc.category_meta_keywords,
SELECT n.*, u.user_id, u.user_name, u.user_customtitle, u.user_image, u.user_login, nc.category_id, nc.category_name, nc.category_sef, nc.category_icon, nc.category_meta_keywords,
nc.category_meta_description
FROM #news AS n
LEFT JOIN #user AS u ON n.news_author = u.user_id

View File

@@ -18,6 +18,11 @@ if (!e107::isInstalled('tagcloud'))
return '';
}
/**
* @example {MENU: path=tagcloud&order=size,desc}
* @example {MENU: path=tagcloud&order=tag,asc&limit=20}
*/
require_once('tagcloud_class.php');
@@ -40,6 +45,11 @@ if(!class_exists('tagcloud_menu'))
$cloud = new TagCloud();
$sql = e107::getDb();
if(is_string($parm))
{
parse_str($parm,$parm);
}
e107::getCache()->setMD5(e_LANGUAGE);
if ($text = e107::getCache()->retrieve('tagcloud', 5, false))
@@ -86,10 +96,25 @@ if(!class_exists('tagcloud_menu'))
return $text;
});
$cloud->setOrder('size', 'DESC');
if(!empty($parm['order']))
{
list($o1,$o2) = explode(',', $parm['order']);
$cloud->setOrder($o1, strtoupper($o2));
}
else
{
$cloud->setOrder('size', 'DESC');
}
$limit = !empty($parm['tagcloud_limit']) ? intval($parm['tagcloud_limit']) : 50;
if(!empty($parm['limit']))
{
$limit = (int) $parm['limit'];
}
$cloud->setLimit($limit);
$text = $cloud->render();